docstr: Parameters
  ----------
  corpus, Corpus: Corpus to extract documents and labels from
  alternative_text_field, str or None: if str, corpus must be parsed corpus
docstr_tok: ["Parameters","--","--","--","--","--","corpus",",","Corpus",":","Corpus","to","extract","documents","and","labels","from","alternative_text_field",",","str","or","None",":","if","str",",","corpus","must","be","parsed","corpus"]
code: def __init__(self, corpus, alternative_text_field=None):
      """
      Parameters
      ----------
      corpus, Corpus: Corpus to extract documents and labels from
      alternative_text_field, str or None: if str, corpus must be parsed corpus
      """
      # assert (isinstance(corpus, (Corpus, ParsedCorpus, CorpusDF, TermCategoryFrequencies))
      # 		or (issubclass(type(corpus), (Corpus, ParsedCorpus, CorpusDF, TermCategoryFrequencies))))
      self._texts_to_display = None
      if alternative_text_field is not None:
          if not isinstance(corpus, ParsedCorpus):
              raise CorpusShouldBeParsedCorpusException(
                  "Corpus type needs to be ParsedCorpus to use the alternative text field."
              )
          self._texts_to_display = corpus.get_field(
              alternative_text_field
          )
      self._use_non_text_features = False
      self._use_terms_for_extra_features = False
      self._corpus = corpus
  
file_path: scattertext/scattertext/DocsAndLabelsFromCorpus.py
imports: import numpy
  import sys
  from scattertext.ParsedCorpus import ParsedCorpus
label_desc: Use image node_id 1 to create a new DocsAndLabelsFromCorpus object  with example: obj = DocsAndLabelsFromCorpus(corpus, alternative_text_field)