docstr: Parameters
  ----------
  df : pd.DataFrame
   contains category_col, and parse_col, were parsed col is entirely spacy docs
  parsed_col : str
      name of spacy parsed column in convention_df
  feats_from_spacy_doc : FeatsFromSpacyDoc
  category_col : str, Optional
      name of category column in df; if None, all category names will be '_'
docstr_tok: ["Parameters","--","--","--","--","--","df",":","pd.DataFrame","contains","category_col",",","and","parse_col",",","were","parsed","col","is","entirely","spacy","docs","parsed_col",":","str","name","of","spacy","parsed","column","in","convention_df","feats_from_spacy_doc",":","FeatsFromSpacyDoc","category_col",":","str",",","Optional","name","of","category","column","in","df",";","if","None",",","all","category","names","will","be","'","_","'"]
code: def __init__(
      self, df, parsed_col, feat_and_offset_getter, category_col=None
  ):
      """
      Parameters
      ----------
      df : pd.DataFrame
       contains category_col, and parse_col, were parsed col is entirely spacy docs
      parsed_col : str
          name of spacy parsed column in convention_df
      feats_from_spacy_doc : FeatsFromSpacyDoc
      category_col : str, Optional
          name of category column in df; if None, all category names will be '_'
      """
      self._df = df.reset_index()
      self._category_col = category_col
      self._parsed_col = parsed_col
      self._category_idx_store = IndexStore()
      self._X_factory = CSRMatrixFactory()
      self._mX_factory = CSRMatrixFactory()
      self._term_idx_store = IndexStore()
      self._metadata_idx_store = IndexStore()
      self._feat_and_offset_getter = feat_and_offset_getter
      self._term_offsets = {}
      self._metadata_offsets = {}
  
file_path: scattertext/scattertext/OffsetCorpusFactory.py
imports: import string
  import numpy
  from scattertext.OffsetCorpus import OffsetCorpus
  from scattertext.CSRMatrixTools import CSRMatrixFactory
  from scattertext.indexstore.IndexStore import IndexStore
label_desc: Use image node_id 1 to create a new OffsetCorpusFactory object from inherited base classes: object with example: obj = OffsetCorpusFactory(df, parsed_col, feat_and_offset_getter, category_col)