class_docstr: A SingleStateFeaturizer for use with policies that predict intent labels.
class_docstr_tok: ["A","SingleStateFeaturizer","for","use","with","policies","that","predict","intent","labels","."]
docstr: Extracts a numeric representation of an intent.
  
  Args:
      intent: Intent to be encoded.
      precomputations: Contains precomputed features and attributes.
  
  Returns:
      Encoded representation of intent.
docstr_tok: ["Extracts","a","numeric","representation","of","an","intent",".","Args",":","intent",":","Intent","to","be","encoded",".","precomputations",":","Contains","precomputed","features","and","attributes",".","Returns",":","Encoded","representation","of","intent","."]
code: def _encode_intent(
      self,
      intent: Text,
      precomputations: Optional[MessageContainerForCoreFeaturization],
  ) -> Dict[Text, List[Features]]:
      """Extracts a numeric representation of an intent.
  
      Args:
          intent: Intent to be encoded.
          precomputations: Contains precomputed features and attributes.
  
      Returns:
          Encoded representation of intent.
      """
      intent_as_sub_state = {INTENT: intent}
      return self._extract_state_features(
          intent_as_sub_state, precomputations
      )
  
imports: import logging
  import numpy
  import scipy.sparse
  from typing import List, Optional, Dict, Text, Set, Any
  from rasa.core.featurizers.precomputation import MessageContainerForCoreFeaturization
  from rasa.nlu.extractors.extractor import EntityTagSpec
  from rasa.nlu.utils import bilou_utils
  from rasa.nlu.utils.bilou_utils import BILOU_PREFIXES
  from rasa.shared.core.domain import SubState, State, Domain
  from rasa.shared.core.constants import PREVIOUS_ACTION, ACTIVE_LOOP, USER, SLOTS
  from rasa.shared.core.trackers import is_prev_action_listen_in_state
  from rasa.shared.nlu.constants import ENTITIES, FEATURE_TYPE_SENTENCE, ACTION_TEXT, ACTION_NAME, INTENT, NO_ENTITY_TAG, ENTITY_ATTRIBUTE_TYPE, ENTITY_TAGS, TEXT
  from rasa.shared.nlu.training_data.features import Features
  from rasa.utils.tensorflow import model_data_utils
label_desc: Use image node_id 1 for calling the IntentTokenizerSingleStateFeaturizer obj's underlying member method code with example usage: obj._encode_intent(intent, precomputations) and returns: self