opennlp.tools.tokenize.lang.en
Class TokenSampleStream
java.lang.Object
opennlp.tools.tokenize.lang.en.TokenSampleStream
- All Implemented Interfaces:
- Iterator<TokenSample>
public class TokenSampleStream
- extends Object
- implements 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 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TokenSampleStream
public TokenSampleStream(InputStream is)
throws IOException
- Throws:
IOException
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interface Iterator<TokenSample>
next
public TokenSample next()
- Specified by:
next
in interface Iterator<TokenSample>
remove
public void remove()
- Specified by:
remove
in interface Iterator<TokenSample>
main
public static void main(String[] args)
throws IOException
- Throws:
IOException
Copyright © 2010. All Rights Reserved.