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

Vocabulary size is much smaller than it ought to be #7

Closed
KevinBretonnelCohen opened this issue Jan 20, 2016 · 3 comments
Closed

Vocabulary size is much smaller than it ought to be #7

KevinBretonnelCohen opened this issue Jan 20, 2016 · 3 comments

Comments

@KevinBretonnelCohen
Copy link

"Vocab size" is way off. See the attached screen shot: 1.4 billion words of PubMedCentral author manuscripts, and the vocabulary size is 1,307, according to the status message output. Doesn't seem likely.

I'm using whatever version of wordVectors was on GitHub as of mid-January 2015. Not sure what version of RStudio--I think those 1.4 billion words of text have choked my laptop to death... OS X.

screenshot 2016-01-19 19 48 53

@KevinBretonnelCohen
Copy link
Author

An additional data point regarding the small vocabulary size that's showing up on the status message: I'm trying to run train_word2vec() on a data set that's about 1/10 the size of the data set that I was using yesterday, and it's showing the same vocabulary size--see the attached screen shot...

screenshot 2016-01-20 12 54 27

@KevinBretonnelCohen
Copy link
Author

Cut the data set down by another order of magnitude--same vocabulary size showing. See screen shot.

screenshot 2016-01-20 13 03 19

@bmschmidt
Copy link
Owner

Huh. How are you normalizing the text? I can untar a few pubmed abstracts and run cat */*.txt | perl -pe 's/[^A-Za-z \n]/ /g;' > all.txt to get something that gives 40,195 vocab in 5.8 million words.

  1. What's the output of system("head -20 YOURFILENAME | cut -c 1-80")? Does it look like real text? Or another check is; what are the first twenty rownames() of the trained object model?
  2. Try rerunning install_github("bmschmidt/wordVectors"); maybe the update last week fixed it.

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