iink SDK on Device

Answered

How to disable specific gestures when the content type is text?

We want to disable specific gestures when the content type is text.

We looked at the configuration settings of the SDK:

1. gesture.enable : enable/disable all gestures

2. raw-content.pen.gestures : disable specific gestures when the content type is raw-content

3. diagram.pen.gestures : disable specific gestures when the content type is diagram

 

My question is how to disable specific gestures when the content type is text?

Whether there are similar configuration values such as "text.pen.gestures"?



Best Answer

Dear Mokacao,


thank you for the update.


Currently, as symbols such as "æ" or "ʊ" are not supported by our text technology, it is not possible to create a lexicon that would allow to recognize such symbols.


It is therefore not possible to recognize phonetic symbols.


Best regards,


Olivier


Answer

Dear Mokacao,


thank you for the update.


Currently, as symbols such as "æ" or "ʊ" are not supported by our text technology, it is not possible to create a lexicon that would allow to recognize such symbols.


It is therefore not possible to recognize phonetic symbols.


Best regards,


Olivier

Thanks, I've got it.

How to recognize phonetic symbols?

For example the following characters:

/kʌp/

/blæk/

/haʊ/

Dear Mokacao,


thank you for the update.


Please find attachedthe supported symbols in en_US.


Best regards,


Olivier


txt
(439 Bytes)

I want to know which characters can be recognized in en_US.

By searching the forum, I got the following results:

 

    For information, please find the list of symbols and emojis we support in en_US:

    !"#$%&'()*+,-_./:;<=>?@[\]^{}~€¢£¥§×µ±÷|•←→↳⇐⇒✓°↑↓≠⊕⊖∅↔≈≥≤↗↘⇔♀♂◦☆

    ❤

 

I want to know the range that can be recognized in en_US, including characters, symbols, emojis, etc.

Dear Mokacao,


currently, the gesture detection needs 2 things to work:

-the time information

-"Enough time" in between each stroke, so that the strokes are processed and we have context when a gesture is done


From this, you understand the gesture detection cannot work with the batch mode.


Nevertheless, if you have the time information for each point, you can replay the ink using the incremental API: https://developer.myscript.com/docs/interactive-ink/latest/android/fundamentals/editing/#incremental-input


Then, after each penUP, you shall call the "WaitForIdle". The process will be slower, but the gestures shall be detected pretty fine.


Best regards,


Olivier

In the interactive mode(editor.pointerDown/pointerMove/pointerUp), the gesture function can take effect normally.

But in the off-screen batch mode(editor.pointerEvents), even if the gesture is turned on, there is no effect.

For example, if I write "abc" and then scratch-out the letter "a",

in the interactive mode, the recognition returns "bc", this is the correct result,

in the off-screen batch mode, the recognition returns "xxxabc", this is the wrong result.

 

In the off-screen batch mode, I have set the following configuration, but it has no effect.

conf.setBoolean("gesture.enable", true);

editor.pointerEvents(pointerEvents, true);

 

How can I use the gesture function in the off-screen batch mode?

Dear Mokacao,


please find the whole list of gestures that can be deactivated: "scratch-out", "strike-through", "double-strike-through", "cross-out", "pigtail-out", "select", "join", "arc-join", "insert", "v-insert", "return", "decorate", "underline", "double-underline", "ellipse", "free-form", "tap", "double-tap", "long-press", "overwrite-strokes", "insert-strokes".


Can custom recognition set the weight of certain words or phrases?

>>This cannot be done with the iink SDK


Can I customize Linguistic knowledge (LK)?

>>You can indeed create your own lexicons, or subset knowledge. The easier is that you refer to our online documentation: https://developer.myscript.com/docs/interactive-ink/latest/android/advanced/custom-recognition/


Best regards,


Olivier

I tried "gesture.disabled-gestures" and it works, but I want to know what is the complete list of gestures?

Because I haven't seen anything like "pigtail-out" in the documentation.

 

Can custom recognition set the weight of certain words or phrases?

I see there used to be "mul-lk-email.res" or "mul-lk-phone_number.res" etc.

Can I customize Linguistic knowledge (LK)?

Dear Mokacao,


thank you for contacting us.


You can disable gestures via the gesture.disabled-gestures configuration.


This can be done as follows:

configuration.let { conf ->
val confDir = "zip://${application.packageCodePath}!/assets/conf"
conf.setStringArray("configuration-manager.search-path", arrayOf(confDir))
val tempDir = File(application.cacheDir, "tmp")
    conf.setString("content-package.temp-folder", tempDir.absolutePath)
    val disabled_Gestures = arrayOf<String>("strike-through","double-strike-through","cross-out","pigtail-out","select","join","arc-join","insert")
    conf.setStringArray("gesture.disabled-gestures", disabled_Gestures)
}


Let us know if you have any other question.


Best regards,


Olivier