opennlp.tools.tokenize.lang.en
Class TokenSampleStream
java.lang.Object
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.
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TokenSampleStream
public TokenSampleStream(java.io.InputStream is)
throws java.io.IOException
- Throws:
java.io.IOException
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.