Skip to content

Commit

Permalink
Fix parameter setting for FastText.train. Fix #1818 (#1837)
Browse files Browse the repository at this point in the history
* bm25 scoring function updated

* Fixes #1828

* Fixes #1828

* Fixes #1828

* Fixes #1828

* Fixes #1828

* Fixes #1828 , Tests added

* Fixes #1828 , Tests added

* Fixes #1828 , Tests Added

* Fixes #1828 , Tests Added

* Fixes #1828 , Tests Added

* Fixes #1828 , Tests Added

* Fixes #1828

* Function Parameters corrected , Fixes #1818

* add missing params + add supercall
  • Loading branch information
sj29-innovate authored and menshikh-iv committed Jan 12, 2018
1 parent 1648ac2 commit 4b8a1c0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions gensim/models/fasttext.py
Original file line number Diff line number Diff line change
Expand Up @@ -528,9 +528,10 @@ def train(self, sentences, total_examples=None, total_words=None,
self.neg_labels = zeros(self.negative + 1)
self.neg_labels[0] = 1.

Word2Vec.train(
self, sentences, total_examples=self.corpus_count, epochs=self.iter,
start_alpha=self.alpha, end_alpha=self.min_alpha)
super(FastText, self).train(
sentences, total_examples=total_examples, total_words=total_words, epochs=epochs, start_alpha=start_alpha,
end_alpha=end_alpha, word_count=word_count, queue_factor=queue_factor, report_delay=report_delay
)
self.get_vocab_word_vecs()

def __getitem__(self, word):
Expand Down

0 comments on commit 4b8a1c0

Please sign in to comment.