It specifies the maximum memory available to the Java VM to be 1.5 GB. You may want to adjust this if you're working on a machine with less memory or if you find your VM running out of memory.
The Treebank class doesn't permit this. You can use MemoryTreebank, which allows modifications.
Your code should compile against LexicalizedParser and instantiate an instance of it, not make a system call and invoke the java interpreter. Your class should have a main method and will take some arguments on the command line. Please remember to list the actual commands you ran in your README file.
Unlikely. You can just construct your Treebanks from a file, modifying the makeTreebank() code appropriately when you copy it into your class.
Nothing. Get rid of it. You're training your own parsers in this assignment. If necessary, you can make your own serialized parser to save some training time.
For Homework 3, you will likely need to make very few if any modifications to the Stanford parser. However, you will create a separate set of classes that interact with the parser, primarily through the
LexicalizedParser class. Begin by reading the JavaDoc for that class and package overview JavaDoc for
edu.stanford.nlp.parser.lexparser. They are included in the Stanford parser distribution under the
Here are some tips to help you get started:
Optionsobject as follows:
Options op = new Options(); op.doDep = false; op.doPCFG = true; op.setOptions("-goodPCFG", "-evals", "tsv");You will pass it in to the
EvaluateTreebankto your own class. You can make use of
testOnTreebank()directly or modify it to more easily access the scores you are interested in.