public class StanfordRelationModel
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
StanfordRelationModel.IRelationProcessor<T>
Process GrammaticalRelation
|
class |
StanfordRelationModel.Walker<T>
Walks GrammaticalRelation tree
|
| Modifier and Type | Field and Description |
|---|---|
private java.util.Map<edu.stanford.nlp.trees.GrammaticalRelation,java.util.List<edu.stanford.nlp.trees.GrammaticalRelation>> |
children
Children map
|
Language |
language
Language
|
edu.stanford.nlp.trees.GrammaticalRelation[] |
relations
Relation array
|
edu.stanford.nlp.trees.GrammaticalRelation |
root
Root relation
|
| Constructor and Description |
|---|
StanfordRelationModel(edu.stanford.nlp.trees.GrammaticalRelation root,
java.util.List<edu.stanford.nlp.trees.GrammaticalRelation> relations,
Language language)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
java.util.List<edu.stanford.nlp.trees.GrammaticalRelation> |
getChildren(edu.stanford.nlp.trees.GrammaticalRelation relation)
Get this relation's parent
|
edu.stanford.nlp.trees.GrammaticalRelation |
getParent(edu.stanford.nlp.trees.GrammaticalRelation relation)
Get this relation's children
|
static java.lang.String |
getTreeAncestorsNames(edu.stanford.nlp.trees.GrammaticalRelation grammaticalRelation,
boolean down,
boolean displayLongName)
Get up lineage (parents to root)
|
static java.lang.String |
getTreeName(edu.stanford.nlp.trees.GrammaticalRelation grammaticalRelation,
boolean down,
boolean displayLongName)
Get tree name (this node with appended lineage)
|
static void |
main(java.lang.String[] args)
Dump model tree
|
private static java.util.Map<edu.stanford.nlp.trees.GrammaticalRelation,java.util.List<edu.stanford.nlp.trees.GrammaticalRelation>> |
makeChildren(java.util.List<edu.stanford.nlp.trees.GrammaticalRelation> relations)
Build children map
|
static StanfordRelationModel |
makeChineseModel()
Make Chinese model
|
private static StanfordRelationModel |
makeDefaultModel()
Make default model
|
static StanfordRelationModel |
makeEnglishModel()
Make English model
|
static StanfordRelationModel |
makeModel(Language language)
Make model
|
static StanfordRelationModel |
makeUniversalEnglishModel()
Make UniversalEnglish model
|
public final edu.stanford.nlp.trees.GrammaticalRelation root
public final edu.stanford.nlp.trees.GrammaticalRelation[] relations
private final java.util.Map<edu.stanford.nlp.trees.GrammaticalRelation,java.util.List<edu.stanford.nlp.trees.GrammaticalRelation>> children
public final Language language
public StanfordRelationModel(edu.stanford.nlp.trees.GrammaticalRelation root,
java.util.List<edu.stanford.nlp.trees.GrammaticalRelation> relations,
Language language)
root - root relationrelations - relation listlanguage - languageprivate static java.util.Map<edu.stanford.nlp.trees.GrammaticalRelation,java.util.List<edu.stanford.nlp.trees.GrammaticalRelation>> makeChildren(java.util.List<edu.stanford.nlp.trees.GrammaticalRelation> relations)
relations - set of relationspublic java.util.List<edu.stanford.nlp.trees.GrammaticalRelation> getChildren(edu.stanford.nlp.trees.GrammaticalRelation relation)
relation - relationpublic edu.stanford.nlp.trees.GrammaticalRelation getParent(edu.stanford.nlp.trees.GrammaticalRelation relation)
relation - relationpublic static java.lang.String getTreeName(edu.stanford.nlp.trees.GrammaticalRelation grammaticalRelation,
boolean down,
boolean displayLongName)
grammaticalRelation - grammatical relationdown - parent-child orderdisplayLongName - whether to display long namespublic static java.lang.String getTreeAncestorsNames(edu.stanford.nlp.trees.GrammaticalRelation grammaticalRelation,
boolean down,
boolean displayLongName)
grammaticalRelation - grammatical relationdown - parent-child orderdisplayLongName - whether to display long namesprivate static StanfordRelationModel makeDefaultModel()
public static StanfordRelationModel makeModel(Language language)
language - language namepublic static StanfordRelationModel makeEnglishModel()
public static StanfordRelationModel makeUniversalEnglishModel()
public static StanfordRelationModel makeChineseModel()
public static void main(java.lang.String[] args)
args - not used