# Bad results with terms.teach

**URL:** <https://support.prodi.gy/t/bad-results-with-terms-teach/350>\
**Category:** Uncategorized\
**Tags:** terms, solved\
**Created:** [February 27, 2018, 5:45pm UTC](https://support.prodi.gy/t/bad-results-with-terms-teach/350 "2018-02-27T17:45:38Z")\
**Posts on this page:** 1\
**Showing post:** 6

<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:** [August 20, 2018, 10:55am UTC](https://support.prodi.gy/t/bad-results-with-terms-teach/350/6 "2018-08-20T10:55:21Z")

</div>

> [@lorenlc](#):
>
> Do you have any suggestions as to why this might be happening?

To find other terms , the `terms.teach` recipe will iterate over the entries in the model's vocab. So maybe your custom model doesn't actually have the words present in its vocabulary?

This would explain why the only terms you see are the seed terms (which were added to the target `Doc` and are then part of the vocab) and why it works when you use the model manually (because words you process are then added to the vocabulary). You can test this by looking at `len(nlp.vocab)` – the number should be roughly the number of word you've added vectors for.

In your code, make sure to use the [`vocab.set_vector` method](https://spacy.io/api/vocab#set_vector) to also add the word to the vocab. Alternatively, you could also use [`vocab.strings.add`](https://spacy.io/api/stringstore#add) to add strings to the vocabulary directly.

---

_[View the full topic](https://support.prodi.gy/t/bad-results-with-terms-teach/350)._
