Word frequencies

210 views
Skip to first unread message

suni...@gmail.com

unread,
Jun 5, 2018, 3:34:15 PM6/5/18
to fastText library
Does fasttext also produce a word frequency file from the text put in?

If not, is there a way to get the word frequencies of the pretrained models on the fasttext website?

Thanks!

Sunipa

Alexandre Pinto

unread,
Jun 7, 2018, 5:37:27 AM6/7/18
to fastText library

If I recall correctly, the word vectors file are ordered by frequency (most common to less common)

Sunipa Dev

unread,
Jun 7, 2018, 8:30:38 AM6/7/18
to Alexandre Pinto, fastText library
Yes it is ordered that way. But for this one task, I need the exact word frequencies of the words. Is there a way to extract that from the model?

Thanks!
Sunipa
--
You received this message because you are subscribed to a topic in the Google Groups "fastText library" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/fasttext-library/r1TgMibHQus/unsubscribe.
To unsubscribe from this group and all its topics, send an email to fasttext-library+unsubscribe@googlegroups.com.
To post to this group, send email to fasttext-library@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fasttext-library/909b4808-2b0b-42c5-9288-fcfedc6e4a95%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Sent from Gmail Mobile

Alexandre Pinto

unread,
Jun 7, 2018, 9:41:58 AM6/7/18
to fastText library
Yeah, you can:

import fastText
vectors
= fastText.load_model('wiki.en.bin')
words
, freq = vectors.get_words(include_freq=True)




On Tuesday, 5 June 2018 20:34:15 UTC+1, suni...@gmail.com wrote:
Reply all
Reply to author
Forward
0 new messages