# Unable to extract Entity with spaces

**URL:** <https://forum.rasa.com/t/unable-to-extract-entity-with-spaces/60796>\
**Category:** Rasa Open Source\
**Created:** [January 18, 2024, 6:39am UTC](https://forum.rasa.com/t/unable-to-extract-entity-with-spaces/60796 "2024-01-18T06:39:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AbhishekC81](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/abhishekc81/32/23814_2.png) [@AbhishekC81](https://forum.rasa.com/u/AbhishekC81)\
**Post date:** [January 18, 2024, 6:39am UTC](https://forum.rasa.com/t/unable-to-extract-entity-with-spaces/60796/1 "2024-01-18T06:39:11Z")

</div>

Hello, I have an entity such as [block1] but if query is “Block 1” only [block] is extracted from it instead of [block1]. I have created a lookup table and synonyms for 4 blocks.

**NLU DATA:**

- intent: location\_query examples: |

- lookup: location examples: |

- synonym: block1 examples: |

- synonym: block2 examples: |

- synonym: block3 examples: |

- synonym: block4 examples: |

**PIPELINE:**

recipe: default.v1

assistant\_id: 20240111-153320-prompt-accelerometer

language: en

pipeline:

- name: WhitespaceTokenizer
- name: RegexFeaturizer
- name: LexicalSyntacticFeaturizer
- name: CountVectorsFeaturizer analyzer: char\_wb min\_ngram: 1 max\_ngram: 4
- name: DIETClassifier epochs: 100 constrain\_similarities: true
- name: EntitySynonymMapper use\_lookup\_tables: true
- name: ResponseSelector epochs: 100 constrain\_similarities: true
- name: FallbackClassifier threshold: 0.3 ambiguity\_threshold: 0.1

policies: null

**EXAMPLE:** Query: Where is block1? Extracted Entity: block1

Query: Where is block 1? Extracted Entity: block

How can I fix this?

---

<div class="post-metadata">

**Author:** ![stephens](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/stephens/32/1632_2.png) [@stephens](https://forum.rasa.com/u/stephens)\
**Post date:** [January 20, 2024, 7:23am UTC](https://forum.rasa.com/t/unable-to-extract-entity-with-spaces/60796/2 "2024-01-20T07:23:21Z")

</div>

There’s an important note about this in the [synonyms docs page](https://rasa.com/docs/rasa/nlu-training-data/#synonyms). Include examples with spaces in the intent examples. Synonyms are intented to clean-up/standardize the entity **after** it has been extracted.

##### PROVIDE TRAINING EXAMPLES

Synonym mapping only happens **after** entities have been extracted. That means that your training examples should include the synonym examples
