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.
MyScript iink SDK comes with a set of supported language with associated recognition configurations.
However, there are a few situations where you may want to adapt these provided configurations:
Resources are pieces of knowledge that can 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.
An LK is not mandatory but not attaching one often results in a significant accuracy drop. It may be relevant if you do not expect to write full meaningful words, for instance if you plan to filter a list with a few letters.
A lexicon is a resource that lists words that can be recognized in addition to what is included into linguistic knowledge resources.
You can build and attach your own custom lexicons.
A subset knowledge (SK) is a resource that restricts the number of text characters that the engine shall attempt to recognize. It thus corresponds to a restriction of an AK resource. It 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.
A math grammar is a resource that restricts the number of math symbols and rules that the engine shall be able to process. In education use cases, it can prove very 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.
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 our your web-component.
With TEXT
type configure your editor like this.
const configuration = {
recognitionParams : {
// Text configuration
text : {
configuration : {
customResources : ['test']
addLKText : true
}
}
}
}
iink.register(editorElement,configuration)
With MATH
type configure your editor like that.
const configuration = {
recognitionParams : {
// Math configuration
math : {
customGrammar : 'test'
}
}
}
iink.register(editorElement,configuration)