iOS Iink - Parsing leters and numbers on Math blocks
J
Just GoNXaS
started a topic
over 2 years ago
Hey Guys.
I was wondering if there was any way to prioritize (or enforce) numbers recognition over letters when using Math bloks inside a Text Document part.
We usually experience '5's interpreted as 'S's and '7's as 'T's, for example, and usually, unless we write slow, there are misinterpretations which causes on calculations not being resolved.
Any tip to improve this?
Thanks!
Best Answer
O
Olivier @MyScript
said
over 2 years ago
Dear Just,
currently, of you need the vlist, the solution is the use it as below:
Thanks Oliver, but I can't seem to be able to download the files.
Could you please share them by link?
Also, I just tried to compile them using the ".def" extension, but I get the same screen
J
Just GoNXaS
said
over 2 years ago
Hey Oliver.
I just tried using Safari instead of Firefox and the resourse compiled, I guess it's an issue with the browser
I'm currently using Firefox Quantum 63.0.1 (64-bit)
J
Just GoNXaS
said
over 2 years ago
One more question related to the building of custom resources, is it possible to change symbol's definitions? Particulary I would like to make x to multiply instead of *
Thanks!
O
Olivier @MyScript
said
over 2 years ago
Dear Just,
thank you for the updates.
Indeed, I am using the Firefox 59.0 64 bit version and it is working fine on my side.
Regarding your other question, a custom grammar definition doesn't allow to modify the multiply symbol. This shall be done as post-treatment, i.E. when getting the result, you check if it cointains the multiply symbol, and you update it when displaying the result.
Best regards,
Olivier
J
Just GoNXaS
said
over 2 years ago
Gotcha, thanks!
One last thing, I keep getting crashes when trying to convert the Math block using this configuration:
Just GoNXaS
Hey Guys.
I was wondering if there was any way to prioritize (or enforce) numbers recognition over letters when using Math bloks inside a Text Document part.
We usually experience '5's interpreted as 'S's and '7's as 'T's, for example, and usually, unless we write slow, there are misinterpretations which causes on calculations not being resolved.
Any tip to improve this?
Thanks!
Dear Just,
currently, of you need the vlist, the solution is the use it as below:
symbol = 0 1 2 3 4 5 6 7 8 9 + - / ÷ = . , % | ( ) : * x v
leftpar = (
rightpar = )
currency_symbol = $ R € ₹ £
character ::= identity(symbol)
| identity(currency_symbol)
fractionless ::= identity(character)
| fence (fractionless, leftpar, rightpar)
| hpair(fractionless, fractionless)
fractionable ::= identity(character)
| fence (fractionable, leftpar, rightpar)
| hpair(fractionable, fractionable)
| fraction(fractionless, fractionless)
expression ::= identity(character)
| fence (expression, leftpar, rightpar)
| hpair(expression, expression)
| fraction(fractionable, fractionable)
| sqrt(expression)
| superscript(symbol,expression)
| presuperscript(expression, symbol)
list ::= vlist(expression)
start(list)
Best regards,
Olivier
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstOlivier @MyScript
Dear Just,
thank you for your question.
Currently, it is possible to have an ink sample (screenshot, ideally x and y cooredinates), so that we can reproduce?
Currently, there is now way to give more weight to digits over letters. The question is do you need the letters? In that case, you can create your custom math grammar removing the letters: https://developer.myscript.com/docs/interactive-ink/1.2/android/advanced/custom-recognition/#math-grammar
Best regards,
Olivier
1 person likes this
Just GoNXaS
Hey Oliver!
Thanks for that approach, I think indeed would be helpful.
I'm trying to create a new grammar resource with the online tool (https://developer.myscript.com/support/recognition-assets/#resource-builder)
I managed to create one the first time, with a txt file with the code from the example you give here https://developer.myscript.com/docs/interactive-ink/1.2/android/advanced/build-custom-resources/#supported-symbols-and-rules , but after the first success, I couldn't create a new resource, nor with my modified code, nor with the same example I succeeded previously, I keep getting this screen:
Here are the txt I'm trying to upload:
https://cloud.gonxas.com/index.php/s/rbAMiabb7QgA6KK
https://cloud.gonxas.com/index.php/s/HWEWnpfgnYmFq7w
Could you give me a hand to understand what's happening?
Thanks!
Olivier @MyScript
Dear Just,
thank you for the update.
I am wondering why it could not compile. If this happens again, can you please give the ".def" extension to your source files?
Meanwhile, I compiled these on my side. Please find these attached.
Best regards,
Olivier
1 person likes this
Just GoNXaS
Thanks Oliver, but I can't seem to be able to download the files.
Could you please share them by link?
Also, I just tried to compile them using the ".def" extension, but I get the same screen
Just GoNXaS
Hey Oliver.
I just tried using Safari instead of Firefox and the resourse compiled, I guess it's an issue with the browser
I'm currently using Firefox Quantum 63.0.1 (64-bit)
Just GoNXaS
One more question related to the building of custom resources, is it possible to change symbol's definitions? Particulary I would like to make x to multiply instead of *
Thanks!
Olivier @MyScript
Dear Just,
thank you for the updates.
Indeed, I am using the Firefox 59.0 64 bit version and it is working fine on my side.
Regarding your other question, a custom grammar definition doesn't allow to modify the multiply symbol. This shall be done as post-treatment, i.E. when getting the result, you check if it cointains the multiply symbol, and you update it when displaying the result.
Best regards,
Olivier
Just GoNXaS
Gotcha, thanks!
One last thing, I keep getting crashes when trying to convert the Math block using this configuration:
I noticed removing this line "| vlist(expression)" prevents the crashes, so I'm not using it right now, but I though I better let you know.
Thanks for your help!
Olivier @MyScript
Dear Just,
thank you for pointing this.
We are investigating, I keep you updated.
Best regards,
Olivier
Olivier @MyScript
Dear Just,
currently, of you need the vlist, the solution is the use it as below:
symbol = 0 1 2 3 4 5 6 7 8 9 + - / ÷ = . , % | ( ) : * x v
leftpar = (
rightpar = )
currency_symbol = $ R € ₹ £
character ::= identity(symbol)
| identity(currency_symbol)
fractionless ::= identity(character)
| fence (fractionless, leftpar, rightpar)
| hpair(fractionless, fractionless)
fractionable ::= identity(character)
| fence (fractionable, leftpar, rightpar)
| hpair(fractionable, fractionable)
| fraction(fractionless, fractionless)
expression ::= identity(character)
| fence (expression, leftpar, rightpar)
| hpair(expression, expression)
| fraction(fractionable, fractionable)
| sqrt(expression)
| superscript(symbol,expression)
| presuperscript(expression, symbol)
list ::= vlist(expression)
start(list)
Best regards,
Olivier