Wit.ai not parsing data for pence -


wit trained extract wit/number , wit/amountofmoney correctly interprets following sentences 3.03 pounds: 1)spent 3 pound , 3 pence 2) spent 3 cent 3) spent £3:

but fails : 1) spent 3 pence 2) spent 3p

questions: 1) bug/ new feature ? 2) there workaround ? reference : https://en.wikipedia.org/wiki/pound_sterling wit.ai api response spent 3 pounds , 3 cent

{       "msg_id": "xxxxxxxxxxxxxxxxxxx",       "_text": "spent 3 pounds , 3 cent",       "entities": {         "amount_of_money": [           {             "_body": "3 pounds , 3 cent",             "confidence": 1,             "_start": 6,             "_end": 25,             "_entity": "amount_of_money",             "type": "value",             "value": 3.03,             "unit": "£"           }         ],         "intent": [           {             "confidence": 0.9873680621152465,             "_entity": "intent",             "value": "expense"           }         ]       }     } 

wit.ai api response "spent 3p" :

{   "msg_id": "xxxxxxxxxxxxxxxxxxx",   "_text": "spent 3p",   "entities": {     "number": [       {         "_body": "3",         "confidence": 1,         "_start": 6,         "_end": 7,         "_entity": "number",         "type": "value",         "value": 3       }     ],     "intent": [       {         "confidence": 0.9928105550766221,         "_entity": "intent",         "value": "expense"       }     ]   } } 

the wit/number , wit/amount-of-money entities rely on duckling parsing.

here rules defining amounts of money english: https://github.com/wit-ai/duckling/blob/master/resources/languages/en/rules/finance.clj

as can see, there no rule "pence" nor "p". duckling being open source, can contribute , pull request.


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - IE9 error '$'is not defined -