In the configuration of your code sample, you should make following changes:
The configuration message must be sent before creating the part, else the configuration is not applied to the new part. So you must move your configuration block code before your contentpart block code.
In your configuration json there is a small mistake on the language key name: it must be "lang" (not "language"). So in your code the line "\"language\":\"zh_CN\",\n"+must be replaced by"\"lang\":\"zh_CN\",\n" +
With those updates, the strokes are recognized as 干as you expect.
Is it possible to have the different types of requests your are sending to our server? This will help understand.
Thank you,
Best regards,
Olivier
O
Olivier @MyScript
said
over 2 years ago
Dear 新 雷,
Currently, how do you add your strokes? In batch mode (all strokes at once), or as soon as they are written? Indeed, in the latter case, gestures are normally set and detected when written. Otherwise, in batch mode these are indeed not activated.
Best regards,
Olivier
新
新 雷
said
over 2 years ago
I have a new problem recently,
I wanted to turn on gesture erasure, but I didn't find any cloud recognition gestures,
Although pointerevents has a hint,
But when I transplanted it, it didn't seem to work out
Although pointerevents has a little hint, it seems that there is no result after I transplant it in
新
新 雷
said
over 2 years ago
Thank you very much for your patience and help. It will run perfectly in the future.
Thank you
G
Gwenaelle @MyScript
said
over 2 years ago
Answer
Dear 新 雷,
Thank you for your update.
In the configuration of your code sample, you should make following changes:
The configuration message must be sent before creating the part, else the configuration is not applied to the new part. So you must move your configuration block code before your contentpart block code.
In your configuration json there is a small mistake on the language key name: it must be "lang" (not "language"). So in your code the line "\"language\":\"zh_CN\",\n"+must be replaced by"\"lang\":\"zh_CN\",\n" +
With those updates, the strokes are recognized as 干as you expect.
Under Chrome, using the inspector, I have the following message when switching to the cs_CZ language: { "type":"configuration", "alwaysConnected":false, "lang":"cs_CZ", "text":{ "guides":{"enable":true}, "smartGuide":true, "smartGuideFadeOut":{"enable":false,"duration":10000,"enabled":false}, "mimeTypes":["text/plain","application/vnd.myscript.jiix"], "margin":{"top":20,"left":10,"right":10}, "configuration":{"customResources":[],"customLexicon":[],"addLKText":true}} }
Comparing with your message, the only difference I see that you replaced "guides" with "guides": { "type":"configuration", "lang":"zh_CN", "text":{ "margin":{"top":0,"left":0,"right":0}, "guide":{"enable":true}, "configuration":{"addLKText":true} } }
新 雷
发送 newContentPackager
返回类型确认
发送 {
“ type” :“ newContentPart” ,我想知道Android是否不能使用WebSockets或为什么
Dear 新 雷,
Thank you for your update.
In the configuration of your code sample, you should make following changes:
With those updates, the strokes are recognized as 干as you expect.
Regards,
Gwenaëlle
- Oldest First
- Popular
- Newest First
Sorted by Newest FirstOlivier @MyScript
Dear XiangJue,
I recomment you play with the webDemo and look for the messages in the console: https://webdemo.myscript.com/views/text/index.html
Doing an erasure I had the following message:
{"type":"svgPatch","updates":[
{ "type": "REMOVE_CHILD", "parentId": "BACKGROUND-guides", "index": 0 },
{ "type": "REMOVE_CHILD", "parentId": "BACKGROUND-guides", "index": 0 },
{ "type": "REMOVE_CHILD", "parentId": "BACKGROUND-guides", "index": 0 },
{ "type": "REMOVE_CHILD", "parentId": "BACKGROUND-guides", "index": 0 },
{ "type": "REMOVE_CHILD", "parentId": "BACKGROUND-guides", "index": 0 },
{ "type": "REMOVE_CHILD", "parentId": "BACKGROUND-guides", "index": 0 },
{ "type": "SET_ATTRIBUTE", "name": "viewBox", "value": "0 0 1920 100 " },
{ "type": "SET_ATTRIBUTE", "name": "height", "value": "100px" }
],"layer":"BACKGROUND"}
Applying all the SVG patches should normally update properly your background.
Best regards,
Olivier
Olivier @MyScript
Dear XiangJue,
can you confirm you apply SVG Patch, which will allow you to remove the erased stroke: https://developer.myscript.com/docs/interactive-ink/1.3/web/websockets/messages/#pending-stroke-management
Let us know if this helps.
Best regards,
Olivier
Olivier @MyScript
Dear XiangJue,
Currently, I am not sure to understand.
Is it possible to have the different types of requests your are sending to our server? This will help understand.
Thank you,
Best regards,
Olivier
Olivier @MyScript
Dear 新 雷,
Currently, how do you add your strokes? In batch mode (all strokes at once), or as soon as they are written? Indeed, in the latter case, gestures are normally set and detected when written. Otherwise, in batch mode these are indeed not activated.
Best regards,
Olivier
新 雷
I have a new problem recently,
I wanted to turn on gesture erasure, but I didn't find any cloud recognition gestures,
Although pointerevents has a hint,
But when I transplanted it, it didn't seem to work out
Although pointerevents has a little hint, it seems that there is no result after I transplant it in
新 雷
Thank you very much for your patience and help. It will run perfectly in the future.
Thank you
Gwenaelle @MyScript
Dear 新 雷,
Thank you for your update.
In the configuration of your code sample, you should make following changes:
With those updates, the strokes are recognized as 干as you expect.
Regards,
Gwenaëlle
1 person likes this
新 雷
Thank you very much for your patience
demo This is the instance code you want
The internal code is very simple. The basic configuration is made, and the language is changed to Chinese.
But I'm very sad that I can't recognize Chinese all the time.
The strokes I added are from file:///D:/web-integration-samples-master/batch-mode-explorer/dist/index.html#/write
This is my input: 干,
You can also take my configuration and test it
Olivier @MyScript
Dear 新 雷,
Currently, I changed language using the samples available at the following location: https://myscript.github.io/myscript-text-web/#/elements/myscript-text-web/demos/other-examples
Under Chrome, using the inspector, I have the following message when switching to the cs_CZ language:
{
"type":"configuration",
"alwaysConnected":false,
"lang":"cs_CZ",
"text":{
"guides":{"enable":true},
"smartGuide":true,
"smartGuideFadeOut":{"enable":false,"duration":10000,"enabled":false},
"mimeTypes":["text/plain","application/vnd.myscript.jiix"],
"margin":{"top":20,"left":10,"right":10},
"configuration":{"customResources":[],"customLexicon":[],"addLKText":true}}
}
Comparing with your message, the only difference I see that you replaced "guides" with "guides":
{
"type":"configuration",
"lang":"zh_CN",
"text":{
"margin":{"top":0,"left":0,"right":0},
"guide":{"enable":true},
"configuration":{"addLKText":true}
}
}
Can you please check this?
Let us know if it helps.
Best regards,
Olivier
1 person likes this
Olivier @MyScript
Dear 新 雷,
thank you for the update.
Based on the above, your language configuration of the webSocket seems fines. It is indeed similar to the documentation: https://developer.myscript.com/docs/interactive-ink/1.3/web/websockets/messages/#configuration
Which ink are you sending? Can we have the X and Y coordinates.
Is it possible to have your code, so that we can investigate further?
Best regards,
Olivier
1 person likes this
新 雷
Hello,The above problem is solved because of the problem of JSON format,
I want to ask a new question,I set it up in configuration
{
"type":"configuration",
"lang":"zh_CN",
"math":{
"solver":{
"enable":true,
"fractionalPartDigits":3,
"decimalSeparator":".",
"roundingMode":"half up",
"angleUnit":"deg"
},
"margin":{
"top":0,
"left":0,
"right":0
},
},
"text":{
"margin":{
"top":0,
"left":0,
"right":0
},
"guide":{
"enable":true
},
"configuration":{
"addLKText":true
}
}
}
After the submission of the strokes, all of them can be identified in English, but not in Chinese.
I've changed the language. Why doesn't it take effect?
if possible,
Can you give me a simple Chinese recognition configuration?
Olivier @MyScript
Dear Sir,
thank you for contacting us.
First, there is no reason webSocket cannot be done on Android.
On your side, can you confirm you get the "partChanged" event before sending the configuration and strokes?
Best regards,
Olivier
新 雷
send newContentPackager
return "type ack"
send{
“ type” :“ newContentPart” ,
“ contentType” :“ MATH” ,“ mimeTypes” :[ “ application / x-latex” ,“ application / mathml + xml” ] }
send configuration
send {
{
type: "addStrokes",
strokes: [
The system returned to me "type error message, no content part curent found
I wonder if Android can't use WebSockets or why