# ENTITY EXTRACTION ISSUE

**URL:** <https://forum.rasa.com/t/entity-extraction-issue/12840>\
**Category:** Rasa Open Source\
**Created:** [July 12, 2019, 4:41am UTC](https://forum.rasa.com/t/entity-extraction-issue/12840 "2019-07-12T04:41:39Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![shubham](https://avatars.discourse-cdn.com/v4/letter/s/85e7bf/32.png) [@shubham](https://forum.rasa.com/u/shubham)\
**Post date:** [July 12, 2019, 4:41am UTC](https://forum.rasa.com/t/entity-extraction-issue/12840/1 "2019-07-12T04:41:39Z")

</div>

I am facing issue while extracting entity which has same pattern

- Tcode is T3WKFR
- order no is MS5WDF

both sentence are similar except its beginning, how can I differentiate both and make entity extraction accurate.

**training data**

## intent:Transaction\_details

- Tcode is T3WKFR

- with Tcode VSRDGB

- Tcode is GSFRGB

- Tcode is IFFCL / ZPRCL

- with Tcode 4G6RKS

- Tcode is VLVF0CA/VF100

- with Tcode NLXP67CA/AU330

## intent:Order\_details

- order no is ZTEGCJ

- with order no JTJ7GQ

- order no is SSW8N8

- with order no LK2SM1

- order no is MS5WDF

- order no is PS28SS

- with order no 3R2DDS

@akelad @JulianGerhard @Juste @juste_petr

---

<div class="post-metadata">

**Author:** ![shanushawan](https://avatars.discourse-cdn.com/v4/letter/s/71e660/32.png) [@shanushawan](https://forum.rasa.com/u/shanushawan)\
**Post date:** [July 12, 2019, 4:45am UTC](https://forum.rasa.com/t/entity-extraction-issue/12840/2 "2019-07-12T04:45:28Z")

</div>

Am also facing similiar issue can anyone help??? @akelad @JulianGerhard @Juste @shubham

---

<div class="post-metadata">

**Author:** ![JiteshGaikwad](https://avatars.discourse-cdn.com/v4/letter/j/77aa72/32.png) [@JiteshGaikwad](https://forum.rasa.com/u/JiteshGaikwad)\
**Post date:** [July 12, 2019, 5:00am UTC](https://forum.rasa.com/t/entity-extraction-issue/12840/3 "2019-07-12T05:00:53Z")

</div>

hey @shubham, I can suggest you to try out Regex Feature for these problem, you can add the patterns for the above sentences:

> **[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.

---

<div class="post-metadata">

**Author:** ![shubham](https://avatars.discourse-cdn.com/v4/letter/s/85e7bf/32.png) [@shubham](https://forum.rasa.com/u/shubham)\
**Post date:** [July 12, 2019, 6:58am UTC](https://forum.rasa.com/t/entity-extraction-issue/12840/4 "2019-07-12T06:58:42Z")

</div>

it’s still not working for me, entity extraction is not accurate. can anyone help me with this ?

where the should do the changes in my training data or should I do something EntityExtractor?

@akelad @JulianGerhard@Juste

---

<div class="post-metadata">

**Author:** ![akelad](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/akelad/32/69_2.png) [@akelad](https://forum.rasa.com/u/akelad)\
**Post date:** [July 13, 2019, 5:15pm UTC](https://forum.rasa.com/t/entity-extraction-issue/12840/5 "2019-07-13T17:15:04Z")

</div>

what does your nlu config look like?

---

<div class="post-metadata">

**Author:** ![shubham](https://avatars.discourse-cdn.com/v4/letter/s/85e7bf/32.png) [@shubham](https://forum.rasa.com/u/shubham)\
**Post date:** [July 15, 2019, 7:26am UTC](https://forum.rasa.com/t/entity-extraction-issue/12840/6 "2019-07-15T07:26:19Z")

</div>

language: en pipeline:

- name: “SpacyNLP” model: “en\_core\_web\_lg”

- name: “SpacyTokenizer”

- name: “SpacyFeaturizer”

- name: “RegexFeaturizer”

- name: “CRFEntityExtractor”

- name: “EntitySynonymMapper”

- name: “CountVectorsFeaturizer” stop\_words: [‘ourselves’, ‘hers’, ‘between’, ‘yourself’, ‘but’, ‘again’, ‘there’, ‘about’, ‘once’, ‘during’, ‘out’, ‘very’, ‘having’, ‘with’, ‘they’, ‘own’, ‘an’, ‘be’, ‘some’, ‘for’, ‘do’, ‘its’, ‘yours’, ‘such’, ‘into’, ‘of’, ‘most’, ‘itself’, ‘off’, ‘is’, ‘s’, ‘am’, ‘or’, ‘who’, ‘as’, ‘from’, ‘him’, ‘each’, ‘the’, ‘themselves’, ‘until’, ‘below’, ‘are’, ‘we’, ‘these’, ‘your’, ‘his’, ‘through’, ‘don’, ‘nor’, ‘me’, ‘were’, ‘her’, ‘more’, ‘himself’, ‘this’, ‘down’, ‘should’, ‘our’, ‘their’, ‘while’, ‘above’, ‘both’, ‘up’, ‘to’, ‘ours’, ‘had’, ‘she’, ‘all’, ‘no’, ‘when’, ‘at’, ‘any’, ‘before’, ‘them’, ‘same’, ‘and’, ‘been’, ‘have’, ‘in’, ‘will’, ‘on’, ‘does’, ‘yourselves’, ‘then’, ‘that’, ‘because’, ‘what’, ‘over’, ‘why’, ‘so’, ‘can’, ‘did’, ‘not’, ‘now’, ‘under’, ‘he’, ‘you’, ‘herself’, ‘has’, ‘just’, ‘where’, ‘too’, ‘only’, ‘myself’, ‘which’, ‘those’, ‘i’, ‘after’, ‘few’, ‘whom’, ‘t’, ‘being’, ‘if’, ‘theirs’, ‘my’, ‘against’, ‘a’, ‘by’, ‘doing’, ‘it’, ‘how’, ‘further’, ‘was’, ‘here’, ‘than’]

- name: “EmbeddingIntentClassifier” intent\_tokenization\_flag: true intent\_split\_symbol: “+”

policies:

- name: MemoizationPolicy
- name: KerasPolicy
- name: MappingPolicy

---

<div class="post-metadata">

**Author:** ![msamogh](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/msamogh/32/3478_2.png) [@msamogh](https://forum.rasa.com/u/msamogh)\
**Post date:** [July 17, 2019, 8:39am UTC](https://forum.rasa.com/t/entity-extraction-issue/12840/7 "2019-07-17T08:39:22Z")

</div>

I suggest you put them both under one entity called “code” or something, and later differentiate them based on the output of the intent classification. Let me know if that makes sense for your use case.
