docstr: Parameters
  ----------
  corpus: ParsedCorpus
    from which to build word2vec model
  word2vec_model: word2vec.Word2Vec
      Gensim instance to be used to train word2vec model
docstr_tok: ["Parameters","--","--","--","--","--","corpus",":","ParsedCorpus","from","which","to","build","word2vec","model","word2vec_model",":","word2vec.Word2Vec","Gensim","instance","to","be","used","to","train","word2vec","model"]
code: def __init__(self, corpus, word2vec_model=None):
      """
      Parameters
      ----------
      corpus: ParsedCorpus
        from which to build word2vec model
      word2vec_model: word2vec.Word2Vec
          Gensim instance to be used to train word2vec model
      """
      try:
          from gensim.models import word2vec
  
          assert word2vec_model is None or isinstance(
              word2vec_model, word2vec.Word2Vec
          )
      except:
          warnings.warn(
              "You should really install gensim, but we're going to duck-type your model and pray it works"
          )
      # assert isinstance(corpus, ParsedCorpus)
      self.corpus = corpus
      self.model = self._get_word2vec_model(word2vec_model)
  
imports: import itertools
  import warnings
  from collections import Counter
  from scattertext.ParsedCorpus import ParsedCorpus
label_desc: Use image node_id 1 to create a new Word2VecFromParsedCorpus object from inherited base classes: Word2VecDefault with example: obj = Word2VecFromParsedCorpus(corpus, word2vec_model)