edu.stanford.nlp.trees.international.pennchinese
Class ChineseGrammaticalStructure
java.lang.Object
edu.stanford.nlp.trees.TreeGraph
edu.stanford.nlp.trees.GrammaticalStructure
edu.stanford.nlp.trees.international.pennchinese.ChineseGrammaticalStructure
- All Implemented Interfaces:
- Serializable
public class ChineseGrammaticalStructure
- extends GrammaticalStructure
A GrammaticalStructure for Chinese.
- Author:
- Galen Andrew, Pi-Chuan Chang
- See Also:
- Serialized Form
Fields inherited from class edu.stanford.nlp.trees.TreeGraph |
root |
Method Summary |
protected void |
collapseDependencies(List<TypedDependency> list,
boolean CCprocess)
Destructively modify the Collection<TypedDependency> to collapse
language-dependent transitive dependencies. |
static void |
main(String[] args)
Just for testing. |
Methods inherited from class edu.stanford.nlp.trees.GrammaticalStructure |
allTypedDependencies, collapseDependenciesTree, correctDependencies, dependencies, getDependencyPath, getDependencyPath, getDependents, getGovernor, getGrammaticalRelation, getGrammaticalRelation, getListGrammaticalRelation, getNodeInRelation, getRoots, isConnected, toString, typedDependencies, typedDependencies, typedDependenciesCCprocessed, typedDependenciesCollapsed, typedDependenciesCollapsed, typedDependenciesCollapsedTree |
ChineseGrammaticalStructure
public ChineseGrammaticalStructure(Tree t)
- Construct a new
GrammaticalStructure
from an
existing parse tree. The new GrammaticalStructure
has the same tree structure and label values as the given tree
(but no shared storage). As part of construction, the parse tree
is analyzed using definitions from GrammaticalRelation
to populate the new
GrammaticalStructure
with as many labeled
grammatical relations as it can.
ChineseGrammaticalStructure
public ChineseGrammaticalStructure(Tree t,
Filter<String> puncFilter)
ChineseGrammaticalStructure
public ChineseGrammaticalStructure(Tree t,
HeadFinder hf)
ChineseGrammaticalStructure
public ChineseGrammaticalStructure(Tree t,
Filter<String> puncFilter,
HeadFinder hf)
collapseDependencies
protected void collapseDependencies(List<TypedDependency> list,
boolean CCprocess)
- Description copied from class:
GrammaticalStructure
- Destructively modify the
Collection<TypedDependency>
to collapse
language-dependent transitive dependencies.
Default is no-op; to be over-ridden in subclasses.
- Overrides:
collapseDependencies
in class GrammaticalStructure
- Parameters:
list
- A list of dependencies to process for possible collapsingCCprocess
- apply CC process?
main
public static void main(String[] args)
- Just for testing.
Usage:
java edu.stanford.nlp.trees.ChineseGrammaticalStructure -treeFile [treeFile]
java ChineseGrammaticalStructure -sentFile [sentenceFile]
- Parameters:
args
- Command line args as above
Stanford NLP Group