Cloud Development Kit

Restrictng Cloud Hand Recognition to numbers

Hi,

We are using cloud API for hand written recognition. The text recognition works fine but accuracy is going low when the font size is decreased.

We want to recognize phone number and hence want to restrict the recognition to only numbers. Can you let us know how can we restrict the recognition to only numbers using the cloud API.

Below is the request we are using

URL "https://cloud.myscript.com/api/v3.0/recognition/rest/text/doSimpleRecognition.json"
textInput": {
"textParameter": {
"textInputMode": "CURSIVE",
"resultDetail": "TEXT",
"language": "en_US"
},
"inputUnits": [
{
"textInputType": "MULTI_LINE_TEXT",
"components": [
<strokes>
]
}
]
}


Thanks
Abhinay


Dear Abhinay,
We need to update our documentation about our new custom resource tool. In the meantime, please find some explanations below.
How to create and use custom resource on the cloud:
- Go to the Resource tools webpage https://developer.myscript.com/tools (it requires to be logged in)
- According to the documentation about lexicon, subset knowledge or math grammar, create your own resource file http://doc.myscript.com/Common/DevTools/index.html. In your case, create a text file (or .sk) file containing numbers only
- select 'CDK' and load the file (UTF8 encoded!) then download the generated resource file (.res)

Tools-custom-resource-Upload
- Go to your cloud dashboard https://cloud.myscript.com, select 'Resource' tab and upload the resource file as shown below
Cloud-Upload-customResource
--> You will then be able to add the parameter in your cloud request like userResources:test
{ "components": [{ "type": "stroke", "x": [....], "y": [...] }], ..."userResources":["test"]}

Please let us know if it helps

It's very helpful!

I'm just wondering if I want to use my lexicon and sub-knowledge files at same time, say I have two files like following:

Input type Name  Filename ▴ 
SK python  python.res 
LK  pythonKeywords pythonKeywords.res

what kind of parameter can I use with both resource files?

Login or Signup to post a comment