edu.stanford.nlp.parser.lexparser
Class MLEDependencyGrammarExtractor

java.lang.Object
  extended by edu.stanford.nlp.parser.lexparser.AbstractTreeExtractor<DependencyGrammar>
      extended by edu.stanford.nlp.parser.lexparser.MLEDependencyGrammarExtractor
All Implemented Interfaces:
Extractor<DependencyGrammar>

public class MLEDependencyGrammarExtractor
extends AbstractTreeExtractor<DependencyGrammar>

Gathers statistics on tree dependencies and then passes them to an MLEDependencyGrammar for dependency grammar construction.

Author:
Dan Klein

Field Summary
protected  boolean basicCategoryTagsInDependencyGrammar
          Whether basic category tags are in the dependency grammar.
protected  ClassicCounter<IntDependency> dependencyCounter
          This is where all dependencies are stored (using full tag space).
protected  boolean directional
          Whether left and right is distinguished.
protected  Index<String> tagIndex
           
protected  TreebankLangParserParams tlpParams
           
protected  boolean useCoarseDistance
          Whether dependent distance is distinguished more coarsely.
protected  boolean useDistance
          Whether dependent distance from head is distinguished.
protected  Index<String> wordIndex
           
 
Fields inherited from class edu.stanford.nlp.parser.lexparser.AbstractTreeExtractor
op
 
Constructor Summary
MLEDependencyGrammarExtractor(Options op, Index<String> wordIndex, Index<String> tagIndex)
           
 
Method Summary
 DependencyGrammar formResult()
           
protected  void tallyRoot(Tree lt, double weight)
           
 
Methods inherited from class edu.stanford.nlp.parser.lexparser.AbstractTreeExtractor
extract, extract, extract, extract, extract, tallyInternalNode, tallyLeaf, tallyLocalTree, tallyPreTerminal, tallyTree, tallyTreeIterator, tallyTrees
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

wordIndex

protected final Index<String> wordIndex

tagIndex

protected final Index<String> tagIndex

dependencyCounter

protected ClassicCounter<IntDependency> dependencyCounter
This is where all dependencies are stored (using full tag space).


tlpParams

protected TreebankLangParserParams tlpParams

directional

protected boolean directional
Whether left and right is distinguished.


useDistance

protected boolean useDistance
Whether dependent distance from head is distinguished.


useCoarseDistance

protected boolean useCoarseDistance
Whether dependent distance is distinguished more coarsely.


basicCategoryTagsInDependencyGrammar

protected final boolean basicCategoryTagsInDependencyGrammar
Whether basic category tags are in the dependency grammar.

Constructor Detail

MLEDependencyGrammarExtractor

public MLEDependencyGrammarExtractor(Options op,
                                     Index<String> wordIndex,
                                     Index<String> tagIndex)
Method Detail

tallyRoot

protected void tallyRoot(Tree lt,
                         double weight)
Overrides:
tallyRoot in class AbstractTreeExtractor<DependencyGrammar>

formResult

public DependencyGrammar formResult()
Overrides:
formResult in class AbstractTreeExtractor<DependencyGrammar>


Stanford NLP Group