Package edu.berkeley.nlp.lm.map
Class NgramsForOrderMapWrapper<W,V>
- Type Parameters:
W
-V
-
Wraps an NgramMap as a Java Map, but only ngrams of a particular order. This
collection is read-only. It is also uses a lot inefficient boxing and
unboxing.
- Author:
- adampauls
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,
V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Constructor Summary
ConstructorsConstructorDescriptionNgramsForOrderMapWrapper
(NgramMap<V> map, WordIndexer<W> wordIndexer, int ngramOrder) -
Method Summary
Methods inherited from class java.util.AbstractMap
clear, clone, containsValue, equals, hashCode, isEmpty, keySet, put, putAll, remove, size, toString, values
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
NgramsForOrderMapWrapper
- Parameters:
map
-ngramOrder
- 0-based, i.e. 0 means unigrams
-
-
Method Details
-
get
-
containsKey
- Specified by:
containsKey
in interfaceMap<W,
V> - Overrides:
containsKey
in classAbstractMap<List<W>,
V>
-
entrySet
-