0
$\begingroup$

I expected GLoVe to have vectors for numbers.

from gensim import downloader as api
glove = api.load("glove-twitter-25")
glove['1']

This results in KeyError: "Key '1' not present"

Does GLoVe ignore numbers? Or are they somehow tokenized?

Interesting that there are vectors for single letters like "a" or even "i"

$\endgroup$

1 Answer 1

0
$\begingroup$

It does have vector representation for numerics in arabic and other languages. Type this:

for e in glove.index_to_key :
    try : 
        int(e)
        print(type(e))
        print(e)
    except :
        pass 
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.