MyScript / MyScriptJS

:pencil2: :cloud: MyScriptJS is the fastest way to integrate rich handwriting recognition features in your webapp.
https://developer.myscript.com
Other
353 stars 63 forks source link

the problem about handwritten math formula recognition and export latex #19

Open leenty opened 5 years ago

leenty commented 5 years ago

I am very excited to have such a good handwritten formula recognition tool, which has helped me a lot. I found several problems in using it. Next I'll list some ambiguities and the latex code I expect to produce

state:occasionally recognition errors
write:△ABC
expect:\\triangle ABC
actual:\\Delta ABC
state:hard to recognize correctly
write:ac // df
expect:ac\\parallel df
actual:ac\\left| \\right| df
state:Incorrect recognition
write:3′ 45″
expect:3′ 45″
actual:3^{1}45^{11}
state:Incorrect recognition
write:20℃
expect:20℃
actual:20^{0}C
state:Incorrect recognition
write:⏥abcd
result:Incorrect recognition
MyScriptSupport commented 5 years ago

Dear Leenty,

thank you for contacting us and your questions.

To answer these: write:△ABC => This usually occurs when the triangle has the same size than the letters. Currently, you should create a custom grammar definition in which you remove the delta symbol. The triangle will then no longer be confused with the delta, and will be properly recognized.

write:ac // df => In the same way, we recommend you create a custom gramar in which you remove all symbols that may be confused with the parallel and ensure you have the parallel symbol

write:3′ 45″ => This is currently not properly supported. We would recommend that you do a "post-treatment" and when "exponent 1" or "exponent 11" is found, you replace it accordingly.

write:20℃ => Degree is indeed difficult to recognize, as easily confused with expononent 0. There are basically 2 possibilites, either you remove the support of the exponent or when exponent 0 is found, you replace it by degree.

write:⏥abcd =>this symbol is not supported, we will then not be able to return it.

Based on the above, you then understand the default grammar we provide is for a general purpose. It should be customized according to anyone's needs. More explanation to tune it can be found in our documentation: https://developer.myscript.com/docs/interactive-ink/1.3/android/advanced/build-custom-resources/#math

Best regards,

Olivier