wit icon indicating copy to clipboard operation
wit copied to clipboard

Problem with Arabic numbers

Open mennafateen opened this issue 8 years ago • 6 comments

Do you want to request a feature, report a bug, or ask a question about wit? Ask a question

What is the current behavior? image When I write 'million' in Arabic, wit/number and wit/amount_of_money don't recognize it even though I've trained it with this particular number a couple of times. I'm also confused as to how to train wit.ai to extract (as in the attached image) that the user needs 2 bathrooms (حمامين)

What is the expected behavior? Extract 1000000 when the user says 'million' and '2' when it is not explicitly mentioned.

What is the App ID where you are experiencing this issue (if applicable)? 5acd05eb-2cc7-46e4-86db-f7c3613bec67

mennafateen avatar May 14 '18 08:05 mennafateen

Thank you for your feedback, we're looking into your wit/number issue.

Regarding your other issue with bathrooms, we unfortunately don't have an Arabic speaker available now. Could you provide more information as to what is wrong? (expected behavior, actual behavior)

blandinw avatar May 14 '18 13:05 blandinw

In Arabic, there are two kinds of suffixes that could be added to nouns to change them into dual nouns. I want to be able to extract that the user wants 2 instances.

There's another similar situation where a user could say something like "I want an apt with 2 bedrooms and a bathroom". In Arabic, the letter "a" before "bathroom" can be omitted. It needs to understand that the number to extract here is 1.

How do I train wit.ai to do that?

mennafateen avatar May 14 '18 14:05 mennafateen

Hi @mennafateen,

wit/amount_of_money and wit/number are powered by https://github.com/facebook/duckling. Please chime in in https://github.com/facebook/duckling/issues/150. If you know Arabic, maybe you can take a stab at it.

patapizza avatar May 14 '18 14:05 patapizza

@mennafateen The first issue should be fixed now. Regarding your second issue, have you considered using composite entities with wit/number and location_2, defaulting to 1 if wit/number is not present?

patapizza avatar May 17 '18 01:05 patapizza

@patapizza Thank you for fixing the first issue! However, I still haven't found a solution for the second issue, the one regarding dual nouns. A composite entity might fix the situation for a single noun but I don't think it will fix the dual nouns problem. This problem also arises with numbers like "الفين".
I was thinking of creating my own number entity somehow for a quick fix but that shouldn't be the solution.

mennafateen avatar May 23 '18 12:05 mennafateen

@mennafateen Actually it's @Abdallatif who fixed the first issue. I'm working with him to see if there is a way to resolve the dual nouns.

patapizza avatar May 23 '18 21:05 patapizza