/** * Puts an extra feature to this node using the specific key and value. * This method overwrites an existing value of the same key with the current value. */ public void addFeat(String key, String value) { d_feats.put(key, value); }
public String putFeat(String key, String value) { return d_head.c2d.d_feats.put(key, value); }
/** * Adds the specific features to this map. * @param feats {@code "_"} or {@code feat(|feat)*}.<br> * {@code "_"}: indicates no feature.<br> * {@code feat ::= key=value} (e.g., {@code pos=VBD}). */ public void add(String feats) { if (feats.equals(DEPReader.BLANK_COLUMN)) return; String key, value; int idx; for (String feat : P_FEATS.split(feats)) { idx = feat.indexOf(DELIM_KEY_VALUE); if (idx > 0) { key = feat.substring(0, idx); value = feat.substring(idx+1); put(key, value); } } }