org.apache.stanbol.commons.opennlp
Class TextAnalyzer.AnalysedText.Token

java.lang.Object
  extended by org.apache.stanbol.commons.opennlp.TextAnalyzer.AnalysedText.Token
Enclosing class:
TextAnalyzer.AnalysedText

public class TextAnalyzer.AnalysedText.Token
extends java.lang.Object


Field Summary
protected  boolean hasAlphaNumeric
           
protected  double[] posProbabilities
           
protected  java.lang.String[] posTags
           
protected  opennlp.tools.util.Span span
           
protected  java.lang.String token
           
 
Method Summary
 int getEnd()
           
 double[] getPosProbabilities()
          Getter for the probabilities of all POS tags
 double getPosProbability()
          Getter for the probability of the top ranked POS tag
 java.lang.String getPosTag()
          Getter for the best ranked POS tag for this token
 java.lang.String[] getPosTags()
          Getter for all the POS tags of this Token.
 int getStart()
           
 java.lang.String getText()
          Getter for the value of this token
 boolean hasAplhaNumericChar()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

span

protected final opennlp.tools.util.Span span

token

protected java.lang.String token

posTags

protected final java.lang.String[] posTags

posProbabilities

protected final double[] posProbabilities

hasAlphaNumeric

protected final boolean hasAlphaNumeric
Method Detail

getStart

public int getStart()

getEnd

public int getEnd()

getPosTag

public java.lang.String getPosTag()
Getter for the best ranked POS tag for this token

Returns:

getPosTags

public java.lang.String[] getPosTags()
Getter for all the POS tags of this Token. The one with the highest probability is at index 0.

Returns:
All POS tags assigned to this Token

getPosProbability

public double getPosProbability()
Getter for the probability of the top ranked POS tag

Returns:
the POS probability

getPosProbabilities

public double[] getPosProbabilities()
Getter for the probabilities of all POS tags

Returns:
the probabilities of the POS tags returned by getPosTags()

getText

public java.lang.String getText()
Getter for the value of this token

Returns:

hasAplhaNumericChar

public boolean hasAplhaNumericChar()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.