# Entity Extraction not working with lookup table option

**URL:** <https://forum.rasa.com/t/entity-extraction-not-working-with-lookup-table-option/12913>\
**Category:** Rasa Open Source\
**Created:** [July 14, 2019, 2:53pm UTC](https://forum.rasa.com/t/entity-extraction-not-working-with-lookup-table-option/12913 "2019-07-14T14:53:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![manojrustagi79](https://avatars.discourse-cdn.com/v4/letter/m/cdc98d/32.png) [@manojrustagi79](https://forum.rasa.com/u/manojrustagi79)\
**Post date:** [July 14, 2019, 2:53pm UTC](https://forum.rasa.com/t/entity-extraction-not-working-with-lookup-table-option/12913/1 "2019-07-14T14:53:05Z")

</div>

I am creating a chabot for the restaurant search and I have created the data to be trained in JSON format. for city entity I have created a lookup table. E.g.

## intent:restaurant\_search

- show me a mexican place in the delhi for cusine and cities I have created the lookup table. when I test model using text: show me a mexican place in the delhi then it works fine. But when I test model with different cusine like italian and other city like mumbai. it does not extract the entities.

Can you please help me where I have made a mistake?

Thanks Manoj Kumar

---

<div class="post-metadata">

**Author:** ![JulianGerhard](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/juliangerhard/32/3781_2.png) [@JulianGerhard](https://forum.rasa.com/u/JulianGerhard)\
**Post date:** [July 15, 2019, 5:02am UTC](https://forum.rasa.com/t/entity-extraction-not-working-with-lookup-table-option/12913/2 "2019-07-15T05:02:47Z")

</div>

Hi @manojrustagi79

as documented here:

> **[NLU Training Data](https://rasa.com/docs/rasa/nlu-training-data/)**
>
> Read more about how to format training data with Rasa NLU for open source natural language processing.

the lookup tables are just a “help” for the algorithm to find entities. If this intent and the provided sample are “all” you feeded your bot to train, this might not be enough.

Derived from your sample: Have you thought about using e.g. spacy to auto-extract / map your slot with the predefined entity “LOC” ? That possibly might be easier…

Regards Julian

---

<div class="post-metadata">

**Author:** ![Tanja](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/tanja/32/4696_2.png) [@Tanja](https://forum.rasa.com/u/Tanja)\
**Post date:** [July 15, 2019, 8:18am UTC](https://forum.rasa.com/t/entity-extraction-not-working-with-lookup-table-option/12913/3 "2019-07-15T08:18:41Z")

</div>

You should keep the note from the documentation in mind

> Note: For lookup tables to be effective, there must be a few examples of matches in your training data. Otherwise the model will not learn to use the lookup table match features.

If a word is in a lookup table or not, is just another feature for our NER. So, you should have a couple of training examples that contain cities from your lookup tables. Otherwise, the NER cannot learn, that the lookup table feature is important to mark a word as city. Does that help?

---

<div class="post-metadata">

**Author:** ![manojrustagi79](https://avatars.discourse-cdn.com/v4/letter/m/cdc98d/32.png) [@manojrustagi79](https://forum.rasa.com/u/manojrustagi79)\
**Post date:** [July 17, 2019, 4:50pm UTC](https://forum.rasa.com/t/entity-extraction-not-working-with-lookup-table-option/12913/4 "2019-07-17T16:50:30Z")

</div>

Thanks for your inputs. It was solved using above suggestions.
