# Lookup table not giving desired result

**URL:** <https://forum.rasa.com/t/lookup-table-not-giving-desired-result/10669>\
**Category:** Rasa Open Source\
**Created:** [May 30, 2019, 3:49pm UTC](https://forum.rasa.com/t/lookup-table-not-giving-desired-result/10669 "2019-05-30T15:49:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![abhi\_bh\_nlp](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/abhi_bh_nlp/32/5905_2.png) [@abhi\_bh\_nlp](https://forum.rasa.com/u/abhi_bh_nlp)\
**Post date:** [May 30, 2019, 3:49pm UTC](https://forum.rasa.com/t/lookup-table-not-giving-desired-result/10669/1 "2019-05-30T15:49:05Z")

</div>

Hi, i have gone through the blog [Improving Entity Extraction with Lookup Tables](https://blog.rasa.com/improving-entity-extraction/?_ga=2.258433229.630265857.1559062226-1054761945.1556541568).

I am facing challenges in getting the desired result, if anyone can help me understand how exactly this lookup functionality works.

Below are my files: nlu\_entity\_md=“”"

## intent:Access

-Can I get access to ABCD [Animal & Bird Cat Data] (application)  
-May I get access to CODE Control and Operational Dept Evaluation  
-how do i get entry into ABCD?  
-Access to ROSE  
-How can I get access to FIFA  
-How do I acees into Controls Room  
-I want login to ABA?  
-access to code?  
-rose access  
-Animal & Bird Cat Data access  
-FIFA access  
-FIFA access  
-access to fifa  
-access to aba  
-Can I get access for [Animal & Bird Cat Data] (application:ABCD)  
-May I get access for Control and Operational Dept Evaluation  
-May I get access to control and operational dept evaluation  
-how do i get access for fifa

# lookup:application

- ABCD
- CODE
- ROSE
- ABA
- FIFA
- Controls Room
- abcd
- code
- rose
- aba
- fifa
- controls room
- apple
- rat
- mat
- value and prepositions “”" %store nlu\_entity\_md \> nlu\_entity.md

##### config file

config = “”" language: “en”

pipeline:

- name: “SpacyNLP” # loads the spacy language model model: “en\_core\_web\_md” case\_sensitive: true
- name: “SpacyTokenizer” # splits the sentence into tokens
- name: “RegexFeaturizer”
- name: “CRFEntityExtractor” features: [[“low”, “titlmate”, “upper”],[“bias”, “low”, “prefix5”, “prefix2”, “suffix5”, “suffix3”,“suffix2”, “upper”, “title”, “digit”, “pattern”],[“low”, “title”, “upper”]]

“”"

%store config \> config.yml indent preformatted text by 4 spaces ########## test data sent=[‘access to aba’, ‘how do i get access to ROSE’, ‘can i get access to fifa’, ’ how do i get access to RANDOM’, ‘access to MAT’, ‘access to mat’, ‘access to value and prepositions’, ‘access to JIRA’]

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/f/f494bfb11cbbb6bb94a04771543b8a045278f22c.png)

## queries that i have.

1. Why it is unable to pick up the entity mat and ’ value and prepositions" even tough its there in look up table?
2. RANDOM is not there in lookup table but i believe CRF is able to understand the structure of sentence and predict the entity, thus in this case even if i remove the MAT from the lookup it would work, then how exactly LOOKUP table is useful for us.
3. How do i handle entities that are of more than one word, do i need to train for all such values.
4. How exactly lookup tables are used for entity extraction?

---

<div class="post-metadata">

**Author:** ![OmarGr](https://avatars.discourse-cdn.com/v4/letter/o/258eb7/32.png) [@OmarGr](https://forum.rasa.com/u/OmarGr)\
**Post date:** [May 30, 2019, 8:28pm UTC](https://forum.rasa.com/t/lookup-table-not-giving-desired-result/10669/3 "2019-05-30T20:28:32Z")

</div>

Hi @abhi_bh_nlp, try to include all your lookup words in the training set. It should work then.

---

<div class="post-metadata">

**Author:** ![abhi\_bh\_nlp](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/abhi_bh_nlp/32/5905_2.png) [@abhi\_bh\_nlp](https://forum.rasa.com/u/abhi_bh_nlp)\
**Post date:** [May 31, 2019, 12:24pm UTC](https://forum.rasa.com/t/lookup-table-not-giving-desired-result/10669/4 "2019-05-31T12:24:50Z")

</div>

That’s what i am failing to understand, if i have to give all the words in the training sets how is lookup table helpful. Is it just that it creates additional feature for CRF , so that probability of getting recognized of entity increases?

---

<div class="post-metadata">

**Author:** ![OmarGr](https://avatars.discourse-cdn.com/v4/letter/o/258eb7/32.png) [@OmarGr](https://forum.rasa.com/u/OmarGr)\
**Post date:** [May 31, 2019, 1:45pm UTC](https://forum.rasa.com/t/lookup-table-not-giving-desired-result/10669/5 "2019-05-31T13:45:17Z")

</div>

Yes! The lookup transforms to features for CRF.

---

<div class="post-metadata">

**Author:** ![juven](https://avatars.discourse-cdn.com/v4/letter/j/b487fb/32.png) [@juven](https://forum.rasa.com/u/juven)\
**Post date:** [June 29, 2019, 9:25am UTC](https://forum.rasa.com/t/lookup-table-not-giving-desired-result/10669/6 "2019-06-29T09:25:34Z")

</div>

I have similiar question: Whether do I need include all data in lookup table into nlu training data? If yes, why do I need to use lookup tables? and the volumn of nlu training data will be too much, it will cost a long time to train.

Waiting someone for giving the answer. Thanks.
