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

Having problems running on fasttext vectors #15

Open
patrickdrouin opened this issue Feb 8, 2023 · 1 comment
Open

Having problems running on fasttext vectors #15

patrickdrouin opened this issue Feb 8, 2023 · 1 comment

Comments

@patrickdrouin
Copy link

Hello,

I am trying to test meemi on some fasttext embeddings (in txt format) I have. Here's the output I get. Any idea what is happening? I suspect it can read the embeddings since the first 2 steps seem to be running just fine.

(metavirt) $ ./meemi/get_crossembs.sh corpus_en.tag.bin.vec corpus_fr.tag.bin.vec en-fr.txt
Cross-lingual means
Mean mapping
Traceback (most recent call last):
File "map_embeddings.py", line 304, in
main()
File "map_embeddings.py", line 83, in main
trg_words, z = embeddings.read(trgfile, dtype=dtype)
File ".../metavirt/meemi/utils/vecmap/embeddings.py", line 23, in read
count = int(header[0]) if threshold <= 0 else min(threshold, int(header[0]))
ValueError: invalid literal for int() with base 10: ''
Traceback (most recent call last):
File "map_embeddings.py", line 304, in
main()
File "map_embeddings.py", line 83, in main
trg_words, z = embeddings.read(trgfile, dtype=dtype)
File ".../metavirt/meemi/utils/vecmap/embeddings.py", line 23, in read
count = int(header[0]) if threshold <= 0 else min(threshold, int(header[0]))
ValueError: invalid literal for int() with base 10: ''

@patrickdrouin
Copy link
Author

Tested with word2vec embeddings and ran into the same problem.

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

1 participant