I had two buttons.Button "A" and Button "B".if i write the "Paracetamol" after pressing the button "A" ,that word only check in within the Lexicon 1.Then i press the button "B" and then i write the word "Dolo" ,that word only be search within the Lexicon 2.
How do i set the separate Lexicons for after press the buttons.
How can i achieve that?
Best Answer
O
Olivier @MyScript
said
over 3 years ago
Dear Kannan,
currently, the reason the "lexicon2" configuration is not set is that you shall set the "text.configuration.name" key: You should then proceed as follows: editorViewController.editor.configuration.setString("lexicon2", forKey: "text.configuration.name")
print("Error while creating package : " + error.localizedDescription)
}
When i press the Button "B" , After my all recognition's are only based on "lexicon2" lexicon only.
But it always also consider the "lexicon1" lexicon.
Above my setup was configured correctly?
My platform was iOS.So can i get the same example in iOS Swift language?
O
Olivier @MyScript
said
over 3 years ago
Answer
Dear Kannan,
currently, the reason the "lexicon2" configuration is not set is that you shall set the "text.configuration.name" key: You should then proceed as follows: editorViewController.editor.configuration.setString("lexicon2", forKey: "text.configuration.name")
Kannan Balasubramanian
Hi ,
I used iinkSDK.
I have two custom lexicons.
ex: Lexicon 1 and Lexicon 2
I had two buttons.Button "A" and Button "B".if i write the "Paracetamol" after pressing the button "A" ,that word only check in within the Lexicon 1.Then i press the button "B" and then i write the word "Dolo" ,that word only be search within the Lexicon 2.
How do i set the separate Lexicons for after press the buttons.
How can i achieve that?
Dear Kannan,
currently, the reason the "lexicon2" configuration is not set is that you shall set the "
text.configuration.name
" key: You should then proceed as follows: editorViewController.editor.configuration.setString("lexicon2", forKey: "text.configuration.name")The list of configuration keys can be found in our documentation: https://developer.myscript.com/docs/interactive-ink/1.3/reference/configuration/
Best regards,
Olivier
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstOlivier @MyScript
Dear Kannan,
Currently, in your .conf file, you shall have 2 configurations, such as:
Bundle-Version: 1.0
Bundle-Name: en_US
Configuration-Script:
AddResDir /data/user/0/com.sample.example/app_example_directory
Name: configuration1
Type: Text
Configuration-Script:
AddResource en_US-ak-cur.res
AddResource en_US-lk-text.res
AddResource myLexicon1.res
EnableAlienCharacters
SetTextListSize 1
SetWordListSize 7
SetCharListSize 1
Name: configuration2
Type: Text
Configuration-Script:
AddResource en_US-ak-cur.res
AddResource en_US-lk-text.res
AddResource myLexicon2.res
EnableAlienCharacters
SetTextListSize 1
SetWordListSize 7
SetCharListSize 1
Then, when you want to set a configuration, you shall set it as follows: conf.setString("text.configuration.name", "textconfiguration1");
A code sample can be found here: https://myscript.filecamp.com/s/q5s39RQovHi1Exet/d/jMKagPDWhXBpxsbY
Best regards,
Olivier
Kannan Balasubramanian
Hi ,
My .Conf File was,
Bundle-Version: 1.0
Bundle-Name: en_US
Configuration-Script:
AddResDir ../resources/
Name: lexicon1
Type: Text
Configuration-Script:
AddResource en_US/en_US-ak-cur.res
AddResource en_US/en_US-lk-text.res
EnableAlienCharacters
SetTextListSize 1
SetWordListSize 5
SetCharListSize 1
Name: lexicon2
Type: Text
Configuration-Script:
AddResource en_US/en_US-ak-cur.res
AddResource livedatas/live_data.res
AddResource en_US/live_data1.res
AddResource en_US/live_data2.res
EnableAlienCharacters
SetTextListSize 1
SetWordListSize 5
SetCharListSize 1
My Configuration setup code was,
do{
try editorViewController.editor.configuration.setString("lexicon2", forKey: "en_US")
}
catch{
print("Error while creating package : " + error.localizedDescription)
}
When i press the Button "B" , After my all recognition's are only based on "lexicon2" lexicon only.
But it always also consider the "lexicon1" lexicon.
Above my setup was configured correctly?
My platform was iOS.So can i get the same example in iOS Swift language?
Olivier @MyScript
Dear Kannan,
currently, the reason the "lexicon2" configuration is not set is that you shall set the "
text.configuration.name
" key: You should then proceed as follows: editorViewController.editor.configuration.setString("lexicon2", forKey: "text.configuration.name")The list of configuration keys can be found in our documentation: https://developer.myscript.com/docs/interactive-ink/1.3/reference/configuration/
Best regards,
Olivier
Kannan Balasubramanian
Hi,
Thank you.It's working now.