wit icon indicating copy to clipboard operation
wit copied to clipboard

wit number / wit location mix up question

Open ivgenyk opened this issue 9 years ago • 2 comments

Hi, Our chatbot is using both wit-location and wit-number entities. The number is way more important to us than the location. A typical answer to one of our questions is a number like "153,000". The user can also write "153 grand". The problem is that this answer is classified as wit-location. I tried to train wit to identify this sentence as number but with no use. Can we add an exception to wit location to ignore the word "grand"? Can we add an exception to wit-number to identify the word "grand"? Can I prioritize which wit entity is more important?

Example of wit reply { "msg_id": " xxxx", "_text": " 153 grand", "entities": { "location": [ { "confidence": 0.7919652791745359, "type": "value", "value": "153 grand", "suggested": true } ] } }

Will be grateful for any assistance, Ivgeny

ivgenyk avatar Apr 06 '17 12:04 ivgenyk

Hi @ivgenyk, sorry for the latency here.

"153 grand" is actually an amount of money, not a numeral. So you could use wit/amount_of_money instead. wit/amount_of_money is powered by Duckling - feel free to submit a pull request to handle grand.

patapizza avatar Feb 05 '18 23:02 patapizza

This is now supported by Duckling.

patapizza avatar May 09 '18 20:05 patapizza