class_docstr: Feature extractor for text classification relying on ngrams tfidf and
  optionally word cooccurrences features
class_docstr_tok: ["Feature","extractor","for","text","classification","relying","on","ngrams","tfidf","and","optionally","word","cooccurrences","features"]
docstr: Maps the feature index of the feature matrix to printable features
  names. Mainly useful for debug.
  
  Returns:
      dict: a dict mapping feature indices to printable features names
docstr_tok: ["Maps","the","feature","index","of","the","feature","matrix","to","printable","features","names",".","Mainly","useful","for","debug",".","Returns",":","dict",":","a","dict","mapping","feature","indices","to","printable","features","names"]
code: def feature_index_to_feature_name(self):
      """Maps the feature index of the feature matrix to printable features
      names. Mainly useful for debug.
  
      Returns:
          dict: a dict mapping feature indices to printable features names
      """
      if not self.fitted:
          return dict()
  
      index = {
          i: "ngram:%s" % ng
          for ng, i in iteritems(self.tfidf_vectorizer.vocabulary)
      }
      num_ng = len(index)
      if self.cooccurrence_vectorizer is not None:
          for word_pair, j in iteritems(
              self.cooccurrence_vectorizer.word_pairs
          ):
              index[j + num_ng] = "pair:%s+%s" % (
                  word_pair[0],
                  word_pair[1],
              )
      return index
  
imports: from __future__ import division, unicode_literals
  import json
  from builtins import str, zip
  from copy import deepcopy
  from pathlib import Path
  from future.utils import iteritems
  from snips_nlu.common.utils import json_string, fitted_required, replace_entities_with_placeholders, check_persisted_path
  from snips_nlu.constants import DATA, ENTITY, ENTITY_KIND, LANGUAGE, NGRAM, TEXT, ENTITIES
  from snips_nlu.dataset import get_text_from_chunks, validate_and_format_dataset
  from snips_nlu.entity_parser.builtin_entity_parser import is_builtin_entity
  from snips_nlu.exceptions import _EmptyDatasetUtterancesError, LoadingError
  from snips_nlu.languages import get_default_sep
  from snips_nlu.pipeline.configs import FeaturizerConfig
  from snips_nlu.pipeline.configs.intent_classifier import CooccurrenceVectorizerConfig, TfidfVectorizerConfig
  from snips_nlu.pipeline.processing_unit import ProcessingUnit
  from snips_nlu.preprocessing import stem, tokenize_light
  from snips_nlu.resources import get_stop_words, get_word_cluster
  from snips_nlu.slot_filler.features_utils import get_all_ngrams
label_desc: Use image node_id 3 for calling the Featurizer obj's underlying member method code with example usage: obj.feature_index_to_feature_name() and returns: index, dict