class_docstr: A representation of a set of features, usually associated with a word form.
class_docstr_tok: ["A","representation","of","a","set","of","features",",","usually","associated","with","a","word","form","."]
docstr: Use dict-type syntax to set the value of features.
  >>> f1 = f(F.pos)
  >>> f1[N] = N.neg
  >>> f1
  {F: [pos], N: [neg]}
  >>> f1['V'] = V.pos
  >>> f1
  {F: [pos], N: [neg], V: [pos]}
docstr_tok: ["Use","dict-type","syntax","to","set","the","value","of","features",".",">",">",">","f1","=","f","(","F.pos",")",">",">",">","f1","[","N","]","=","N.neg",">",">",">","f1","{","F",":","[","pos","]",",","N",":","[","neg","]","}",">",">",">","f1","[","'","V","'","]","=","V.pos",">",">",">","f1","{","F",":","[","pos","]",",","N",":","[","neg","]",",","V",":","[","pos","]","}"]
code: def __setitem__(
      self,
      feature_name: Union[str, Type[MorphosyntacticFeature]],
      feature_values: Union[
          MorphosyntacticFeature, List[MorphosyntacticFeature]
      ],
  ) -> "MorphosyntacticFeatureBundle":
      """
      Use dict-type syntax to set the value of features.
      >>> f1 = f(F.pos)
      >>> f1[N] = N.neg
      >>> f1
      {F: [pos], N: [neg]}
      >>> f1['V'] = V.pos
      >>> f1
      {F: [pos], N: [neg], V: [pos]}
      """
      if type(feature_name) == str:
          if feature_name not in globals():
              raise TypeError(
                  feature_name + " is not a morphosytactic feature"
              )
          feature_name = globals()[feature_name]
  
      if not issubclass(feature_name, MorphosyntacticFeature):
          raise TypeError(
              str(feature_name) + " is not a morphosyntactic feature"
          )
  
      if type(feature_values) is not list:
          feature_values = [feature_values]
  
      for value in feature_values:
          if value is not None and type(value) != feature_name:
              raise TypeError(
                  str(value) + " is not a " + str(feature_name)
              )
  
      self.features[feature_name] = feature_values
      return self
  
file_path: cltk/src/cltk/morphology/morphosyntax.py
imports: from typing import Dict, List, Optional, Tuple, Type, Union
  from cltk.core.exceptions import CLTKException
  from cltk.morphology.universal_dependencies_features import *
label_desc: Use image node_id 3 for calling the MorphosyntacticFeatureBundle obj's underlying member method code with example usage: obj.__setitem__(feature_name, feature_values) and returns: self