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

How to count out of vocabulary words #37

Open
svetlana21 opened this issue Feb 28, 2018 · 1 comment
Open

How to count out of vocabulary words #37

svetlana21 opened this issue Feb 28, 2018 · 1 comment

Comments

@svetlana21
Copy link

svetlana21 commented Feb 28, 2018

Hello,
I wonder if there is some way to count OOVs in my data. I want to evaluate coverage of my data by the fasttext model. And how can I get the words which actually exist in the model? Can I ignore OOVs somehow while working with the model?
Thank you

@vrasneur
Copy link
Owner

Hello @svetlana21,

You have the model.words attribute that contains a list of all the words that exist in the model.

Fasttext uses "subwords" to handle OOV words. You can use model.get_substrings(word) to get the subwords.

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