-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changing default language of the math evaluation logic adapter #1115
Comments
I will note, that not all languages are supported by the mathematical evaluation adapter yet. You can find out the list of supported languages by looking at the (MathParse is the library that ChatterBot uses to evaluate math string expressions) |
Thank you gunthercox, I added Mandarin into the dictionary in math words file and changed the default language. But when I ran the bot, it never went through the mathematical evaluation logic adapter. The logging shows: This occurs no matter the order of logic adapters I put when initialising the bot. |
What was the input? Perhaps it was something that the math adapter didn't detect as a mathematical string? |
Thank you gunthercox, My input was '二加二‘ in Mandarin which means 'two plus two'. |
Ah, I think I know what the issue is. The tokenizer in the mathparse library splits math tokens based on spaces. I think I'll have to make some adjustments to the code to change how it tokenizes Mandarin. |
Thanks gunthercox, I see. Thank you in advance for the adjustments to fit Mandarin. |
I'm going to close this ticket off, I've created a new one with a proposed solution in the issue tracker for mathparse (gunthercox/mathparse#19). @xiaolitang I might have a few more questions about Mandarin that I may need your help with. |
Sure, I would love to help ;) |
Hello!
I was wondering if it is possible to the change the default language 'ENG' into other languages of the mathematical evaluation logic adapter at this stage?
Thank you very much!
The text was updated successfully, but these errors were encountered: