nltk.FeatDict.__init__¶
-
FeatDict.
__init__
(features=None, **morefeatures)[source]¶ Create a new feature dictionary, with the specified features.
Parameters: - features – The initial value for this feature
dictionary. If
features
is aFeatStruct
, then its features are copied (shallow copy). Iffeatures
is a dict, then a feature is created for each item, mapping its key to its value. Iffeatures
is a string, then it is processed usingFeatStructReader
. Iffeatures
is a list of tuples(name, val)
, then a feature is created for each tuple. - morefeatures – Additional features for the new feature
dictionary. If a feature is listed under both
features
andmorefeatures
, then the value frommorefeatures
will be used.
- features – The initial value for this feature
dictionary. If