original_docstring: 
          Learn word2vec embeddings for the examples in `X_train`.
  
          Parameters
          ----------
          corpus_fps : str or list of strs
              The filepath / list of filepaths to the document(s) to be encoded.
              Each document is expected to be encoded as newline-separated
              string of text, with adjacent tokens separated by a whitespace
              character.
          encoding : str
              Specifies the text encoding for corpus. Common entries are either
              'utf-8' (no header byte), or 'utf-8-sig' (header byte).  Default
              value is 'utf-8-sig'.
          n_epochs : int
              The maximum number of training epochs to run. Default is 20.
          batchsize : int
              The desired number of examples in each training batch. Default is
              128.
          verbose : bool
              Print batch information during training. Default is True.
          
docstring: Learn word2vec embeddings for the examples in `X_train`.
  Parameters
  
  corpus_fps : str or list of strs
  The filepath / list of filepaths to the document(s) to be encoded.
  Each document is expected to be encoded as newline-separated
  string of text, with adjacent tokens separated by a whitespace
  character.
  encoding : str
  Specifies the text encoding for corpus. Common entries are either
  'utf-8' (no header byte), or 'utf-8-sig' (header byte).  Default
  value is 'utf-8-sig'.
  n_epochs : int
  The maximum number of training epochs to run. Default is 20.
  batchsize : int
  The desired number of examples in each training batch. Default is
  128.
  verbose : bool
  Print batch information during training. Default is True.
docstring_tokens: Learn word2vec embeddings for the examples in ` X_train ` . Parameters corpus_fps : str or list of strs The filepath / list of filepaths to the document ( s ) to be encoded . Each document is expected to be encoded as newline - separated string of text with adjacent tokens separated by a whitespace character . encoding : str Specifies the text encoding for corpus . Common entries are either ' utf - 8 ' ( no header byte ) or ' utf - 8 - sig ' ( header byte ) . Default value is ' utf - 8 - sig ' . n_epochs : int The maximum number of training epochs to run . Default is 20 . batchsize : int The desired number of examples in each training batch . Default is 128 . verbose : bool Print batch information during training . Default is True .
code: def fit(
          self, corpus_fps, encoding="utf-8-sig", n_epochs=20, batchsize=128, verbose=True
      ):
          """
          Learn word2vec embeddings for the examples in `X_train`.
  
          Parameters
          ----------
          corpus_fps : str or list of strs
              The filepath / list of filepaths to the document(s) to be encoded.
              Each document is expected to be encoded as newline-separated
              string of text, with adjacent tokens separated by a whitespace
              character.
          encoding : str
              Specifies the text encoding for corpus. Common entries are either
              'utf-8' (no header byte), or 'utf-8-sig' (header byte).  Default
              value is 'utf-8-sig'.
          n_epochs : int
              The maximum number of training epochs to run. Default is 20.
          batchsize : int
              The desired number of examples in each training batch. Default is
              128.
          verbose : bool
              Print batch information during training. Default is True.
          """
          self.verbose = verbose
          self.n_epochs = n_epochs
          self.batchsize = batchsize
  
          self.vocab = Vocabulary(
              lowercase=True,
              min_count=self.min_count,
              max_tokens=self.max_tokens,
              filter_stopwords=self.filter_stopwords,
          )
          self.vocab.fit(corpus_fps, encoding=encoding)
          self.vocab_size = len(self.vocab)
  
          # ignore special characters when training the model
          for sp in self.special_chars:
              self.vocab.counts[sp] = 0
  
          # now that we know our vocabulary size, we can initialize the embeddings
          self._init_params()
  
          prev_loss = np.inf
          for i in range(n_epochs):
              loss, estart = 0.0, time()
              loss = self._train_epoch(corpus_fps, encoding)
  
              fstr = "[Epoch {}] Avg. loss: {:.3f}  Delta: {:.3f} ({:.2f}m/epoch)"
              print(fstr.format(i + 1, loss, prev_loss - loss, (time() - estart) / 60.0))
              prev_loss = loss
code_tokens: def fit ( self , corpus_fps , encoding = "utf-8-sig" , n_epochs = 20 , batchsize = 128 , verbose = True ) : self . verbose = verbose self . n_epochs = n_epochs self . batchsize = batchsize self . vocab = Vocabulary ( lowercase = True , min_count = self . min_count , max_tokens = self . max_tokens , filter_stopwords = self . filter_stopwords , ) self . vocab . fit ( corpus_fps , encoding = encoding ) self . vocab_size = len ( self . vocab ) for sp in self . special_chars : self . vocab . counts [ sp ] = 0 self . _init_params ( ) prev_loss = np . inf for i in range ( n_epochs ) : loss , estart = 0.0 , time ( ) loss = self . _train_epoch ( corpus_fps , encoding ) fstr = "[Epoch {}] Avg. loss: {:.3f}  Delta: {:.3f} ({:.2f}m/epoch)" print ( fstr . format ( i + 1 , loss , prev_loss - loss , ( time ( ) - estart ) / 60.0 ) ) prev_loss = loss
short_docstring: Learn word2vec embeddings for the examples in `X_train`.
short_docstring_tokens: Learn word2vec embeddings for the examples in ` X_train ` .
comment: """
          Learn word2vec embeddings for the examples in `X_train`.
  
          Parameters
          ----------
          corpus_fps : str or list of strs
              The filepath / list of filepaths to the document(s) to be encoded.
              Each document is expected to be encoded as newline-separated
              string of text, with adjacent tokens separated by a whitespace
              character.
          encoding : str
              Specifies the text encoding for corpus. Common entries are either
              'utf-8' (no header byte), or 'utf-8-sig' (header byte).  Default
              value is 'utf-8-sig'.
          n_epochs : int
              The maximum number of training epochs to run. Default is 20.
          batchsize : int
              The desired number of examples in each training batch. Default is
              128.
          verbose : bool
              Print batch information during training. Default is True.
          """$SEP$# ignore special characters when training the model$SEP$# now that we know our vocabulary size, we can initialize the embeddings