# Unknown random dynamic entity extraction with know prefix any ideas?

**URL:** <https://forum.rasa.com/t/unknown-random-dynamic-entity-extraction-with-know-prefix-any-ideas/30992>\
**Category:** Rasa Open Source\
**Created:** [July 5, 2020, 8:51pm UTC](https://forum.rasa.com/t/unknown-random-dynamic-entity-extraction-with-know-prefix-any-ideas/30992 "2020-07-05T20:51:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pvbhanuteja](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/pvbhanuteja/32/7189_2.png) [@pvbhanuteja](https://forum.rasa.com/u/pvbhanuteja)\
**Post date:** [July 5, 2020, 8:51pm UTC](https://forum.rasa.com/t/unknown-random-dynamic-entity-extraction-with-know-prefix-any-ideas/30992/1 "2020-07-05T20:51:43Z")

</div>

Hi,

I have following training data for intent search\_on\_web

```
check google for (Hollywood songs)[search_parameter]
check google for (hollywood movies)[search_parameter]
check google for (melody songs)[search_parameter]
check google for (latest movies)[search_parameter]
check google for (something bla )[search_parameter]
check google for (something bla bla bla)[search_parameter]

```

so my search\_parameter is the required entity I want to extract it can be anything

but it comes just before prefix `check google for`, so is there any way to exact when it comes after check google for

so when user types` check google for latest books by Aravind` it should automatically extract entity as “latest books by Aravind” I can’t put it all possibilities in NLU training user can type anything,

all I want is to extract that comes after check google for and search it on something and provide results.

---

<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 6, 2020, 6:41am UTC](https://forum.rasa.com/t/unknown-random-dynamic-entity-extraction-with-know-prefix-any-ideas/30992/2 "2020-07-06T06:41:39Z")

</div>

Hi @pvbhanuteja, if the prefix is fixed, you could build your own entity extractor that checks for the prefix `check google for` and takes whatever comes after that and stores that as the entity `search_parameter`. Check our [documentation](https://rasa.com/docs/rasa/api/custom-nlu-components/#custom-nlu-components) on how to write your own custom component. If you need come example code, you can take a look at [rasa/mitie\_entity\_extractor.py at master · RasaHQ/rasa · GitHub](https://github.com/RasaHQ/rasa/blob/master/rasa/nlu/extractors/mitie_entity_extractor.py). I don’t think you need to implement persist and load. Let me know if you have any further questions.
