But when I request without resources then I am getting correct response .
Please let me know if I am doing some thing wrong or even if request format has changed .
Thanks and regards
Mukesh Kumar
Best Answer
G
Gwenaelle @MyScript
said
about 1 year ago
Dear Mukesh Kumar,
Thank you for your update.
The returned result is empty because the recognition engine tries to find recognition candidates from your custom ressource 'swiss' lexicon only.
I guess you used our ready-to-use swiss example, so as your ink seems to consist in two letters 'p' and 'D' and as there is no candidate from the swiss lexicon matching this input, the returned result is empty.
In you first test, as you don't specify any resource, the engine uses the default text lexicon to perform the recognition, therefore the recognition output is not empty.
If you want to add the 'swiss' lexicon to the default text lexicon, you must specify that your data is a text content type by adding the following textParameter
"contentTypes": ["text"], so your request data would look like:
This way the recognition engine will use both lexicons: default text one and you custom 'swiss' one.
Also, we notice that you are using the V3 WebSocket API which is now deprecated.
So we strongly recommand you to use the V4 API, specially if you are starting a new project. Please, check this section of the documentation for V4 API:
In order to provide you with a better support, can you share with us your complete request (without the application key) and indicate which API your are using?
The returned result is empty because the recognition engine tries to find recognition candidates from your custom ressource 'swiss' lexicon only.
I guess you used our ready-to-use swiss example, so as your ink seems to consist in two letters 'p' and 'D' and as there is no candidate from the swiss lexicon matching this input, the returned result is empty.
In you first test, as you don't specify any resource, the engine uses the default text lexicon to perform the recognition, therefore the recognition output is not empty.
If you want to add the 'swiss' lexicon to the default text lexicon, you must specify that your data is a text content type by adding the following textParameter
"contentTypes": ["text"], so your request data would look like:
This way the recognition engine will use both lexicons: default text one and you custom 'swiss' one.
Also, we notice that you are using the V3 WebSocket API which is now deprecated.
So we strongly recommand you to use the V4 API, specially if you are starting a new project. Please, check this section of the documentation for V4 API:
Mukesh Kumar
Hi ,
I have custom resources in my account but I use custom resources I am getting following response :
Following are my request parameter .
{'textParameter': {'textProperties': {'wordCandidateListSize': 3, 'characterCandidateListSize': 1, 'textCandidateListSize': 3}, 'resultDetail': 'CHARACTER', 'userResources': ['swiss'], 'textInputMode': 'CURSIVE', 'language': 'en_US'}, 'containerId': 'form1', 'inputUnits': [{'textInputType': 'MULTI_LINE_TEXT', 'components': [{'type': 'stroke', 'y':................
But when I request without resources then I am getting correct response .
Please let me know if I am doing some thing wrong or even if request format has changed .
Thanks and regards
Mukesh Kumar
Dear Mukesh Kumar,
Thank you for your update.
The returned result is empty because the recognition engine tries to find recognition candidates from your custom ressource 'swiss' lexicon only.
I guess you used our ready-to-use swiss example, so as your ink seems to consist in two letters 'p' and 'D' and as there is no candidate from the swiss lexicon matching this input, the returned result is empty.
In you first test, as you don't specify any resource, the engine uses the default text lexicon to perform the recognition, therefore the recognition output is not empty.
If you want to add the 'swiss' lexicon to the default text lexicon, you must specify that your data is a text content type by adding the following textParameter
"contentTypes": ["text"], so your request data would look like:
{'textParameter': {'textProperties': {'wordCandidateListSize': 3, 'characterCandidateListSize': 1, 'textCandidateListSize': 3}, 'resultDetail': 'CHARACTER', "contentTypes": ["text"], 'userResources': ['swiss'], 'textInputMode': 'CURSIVE', 'language': 'en_US'}, 'containerId': 'form1', 'inputUnits': [{'textInputType': 'MULTI_LINE_TEXT', 'components': [{'type': 'stroke', ... ]}]}], 'type': 'start', 'containerType': 'FORM'}
This way the recognition engine will use both lexicons: default text one and you custom 'swiss' one.
Also, we notice that you are using the V3 WebSocket API which is now deprecated.
So we strongly recommand you to use the V4 API, specially if you are starting a new project. Please, check this section of the documentation for V4 API:
https://developer.myscript.com/docs/interactive-ink/1.3/web/websockets/messages/
Best regards,
Gwenaëlle
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstGwenaelle @MyScript
Dear Mukesh Kumar,
Thank you for your request.
In order to provide you with a better support, can you share with us your complete request (without the application key) and indicate which API your are using?
Best regards,
Gwenaëlle
Mukesh Kumar
Hi ,
Complete request data:
I am using web-socket for request .
Thanks
Gwenaelle @MyScript
Dear Mukesh Kumar,
Thank you for your update.
The returned result is empty because the recognition engine tries to find recognition candidates from your custom ressource 'swiss' lexicon only.
I guess you used our ready-to-use swiss example, so as your ink seems to consist in two letters 'p' and 'D' and as there is no candidate from the swiss lexicon matching this input, the returned result is empty.
In you first test, as you don't specify any resource, the engine uses the default text lexicon to perform the recognition, therefore the recognition output is not empty.
If you want to add the 'swiss' lexicon to the default text lexicon, you must specify that your data is a text content type by adding the following textParameter
"contentTypes": ["text"], so your request data would look like:
{'textParameter': {'textProperties': {'wordCandidateListSize': 3, 'characterCandidateListSize': 1, 'textCandidateListSize': 3}, 'resultDetail': 'CHARACTER', "contentTypes": ["text"], 'userResources': ['swiss'], 'textInputMode': 'CURSIVE', 'language': 'en_US'}, 'containerId': 'form1', 'inputUnits': [{'textInputType': 'MULTI_LINE_TEXT', 'components': [{'type': 'stroke', ... ]}]}], 'type': 'start', 'containerType': 'FORM'}
This way the recognition engine will use both lexicons: default text one and you custom 'swiss' one.
Also, we notice that you are using the V3 WebSocket API which is now deprecated.
So we strongly recommand you to use the V4 API, specially if you are starting a new project. Please, check this section of the documentation for V4 API:
https://developer.myscript.com/docs/interactive-ink/1.3/web/websockets/messages/
Best regards,
Gwenaëlle
1 person likes this