docstr: Adds a spaCy-compatible nlp function
  
  Paramters
  ----------
  nlp : spacy model
  
    Returns
    ----------
    self: TermDocMatrixFactory
   
docstr_tok: ["Adds","a","spaCy-compatible","nlp","function","Paramters","--","--","--","--","--","nlp",":","spacy","model","Returns","--","--","--","--","--","self",":","TermDocMatrixFactory"]
code: def set_nlp(self, nlp):
      """Adds a spaCy-compatible nlp function
  
      Paramters
      ----------
      nlp : spacy model
  
        Returns
        ----------
        self: TermDocMatrixFactory
      """
  
      self._nlp = nlp
      return self
  
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 3 for calling the TermDocMatrixFactory obj's underlying member method code with example usage: obj.set_nlp(nlp) and returns: self