I have an intent here:
What are the rates for a house valued at [158,000](value) in [13241](zipcode)?
How much are the rates for a house worth [542345](value) in [74523](zipcode) area?
And several other examples, with different values…
I’m using regex for value and zipcode, but sometimes I get a collision where Rasa picks up (value) as a zipcode if the value is five digits long.
Any way for rasa to use the surrounding words to detect if its a value or a zipcode?
Maybe you can differentiate by putting a comma in the value and ofcourse not in zipcode. make a regex such that if there is a comma it would detect it as a value and zipcode if not. But this will restrict the user to only enter the value with commas(even if they are 3 digits)
Thanks for the sugesstion. I’m already using regex’s, but the user can input a variety of values such as “0.05 million”, “50 thousand”, “50000”, “50,000”, “50000.00” and “50,000.00”. Therefore I can’t use a comma to differentiate.
50000 would be a “valid” zip code too, that’s why the entity should be picked up by its significance in the phrase.
The user could also enter:
What are the rates for a house in [13241](zipcode) valued at [158,000](value)?
How much are the rates for a house in [74523](zipcode) area worth [542345](value)?
I have a similar problem with extracting through context. Has anyone solved this kind of problem ?
Guess more training examples should do it for the example above, if you use surrounding words as a feature for the EntityExtractor (which should be standard).
Not working for me.
It picks up the first regex match and uses that to decide what’s being said: If I swap the regex sequence in the NLU file, it picks up a different entity instead of using surrounding words.