![JAR search and dependency download from the Maven repository](/logo.png)
edu.berkeley.nlp.mapper.MapWorkerFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of berkeleyparser Show documentation
Show all versions of berkeleyparser Show documentation
The Berkeley parser analyzes the grammatical structure of natural language using probabilistic context-free grammars (PCFGs).
The newest version!
package edu.berkeley.nlp.mapper;
import java.util.List;
public interface MapWorkerFactory- {
public MapWorker
- newMapWorker();
public static class DefaultFactory
- implements MapWorkerFactory
- {
private Class c;
public DefaultFactory(Class c) {
this.c = c;
}
public MapWorker
- newMapWorker() {
// TODO Auto-generated method stub
try {
Object o = c.newInstance();
return (MapWorker
- ) o;
} catch (Exception e) {
e.printStackTrace();
}
throw new RuntimeException();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy