docstr: Class for extracting features from a new document.
  
  Parameters
  ----------
  term_idx_store : IndexStore (index -> term)
  clean_function : function (default lambda x: x)
      A function that takes a unicode document and returns
      a cleaned version of that document
  post_nlp_clean_function : function (default lambda x: x)
      A function that takes a spaCy Doc
  nlp : spacy parser (default None)
      The spaCy parser used to parse documents.  If it's None,
      the class will go through the expensive operation of
      creating one to parse the text
  feats_from_spacy_doc : FeatsFromSpacyDoc (default None)
      Class for extraction of features from spacy
docstr_tok: ["Class","for","extracting","features","from","a","new","document",".","Parameters","--","--","--","--","--","term_idx_store",":","IndexStore","(","index","-",">","term",")","clean_function",":","function","(","default","lambda","x",":","x",")","A","function","that","takes","a","unicode","document","and","returns","a","cleaned","version","of","that","document","post_nlp_clean_function",":","function","(","default","lambda","x",":","x",")","A","function","that","takes","a","spaCy","Doc","nlp",":","spacy","parser","(","default","None",")","The","spaCy","parser","used","to","parse","documents",".","If","it","'s","None",",","the","class","will","go","through","the","expensive","operation","of","creating","one","to","parse","the","text","feats_from_spacy_doc",":","FeatsFromSpacyDoc","(","default","None",")","Class","for","extraction","of","features","from","spacy"]
code: def __init__(
      self,
      term_idx_store,
      clean_function=lambda x: x,
      nlp=None,
      feats_from_spacy_doc=None,
  ):
      """Class for extracting features from a new document.
  
      Parameters
      ----------
      term_idx_store : IndexStore (index -> term)
      clean_function : function (default lambda x: x)
          A function that takes a unicode document and returns
          a cleaned version of that document
      post_nlp_clean_function : function (default lambda x: x)
          A function that takes a spaCy Doc
      nlp : spacy parser (default None)
          The spaCy parser used to parse documents.  If it's None,
          the class will go through the expensive operation of
          creating one to parse the text
      feats_from_spacy_doc : FeatsFromSpacyDoc (default None)
          Class for extraction of features from spacy
  
      """
      TermDocMatrixFactory.__init__(
          self,
          clean_function=clean_function,
          nlp=nlp,
          feats_from_spacy_doc=feats_from_spacy_doc,
      )
      self._term_idx_store = term_idx_store
  
imports: import string
  from collections import Counter
  import numpy
  import pandas
  from scattertext.CSRMatrixTools import CSRMatrixFactory
  from scattertext.TermDocMatrix import TermDocMatrix
  from scattertext.features.FeatsFromSpacyDoc import FeatsFromSpacyDoc
  from scattertext.indexstore.IndexStore import IndexStore
label_desc: Use image node_id 1 to create a new FeatsFromDoc object from inherited base classes: TermDocMatrixFactory with example: obj = FeatsFromDoc(term_idx_store, clean_function, nlp, feats_from_spacy_doc)