public class CoreSentence
extends java.lang.Object
Constructor and Description |
---|
CoreSentence(CoreDocument myDocument,
CoreMap coreMapSentence) |
Modifier and Type | Method and Description |
---|---|
Pair<java.lang.Integer,java.lang.Integer> |
charOffsets()
char offsets of mention
|
Tree |
constituencyParse()
constituency parse
|
CoreMap |
coreMap()
get the underlying CoreMap if need be
|
SemanticGraph |
dependencyParse()
dependency parse
|
CoreDocument |
document()
get the document this sentence is in
|
java.util.List<CoreEntityMention> |
entityMentions()
list of entity mentions
|
java.util.List<java.lang.String> |
lemmas()
list of lemma tags
|
java.util.List<java.lang.String> |
nerTags()
list of ner tags
|
java.util.List<java.lang.String> |
nounPhrases() |
java.util.List<Tree> |
nounPhraseTrees()
return noun phrases, assuming NP is the label
|
java.util.List<java.lang.String> |
posTags()
list of pos tags
|
java.util.List<RelationTriple> |
relations()
list of KBP relations found
|
java.lang.String |
sentiment()
sentiment
|
Tree |
sentimentTree()
sentiment tree
|
java.lang.String |
text()
full text of the sentence
|
java.util.List<CoreLabel> |
tokens()
list of tokens
|
java.util.List<java.lang.String> |
tokensAsStrings()
list of tokens as String
|
java.lang.String |
toString() |
java.util.List<java.lang.String> |
tregexResults(java.lang.String s) |
java.util.List<java.lang.String> |
tregexResults(TregexPattern p) |
java.util.List<Tree> |
tregexResultTrees(java.lang.String s)
Tregex - find subtrees of interest with a general Tregex pattern
|
java.util.List<Tree> |
tregexResultTrees(TregexPattern p) |
java.util.List<java.lang.String> |
verbPhrases() |
java.util.List<Tree> |
verbPhraseTrees()
return verb phrases, assuming VP is the label
|
void |
wrapEntityMentions()
create list of CoreEntityMention's based on the CoreMap's entity mentions
|
public CoreSentence(CoreDocument myDocument, CoreMap coreMapSentence)
public void wrapEntityMentions()
public CoreDocument document()
public CoreMap coreMap()
public java.lang.String text()
public Pair<java.lang.Integer,java.lang.Integer> charOffsets()
public java.util.List<CoreLabel> tokens()
public java.util.List<java.lang.String> tokensAsStrings()
public java.util.List<java.lang.String> posTags()
public java.util.List<java.lang.String> lemmas()
public java.util.List<java.lang.String> nerTags()
public Tree constituencyParse()
public java.util.List<Tree> tregexResultTrees(java.lang.String s)
public java.util.List<Tree> tregexResultTrees(TregexPattern p)
public java.util.List<java.lang.String> tregexResults(TregexPattern p)
public java.util.List<java.lang.String> tregexResults(java.lang.String s)
public java.util.List<Tree> nounPhraseTrees()
public java.util.List<java.lang.String> nounPhrases()
public java.util.List<Tree> verbPhraseTrees()
public java.util.List<java.lang.String> verbPhrases()
public SemanticGraph dependencyParse()
public java.lang.String sentiment()
public Tree sentimentTree()
public java.util.List<CoreEntityMention> entityMentions()
public java.util.List<RelationTriple> relations()
public java.lang.String toString()
toString
in class java.lang.Object