public class MSTParserWrapperImpl extends Object implements MSTParserWrapper, org.apache.uima.resource.SharedResourceObject
| Modifier and Type | Field and Description |
|---|---|
static String |
COMPONENT_ID |
| Constructor and Description |
|---|
MSTParserWrapperImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
load(org.apache.uima.resource.DataResource resource) |
DependencyParser |
loadModel()
Load the parser model and to set up some parameters.
|
String |
predict(DependencyParser parser,
String inputSentence)
Let the parser parse the input sentence and then return the parsed sentence.
|
public static final String COMPONENT_ID
public DependencyParser loadModel()
loadModel in interface MSTParserWrappermodelFilename - String which specifies the path to the model filetemporaryPath - String which specifies the path to the directory where temporary files will be storedprojective - Boolean which determines whether the dependency relations are projectiveformat - String which specifies the format of test sentences (allowed values: MST, CONLL)Exceptionpublic String predict(DependencyParser parser, String inputSentence) throws IOException
predict in interface MSTParserWrapperparser - - DependencyParser which will be parsing the input sentenceinputSentence - - String which specifies the sentence to be parsed by the parserIOExceptionpublic void load(org.apache.uima.resource.DataResource resource)
throws org.apache.uima.resource.ResourceInitializationException
load in interface org.apache.uima.resource.SharedResourceObjectorg.apache.uima.resource.ResourceInitializationExceptionCopyright © 2016 JULIE Lab Jena, Germany. All rights reserved.