MCPcopy Create free account
hub / github.com/GateNLP/gate-core / featureMap

Method featureMap

src/main/java/gate/Utils.java:670–678  ·  view source on GitHub ↗

Create a feature map from an array of values. The array must have an even number of items, alternating keys and values i.e. [key1, value1, key2, value2, ...]. @param values an even number of items, alternating keys and values. @return a feature map containing the given items.

(Object... values)

Source from the content-addressed store, hash-verified

668 * @return a feature map containing the given items.
669 */
670 public static FeatureMap featureMap(Object... values) {
671 FeatureMap fm = Factory.newFeatureMap();
672 if(values != null) {
673 for(int i = 0; i < values.length; i++) {
674 fm.put(values[i], values[++i]);
675 }
676 }
677 return fm;
678 }
679
680 /**
681 * Create a feature map from an existing map (typically one that does not

Callers 1

Calls 2

newFeatureMapMethod · 0.95
putMethod · 0.45

Tested by 1