Package edu.stanford.nlp.process

Source Code of edu.stanford.nlp.process.WordTokenFactory

package edu.stanford.nlp.process;


import edu.stanford.nlp.ling.Word;

/**
* Constructs a Word from a String. This is the default
* TokenFactory for PTBLexer. It discards the positional information.
*
* @author Jenny Finkel
*/
public class WordTokenFactory implements LexedTokenFactory<Word> {

  public Word makeToken(String str, int begin, int length) {
    return new Word(str, begin, begin+length);
  }

}
TOP

Related Classes of edu.stanford.nlp.process.WordTokenFactory

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.