edu.washington.cs.knowitall.nlp
Class ChunkedSentenceIterator
java.lang.Object
com.google.common.collect.UnmodifiableIterator<T>
com.google.common.collect.AbstractIterator<ChunkedSentence>
edu.washington.cs.knowitall.nlp.ChunkedSentenceIterator
- All Implemented Interfaces:
- Iterator<ChunkedSentence>
public class ChunkedSentenceIterator
- extends com.google.common.collect.AbstractIterator<ChunkedSentence>
A class that combines an Iterator object over sentences with a
SentenceChunker object to produce an iterator over ChunkedSentence
objects.
- Author:
- afader
| Methods inherited from class com.google.common.collect.AbstractIterator |
endOfData, hasNext, next, peek |
| Methods inherited from class com.google.common.collect.UnmodifiableIterator |
remove |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ChunkedSentenceIterator
public ChunkedSentenceIterator(Iterator<String> sentIter,
SentenceChunker chunker)
- Parameters:
sentIter - an iterator over String sentences.chunker -
getLastComputeTime
public long getLastComputeTime()
- Returns:
- the time of the last computation in nanoseconds
addFilter
public void addFilter(com.google.common.base.Predicate<ChunkedSentence> filter)
- If a chunked sentence is filtered, it will not be returned.
- Parameters:
filter - A predicate to test chunked sentences against.
computeNext
protected ChunkedSentence computeNext()
- Specified by:
computeNext in class com.google.common.collect.AbstractIterator<ChunkedSentence>
Copyright © 2010-2012 University of Washington CSE. All Rights Reserved.