|
MaltParser 1.4.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.maltparser.MaltParserService
public class MaltParserService
The purpose of MaltParserService is to easily write third-party programs that uses MaltParser. There are two ways to call the MaltParserService: 1. By running experiments, which allow other programs to train a parser model or parse with a parser model. IO-handling is done by MaltParser. 2. By first initialize a parser model and then call the method parse() with an array of tokens that MaltParser parses. IO-handling of the sentence is done by the third-party program. How to use MaltParserService, please see the examples provided in the directory 'examples/apiexamples/srcex'
Constructor Summary | |
---|---|
MaltParserService()
Creates a MaltParserService with the option container 0 |
|
MaltParserService(int optionContainer)
Creates a MaltParserService with the specified option container. |
Method Summary | |
---|---|
static String |
getMaltJarPath()
Returns the path of malt.jar file |
int |
getOptionContainer()
Returns the option container index |
void |
initializeParserModel(String commandLine)
Initialize a parser model that later can by used to parse sentences. |
DependencyStructure |
parse(String[] tokens)
Parses an array of tokens and returns a dependency structure. |
void |
runExperiment(String commandLine)
Runs a MaltParser experiment. |
void |
terminateParserModel()
Terminates the parser model. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MaltParserService() throws MaltChainedException
MaltChainedException
public MaltParserService(int optionContainer) throws MaltChainedException
optionContainer
- an integer from 0 to max value of data type Integer
MaltChainedException
Method Detail |
---|
public void runExperiment(String commandLine) throws MaltChainedException
commandLine
- a commandLine string that controls the MaltParser.
MaltChainedException
public void initializeParserModel(String commandLine) throws MaltChainedException
commandLine
- a commandLine string that controls the MaltParser
MaltChainedException
public DependencyStructure parse(String[] tokens) throws MaltChainedException
tokens
- an array of tokens
MaltChainedException
public void terminateParserModel() throws MaltChainedException
MaltChainedException
public int getOptionContainer()
public static String getMaltJarPath()
|
MaltParser 1.4.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |