|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--edu.stanford.nlp.parser.lexparser.LexicalizedParser
A reasonably good lexicalized pcfg parser. It does a combination of plain PCFG parsing, and lexicalized dependency parsing, unless asked otherwise. Note that this requires a lot of memory to run. Try -mx1500m.
| Constructor Summary | |
LexicalizedParser(String treebankPath)
Construct a new LexicalizedParser. |
|
LexicalizedParser(String treebankPath,
FileFilter filt)
Construct a new LexicalizedParser. |
|
LexicalizedParser(String treebankPath,
FileFilter filt,
int maxLeng)
Construct a new LexicalizedParser. |
|
| Method Summary | |
Tree |
getBestParse()
Returns a best parse of the last sentence on which parse was called, or null if none exist. |
static void |
main(String[] args)
A simple test main program. |
void |
parse(List sentence)
Parse a sentence |
boolean |
parse(Sentence sentence)
Parses the given sentence. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public LexicalizedParser(String treebankPath)
treebankPath - a String value
public LexicalizedParser(String treebankPath,
FileFilter filt)
treebankPath - a String valuefilt - a FileFilter value
public LexicalizedParser(String treebankPath,
FileFilter filt,
int maxLeng)
treebankPath - a String valuefilt - a FileFilter valuemaxLeng - The maximum length sentences to be able to parser.
A large value for this requires a great deal of memory (and
time) for parsing, but allows parsing longer sentences.| Method Detail |
public boolean parse(Sentence sentence)
Parser
parse in interface Parsersentence - a Sentence value
public void parse(List sentence)
IllegalArgumentExceptionpublic Tree getBestParse()
ViterbiParser
getBestParse in interface ViterbiParserpublic static void main(String[] args)
java edu.stanford.nlp.parser.lexparser.LexicalizedParser
trainFilesPath [start stop [testFilePath [start stop [maxLeng]]]]
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||