|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecttml.utils.StanfordUtils
public class StanfordUtils
Class to consolidate the calls to the Stanford parser
| Constructor Summary | |
|---|---|
StanfordUtils()
|
|
| Method Summary | |
|---|---|
static java.util.List<java.lang.String> |
calculateTypedDependencies(edu.stanford.nlp.trees.Tree tree)
Calculates the typed dependencies from a grammatical tree |
static java.lang.String |
cleanNodeContent(java.lang.String content)
Added to remove punctuation from the strings extracted from the tree |
static java.util.List<java.lang.String> |
extractNouns(edu.stanford.nlp.trees.Tree t)
|
static java.util.List<java.lang.String> |
extractVerbs(edu.stanford.nlp.trees.Tree t)
|
static java.lang.String |
getPennString(edu.stanford.nlp.trees.Tree tree)
|
static java.lang.String |
getPennTagFirstBranch(edu.stanford.nlp.trees.Tree orig,
edu.stanford.nlp.trees.Tree t,
edu.stanford.nlp.trees.Tree pt)
|
static java.lang.String |
getPennTagMinimalPhrase(edu.stanford.nlp.trees.Tree t)
|
static edu.stanford.nlp.trees.Tree |
getPennTree(java.lang.String text)
|
static edu.stanford.nlp.trees.Tree |
getTreeFromString(java.lang.String passageId,
java.lang.String pennTreeString)
Calculates a Penn grammatical tree from its string representation |
static java.lang.String |
nodeContent(edu.stanford.nlp.trees.Tree t)
|
static java.lang.String |
nodeContent(edu.stanford.nlp.trees.Tree t,
edu.stanford.nlp.trees.Tree pv)
|
static java.lang.String |
removeDeterminersFromNounPhrase(java.lang.String phrase)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StanfordUtils()
| Method Detail |
|---|
public static java.util.List<java.lang.String> extractVerbs(edu.stanford.nlp.trees.Tree t)
t - a grammar tree to extract the verbs
public static java.lang.String nodeContent(edu.stanford.nlp.trees.Tree t,
edu.stanford.nlp.trees.Tree pv)
t - the tree to which extract the content
public static java.util.List<java.lang.String> extractNouns(edu.stanford.nlp.trees.Tree t)
t - the grammar tree
public static java.lang.String cleanNodeContent(java.lang.String content)
content - any string containing punctuation at beginning or end
public static java.lang.String nodeContent(edu.stanford.nlp.trees.Tree t)
t - the tree to which extract the content
public static edu.stanford.nlp.trees.Tree getTreeFromString(java.lang.String passageId,
java.lang.String pennTreeString)
pennTreeString - the string
java.lang.Exceptionpublic static java.util.List<java.lang.String> calculateTypedDependencies(edu.stanford.nlp.trees.Tree tree)
tree - the grammatical tree
public static java.lang.String removeDeterminersFromNounPhrase(java.lang.String phrase)
throws java.io.IOException
java.io.IOExceptionpublic static java.lang.String getPennString(edu.stanford.nlp.trees.Tree tree)
public static edu.stanford.nlp.trees.Tree getPennTree(java.lang.String text)
throws java.io.IOException
java.io.IOExceptionpublic static java.lang.String getPennTagMinimalPhrase(edu.stanford.nlp.trees.Tree t)
public static java.lang.String getPennTagFirstBranch(edu.stanford.nlp.trees.Tree orig,
edu.stanford.nlp.trees.Tree t,
edu.stanford.nlp.trees.Tree pt)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||