Text

Search For a "Text" In Handwritten Notes

Dear Team, 

Can you please help us in searching for a text in hand-written content by using your SDK?

We need to get the rectangle of text being searched in the hand-written text.


Thanks


Regards,

Naidu

Sr. iOS Developer


Dear Naidu,


thank you for contacting us.


Currently, you can use the iink SDK to do a search in a page of text.


To proceed, once your strokes have been added, ensure recognition is finished calling editor.waitForIdle().


You should then export in JIIX format: editor.export_(MimeType.JIIX). The JIIX contains the recognized text with the corresponding ink.


Let us know if you need further help.


Best regards,


Olivier

Dear Olivier,

Thanks for the prompt revert. 

============================

 let block: IINKContentBlock = IINKContentBlock.init()

 try editorViewController.editor.export_(block, mimeType: IINKMimeType.JIIX)

 editorViewController.editor.waitForIdle()

//Crashing at below line

 block.children.forEach { (child) in

           print("child.part.viewBox: %@",child.part.viewBox)

 }

============================


Anything wrong we did here?


Thanks

Hello Olivier,


Please ignore the above message.

Great to see that we got the result of written text into a JSON object by the code below:

=========================

            let jsonText = try editorViewController.editor.export_(block, mimeType: IINKMimeType.JIIX)

            let data = jsonText.data(using: .utf8)!

            let jsonDict = try JSONSerialization.jsonObject(with: data, options : .allowFragments) as? [Dictionary<String,Any>]

=========================

Got the JSON object with word by word bounding rect.

My written text is::  " A man can do anything"

Now if user search for "A", how can I get that particular letter bounding box to highlight it?

Currently I can see each word's bounding box but not for each letter.


Please help us with your inputs.


Thanks


Dear Naidu,


Currently to get the characters information, you should set the following configuration: conf.setBoolean("export.jiix.text.chars", true);


When exporting as JIIX, you will then have your result at character level.


Regarding the bounding-box, you should then have it as follows:

   "label": ".",
   "candidates": [ ".", ",", "-", "i", "e" ],
   "bounding-box": {
    "x": 1590.2682,
    "y": 548.86816,
    "width": 8.4197998,
    "height": 10.373596
   },


Let us know if this helps.


Best regards,


Olivier

Dear Olivier,


It's working great with character level, but we need to be able to search for both single character & words too.

For Eg:  If we have the string "A man can do anything"

Here if user search for "A" then

Results -> A[A], a[man], a[anything]


if search for ma then
Results -> ma[man]


How can we get all the combinations of written text to be searched?


Thanks



Regards,

Naidu

Dear Olivier,

We are able to execute the sample app provided in github.


Now the issue is when we create a new demo app and install the pods as mentioned, but we keep getting "Certificate error" which is working fine in your sample app.

We are using the same certificate which is working fine in sample app provided by you at : https://github.com/MyScript/interactive-ink-examples-ios

Can you please guide us to get rid of this error?


Thanks

Dear Naidu,


Currently, when looking at your account, you have the "Mismatch between certificate and application" error message.


Can you please check the bundleIdentifier of your project: https://developer-support.myscript.com/support/discussions/topics/16000007816.


Best regards,


Olivier

Dear Olivier,

Thanks a lot for your patience in helping us.

The content shown in the screen attached has many strokes, and when we are supplying our stroke points by below methods resulting a delay of 30 seconds to process all the stroke points. Can you please help us in fixing this problem as we will have too many strokes in each page? 

Thanks


Regards.

Naidu

image


Dear Naidu,


currently, in order to get the fastest recognition, you should ensure all the points are added in one call using the editor.pointerEvents().


Nevertheless, keep in mind TEXT recognition is a demanding process, and the more ink you have, the slower recognition is. You also understand the more powerful your device, the faster recognition will be.


Best regards,


Olivier

Login or Signup to post a comment