I’m slightly confused about entity recognition in Rasa.
I would like to be able to detect the presence or not of an entity, and that entity could be referred to in different ways.
If I’m looking to ask “is it painful?” What would be the best way to set up my training data to detect the presence/absence of pain in the free text? Along with recognising syonyms (hurt, ache, agony, throbbing etc.)
Would something like this work? Is there way of adding the synonyms for “pain” separately rather than having to provide an example sentence using every single synonym?
nlu.md
- it [is painful](pain:yes)
- it [isn't painful](pain:no)
- it [is not painful](pain:no)
- it [really hurts](pain:yes)
- it [doesn't hurt](pain:no) much
That’s fine for getting the response from a form question. What I’m trying to do is extract the information from free text too.
If someone has entered “it is painful”, “i’m in agony” etc. then I wouln’t have to ask the direct question with the button. The form question is basically a fall back if the entities haven’t already been captured from free text.
@jaravo Is there any situation in which an user will reply “It is not painful” when they didn’t get ask “Is it painful” ? I can understand they may answer “It is painful” if they are asked “What is the symptom”, but not “It is not painful”.
Anyway, i feel like there is really no elegant solution to this problem without having to provide a lot of nlu training data for it. I can suggest a way like below but i don’t know if it’s better than what you are doing:
## intent:yes_symptom:
- It is [painful](symptom)
- I'm in [agony](symptom)
- I feel like it's [throbbing](symptom)
....
## intent:no_symptom:
- No, it is not [painful](symptom)
- Not so much [agony](symptom)
- I don't feel any [pain](symptom:painful) at all
...
Then maybe you can handle stories depends on these 2 intents, checking the symptom slot, etc…
I was hoping to use an open question like “can you describe the situation?” to get an intial overview, before then clarifying other questions. In this situation the user could describe absence of issues (e.g. not painful) as well as presence.
Sounds like there’s not an elegant way of doing this.