MyScript’s recognition technology is very flexible. While the default configurations support common use cases, this page explains how you can fine tune them to address specific needs.

What are recognition resources?

Resources are pieces of knowledge that should be attached to the recognition engine to make it able to recognize a given language or content.

Alphabet knowledge

An Alphabet knowledge (AK) is a resource that enables the engine to recognize individual characters for a given language and a given writing style. Default configurations include a cursive AK for each supported language.

You can only attach a single AK to an engine at a time.

Linguistic knowledge

A Linguistic knowledge (LK) is a resource that provides the engine with linguistic information for a given language. It allows the recognition engine to improve its accuracy by favoring words from its lexicon that are the most likely to occur. Default configurations include an LK for each supported language.

Default configurations for all languages but English variants also attach a “secondary English” LK that allows the engine to recognize a mix of the target language and English. Except for this particular case, it is not expected to mix languages together.

Lexicon

A lexicon is a resource that lists words that can be recognized in addition to what is included into linguistic knowledge resources.

Subset knowledge

A subset knowledge (SK) is a resource that restricts the number of text characters or math symbols and rules that the engine shall attempt to recognize. It thus corresponds to a restriction of another resource.

Math grammar

A math grammar is a resource that restricts the number of math symbols and rules that the engine shall be able to process.

Ready-to use resources delivered by MyScript

MyScript iink SDK comes with a set of resources with associated recognition configurations.

Using customized resources

Why customize the recognition?

There are a few situations where you may want to adapt these provided configurations:

How to do so?

An LK is not mandatory but not attaching one often results in a significant accuracy drop. It may be relevant to build your own LK if you do not expect to write full meaningful words, for instance if you plan to filter a list with a few letters.

You can build and attach your own custom lexicons.

A customized SK can be useful in a form application, for example, to restrict the authorized characters of an email field to alphanumerical characters, @ and a few allowed punctuation signs.

You can build and attach your own custom subset knowledge.

In education use cases, it can be useful to adapt the recognition to a given math level (for instance, only digits and basic operators for pupils):

Attaching resources

Whatever the web API you are using, once you have build your resource you have to upload it and give it a name into your developer account.

Go to your cloud dashboard https://cloud.myscript.com, select ‘Resources’ tab and upload the resource file as shown below

You will then be able to add the parameter when you create your editor.

iinkTS

With TEXT type configure your editor like this.

const res = await fetch("../server-configuration.json");
    const server = await res.json();
      const options = {
        configuration: {
          server,
            recognition: {
              text: {
                addLKText: true,
                customResources: ["dinosaur"]
              }
            }
          }
    };

  editor = await iink.Editor.load(editorElement, "INTERACTIVEINKSSR", options);
View demo Get source code

With MATH type configure your editor like that.

const res = await fetch("../server-configuration.json");
  const server = await res.json();
    const options = {
      configuration: {
        server,
        recognition: {
          type: "MATH",
          math: {
              customGrammarId: "math-elementary",
              mimeTypes: ["application/x-latex"]
              }
          }
        }
    };

  editor = await iink.Editor.load(editorElement, "INTERACTIVEINKSSR", options);
View demo Get source code