Text

Answered

How to search and highlight Handwritten Text in iOS App?

The handwritten strokes that are converted to text... do they also have their locations referenced (on device)?

For iOS (iPad off-line) development, I would like to have a search box (popup search pad) where the user can enter their search criteria (handwritten) and be able to locate the pages that contain the searched-text, and highlight it when opened (similar to the current iPad Notability App and the way Microsoft introduced in Visual Basic it with Tablet PC in 2005).

For example, 

  1. I enter (handwritten) 'A special day' in the search pad
  2. App converts to text
  3. Locates all pages that have 'A special day' (that was converted under the hood)
  4. Search generates a list of pages
  5. Select a page from the list, that page is loaded, and...
  6. The handwritten text (that was searched for) is highlighted


Best,

Blaine


Best Answer

Dear Blaine,


Thank you for your request.


As far as I understand you would like to retrieve the location of the text once converted as type set.

In order to access this information, you should use the editor export_ method with a JIIX format.


You can refer to this page about JIIX exchange format: https://developer.myscript.com/docs/interactive-ink/1.3/ios/fundamentals/import-and-export/#supported-importsexports


The JIIX format provides a consistent representation of the different types of content, including position aspects. 

It is organized as a hierarchy of JSON objects named blocks, (see https://developer.myscript.com/docs/interactive-ink/1.3/reference/jiix/#properties-common-to-blocks), each block having a common set of properties including a bounding box that gives information about the position and extent of the block.


So in order to search for a given word, let's say "hello" and retrieve its position, you can perform your search into the JIIX hierarchy, in order to retrieve the words objects (see https://developer.myscript.com/docs/interactive-ink/1.3/reference/jiix/#word-object), then compare the words label with your string "hello" and if it matches, get the bounding boxes.


Regards,

Gwenaëlle


Answer

Dear Blaine,


Thank you for your request.


As far as I understand you would like to retrieve the location of the text once converted as type set.

In order to access this information, you should use the editor export_ method with a JIIX format.


You can refer to this page about JIIX exchange format: https://developer.myscript.com/docs/interactive-ink/1.3/ios/fundamentals/import-and-export/#supported-importsexports


The JIIX format provides a consistent representation of the different types of content, including position aspects. 

It is organized as a hierarchy of JSON objects named blocks, (see https://developer.myscript.com/docs/interactive-ink/1.3/reference/jiix/#properties-common-to-blocks), each block having a common set of properties including a bounding box that gives information about the position and extent of the block.


So in order to search for a given word, let's say "hello" and retrieve its position, you can perform your search into the JIIX hierarchy, in order to retrieve the words objects (see https://developer.myscript.com/docs/interactive-ink/1.3/reference/jiix/#word-object), then compare the words label with your string "hello" and if it matches, get the bounding boxes.


Regards,

Gwenaëlle

Thanks for the great details Gwenaëlle - I'm looking into this! - Blaine