Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #824 : no corpus in init, but trim_rule in init #1186

Merged
merged 2 commits into from
Mar 7, 2017

Conversation

prakhar2b
Copy link
Contributor

@prakhar2b prakhar2b commented Mar 7, 2017

logged warning that trim_rule is being ignored for separate model initialization and vocabulary building. (#824)

logged warning that trim_rule is being ignored for separate model initialization and vocabulary building
@@ -474,6 +474,11 @@ def __init__(
raise TypeError("You can't pass a generator as the sentences argument. Try an iterator.")
self.build_vocab(sentences, trim_rule=trim_rule)
self.train(sentences)

else :
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This warning even shows if no trim_rule specified – which seems excessive, as there's no hint that the user is confused in that case.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gojomo Thanks for pointing that out. I've updated the code accordingly.

@tmylk tmylk merged commit 000c02a into piskvorky:develop Mar 7, 2017
@tmylk
Copy link
Contributor

tmylk commented Mar 7, 2017

Thanks for making this more clear to users!

@prakhar2b prakhar2b deleted the pre_gsoc_2017 branch March 8, 2017 06:49
pranaydeeps pushed a commit to pranaydeeps/gensim that referenced this pull request Mar 21, 2017
…ky#1186)

* no corpus in init, but trim_rule in init

logged warning that trim_rule is being ignored for separate model initialization and vocabulary building

* log warning only when trim_rule is specified
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants