edu.stanford.nlp.process
Class WordTokenFactory

java.lang.Object
  extended by edu.stanford.nlp.process.WordTokenFactory
All Implemented Interfaces:
LexedTokenFactory

public class WordTokenFactory
extends Object
implements LexedTokenFactory

Constructs a Word from a String. This is the default TokenFactory for PTBLexer. It discards the positional information.


Constructor Summary
WordTokenFactory()
           
 
Method Summary
 Object makeToken(String str, int begin, int length)
          Constructs a token (of arbitrary type) from a String and its position in the underlying text.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WordTokenFactory

public WordTokenFactory()
Method Detail

makeToken

public Object makeToken(String str,
                        int begin,
                        int length)
Description copied from interface: LexedTokenFactory
Constructs a token (of arbitrary type) from a String and its position in the underlying text.

Specified by:
makeToken in interface LexedTokenFactory
Parameters:
str - The String extracted by the lexer.
begin - The offset in the document of the first character in this string.
length - The number of characters the string takes up in the document.


Stanford NLP Group