public class CoreMaps
extends java.lang.Object
CoreMap
's.Modifier and Type | Method and Description |
---|---|
static <V,CM extends CoreMap,COLL extends java.util.Collection<CM>> |
asMap(COLL coremaps,
java.lang.Class<? extends TypesafeMap.Key<V>> valueKey)
Returns a view of a collection of CoreMaps as a Map from each CoreMap to
the value it stores under valueKey.
|
static java.lang.String |
dumpCoreMap(CoreMap cm)
Utility function for dumping all the keys and values of a CoreMap to a String.
|
static void |
dumpCoreMapToStringBuilder(CoreMap cm,
java.lang.StringBuilder sb) |
static CoreLabel |
merge(CoreLabel base,
CoreLabel toBeMerged)
see merge(CoreMap base, CoreMap toBeMerged)
|
static CoreMap |
merge(CoreMap base,
CoreMap toBeMerged)
Merge one CoreMap into another -- that is, overwrite and add any keys in
the base CoreMap with those in the one to be merged.
|
public static CoreMap merge(CoreMap base, CoreMap toBeMerged)
base
- The CoreMap to serve as the base (keys in this are lower priority)toBeMerged
- The CoreMap to merge in (keys in this are higher priority)public static CoreLabel merge(CoreLabel base, CoreLabel toBeMerged)
public static <V,CM extends CoreMap,COLL extends java.util.Collection<CM>> java.util.Map<CM,V> asMap(COLL coremaps, java.lang.Class<? extends TypesafeMap.Key<V>> valueKey)
public static java.lang.String dumpCoreMap(CoreMap cm)
public static void dumpCoreMapToStringBuilder(CoreMap cm, java.lang.StringBuilder sb)