public class RelationDependentsDirectFactory
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private edu.stanford.nlp.trees.HeadFinder |
headFinder |
private StanfordRelationModel |
relationModel
Relation model
|
| Constructor and Description |
|---|
RelationDependentsDirectFactory(StanfordRelationModel relationModel,
Language language0) |
| Modifier and Type | Method and Description |
|---|---|
private void |
build(edu.stanford.nlp.trees.Tree tree,
ARelationDependents artifact)
Build relation dependents
|
private java.util.List<RelationDependent> |
getRelationDependents(edu.stanford.nlp.trees.GrammaticalRelation relation,
edu.stanford.nlp.trees.TreeGraphNode tree,
edu.stanford.nlp.trees.TreeGraphNode rootTree)
Analyze tree for a given grammatical relation
|
private void |
getRelationDependents(edu.stanford.nlp.trees.GrammaticalRelation grammaticalRelation,
edu.stanford.nlp.trees.TreeGraphNode tree,
edu.stanford.nlp.trees.TreeGraphNode rootTree,
java.util.List<RelationDependent> list)
Analyze sentence (recursive)
|
ARelationDependents |
make(edu.stanford.nlp.trees.Tree tree)
Make relation dependents from parse tree
|
private static RelationDependent |
makeRelationDependent(edu.stanford.nlp.trees.GrammaticalRelation relation,
edu.stanford.nlp.trees.Tree tree,
edu.stanford.nlp.trees.Tree head)
Make relation dependent
|
private static java.util.List<Segment> |
treeToSegments(edu.stanford.nlp.trees.Tree tree)
Tree to segments
|
private final StanfordRelationModel relationModel
private edu.stanford.nlp.trees.HeadFinder headFinder
public RelationDependentsDirectFactory(StanfordRelationModel relationModel, Language language0)
public ARelationDependents make(edu.stanford.nlp.trees.Tree tree)
tree - parse treeprivate void build(edu.stanford.nlp.trees.Tree tree,
ARelationDependents artifact)
tree - parse treeartifact - artifactprivate java.util.List<RelationDependent> getRelationDependents(edu.stanford.nlp.trees.GrammaticalRelation relation, edu.stanford.nlp.trees.TreeGraphNode tree, edu.stanford.nlp.trees.TreeGraphNode rootTree)
relation - the targeted grammatical relationtree - the parsed subtree to analyzerootTree - the root tree above the parsed subtree to analyzeprivate void getRelationDependents(edu.stanford.nlp.trees.GrammaticalRelation grammaticalRelation,
edu.stanford.nlp.trees.TreeGraphNode tree,
edu.stanford.nlp.trees.TreeGraphNode rootTree,
java.util.List<RelationDependent> list)
grammaticalRelation - the targeted grammatical relationtree - the parsed subtree to analyzerootTree - the root tree above the parsed subtree to analyzelist - the list accumulation resultsprivate static java.util.List<Segment> treeToSegments(edu.stanford.nlp.trees.Tree tree)
tree - treeprivate static RelationDependent makeRelationDependent(edu.stanford.nlp.trees.GrammaticalRelation relation, edu.stanford.nlp.trees.Tree tree, edu.stanford.nlp.trees.Tree head)
relation - grammatical relationtree - target treehead - its head