edu.stanford.nlp.parser.lexparser
Class Test

java.lang.Object
  extended by edu.stanford.nlp.parser.lexparser.Test

public class Test
extends Object

Options to the parser which affect performance only at testing (parsing) time.


Nested Class Summary
static class Test.Constraint
           
 
Field Summary
static List<Test.Constraint> constraints
          When you want to force the parse to parse a particular subsequence into a particular state.
static double depWeight
          Weighting on dependency log probs
static boolean doRecovery
           
static boolean evalb
          Write EvalB-readable output files.
static boolean exhaustiveTest
           
static boolean forceTags
          Parse using only tags given from correct answer or the POS tagger
static boolean increasingLength
          Parse trees in test treebank in order of increasing length.
static boolean iterativeCKY
          If true, use faster iterative deepening CKY algorithm.
static boolean lengthNormalization
          Turns on normalizing scores for sentence length.
static int MAX_ITEMS
          The maximum number of edges and hooks combined that the factored parser will build before giving up.
static int maxLength
          The maximum sentence length (including punctuation, etc.) to parse.
static int maxSpanForTags
          The largest span to consider for word-hood.
static boolean noRecoveryTagging
          If false, then failure of the PCFG factor to parse a sentence will trigger parse recovery mode, in which more flexible tagging is allowed.
static String outputFormat
          Determines format of output trees: choose among penn, oneline
static String outputFormatOptions
           
static boolean pcfgThreshold
           
static double pcfgThresholdValue
           
static boolean preTag
          Tag the sentences first, then parse given those (coarse) tags.
static boolean printAllBestParses
          Print out all best PCFG parses.
static boolean prunePunc
           
static double unseenSmooth
          The amount of smoothing put in (as an m-estimate) for unknown words.
static boolean useN5
          If true, the n^4 "speed-up" is not used.
static boolean verbose
          Print a lot of extra output as you parse.
static boolean writeOutputFiles
          If true, write files parsed to a new file with the same name except for an added ".stp" extension.
 
Constructor Summary
Test()
           
 
Method Summary
static void display()
           
static TreePrint treePrint(TreebankLangParserParams tlpParams)
          Determines method for print trees on output.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

noRecoveryTagging

public static boolean noRecoveryTagging
If false, then failure of the PCFG factor to parse a sentence will trigger parse recovery mode, in which more flexible tagging is allowed. False by default. Use option -noRecoveryTagging to set to true.


doRecovery

public static boolean doRecovery

useN5

public static boolean useN5
If true, the n^4 "speed-up" is not used.


iterativeCKY

public static boolean iterativeCKY
If true, use faster iterative deepening CKY algorithm.


maxLength

public static int maxLength
The maximum sentence length (including punctuation, etc.) to parse.


MAX_ITEMS

public static int MAX_ITEMS
The maximum number of edges and hooks combined that the factored parser will build before giving up. This number should probably be relative to the sentence length parsed. In general, though, if the parser cannot parse a sentence after this much work then there is no good parse consistent between the PCFG and Dependency parsers. (Normally, depending on other flags), the parser will then just return the best PCFG parse.)


unseenSmooth

public static double unseenSmooth
The amount of smoothing put in (as an m-estimate) for unknown words. If negative, set by the code in the lexicon class.


increasingLength

public static boolean increasingLength
Parse trees in test treebank in order of increasing length.


preTag

public static boolean preTag
Tag the sentences first, then parse given those (coarse) tags.


forceTags

public static boolean forceTags
Parse using only tags given from correct answer or the POS tagger


evalb

public static boolean evalb
Write EvalB-readable output files.


verbose

public static boolean verbose
Print a lot of extra output as you parse.


exhaustiveTest

public static final boolean exhaustiveTest
See Also:
Constant Field Values

pcfgThreshold

public static final boolean pcfgThreshold
See Also:
Constant Field Values

pcfgThresholdValue

public static final double pcfgThresholdValue
See Also:
Constant Field Values

printAllBestParses

public static boolean printAllBestParses
Print out all best PCFG parses.


depWeight

public static double depWeight
Weighting on dependency log probs


prunePunc

public static boolean prunePunc

outputFormat

public static String outputFormat
Determines format of output trees: choose among penn, oneline


outputFormatOptions

public static String outputFormatOptions

writeOutputFiles

public static boolean writeOutputFiles
If true, write files parsed to a new file with the same name except for an added ".stp" extension.


maxSpanForTags

public static int maxSpanForTags
The largest span to consider for word-hood. Used for parsing unsegmented Chinese text and parsing lattices. Keep it at 1 unless you know what you're doing.


lengthNormalization

public static boolean lengthNormalization
Turns on normalizing scores for sentence length. Makes no difference (except decreased efficiency) unless maxSpanForTags is greater than one. Works only for PCFG (so far).


constraints

public static List<Test.Constraint> constraints
When you want to force the parse to parse a particular subsequence into a particular state. Parses will only be made where there is a constituent over the given span which matches (as regular expression) the state Pattern given.

Constructor Detail

Test

public Test()
Method Detail

treePrint

public static TreePrint treePrint(TreebankLangParserParams tlpParams)
Determines method for print trees on output.


display

public static void display()


Stanford NLP Group