# Pre-Annotation Cannot Capture Entiity

**URL:** <https://support.prodi.gy/t/pre-annotation-cannot-capture-entiity/5229>\
**Category:** Uncategorized\
**Tags:** usage, ner, spacy\
**Created:** [January 24, 2022, 1:43pm UTC](https://support.prodi.gy/t/pre-annotation-cannot-capture-entiity/5229 "2022-01-24T13:43:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ta13](https://avatars.discourse-cdn.com/v4/letter/t/59ef9b/32.png) [@ta13](https://support.prodi.gy/u/ta13)\
**Post date:** [January 24, 2022, 1:43pm UTC](https://support.prodi.gy/t/pre-annotation-cannot-capture-entiity/5229/1 "2022-01-24T13:43:34Z")

</div>

I have pre annotated with spacy with Entity Ruler for building a model in Prodigy but some of the patterns cannot be identified by the ruler.  
Ex: pattern = [{'label': 'A', 'pattern': [{'LOWER': 'PP'}]}]  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/prodigy/original/2X/d/dfdb25aafeefee7e774be62af90f17d43ebca116.png)  
It is seen that it didnot find the entity? what's the reason behind it? I have used below lines for the ruler:

nlp = spacy.blank("en")  
ruler = nlp.add\_pipe('entity\_ruler')  
ruler.add\_patterns(pattern)

---

<div class="post-metadata">

**Author:** ![ljvmiranda921](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/ljvmiranda921/32/3197_2.png) [@ljvmiranda921](https://support.prodi.gy/u/ljvmiranda921)\
**Post date:** [January 25, 2022, 9:46am UTC](https://support.prodi.gy/t/pre-annotation-cannot-capture-entiity/5229/2 "2022-01-25T09:46:29Z")

</div>

Hi @ta13,

I am curious as to what recipe are you using for pre-annotation? If it's `ner.correct` + a model saved with the entity ruler, then it should work because the entities are in `doc.ents`.

Perhaps you can try using the `--patterns` argument, it takes the same format as the EntityRuler and will highlight all matches.
