edu.stanford.nlp.parser.lexparser
Class Options

java.lang.Object
  extended by edu.stanford.nlp.parser.lexparser.Options
All Implemented Interfaces:
Serializable

public class Options
extends Object
implements Serializable

Options to the parser which MUST be the SAME at both training and testing (parsing) time in order for the parser to work properly.

See Also:
Serialized Form

Nested Class Summary
static class Options.LexOptions
           
 
Field Summary
 boolean coarseDistance
          Use coarser distance (4 bins) in dependency calculations
 boolean dcTags
          "double count" tags rewrites as word in PCFG and Dep parser.
 boolean directional
          Whether dependency grammar considers left/right direction.
 boolean distance
          Use distance bins in the dependency calculations
 boolean doDep
          Do a dependency parse of the sentence.
 boolean doPCFG
          Do a PCFG parse of the sentence.
 boolean flexiTag
           
 boolean forceCNF
          Forces parsing with strictly CNF grammar -- unary chains are converted to XP&YP symbols and back
 boolean freeDependencies
          if true, any child can be the head (seems rather bad!)
 boolean genStop
           
 Options.LexOptions lexOptions
           
 boolean nodePrune
          If true, inside the factored parser, remove any node from the final chosen tree which improves the PCFG score.
 int numStates
           
 int numTags
           
 int numWords
           
 TreebankLangParserParams tlpParams
          The treebank-specific parser parameters to use.
 
Constructor Summary
Options()
           
Options(TreebankLangParserParams tlpParams)
           
 
Method Summary
 void display()
           
 TreebankLanguagePack langpack()
          returns the treebank language pack for the treebank the parser is trained on.
 void readData(BufferedReader in)
          Populates data in this Options from the character stream given by the Reader r.
 void writeData(Writer w)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

numWords

public int numWords

numTags

public int numTags

numStates

public int numStates

lexOptions

public Options.LexOptions lexOptions

tlpParams

public TreebankLangParserParams tlpParams
The treebank-specific parser parameters to use.


forceCNF

public boolean forceCNF
Forces parsing with strictly CNF grammar -- unary chains are converted to XP&YP symbols and back


doPCFG

public boolean doPCFG
Do a PCFG parse of the sentence. If both variables are on, also do a combined parse of the sentence.


doDep

public boolean doDep
Do a dependency parse of the sentence.


freeDependencies

public boolean freeDependencies
if true, any child can be the head (seems rather bad!)


directional

public boolean directional
Whether dependency grammar considers left/right direction. Good.


genStop

public boolean genStop

distance

public boolean distance
Use distance bins in the dependency calculations


coarseDistance

public boolean coarseDistance
Use coarser distance (4 bins) in dependency calculations


flexiTag

public boolean flexiTag

dcTags

public boolean dcTags
"double count" tags rewrites as word in PCFG and Dep parser. Good for combined parsing only (it used to not kick in for PCFG parsing). This option is only used at Test time, but it is now in Options, so the correct choice for a grammar is recorded by a serialized parser.


nodePrune

public boolean nodePrune
If true, inside the factored parser, remove any node from the final chosen tree which improves the PCFG score. This was added as the dependency factor tends to encourage 'deep' trees.

Constructor Detail

Options

public Options()

Options

public Options(TreebankLangParserParams tlpParams)
Method Detail

langpack

public TreebankLanguagePack langpack()
returns the treebank language pack for the treebank the parser is trained on.


display

public void display()

writeData

public void writeData(Writer w)
               throws IOException
Throws:
IOException

readData

public void readData(BufferedReader in)
              throws IOException
Populates data in this Options from the character stream given by the Reader r.

Throws:
IOException


Stanford NLP Group