use of edu.illinois.cs.cogcomp.edison.utilities.FramesManager in project cogcomp-nlp by CogComp.
the class PathLSTMHandler method initialize.
@Override
public void initialize(ResourceManager rm) {
try {
// TODO: move the end-point url to the resource configurator
Datastore ds = new Datastore("http://smaug.cs.illinois.edu:8080");
File lemmaModel = ds.getFile("org.cogcomp.mate-tools", "CoNLL2009-ST-English-ALL.anna.lemmatizer.model", 3.3, false);
File parserModel = ds.getFile("org.cogcomp.mate-tools", "CoNLL2009-ST-English-ALL.anna.parser.model", 3.3, false);
File posModel = ds.getFile("org.cogcomp.mate-tools", "CoNLL2009-ST-English-ALL.anna.postagger.model", 3.3, false);
File pathLSTM = ds.getFile("uk.ac.ed.inf", "pathLSTM.model", 1.0, false);
// SRL pipeline options (currently hard-coded)
String[] args = new String[] { "eng", "-lemma", lemmaModel.getAbsolutePath(), "-parser", parserModel.getAbsolutePath(), "-tagger", posModel.getAbsolutePath(), "-srl", pathLSTM.getAbsolutePath(), "-reranker", "-externalNNs" };
CompletePipelineCMDLineOptions options = new CompletePipelineCMDLineOptions();
options.parseCmdLineArgs(args);
try {
SRLpipeline = CompletePipeline.getCompletePipeline(options);
} catch (ClassNotFoundException | IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
} catch (DatastoreException e) {
e.printStackTrace();
}
try {
this.propBankManager = new FramesManager(true);
this.nomBankManager = new FramesManager(false);
} catch (InvalidPortException | InvalidEndpointException | DatastoreException e) {
e.printStackTrace();
}
}
Aggregations