public class AGrammaticalStructureFactory
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
private static class |
AGrammaticalStructureFactory.TreeGraphNodeAdapter
Adapter (adapts TreeGraphNode to ITree interface)
|
Modifier and Type | Field and Description |
---|---|
private java.util.Map<java.lang.Integer,MutableAGrammaticalStructure> |
indexToArtifactMap
Node map (index to artifact node)
|
private java.util.Map<edu.stanford.nlp.trees.TreeGraphNode,MutableAGrammaticalStructure> |
nodeToArtifactMap
Node map (TreeGraphNode to artifact node)
|
Constructor and Description |
---|
AGrammaticalStructureFactory()
Constructor
|
Modifier and Type | Method and Description |
---|---|
AGrammaticalStructure |
make(edu.stanford.nlp.trees.GrammaticalStructure grammaticalStructure)
Make artifact from grammatical structure
|
private static MutableAGrammaticalStructure |
makeNode(edu.stanford.nlp.trees.TreeGraphNode treeGraphNode)
Make artifact from node
|
static java.lang.String |
trim(java.lang.String str)
Trim string removing glut
|
private void |
visitNode(edu.stanford.nlp.trees.TreeGraphNode treeGraphNode,
AGrammaticalStructure artifact)
Visit node filling artifact data
|
private final java.util.Map<edu.stanford.nlp.trees.TreeGraphNode,MutableAGrammaticalStructure> nodeToArtifactMap
private final java.util.Map<java.lang.Integer,MutableAGrammaticalStructure> indexToArtifactMap
public AGrammaticalStructure make(edu.stanford.nlp.trees.GrammaticalStructure grammaticalStructure)
grammaticalStructure
- grammatical structureprivate static MutableAGrammaticalStructure makeNode(edu.stanford.nlp.trees.TreeGraphNode treeGraphNode)
treeGraphNode
- tree graph nodeprivate void visitNode(edu.stanford.nlp.trees.TreeGraphNode treeGraphNode, AGrammaticalStructure artifact)
treeGraphNode
- tree graph nodeartifact
- artifactpublic static java.lang.String trim(java.lang.String str)
str
- string to trim