edu.stanford.nlp.parser.lexparser
Class AbstractTreeExtractor<T>
java.lang.Object
edu.stanford.nlp.parser.lexparser.AbstractTreeExtractor<T>
- All Implemented Interfaces:
- Extractor<T>
- Direct Known Subclasses:
- BinaryGrammarExtractor, MLEDependencyGrammarExtractor
public abstract class AbstractTreeExtractor<T>
- extends Object
- implements Extractor<T>
An abstract superclass for parser classes that extract counts from Trees.
- Author:
- grenager, Sarah Spikes (sdspikes@cs.stanford.edu) - cleanup and filling in types
Field Summary |
protected double |
weight
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
weight
protected double weight
AbstractTreeExtractor
public AbstractTreeExtractor()
tallyLeaf
protected void tallyLeaf(Tree lt)
tallyPreTerminal
protected void tallyPreTerminal(Tree lt)
tallyInternalNode
protected void tallyInternalNode(Tree lt)
tallyRoot
protected void tallyRoot(Tree lt)
formResult
public T formResult()
tallyLocalTree
protected void tallyLocalTree(Tree lt)
tallyTree
public void tallyTree(Tree t)
tallyTrees
protected void tallyTrees(Collection<Tree> trees)
tallyTreeIterator
protected void tallyTreeIterator(Iterator<Tree> treeIterator,
Function<Tree,Tree> f)
extract
public T extract()
extract
public T extract(Collection<Tree> treeList)
- Specified by:
extract
in interface Extractor<T>
extract
public T extract(Collection<Tree> trees1,
Collection<Tree> trees2,
double weight)
extract
public T extract(Iterator<Tree> treeIterator,
Function<Tree,Tree> f)
- Specified by:
extract
in interface Extractor<T>
Stanford NLP Group