edu.stanford.nlp.parser.oldparser
Class PCFGParse
java.lang.Object
|
+--edu.stanford.nlp.parser.oldparser.PCFGParse
- public class PCFGParse
- extends Object
A class for running a PCFG chart parser over sentences.
Also supports parsing down to tags only.
This file now illustrates good practice in running the ChartParser.
Usage: java PCFGParse parsedfiles lexicon grammar [TreeReaderFactory]
[start stop short long [evalb.gld evalb.tst]]
The parsedfiles are normally Penn treebank format files.
The lexicon and grammar are a Lexicon and Grammar, perhaps made with
ExtractPTBRules. If the lexicon cannot be opened, for example if you
specify a non-file like "-", then tags are supplied to the
parser. Parsing is then equivalent to parsing down to a list of tags,
but the words are preserved in the tree.
The TreeReaderFactory is an optional instance of the TreeReaderFactory
interface. If not supplied, or if you specify a non-class like "-",
a default TreeReaderFactory is used (custom one that comes with class).
Method Summary |
static void |
main(String[] args)
Runs the PCFG parser. |
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)
- Runs the PCFG parser.
- Parameters:
args
- command list -- see class for argument documentation
Stanford NLP Group