class_docstr: Creates a topic model from a set of key terms based on sentence level co-occurrence.
class_docstr_tok: ["Creates","a","topic","model","from","a","set","of","key","terms","based","on","sentence","level","co-occurrence","."]
docstr: Parameters
  ----------
  corpus
docstr_tok: ["Parameters","--","--","--","--","--","corpus"]
code: def __init__(self, corpus):
      """
  
      Parameters
      ----------
      corpus
      """
      assert isinstance(corpus, ParsedCorpus)
      self.corpus = corpus
      self.termidxstore = corpus._term_idx_store
      matfact = CSRMatrixFactory()
      self.doclabs = []
      self.sentlabs = []
      self.sentdocs = []
      senti = 0
      for doci, doc in enumerate(corpus.get_parsed_docs()):
          for sent in doc.sents:
              validsent = False
              for t in sent:
                  try:
                      termi = self.termidxstore.getidxstrict(t.lower_)
                  except:
                      continue
                  if validsent is False:
                      senti += 1
                      self.sentlabs.append(corpus._y[doci])
                      self.sentdocs.append(doci)
                      validsent = True
                  matfact[senti, termi] = 1
      self.sentX = matfact.get_csr_matrix().astype(bool)
  
file_path: scattertext/scattertext/topicmodel/SentencesForTopicModeling.py
imports: import numpy
  import pandas
  from sklearn.decomposition import NMF
  from sklearn.feature_extraction.text import TfidfTransformer
  from sklearn.pipeline import Pipeline
  from scattertext.CSRMatrixTools import CSRMatrixFactory
  from scattertext.ParsedCorpus import ParsedCorpus
  from scattertext.termscoring.RankDifference import RankDifference
label_desc: Use image node_id 1 to create a new SentencesForTopicModeling object from inherited base classes: object with example: obj = SentencesForTopicModeling(corpus)