Package org.nlpub.watset.util
Interface Sense<V>
-
- Type Parameters:
V- the type of value
- All Superinterfaces:
Supplier<V>
- All Known Implementing Classes:
IndexedSense
public interface Sense<V> extends Supplier<V>
A monad that provides the wrapped value with a sense identifier.
-
-
Method Summary
Static Methods Modifier and Type Method Description static <V> Map<Sense<V>,Number>disambiguate(Map<V,Map<Sense<V>,Map<V,Number>>> inventory, ContextSimilarity<V> similarity, Map<V,Number> context, Collection<V> ignored)Disambiguate each element of the context by maximizing its similarity to the senses in the inventory.
-
-
-
Method Detail
-
disambiguate
static <V> Map<Sense<V>,Number> disambiguate(Map<V,Map<Sense<V>,Map<V,Number>>> inventory, ContextSimilarity<V> similarity, Map<V,Number> context, Collection<V> ignored)
Disambiguate each element of the context by maximizing its similarity to the senses in the inventory.The method skips context keys marked as
ignored.- Type Parameters:
V- the context element class- Parameters:
inventory- the sense inventorysimilarity- the similarity measurecontext- the context to disambiguateignored- the ignored elements ofcontext- Returns:
- the disambiguated context
-
-