edu.stanford.nlp.lexgram
Class ExtractPTBRules
java.lang.Object
|
+--edu.stanford.nlp.lexgram.ExtractPTBRules
- public class ExtractPTBRules
- extends Object
Extract a SimpleLexicon
and a SimpleGrammar
from Penn Treebank files.
Method Summary |
static void |
main(String[] args)
This standalone program will build a lexicon and a grammar from a
collection of Penn Treebank sentences. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
main
public static void main(String[] args)
throws IOException,
FileNotFoundException
- This standalone program will build a lexicon and a grammar from a
collection of Penn Treebank sentences. These can then be used with the
ChartParser. Usage:
java edu.stanford.nlp.lexgram.ExtractPTBRules mrg/wsj lex gram
[TreeReaderFactory] [startnum] [endnum]
If a TreeReaderFactory class is not specified, a default internal
TreeReaderFactory is used. This one will produce grammars compatible
with the default factory for the ChartParser.
The parameters startnum and endnum serve to specify a number range of
Penn Treebank files to train on (e.g., 200 2199).
- Parameters:
args
- Command line arguments as above
IOException
FileNotFoundException
Stanford NLP Group