public class ChineseGrammaticalStructure extends GrammaticalStructure
| Modifier and Type | Class and Description |
|---|---|
static class |
ChineseGrammaticalStructure.FromDependenciesFactory |
GrammaticalStructure.ExtrasallTypedDependencies, CoNLLX_FieldCount, CoNLLX_GovField, CoNLLX_POSField, CoNLLX_RelnField, CoNLLX_WordField, DEFAULT_PARSER_FILE, puncFilter, root, tagFilter, typedDependencies| Constructor and Description |
|---|
ChineseGrammaticalStructure(java.util.List<TypedDependency> projectiveDependencies,
TreeGraphNode root)
Used for postprocessing CoNLL X dependencies
|
ChineseGrammaticalStructure(Tree t)
Construct a new
GrammaticalStructure from an
existing parse tree. |
ChineseGrammaticalStructure(Tree t,
HeadFinder hf) |
ChineseGrammaticalStructure(Tree t,
java.util.function.Predicate<java.lang.String> puncFilter) |
ChineseGrammaticalStructure(Tree t,
java.util.function.Predicate<java.lang.String> puncFilter,
HeadFinder hf) |
| Modifier and Type | Method and Description |
|---|---|
static ChineseGrammaticalStructure |
buildCoNLLXGrammaticalStructure(java.util.List<java.util.List<java.lang.String>> tokenFields) |
protected void |
collapseDependencies(java.util.List<TypedDependency> list,
boolean CCprocess,
GrammaticalStructure.Extras includeExtras)
Destructively modify the
Collection<TypedDependency> to collapse
language-dependent transitive dependencies. |
static void |
main(java.lang.String[] args)
Tests generation of Chinese grammatical relations from a file.
|
static java.util.List<GrammaticalStructure> |
readCoNLLXGrammaticalStructureCollection(java.lang.String fileName) |
allTypedDependencies, buildCoNLLXGrammaticalStructure, collapseDependenciesTree, correctDependencies, dependenciesToCoNLLXString, dependenciesToCoNLLXString, dependenciesToString, extraTreeDepFilter, fromStringReps, getExtras, getGrammaticalRelation, getGrammaticalRelation, getRoots, getTreeDeps, isConnected, postProcessDependencies, printDependencies, readCoNLLXGrammaticalStructureCollection, root, toString, typedDependencies, typedDependencies, typedDependencies, typedDependenciesCCprocessed, typedDependenciesCCprocessed, typedDependenciesCCprocessed, typedDependenciesCollapsed, typedDependenciesCollapsed, typedDependenciesCollapsed, typedDependenciesCollapsedTreepublic ChineseGrammaticalStructure(Tree t)
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.t - Tree to processpublic ChineseGrammaticalStructure(Tree t, java.util.function.Predicate<java.lang.String> puncFilter)
public ChineseGrammaticalStructure(Tree t, HeadFinder hf)
public ChineseGrammaticalStructure(Tree t, java.util.function.Predicate<java.lang.String> puncFilter, HeadFinder hf)
public ChineseGrammaticalStructure(java.util.List<TypedDependency> projectiveDependencies, TreeGraphNode root)
protected void collapseDependencies(java.util.List<TypedDependency> list, boolean CCprocess, GrammaticalStructure.Extras includeExtras)
GrammaticalStructureCollection<TypedDependency> to collapse
language-dependent transitive dependencies.
Default is no-op; to be over-ridden in subclasses.collapseDependencies in class GrammaticalStructurelist - A list of dependencies to process for possible collapsingCCprocess - apply CC process?public static void main(java.lang.String[] args)
java edu.stanford.nlp.trees.international.pennchinese.ChineseGrammaticalStructure -treeFile [treeFile]
java edu.stanford.nlp.trees.international.pennchinese.ChineseGrammaticalStructure -sentFile [sentenceFile] args - Command line args as abovepublic static java.util.List<GrammaticalStructure> readCoNLLXGrammaticalStructureCollection(java.lang.String fileName) throws java.io.IOException
java.io.IOExceptionpublic static ChineseGrammaticalStructure buildCoNLLXGrammaticalStructure(java.util.List<java.util.List<java.lang.String>> tokenFields)