Package edu.berkeley.nlp.lm.map
Class NgramIterableWrapper<W,V>
java.lang.Object
edu.berkeley.nlp.lm.map.NgramIterableWrapper<W,V>
- Type Parameters:
W
-V
-
Wraps an NgramMap as an Iterable, so it is easy to iterate over the n-grams
and associated values. Using this interface is a little inefficient due to
the boxing and temporary object allocation necessary to conform to Java's
interfaces.
- Author:
- adampauls
-
Constructor Summary
ConstructorsConstructorDescriptionNgramIterableWrapper
(NgramMap<V> map, WordIndexer<W> wordIndexer) NgramIterableWrapper
(NgramMap<V> map, WordIndexer<W> wordIndexer, int maxOrder) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator