how many equations of strokes I can send in one REST API request?
M
Maweier
started a topic
over 2 years ago
Hi,
My data is a whole page of strokes, which means it has multiple groups of strokes. Is it possible to send one request for the whole page?
what is the semantic meaning of a single strokeGroup in the request params? should it be one strokeGroup means one equation, or one related context with multiple lines?
(what is a 'data['strokeGroups'][0]' represents? )
what is the semantic meaning of every single stroke dictionary in the every single strokes list of a strokeGroup?
( data['strokeGroups'][0]['strokes'] is a list of strokes, what is a single element of this list means? what is 'data['strokeGroups'][0]['strokes'][0]'?)
is each element in data['strokeGroups'][0]['strokes'] means one character ('+', '=', '8', etc) or just one continuous draw('-', '|', tec )?
please help me
by the way, could anyone help me to export math word or picture result in python request like this?
Raw Content shall more be seen as a "Text" "Non-text" (aka shape) extraction.
I tried on website demos, the 'math' mode is bad at recognizing continuous writing
>>Indeed, Math is more to recognize one equation at a time. If writing several equations, it is not likely to work properly.
On the contrary, Text part can be use as an input method (in particular for the webSocket mode). But for equations, it will not be good
can 'contentType' attribute be multiple types, and let the service to recognize which contenttype is better?
>>Apart from the raw content and Diagram that allow to extract Text from non text, we do not have an "auto detect" mode.
If recognizing Math, then we recommend you use a Math part. If recognizing Text, use the corresponding part type. And if recognizing an equation, Math will better at it.
2. does the 'height' and 'width' attribute affect the outcome of service a lot? In my cases, the page size is around 1000 pixcels and the size of the equation is around 30-50 pixcels, should I resize the strokes to make the equation scale properly scaled and located within a writing area? what is the best scale of a equation respect to a writing area?
>>Our recommendatin is that you do not change the ink at all. Simply provide with the proper ink resolution (ideally the one of your writing device), and it shall return with the best result.
Raw Content shall more be seen as a "Text" "Non-text" (aka shape) extraction.
I tried on website demos, the 'math' mode is bad at recognizing continuous writing
>>Indeed, Math is more to recognize one equation at a time. If writing several equations, it is not likely to work properly.
On the contrary, Text part can be use as an input method (in particular for the webSocket mode). But for equations, it will not be good
can 'contentType' attribute be multiple types, and let the service to recognize which contenttype is better?
>>Apart from the raw content and Diagram that allow to extract Text from non text, we do not have an "auto detect" mode.
If recognizing Math, then we recommend you use a Math part. If recognizing Text, use the corresponding part type. And if recognizing an equation, Math will better at it.
2. does the 'height' and 'width' attribute affect the outcome of service a lot? In my cases, the page size is around 1000 pixcels and the size of the equation is around 30-50 pixcels, should I resize the strokes to make the equation scale properly scaled and located within a writing area? what is the best scale of a equation respect to a writing area?
>>Our recommendatin is that you do not change the ink at all. Simply provide with the proper ink resolution (ideally the one of your writing device), and it shall return with the best result.
Best regards,
Olivier
M
Maweier
said
over 2 years ago
Hi Olivier,
I have 2 more questions:
1. I noticed there are several categories like the 'math', 'Diagram', 'math', 'rawcontent', what does it mean by 'rawcontent'? Cause in some cases, there will be continuous writing number in some equation, I tried on website demos, the 'math' mode is bad at recognizing continuous writing numbers whereas the 'text' mode is good at recognizing continuous numbers, can 'contentType' attribute be multiple types, and let the service to recognize which contenttype is better? or make utilizing all types to draw to a final conclusion?
2. does the 'height' and 'width' attribute affect the outcome of service a lot? In my cases, the page size is around 1000 pixcels and the size of the equation is around 30-50 pixcels, should I resize the strokes to make the equation scale properly scaled and located within a writing area? what is the best scale of a equation respect to a writing area?
thanks
O
Olivier @MyScript
said
over 2 years ago
Dear Maweier,
thank you for contacting us. To answer your questions:
My data is a whole page of strokes, which means it has multiple groups of strokes. Is it possible to send one request for the whole page?
>>Currently, our technology will not ba able to extract the different equations. The result will not be satisfying. You shall sent a REST request per equation.
what is the semantic meaning of a single strokeGroup in the request params? should it be one strokeGroup means one equation, or one related context with multiple lines?
(what is a 'data['strokeGroups'][0]' represents? )
Maweier
Hi,
My data is a whole page of strokes, which means it has multiple groups of strokes. Is it possible to send one request for the whole page?
what is the semantic meaning of a single strokeGroup in the request params? should it be one strokeGroup means one equation, or one related context with multiple lines?
(what is a 'data['strokeGroups'][0]' represents? )
what is the semantic meaning of every single stroke dictionary in the every single strokes list of a strokeGroup?
( data['strokeGroups'][0]['strokes'] is a list of strokes, what is a single element of this list means? what is 'data['strokeGroups'][0]['strokes'][0]'?)
is each element in data['strokeGroups'][0]['strokes'] means one character ('+', '=', '8', etc) or just one continuous draw('-', '|', tec )?
please help me
by the way, could anyone help me to export math word or picture result in python request like this?
Dear Maweier,
thank you for the update.
Indeed, with the REST API, the iink has several parts, that are Text, Math, Diagram and Raw Content: https://developer.myscript.com/docs/interactive-ink/2.0/overview/content-types//#supported-content-types
Raw Content shall more be seen as a "Text" "Non-text" (aka shape) extraction.
I tried on website demos, the 'math' mode is bad at recognizing continuous writing
>>Indeed, Math is more to recognize one equation at a time. If writing several equations, it is not likely to work properly.
On the contrary, Text part can be use as an input method (in particular for the webSocket mode). But for equations, it will not be good
can 'contentType' attribute be multiple types, and let the service to recognize which contenttype is better?
>>Apart from the raw content and Diagram that allow to extract Text from non text, we do not have an "auto detect" mode.
If recognizing Math, then we recommend you use a Math part. If recognizing Text, use the corresponding part type. And if recognizing an equation, Math will better at it.
2. does the 'height' and 'width' attribute affect the outcome of service a lot? In my cases, the page size is around 1000 pixcels and the size of the equation is around 30-50 pixcels, should I resize the strokes to make the equation scale properly scaled and located within a writing area? what is the best scale of a equation respect to a writing area?
>>Our recommendatin is that you do not change the ink at all. Simply provide with the proper ink resolution (ideally the one of your writing device), and it shall return with the best result.
Best regards,
Olivier
- Oldest First
- Popular
- Newest First
Sorted by Newest FirstOlivier @MyScript
Dear Maweier,
thank you for the update.
Indeed, with the REST API, the iink has several parts, that are Text, Math, Diagram and Raw Content: https://developer.myscript.com/docs/interactive-ink/2.0/overview/content-types//#supported-content-types
Raw Content shall more be seen as a "Text" "Non-text" (aka shape) extraction.
I tried on website demos, the 'math' mode is bad at recognizing continuous writing
>>Indeed, Math is more to recognize one equation at a time. If writing several equations, it is not likely to work properly.
On the contrary, Text part can be use as an input method (in particular for the webSocket mode). But for equations, it will not be good
can 'contentType' attribute be multiple types, and let the service to recognize which contenttype is better?
>>Apart from the raw content and Diagram that allow to extract Text from non text, we do not have an "auto detect" mode.
If recognizing Math, then we recommend you use a Math part. If recognizing Text, use the corresponding part type. And if recognizing an equation, Math will better at it.
2. does the 'height' and 'width' attribute affect the outcome of service a lot? In my cases, the page size is around 1000 pixcels and the size of the equation is around 30-50 pixcels, should I resize the strokes to make the equation scale properly scaled and located within a writing area? what is the best scale of a equation respect to a writing area?
>>Our recommendatin is that you do not change the ink at all. Simply provide with the proper ink resolution (ideally the one of your writing device), and it shall return with the best result.
Best regards,
Olivier
Maweier
Hi Olivier,
I have 2 more questions:
1. I noticed there are several categories like the 'math', 'Diagram', 'math', 'rawcontent', what does it mean by 'rawcontent'? Cause in some cases, there will be continuous writing number in some equation, I tried on website demos, the 'math' mode is bad at recognizing continuous writing numbers whereas the 'text' mode is good at recognizing continuous numbers, can 'contentType' attribute be multiple types, and let the service to recognize which contenttype is better? or make utilizing all types to draw to a final conclusion?
2. does the 'height' and 'width' attribute affect the outcome of service a lot? In my cases, the page size is around 1000 pixcels and the size of the equation is around 30-50 pixcels, should I resize the strokes to make the equation scale properly scaled and located within a writing area? what is the best scale of a equation respect to a writing area?
thanks
Olivier @MyScript
Dear Maweier,
thank you for contacting us. To answer your questions:
My data is a whole page of strokes, which means it has multiple groups of strokes. Is it possible to send one request for the whole page?
>>Currently, our technology will not ba able to extract the different equations. The result will not be satisfying. You shall sent a REST request per equation.
what is the semantic meaning of a single strokeGroup in the request params? should it be one strokeGroup means one equation, or one related context with multiple lines?
(what is a 'data['strokeGroups'][0]' represents? )
>>A stroke group is a list of strokes that share the same pen style: see https://swaggerui.myscript.com/
what is the semantic meaning of every single stroke dictionary in the every single strokes list of a strokeGroup?
>>Basically, a stroke is the series of points in between a pen Down and a pen UP.
For example, the "+" ink is made of 2 strokes
Last, to export as image, you shall set the "Accept"header to image/svg+xml, image/jpeg or image/png (depending on the export you prefer):
Best regards,
Olivier