Text

ATK single line widget not recognising custom lexicons that conatin space

Hi,
We are using a custom lex res file for ATK single line widget. Some of the lexicons contain space.
The widget is not able to recognise any of the lexicons which are space separated.
The other resource the widget is configured to use is en_US/en_US-ak-cur.lite.res(default).
Can you please point out what we may be doing wrong here?

Regards,
Satyendra


Hi Satyendra,

The lexicon has to be filled with series of words. As you noticed, it is not efficient if you add space between words. We will update the developer tools soon to allow another type of custom resource based on regular expressions, maybe it could be of help?
We will keep you updated.

Best regards

Hi Cate,

Thank you for the response.
Can you please let us know that how long it is going to take to update.?

Regards
Satyendra

Hi,

Until i stop writing, it understand that i am completing one word even though there are spaces in singleLine widget.
So what is the configuration, we should to so that it understand that there are spaces in between and new word has started.?


Regards
Satyendra

Hi Any update on when the new tool will be available that supports regular expressions. We are blocked on this.

Dear Satyendra,

I have on your side, why do you happen to have spaces in your lexicon? To be able to recognize compound words? How about splitting those compound words in two, and have 2 entries in your lexicon instead of one:
e.g.:
word1 word2
could be replaced in two lines by:
word1
word2

Best regards,

Olivier

Hi Oliver,

Any update on the new tool which would help us recognise Regular expressions.
We find there are many use-cases in our app where we will need regular expression wise prediction.
This would definitely help us to be more accurate.
We will be very thankful if this can be made available!

Thanks,
mithilesh

Dear Mithilesh,

the tool is now available online at https://developer.myscript.com/tools.

You can then create and compile your own ludef files (just drag and drop your own ludef files).

Best regards,

Olivier

Hi Oliver

I see three options:
1. Lexicon (Text)
2. Subset knowledge (Text)
3. Grammar (Math)

Which one should i select?

I am using ATK for TEXT.

Dear Mithilesh,

You should proceed as follows:
-Create you own ludef file, with ludef extension: e.g. myCustomLexicalUnit.ludef
-Drag and drop it into the main area
-If compilation succeeds, you will be offered to download the myCustomLexicalUnit.res file

Best regards,

Olivier

Hi oliver,

Thankyou, I am able to compile ludef file.
Can you please tell me how to identify whitespaces through regular expressions. I tried adding whitespace in the reg-ex->compiling->using the res file, but this does not recognise spaces. I even tried adding t to identify tabs,but it recognises 't' instead of tab.
Other recognitions through regular expression working fine.


Thanks
Mithilesh

Dear Mithilesh,

in a ludef file, in order to recognize a space in between two terms, just add a space in between the 2 terms you want to recognize. Here is an example:

myLex1 = @import string-list "mylexicon1.lex"
myLex2 = @import string-list "mylexicon2.lex"
myResult = {myLex1} {myLex2}
{myResult}


Let us know if youhave further questions.

Best regards,

Olivier

Hi Oliver,

Thanks a lot for prompt reply.
That helped.
Another problem we are facing is that we want to use/refer to already created lex files inside the ludef file. We need to use the lexicon dictionary in our regular expressions.
Can you please guild us on how to do this.


Thanks,
Mithilesh

Dear Mithilesh,

currently, the compiler tool available on the dev portal doesn't allow to import lexicons or compiled resources.

The solution consists in adding the terms of the lexicon in the ludef, concatening those in a line. Here is an example: term1 = (word1)|(word2)|(word3)...

Which could be as follows in a full ludef:

term1 = (toto)|(tata)|(titi)
term2 = (azert)|(qsdfg)|(wxcv)
full = {term1} {term2}
{full}


Let us know if you have further questions.

Best regards,

Olivier

Hi oliver,

we actually have a lot of words in the lexicon.
There are 2-3 lexicon of size 1 MB.
But using all those inside ludef is not possible as it would be > 1MB.
That is why we need to import resources.
Can you tell me when this could be supported by the online tool or if you can think of any other way of achieving this.

Thanks,
Mithilesh.

Login or Signup to post a comment
  • Support
  • Forums
  • Text
  • ATK single line widget not recognising custom lexicons that conatin space