sense2vec icon indicating copy to clipboard operation
sense2vec copied to clipboard

Adding new key

Open santoshbs opened this issue 4 years ago • 2 comments

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 avatar Jun 11 '20 22:06 santoshbs

Request experts' help on this issue/question.

santoshbs avatar Jun 28 '20 10:06 santoshbs

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.

petulla avatar Jul 13 '20 14:07 petulla