# Error when adding seed terms to terms.teach

**URL:** <https://support.prodi.gy/t/error-when-adding-seed-terms-to-terms-teach/1577>\
**Category:** Uncategorized\
**Tags:** done, terms, solved\
**Created:** [May 26, 2019, 7:22am UTC](https://support.prodi.gy/t/error-when-adding-seed-terms-to-terms-teach/1577 "2019-05-26T07:22:40Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![elbow](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/elbow/32/1177_2.png) [@elbow](https://support.prodi.gy/u/elbow)\
**Post date:** [May 26, 2019, 7:22am UTC](https://support.prodi.gy/t/error-when-adding-seed-terms-to-terms-teach/1577/1 "2019-05-26T07:22:40Z")

</div>

Hi, I just bought prodigy and am having a little trouble getting started.

This works:  
`prodigy terms.teach terms_test en_core_web_sm`  
But not this:  
`prodigy terms.teach terms_test en_core_web_sm --seeds “great, excellent”`

Whenever I add seed terms I get the following warning repeated and see an error message on the web app:  
`UserWarning: [W008] Evaluating Lexeme.similarity based on empty vectors.
self._bootstrap_inner()`

I’ve tried using en\_core\_web\_sm, en\_core\_web\_lg, and en\_vectors\_web\_lg. I’m using spacy 2.1.4 and prodigy 1.8.1. Any suggestions?

---

<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:** [May 27, 2019, 9:50am UTC](https://support.prodi.gy/t/error-when-adding-seed-terms-to-terms-teach/1577/2 "2019-05-27T09:50:41Z")

</div>

If you’re using the `en_core_web_sm` model, that warning is expected, because that model doesn’t have any word vectors. For all other models, it usually means that one or more seed terms you’re trying to add are not in your vectors table. However, it does seem unlikely given the terms “great” and “excellent”.

What do the suggestions look like when you use a model like `en_vectors_web_lg` and you go through them in the app? Do they make sense?

**Edit:** Okay, I can reproduce this with the large vector model. It seems like for some reason, spaCy thinks that the underlying lexemes it’s comparing (seed terms vs. model vocab) do not have vectors. So the similarity comparison doesn’t produce any results, and the user warning is shown (which is really just a warning, because spaCy does allow empty similarity comparisons – it’s just normally not what you want and a very helpful warning in cases like this).

---

<div class="post-metadata">

**Author:** ![elbow](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/elbow/32/1177_2.png) [@elbow](https://support.prodi.gy/u/elbow)\
**Post date:** [May 27, 2019, 8:29pm UTC](https://support.prodi.gy/t/error-when-adding-seed-terms-to-terms-teach/1577/3 "2019-05-27T20:29:48Z")

</div>

Thanks for the quick follow up. It isn’t just a warning though, I can’t get terms.teach to work at all if I use seeds.

When I use en\_core\_web\_sm I get the following error:  
`ValueError: [E010] Word vectors set to length 0. This may be because you
don’t have a model installed or loaded, or because your model doesn’t
include word vectors. For more info, see the docs:`  
(in case it helps diagnose, this error doesnt show until I actually try and open the web app in my browser.)

And when I use en\_core\_web\_lg, I get the user warning mentioned earlier (repeated ad infinitum) and the web app remains stuck ‘Loading…’

**Edit** I forgot to answer your suggestion! en\_vectors\_web\_lg shows the same warning as en\_core\_web\_lg and also gets stuck at loading screen w warning repeating

---

<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:** [May 28, 2019, 9:08am UTC](https://support.prodi.gy/t/error-when-adding-seed-terms-to-terms-teach/1577/4 "2019-05-28T09:08:44Z")

</div>

Yes, the `en_core_web_sm` error is expected – this is spaCy telling you that the model doesn’t have word vectors. If you use a model that has word vectors, you won’t see that error – but for some reason, spaCy thinks it’s comparing empty vectors, so you’ll see a warning and there are no suggestions.

Anyway, we’ll hopefully have fix for this today!

---

<div class="post-metadata">

**Author:** ![honnibal](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/honnibal/32/35_2.png) [@honnibal](https://support.prodi.gy/u/honnibal)\
**Post date:** [May 28, 2019, 10:18am UTC](https://support.prodi.gy/t/error-when-adding-seed-terms-to-terms-teach/1577/5 "2019-05-28T10:18:10Z")

</div>

Just implemented the fix for this, which should be released today. I’ve implemented an extra check in the recipe to avoid iterating over words which don’t have a vector, to avoid the warning spam.

In the meantime, you can set the environment variable `SPACY_WARNING_IGNORE="W008"` to prevent the warnings from coming up. The warnings are really the only problem here: with so many warnings printed, the loop runs fairly slowly, which is why you’re not seeing anything coming up. If you suppress the warnings and let the similarity function run, you should see results.

---

<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:** [May 28, 2019, 12:51pm UTC](https://support.prodi.gy/t/error-when-adding-seed-terms-to-terms-teach/1577/6 "2019-05-28T12:51:29Z")

</div>

Just released v1.8.2, which adds a fix to the recipe to automatically skip words with no vectors. This prevents the warning from being raised. So it should now also work as expected without the environment variable 🙂

---

<div class="post-metadata">

**Author:** ![elbow](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/elbow/32/1177_2.png) [@elbow](https://support.prodi.gy/u/elbow)\
**Post date:** [May 29, 2019, 12:30am UTC](https://support.prodi.gy/t/error-when-adding-seed-terms-to-terms-teach/1577/7 "2019-05-29T00:30:27Z")

</div>

Thanks yall. 1.8.2 works for me.

---

<div class="post-metadata">

**Author:** ![alexpghayes](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/alexpghayes/32/2386_2.png) [@alexpghayes](https://support.prodi.gy/u/alexpghayes)\
**Post date:** [September 2, 2021, 6:53pm UTC](https://support.prodi.gy/t/error-when-adding-seed-terms-to-terms-teach/1577/8 "2021-09-02T18:53:42Z")

</div>

I'm running into this when I try to use `en_core_web_trf` instead of `en_core_web_lg` -- is this expected?

---

<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:** [September 5, 2021, 2:48am UTC](https://support.prodi.gy/t/error-when-adding-seed-terms-to-terms-teach/1577/9 "2021-09-05T02:48:08Z")

</div>

> [@alexpghayes](#):
>
> I'm running into this when I try to use `en_core_web_trf` instead of `en_core_web_lg` -- is this expected?

Yes, the `trf` model doesn't have any word vectors, so it won't work with the current `terms.teach` workflow that iterates over the model's vocab and uses word vectors to suggest similar terms.
