# FutureWarning: Directly including lookup tables as a list is deprecated since Rasa 1.6. regex\_pattern = self.\_generate\_lookup\_regex(table)

**URL:** <https://forum.rasa.com/t/futurewarning-directly-including-lookup-tables-as-a-list-is-deprecated-since-rasa-1-6-regex-pattern-self-generate-lookup-regex-table/32405>\
**Category:** Rasa Open Source\
**Created:** [August 9, 2020, 12:36pm UTC](https://forum.rasa.com/t/futurewarning-directly-including-lookup-tables-as-a-list-is-deprecated-since-rasa-1-6-regex-pattern-self-generate-lookup-regex-table/32405 "2020-08-09T12:36:30Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ishamandrekar](https://avatars.discourse-cdn.com/v4/letter/i/aeb1de/32.png) [@ishamandrekar](https://forum.rasa.com/u/ishamandrekar)\
**Post date:** [August 9, 2020, 12:36pm UTC](https://forum.rasa.com/t/futurewarning-directly-including-lookup-tables-as-a-list-is-deprecated-since-rasa-1-6-regex-pattern-self-generate-lookup-regex-table/32405/1 "2020-08-09T12:36:30Z")

</div>

I am using Rasa version 1.10.9 and i want to use the lookup table feature for entity recognition. My config.py file:

```auto
language: en
pipeline:
  - name: SpacyNLP
    model: en_core_web_md
    case_sensitive: False
  - name: SpacyTokenizer
    intent_tokenization_flag: False
    intent_split_symbol: "_"
  - name: SpacyFeaturizer
  - name: RegexFeaturizer
  - name: LexicalSyntacticFeaturizer
  - name: CountVectorsFeaturizer
  - name: CountVectorsFeaturizer
    analyzer: "char_wb"
    min_ngram: 1
    max_ngram: 4
  - name: DucklingHTTPExtractor
    url: "http://localhost:8000"
    dimensions: ["number"]
  - name: RegexFeaturizer
  - name: CRFEntityExtractor
    features: [
               ["low", "title", "upper"],
               ["bias", "low", "prefix5", "prefix2", "suffix5", "suffix3","suffix2", "upper", "title", "digit", "pattern"],
               ["low", "title", "upper"]
              ]
  - name: DIETClassifier
    epochs: 100
  - name: EntitySynonymMapper
  - name: ResponseSelector
    epochs: 100

```

My nlu file contains:

```auto
## lookup:food
- data/food_list.txt

```

First issue is that why is it giving me this future warning when i train rasa nlu: FutureWarning: Directly including lookup tables as a list is deprecated since Rasa 1.6. regex\_pattern = self.\_generate\_lookup\_regex(table)

Is there a new way to specify the lookup table since version 1.6?

and further after training i do rasa shell nlu and i give “Chicken Chilli Maggie” which is present in my lookup list, DietClassifier does entity recognition and not the CRFEntityExtractor and recognizes only “Chicken Chilli” and not the whole entity

How to make rasa use the lookup list? Am i missing something? Also how can Rasa give preference to one entity extractor over other? like in this case i want preference given to entity recognized by CRFEntityExtractor and if it misses some entity then fallback on DietClassifier for entity extraction. Is it possible?

---

<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:** [August 10, 2020, 2:34pm UTC](https://forum.rasa.com/t/futurewarning-directly-including-lookup-tables-as-a-list-is-deprecated-since-rasa-1-6-regex-pattern-self-generate-lookup-regex-table/32405/2 "2020-08-10T14:34:31Z")

</div>

I think you need to remove the `-` in front of your lookup table file. Can you try the following?

```auto
## lookup:food
data/food_list.txt

```

Does it work?

If you have multiple entity extractors in the pipeline, the entities detected by them are merged. So all are considered to be equally important.

---

<div class="post-metadata">

**Author:** ![ishamandrekar](https://avatars.discourse-cdn.com/v4/letter/i/aeb1de/32.png) [@ishamandrekar](https://forum.rasa.com/u/ishamandrekar)\
**Post date:** [August 10, 2020, 4:09pm UTC](https://forum.rasa.com/t/futurewarning-directly-including-lookup-tables-as-a-list-is-deprecated-since-rasa-1-6-regex-pattern-self-generate-lookup-regex-table/32405/3 "2020-08-10T16:09:22Z")

</div>

Yes I did that… it worked after that

---

<div class="post-metadata">

**Author:** ![lgrinberg](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/lgrinberg/32/1659_2.png) [@lgrinberg](https://forum.rasa.com/u/lgrinberg)\
**Post date:** [October 19, 2020, 9:43am UTC](https://forum.rasa.com/t/futurewarning-directly-including-lookup-tables-as-a-list-is-deprecated-since-rasa-1-6-regex-pattern-self-generate-lookup-regex-table/32405/4 "2020-10-19T09:43:47Z")

</div>

In Rasa 2.0 the lookup table example ([NLU Training Data](https://rasa.com/docs/rasa/nlu-training-data#lookup-tables)) is of putting lookup table directly into the NLU training file. Is there a way to refer to the lookup table as a file name, like it was in Rasa 1.x ?

---

<div class="post-metadata">

**Author:** ![degiz](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/degiz/32/9936_2.png) [@degiz](https://forum.rasa.com/u/degiz)\
**Post date:** [October 20, 2020, 9:53am UTC](https://forum.rasa.com/t/futurewarning-directly-including-lookup-tables-as-a-list-is-deprecated-since-rasa-1-6-regex-pattern-self-generate-lookup-regex-table/32405/5 "2020-10-20T09:53:12Z")

</div>

Hey @lgrinberg

In `2.0` the lookup tables don’t refer to file names anymore. You can put then as a separate file with only lookup tables inside, and leave a comment in another file if that’s necessary though.

---

<div class="post-metadata">

**Author:** ![lgrinberg](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/lgrinberg/32/1659_2.png) [@lgrinberg](https://forum.rasa.com/u/lgrinberg)\
**Post date:** [October 20, 2020, 10:16am UTC](https://forum.rasa.com/t/futurewarning-directly-including-lookup-tables-as-a-list-is-deprecated-since-rasa-1-6-regex-pattern-self-generate-lookup-regex-table/32405/6 "2020-10-20T10:16:39Z")

</div>

So what would be the format to put a reference to the lookup table file inside nlu.md? How do I tell the NLU model to use a particular lookup table for a particular entity?

---

<div class="post-metadata">

**Author:** ![lelemh](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/lelemh/32/10128_2.png) [@lelemh](https://forum.rasa.com/u/lelemh)\
**Post date:** [January 14, 2021, 8:49am UTC](https://forum.rasa.com/t/futurewarning-directly-including-lookup-tables-as-a-list-is-deprecated-since-rasa-1-6-regex-pattern-self-generate-lookup-regex-table/32405/7 "2021-01-14T08:49:44Z")

</div>

Did you get solution?
