Cloud Development Kit

recognize only custom number format

Hi  

 Iam using myscript cdk to recognize numbers in certain format .Usually the input is in the form  <digit 1-3><symbol><digit 1-3>(ex .45.6 ,23.4,199.3  or 234/34, 100/65, 90/33..etc) .

How can i customise the above recognition type?

Should i write a math grammar and upload as a resource ,if so please help to write one as i couldn't find detailed information on how to use the grammar syntax .


Hi,


As you mention, MyScript CDK lets you build and upload a custom grammar to restrict what the recognition engine shall attempt to recognize.


Here are some relevant links:


Connect to your cloud.myscript.com dashboard to upload your custom resource and set the userResource parameter of your CDK request to use it.


Best regards,

Thomas


Hi,

Thanks for the response.

I wrote a small grammar rule for the above requirement .and now the accuracy in recognition has improved.

But for the following case i face some  problem .

1) in case of values with "/" symbol :

                 some values get recognised correctly ,sometimes if the vertical length of "/" is small or it is slightly straight   ex .23/453 will be recognised as "231453" instead of "23 / 453 ". how can i overcome this situation ?   I feel the grammar rule bit confusing . If possible can you provide sample grammar to overcome this issue .

Thanks.

Hi,

The issue you are facing is due to the similarity between "1" and "/", which the recognition engine may have difficulties telling apart. There is unfortunately nothing we can do at the grammar level to address this.
If this issue is really impacting, you may consider UX responses, such as showing the recognition results in real-time to let people correct if recognition is wrong, use separate "fields" for the part preceding and following "/" and re-compose the result, or use a fraction rule instead of "/".

Best regards,
Thomas

 

Hi,

Thanks for the reply .

And How do i enable "resemblance score" and "normalised score" similar to Text recognition , for the above Math recognition method?


Hi,


We do not provide resemblance score with the math engine. We do have a "normalizedRecognitionScore" with the CDK results.


However, I would not recommend you base your analysis on it:

  • The absolute value of the score is already taken into account by the engine when ranking the candidates, so it may be a bit redundant.
  • Taken in isolation, the score will not let you know for sure that a given portion of ink "looks" more like a given symbol of another, as it is computed based on many pieces of information, such as grammar rules, context, etc.
  • Interactive Ink SDK (v4 API), the evolution of the CDK (v3 API), does not include this score (mainly due to the first two points I mentioned above).


Best regards,

Thomas

Login or Signup to post a comment