eta.util.tt.parse.attachfeat

attachfeat(feat_xx, feats)[source]

Stores a feature list in a dictionary of word features, modifying the dictionary in-place.

Parameters:
  • feat_xx (list[str]) –

    A list of form [feat, x1, x2, ..., xk], where:

    • feat is a string, regarded as a feature.

    • x1, x2, … are words that will be assigned feat as a feature, i.e., isa(xi, feat) will be True for each xi among x1, x2, …, xk.

  • feats (dict) – A dict mapping words to features, to be modified in-place.