Interactive Ink

Custom Lexicon in native android myscript Interactive Ink application

Hello, I have to use my own custom lexicon in my native android myscript application using Interactive Ink SDK. 

I have generated a resource file named: "custom_lex.res" from this link:

and copied the file to the "resource" directory under GetStarted asset folder. I have also added the command: AddResource en_US/custom_lex.res

to the en_US.conf file in "conf" directory. 

Even after doing this I couldn't see any improvement in the recognition accuracy. What am I doing wrong or missing?

1 person has this question

Dear Akash,

thank you for contacting us and your questions.

Currently, first let me confirm you created and added your lexicon the proper way to proceed! I am therefore surprised accuracy is not satisfying...

Nevertheless, please keep the following in mind:

-the Text resource (en_US-lk-text.res in your case) is a multi-purpose resource, i.e. it can be used to recognize any common word (e.g. first name, last name, number, standard word), but also unknown words (that we call out of lexicon)

-Attaching a custom lexicon should only be done to recognize "specific" words, that are not part of our lexicons, such as medical terms, custom expressions... Indeed, adding common words is indeed likely to decrease accuracy.

Also, what can be done to ensure your lexicon is working properly is to create a configuration without the text resource, write a single word of your lexicon and ensure it is recognized.

Best regards,


It worked! Thank you so much Olivier for your suggestion. 

Dear Olivier, 

I tried that method on a large number of lexicon words which I wrote simply in a column - each word in a new line such as the following:







Now the problem is that my application recognizes only ONE WORD that I write first. Second word written after the first one is not recognized. 

Example: Lets say I write "Monkey" in my hand writing in the application and then in the next line I write "Zebra" just after I write "Monkey", the application gives me the recognition result of only Monkey. Zebra is ignored - no recognition is shown for Zebra. Similarly all consecutive words that I write after are ignored. What is wrong going on?

Thank you.

Dear Akash,

thank you for the update!

This confirms your resource is working fine. Indeed, when using a custom lexicon by itself, you can only recognize a word at a time. If you want to recognize several words from your lexicon, you should attach a grm resource.  As the TEXT resource contains one, you can then combine your lexicon with the standard TEXT resource (en_US-lk-text.res in your case), so that you will be able to recognize custom words.

In case you want to recognize only words from your lexicon, please let me know, I will then provide you with a grm resource.

Best regards,


Yes, sure Olivier, please provide me the grm resource file. Also can you explain how to create a grm file? Thank you.

Dear Akash,

please find the grm resource as an attachment. You should add it the same way than your custom lexicon

Currently, it is not possible to create a GRM on the developper portal. Basically, the GRM will allow you to "loop" in your lexicon.

Best regards,


(90 Bytes)

Can I also get this file?

I am facing very similar issue, where we have firstName & LastName as two entry.




While user writes in same line, it gives only Chohan

Dear Irshad Chohan,

Please find the file as an attachment.

Best regards,


(90 Bytes)

I am unable to download it from this forum. How Can I enable it? It just show me icon nothing else. Can you email me ?

Hello Irshad. If you are using Chrome then go to the page source code. You will find the attached link in it - it works.

Thanks yaar. :-) Done.

Dear Akash,

thank you for the tip.

Irshad, feel free to contact us if you have any question.

Best regards,


Hi Olivier,

What is the purpose of GRM resource? How does it work?


Login or Signup to post a comment