edu.washington.cs.knowitall.nlp
Class ChunkedSentenceToken

java.lang.Object
  extended by edu.washington.cs.knowitall.nlp.ChunkedSentenceToken

public class ChunkedSentenceToken
extends Object

A representation of a token in a ChunkedSentence.

Author:
schmmd

Nested Class Summary
protected static class ChunkedSentenceToken.ChunkTagExpression
          A regular expression that is evaluated against the chunk tag portion of a token.
protected static class ChunkedSentenceToken.Expression
          An expression that is evaluated against a token.
protected static class ChunkedSentenceToken.PosTagExpression
          A regular expression that is evaluated against the POS tag portion of a token.
protected static class ChunkedSentenceToken.StringExpression
          A regular expression that is evaluated against the string portion of a token.
 
Field Summary
 ChunkedSentence ChunkedSentence
           
 int index
           
static com.google.common.base.Function<ChunkedSentenceToken,String> toStringFunction
           
 
Constructor Summary
ChunkedSentenceToken(ChunkedSentence ChunkedSentence, int index)
           
 
Method Summary
 String chunk()
          The chunk tag of this token.
 String pos()
          The part of speech tag of this token.
 String string()
          The string of this token.
static List<ChunkedSentenceToken> tokenize(ChunkedSentence sentence)
           
static List<ChunkedSentenceToken> tokenize(ChunkedSentence sentence, edu.washington.cs.knowitall.commonlib.Range range)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ChunkedSentence

public final ChunkedSentence ChunkedSentence

index

public final int index

toStringFunction

public static final com.google.common.base.Function<ChunkedSentenceToken,String> toStringFunction
Constructor Detail

ChunkedSentenceToken

public ChunkedSentenceToken(ChunkedSentence ChunkedSentence,
                            int index)
Method Detail

tokenize

public static List<ChunkedSentenceToken> tokenize(ChunkedSentence sentence)

tokenize

public static List<ChunkedSentenceToken> tokenize(ChunkedSentence sentence,
                                                  edu.washington.cs.knowitall.commonlib.Range range)

string

public String string()
The string of this token.

Returns:

pos

public String pos()
The part of speech tag of this token.

Returns:

chunk

public String chunk()
The chunk tag of this token.

Returns:

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2010-2012 University of Washington CSE. All Rights Reserved.