# Prodigy sense2vec.teach recipe with gensim w2vec

**URL:** <https://support.prodi.gy/t/prodigy-sense2vec-teach-recipe-with-gensim-w2vec/3978>\
**Category:** Uncategorized\
**Tags:** usage, spacy, terms, solved, sense2vec\
**Created:** [March 4, 2021, 1:42pm UTC](https://support.prodi.gy/t/prodigy-sense2vec-teach-recipe-with-gensim-w2vec/3978 "2021-03-04T13:42:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![fsa](https://avatars.discourse-cdn.com/v4/letter/f/e9a140/32.png) [@fsa](https://support.prodi.gy/u/fsa)\
**Post date:** [March 4, 2021, 1:42pm UTC](https://support.prodi.gy/t/prodigy-sense2vec-teach-recipe-with-gensim-w2vec/3978/1 "2021-03-04T13:42:16Z")

</div>

Hi,

based on the sense2vec.teach

prodigy sense2vec.teach food\_terms data/s2v\_reddit\_2015\_md/ --seeds "garlic, avocado, cottage cheese, olive oil, cumin, chicken breast,beef, iceberg lettuce"

I would like to use gensim w2vec generated model to generate similar words/phrases to the given seed words/phrases

In order to make this smoothly work, the gensim w2vec model should has the same format as the "s2v\_reddit\_2015\_md/" model? if so how to convert the gensim w2vec model format to be compatible with the sense2vec model? or is there any other way to achieve this goal?

---

<div class="post-metadata">

**Author:** ![ines](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/ines/32/3_2.png) [@ines](https://support.prodi.gy/u/ines)\
**Post date:** [March 5, 2021, 12:14am UTC](https://support.prodi.gy/t/prodigy-sense2vec-teach-recipe-with-gensim-w2vec/3978/2 "2021-03-05T00:14:43Z")

</div>

Hi! A sense2vec model is essentially just a word2vec model trained on words/phrases with concatenated POS tags or entity labels. But in order to query that, the `sense2vec` library includes various methods so you can look up words with tags etc.

If you just have a regular w2v model, using it via the sense2vec library doesn't make that much sense and a lot of the assumptions in the `sense2vec.teach` workflow don't really hold up either because your vectors couldn't be queried by tags. I think a better solution would be one of the following:

- [Add your word vectors](https://v2.spacy.io/usage/vectors-similarity#converting) to a blank spaCy pipeline and use it with `terms.teach`.
- Write your own recipe script that loads your vectors, calculates the average for the vectors of all seed terms and then find the most similar entries in your table and send them out. [See here](https://github.com/explosion/spaCy/blob/ea555b03e03a88245f61884913e421db00647896/spacy/vectors.pyx#L308-L363) for the `most_similar` implementation in spaCy.

---

<div class="post-metadata">

**Author:** ![fsa](https://avatars.discourse-cdn.com/v4/letter/f/e9a140/32.png) [@fsa](https://support.prodi.gy/u/fsa)\
**Post date:** [March 5, 2021, 9:47am UTC](https://support.prodi.gy/t/prodigy-sense2vec-teach-recipe-with-gensim-w2vec/3978/3 "2021-03-05T09:47:31Z")

</div>

Thanks a lot

> [@ines](#):
>
> terms.teach

This what I was looking for. I have a complicated scientific text and using sense2vec provided poor result. POS tag doesn't work well.

---

<div class="post-metadata">

**Author:** ![ines](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/ines/32/3_2.png) [@ines](https://support.prodi.gy/u/ines)\
**Post date:** [March 6, 2021, 3:44am UTC](https://support.prodi.gy/t/prodigy-sense2vec-teach-recipe-with-gensim-w2vec/3978/4 "2021-03-06T03:44:55Z")

</div>

Glad to hear! And yeah, the sense2vec vectors we trained were trained on Reddit text, which is pretty far from scientific texts 😅
