com.textrazor.annotations
Class Word
java.lang.Object
com.textrazor.annotations.Annotation
com.textrazor.annotations.Word
public class Word
- extends Annotation
Constructor Summary |
Word()
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Word
public Word()
getPosition
public int getPosition()
- Returns:
- The position of this word in its sentence.
getStartingPos
public int getStartingPos()
- Returns:
- The start offset in the input text for this token. Note that TextRazor treats multi byte utf8 characters as a single position.
getEndingPos
public int getEndingPos()
- Returns:
- The end offset in the input text for this token. Note that TextRazor treats multi byte utf8 characters as a single position.
getStem
public java.lang.String getStem()
- Returns:
- The stem of this word.
getLemma
public java.lang.String getLemma()
- Returns:
- Returns the morphological root of this word
getToken
public java.lang.String getToken()
- Returns:
- The raw token string that matched this word in the source text.
getPartOfSpeech
public java.lang.String getPartOfSpeech()
- Returns:
- The Part of Speech that applies to this word. We use the Penn treebank tagset.
getParentPosition
public int getParentPosition()
- Returns:
- The position of the grammatical parent of this word, or null if this word is either at the root of the sentence or the "dependency-trees" extractor was not requested.
getParentWord
public Word getParentWord()
- Returns:
- The
Word
object of the grammatical parent of this word, or null if this word is either at the root of the sentence or the "dependency-trees" extractor was not requested.
getChildren
public java.util.List<Word> getChildren()
- Returns:
- List of the
Word
objects that are children of this word, empty list if the word has no children or the "dependency-trees" extractor was not requested.
getSenses
public java.util.List<Word.Sense> getSenses()
- Returns:
- List of
Word.Sense
objects of this word.
getRelationToParent
public java.lang.String getRelationToParent()
- Returns:
- The Grammatical relation between this word and it's parent, or null if this word is either at the root of the sentence or the "dependency-trees" extractor was not requested. TextRazor parses into Stanford uncollapsed dependencies.
getEntailments
public java.util.List<Entailment> getEntailments()
- Returns:
- List of the
Entailment
objects that this word is a part of.
getEntities
public java.util.List<Entity> getEntities()
- Returns:
- List of the
Entity
objects that this word is a part of.
getNounPhrases
public java.util.List<NounPhrase> getNounPhrases()
- Returns:
- List of the
NounPhrase
objects that this word is a part of.
getRelations
public java.util.List<Relation> getRelations()
- Returns:
- List of the
Relation
objects that this word is a part of.
getSentences
public java.util.List<Sentence> getSentences()
- Returns:
- List of the
Sentence
objects that this word is a part of.
getPropertyProperties
public java.util.List<Property> getPropertyProperties()
- Returns:
- List of the
Property
objects that this word is a part of.
getPropertyPredicates
public java.util.List<Property> getPropertyPredicates()
- Returns:
- List of the
Property
objects that this word is a part of.
getRelationParams
public java.util.List<RelationParam> getRelationParams()
- Returns:
- List of the
RelationParam
objects that this word is a part of.