# Problem returning full entity synonym containing hyphen

**URL:** <https://forum.rasa.com/t/problem-returning-full-entity-synonym-containing-hyphen/5869>\
**Category:** Rasa Open Source\
**Created:** [March 8, 2019, 3:46pm UTC](https://forum.rasa.com/t/problem-returning-full-entity-synonym-containing-hyphen/5869 "2019-03-08T15:46:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![leeg](https://avatars.discourse-cdn.com/v4/letter/l/e5b9ba/32.png) [@leeg](https://forum.rasa.com/u/leeg)\
**Post date:** [March 8, 2019, 3:46pm UTC](https://forum.rasa.com/t/problem-returning-full-entity-synonym-containing-hyphen/5869/1 "2019-03-08T15:46:57Z")

</div>

I have a set of entities that are company codes containing a hyphen. I’ve tried a few different pipelines but whenever the entity is recognised as a synonym the entity returned is the portion of the code to the right of the hyphen.

In my training data I have all the codes listed with synonyms in the format { “synonyms”: [“Netflix, Inc.”, “Netflix Inc”, “Netflix”, “NFLX US”, “NFLX.O”], “value”: “NFLX-US”, “entity”: “company” },

If I post a question regarding ‘Netflix’ the NLU interpreter returns; . . “entities”: [{ “start”: 26, “end”: 27, “value”: “NFLX”, “entity”: “company”, “confidence”: 0.7324651385950932, “extractor”: “ner\_crf”, “processors”: [ “ner\_synonyms”] } ]

Why is it not returning “NFLX-US” as the entity as I need the full code for custom actions which will query a db? How can I get the full code returned as the entity?

I have also added a list of all the hyphenated codes in a company.txt (but not the synonym spellings) and have included in my training data as…

“lookup\_tables”: [{ “elements”: “data/company.txt”, “name”: “company” }]

---

<div class="post-metadata">

**Author:** ![Egalite123](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/egalite123/32/780_2.png) [@Egalite123](https://forum.rasa.com/u/Egalite123)\
**Post date:** [March 9, 2019, 1:46am UTC](https://forum.rasa.com/t/problem-returning-full-entity-synonym-containing-hyphen/5869/2 "2019-03-09T01:46:24Z")

</div>

For any synonyms found in the synonyms list, apparently it replaces the text with “value”. If you replace “value” in your synonyms with required full name, it should work.
