Title Back Colour Keyoti Title Line Title Curve
Blue Box Top

Updating Dictionary - RapidSpell WPF - Forum

Welcome Guest Search | Active Topics | Log In | Register

Options
frauf
#1 Posted : Friday, July 6, 2012 6:14:03 PM
Rank: Member

Groups: Registered

Joined: 7/6/2012
Posts: 1
I am trying to add new words to dictionary but I am not able to I want to do it programmatically without using the GUI the example that is in dictionary does not explain much, I just have the keyotiRapidSpellDict.dll. The API does not talk about how can I initialize the dictionary manager and add the words from the database? Also I cant figure out how to how can I merge or use english and Medical dictionary together.

I see in customize behavior there is a section where it talk about using database based user dictionary. I just want to update the dictionary file with new words from database because my user should not add words to the dictionary only admin can to database.
Jim
#2 Posted : Friday, July 6, 2012 7:22:55 PM
Rank: Advanced Member

Groups: Administrators, Registered

Joined: 8/13/2004
Posts: 2,667
Location: Canada
Hi, firstly, you'll need to use the ".dict" files that are distributed with our product - these can be modified with Dict Manager.

Here's how to use the Dict Manager API



Reference DictManager.exe in your project (when you browse for the assembly, just change the file type to *.exe in the open dialog).
Create an instance: model = new DictManager.DictManagerModel();
Use any of the API calls:
CreateDict Creates a new dict file
LoadDict Loads an existing dict file
AddWord Adds a word to current open dict file
MergeDictFile Merges an existing dict file with the open dict file
MergeTextFile Merges an existing text file with the open dict file
RemoveWord Removes a word from the dict file
LookUp Checks if a word is in the dict file
SaveDict Saves the currently open dict file


Typical usages should be in the following order;

create or load

modifying operations

save.


Eg. to merge the medical and English, programmatically

Code:

model = new DictManager.DictManagerModel();
model.LoadDict(@"c:\some\path\english.dict");
model.MergeDictFile(@"c:\some\path\medical.dict");
model.SaveDict();


To add words from a database;


Code:

model = new DictManager.DictManagerModel();
model.LoadDict(@"c:\some\path\english.dict");
foreach(string newWord in wordListFromDB)
   model.AddWord(newWord);
model.SaveDict();


don't worry about duplicates, SaveDict takes care of it.

Once you have your saved .dict file, point to it with the DictFilePath property in the controls.

Jim

-your feedback is helpful to other users, thank you!

Evaluation Downloads
-your feedback is helpful to other users, thank you!


Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.




About | Contact | Site Map | Privacy Policy

Copyright © 2002- Keyoti Inc.