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.
Resources are pieces of knowledge that should be attached to the recognition engine to make it able to recognize a given language or content.
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.
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.
A lexicon is a resource that lists words that can be recognized in addition to what is included into linguistic knowledge resources.
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.
A math grammar is a resource that restricts the number of math symbols and rules that the engine shall be able to process.
MyScript iink SDK comes with a set of resources with associated recognition configurations.
There are a few situations where you may want to adapt these provided configurations:
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):
You can build and attach your own custom math grammars for math legacy use.
You can build and attach your own custom math sk for math recognizer use.
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.
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);
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);