opennlp.tools.tokenize.lang.en
Class TokenSampleStream

java.lang.Object
  extended by opennlp.tools.tokenize.lang.en.TokenSampleStream
All Implemented Interfaces:
java.util.Iterator<TokenSample>

public class TokenSampleStream
extends java.lang.Object
implements java.util.Iterator<TokenSample>

Class which produces an Iterator from a file of space delimited token. This class uses a number of English-specific hueristics to un-separate tokens which are typically found together in text.


Constructor Summary
TokenSampleStream(java.io.InputStream is)
           
 
Method Summary
 boolean hasNext()
           
static void main(java.lang.String[] args)
           
 TokenSample next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TokenSampleStream

public TokenSampleStream(java.io.InputStream is)
                  throws java.io.IOException
Throws:
java.io.IOException
Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface java.util.Iterator<TokenSample>

next

public TokenSample next()
Specified by:
next in interface java.util.Iterator<TokenSample>

remove

public void remove()
Specified by:
remove in interface java.util.Iterator<TokenSample>

main

public static void main(java.lang.String[] args)
                 throws java.io.IOException
Throws:
java.io.IOException


Copyright © 2011 The Apache Software Foundation. All Rights Reserved.