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

ngram_vocab=True ignores single words in vocabulary #364

Open
mirorac opened this issue Nov 25, 2024 · 1 comment
Open

ngram_vocab=True ignores single words in vocabulary #364

mirorac opened this issue Nov 25, 2024 · 1 comment

Comments

@mirorac
Copy link

mirorac commented Nov 25, 2024

When ngram_vocab=True is used, single words seem to be ignored in the vocabulary. In previous versions, this behavior did not occur, so I wanted to check if this change was intentional or an unintended regression.

Here’s the relevant line in the code:

vocab = phrases

Suggested fix:

vocab += phrases  

Could merging the phrases with the previously built vocabulary resolve the issue, or is this the expected behavior in the latest version?

@ddangelov
Copy link
Owner

It was intentional, as single words would often end up as top topic words rather than the ngrams.

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

No branches or pull requests

2 participants