class_docstr: Defines the Word2Vec embedding technique.
  
  SEE: https://radimrehurek.com/gensim/models/word2vec.html
  
  Attributes:
      _model: The gensim.models.word2vec model.
          Defaults to None.
      kwargs: The keyword arguments dictionary.
          Defaults to { min_count=0 }.
class_docstr_tok: ["Defines","the","Word2Vec","embedding","technique",".","SEE",":","https",":","\/\/radimrehurek.com\/gensim\/models\/word2vec.html","Attributes",":","_model",":","The","gensim.models.word2vec","model",".","Defaults","to","None",".","kwargs",":","The","keyword","arguments","dictionary",".","Defaults","to","{","min_count=0","}","."]
docstr: Fits the Word2Vec model based on provided walks.
  
  Args:
      walks: The walks to create the corpus to to fit the model.
      is_update: True if the new walks should be added to old model's
          walks, False otherwise.
          Defaults to False.
  
  Returns:
      The fitted Word2Vec model.
docstr_tok: ["Fits","the","Word2Vec","model","based","on","provided","walks",".","Args",":","walks",":","The","walks","to","create","the","corpus","to","to","fit","the","model",".","is_update",":","True","if","the","new","walks","should","be","added","to","old","model's","walks",",","False","otherwise",".","Defaults","to","False",".","Returns",":","The","fitted","Word2Vec","model","."]
code: def fit(
      self, walks: List[List[SWalk]], is_update: bool = False
  ) -> Embedder:
      """Fits the Word2Vec model based on provided walks.
  
      Args:
          walks: The walks to create the corpus to to fit the model.
          is_update: True if the new walks should be added to old model's
              walks, False otherwise.
              Defaults to False.
  
      Returns:
          The fitted Word2Vec model.
  
      """
      corpus = [walk for entity_walks in walks for walk in entity_walks]
      self._model.build_vocab(corpus, update=is_update)
      self._model.train(
          corpus,
          total_examples=self._model.corpus_count,
          epochs=self._model.epochs,
      )
      return self
  
file_path: pyRDF2Vec/pyrdf2vec/embedders/word2vec.py
imports: from __future__ import annotations
  from typing import List
  import attr
  from gensim.models.word2vec import Word2Vec
  from pyrdf2vec.embedders import Embedder
  from pyrdf2vec.typings import Embeddings, Entities, SWalk
label_desc: Use image node_id 2 for calling the Word2Vec obj's underlying member method code with example usage: obj.fit(walks, is_update) and returns: self