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

Adding new key #112

Open
santoshbs opened this issue Jun 11, 2020 · 2 comments
Open

Adding new key #112

santoshbs opened this issue Jun 11, 2020 · 2 comments

Comments

@santoshbs
Copy link

santoshbs commented Jun 11, 2020

I am trying to add some new keys and find words similar to these keys. I was hoping do something on the following lines, for example:

vec=s2v['women|NOUN'] + s2v['king|NOUN'] - s2v['men|NOUN']
s2v.add("my_own_key|NOUN", vec)
s2v.most_similar("my_own_key|NOUN", n=10)

The second line throws an error though:

File "vectors.pyx", line 295, in spacy.vectors.Vectors.add
ValueError: [E060] Cannot add new key to vectors: the table is full. Current shape: (3387194, 300).

Not sure how to do such simple vector operations as above in sense2vec.

@santoshbs
Copy link
Author

Request experts' help on this issue/question.

@petulla
Copy link

petulla commented Jul 13, 2020

Same question @ines. Do you recommend looking at this thread for a solution? I wasn't able to reproduce the solution that's presented in that thread with s2v.

I was going to add vectors and fine-tune the vector corpus with another model.

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