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

GloVe - uneven vector size. #10

Open
BrazilForever11 opened this issue Apr 6, 2018 · 1 comment
Open

GloVe - uneven vector size. #10

BrazilForever11 opened this issue Apr 6, 2018 · 1 comment

Comments

@BrazilForever11
Copy link

I downloaded GloVe from http://nlp.stanford.edu/data/glove.840B.300d.zip and ran:

path = '../path_to_glove/file.txt'
read_file = open(path, 'r', encoding="utf-8")
for i, el in enumerate(read_file):
    if len(el.split())>301:
        print(i)
        print(len(el.split()))

it generated:

52343
303

I was expecting all vectors to be of the same size. I am on Win 7 enterprise with python 3.5
It also causes error in loadEmbedding_rand function.

@santhoshrajamanickam
Copy link

Follow this commit 1763f56 for fixing the bug.

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