com.textrazor.annotations
Class Word

java.lang.Object
  extended by com.textrazor.annotations.Annotation
      extended by com.textrazor.annotations.Word

public class Word
extends Annotation


Nested Class Summary
static class Word.Sense
           
 
Constructor Summary
Word()
           
 
Method Summary
 java.util.List<Word> getChildren()
           
 int getEndingPos()
           
 java.util.List<Entailment> getEntailments()
           
 java.util.List<Entity> getEntities()
           
 java.lang.String getLemma()
           
 java.util.List<NounPhrase> getNounPhrases()
           
 int getParentPosition()
           
 Word getParentWord()
           
 java.lang.String getPartOfSpeech()
           
 int getPosition()
           
 java.util.List<Property> getPropertyPredicates()
           
 java.util.List<Property> getPropertyProperties()
           
 java.util.List<RelationParam> getRelationParams()
           
 java.util.List<Relation> getRelations()
           
 java.lang.String getRelationToParent()
           
 java.util.List<Word.Sense> getSenses()
           
 java.util.List<Sentence> getSentences()
           
 int getStartingPos()
           
 java.lang.String getStem()
           
 java.lang.String getToken()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Word

public Word()
Method Detail

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.