public class ChineseGrammaticalStructure extends GrammaticalStructure
Modifier and Type | Class and Description |
---|---|
static class |
ChineseGrammaticalStructure.FromDependenciesFactory |
GrammaticalStructure.Extras
allTypedDependencies, CoNLLX_FieldCount, CoNLLX_GovField, CoNLLX_POSField, CoNLLX_RelnField, CoNLLX_WordField, puncFilter, 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) |
static java.util.List<GrammaticalStructure> |
readCoNLLXGrammaticalStructureCollection(java.lang.String fileName) |
addEnhancements, allTypedDependencies, buildCoNLLXGrammaticalStructure, collapseDependenciesTree, correctDependencies, extraTreeDepFilter, fromStringReps, getExtras, getGrammaticalRelation, getGrammaticalRelation, getRoots, getTreeDeps, isConnected, postProcessDependencies, readCoNLLXGrammaticalStructureCollection, root, toString, typedDependencies, typedDependencies, typedDependencies, typedDependenciesCCprocessed, typedDependenciesCCprocessed, typedDependenciesCCprocessed, typedDependenciesCollapsed, typedDependenciesCollapsed, typedDependenciesCollapsed, typedDependenciesCollapsedTree, typedDependenciesEnhanced, typedDependenciesEnhancedPlusPlus
public 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)
GrammaticalStructure
Collection<TypedDependency>
to collapse
language-dependent transitive dependencies.
collapseDependencies
in class GrammaticalStructure
list
- A list of dependencies to process for possible collapsingCCprocess
- apply CC process?public static void main(java.lang.String[] args)
public static java.util.List<GrammaticalStructure> readCoNLLXGrammaticalStructureCollection(java.lang.String fileName) throws java.io.IOException
java.io.IOException
public static ChineseGrammaticalStructure buildCoNLLXGrammaticalStructure(java.util.List<java.util.List<java.lang.String>> tokenFields)