Presentation is loading. Please wait.

Presentation is loading. Please wait.

FREEDIC A SymbianOS based multilingual dictionary for the Nokia 7710 Chong Poh Kit ; Dao Yuan; SeungHyun Whang.

Similar presentations


Presentation on theme: "FREEDIC A SymbianOS based multilingual dictionary for the Nokia 7710 Chong Poh Kit ; Dao Yuan; SeungHyun Whang."— Presentation transcript:

1 FREEDIC A SymbianOS based multilingual dictionary for the Nokia 7710 Chong Poh Kit ; Dao Yuan; SeungHyun Whang

2 Contents GUI Background monitoring Classes design Loading dictionary Lookup Function Advantages Future work

3 GUI Format of Dictionary file The main GUI window will be used for users to input text and to display output for dictionary searches. Top combobox pane : word to search Bottom textbox: Output of search function

4 Buttons Clear List Clears the searched words list Background Sends the dictionary to the background but leave it running Exit Permanently end the dictionary session

5 Menu About A short message about the dictionary Copy Copy the selected text Background Sends the dictionary to the background but leave it running Exit Permanently end the dictionary session

6 Copying

7 Background monitoring Monitor for key-press events from the background Wakes up the dictionary and puts it to the foreground to display the text

8

9 Dictionary class design The dictionary will be divide into following classes. Application core class contains GUI, and it generally describes all functions of the e-dictionary. Libs class contains all dictionaries, and it handles all the function calls from AppCore, and forward them to each Dictionary. Dict class contains everything about a particular dictionary, the INDEX file, the DATA file, and how to lookup a key word in dictionary. Index class only deal with index file, constructing the page table, looking up words from index and return its offset in DATA file.

10 Load Dictionary file Format of Dictionary file Contain three files -.ifo.idx.dict.ifo file describe general information about the dictionary. # of word entries, etc..idx file is a index file of.dict file. It record word string and its offset in.dict file..dict file contain the detail translation and explanation of each word.

11 Example of loading.ifo file

12 Load Dictionary file How is it loaded into memory? Very important to reduce memory consumption.

13 Database Lookup Function SimpleLookup Compare the searching word in INDEX file and than read the offset to the DATA file. Interface of SimpleLookup Function sWord iWordIndexiLib TBool SimpleLookupWord(TDesC & sWord, TInt32 & iWordIndex, TInt iLib); sWord is the string of the keyword, iWordIndex will return the offset to the DATA file iLib will determine which dictionary to search. (Since it is will load several dictionary page table into memory.)

14 Lookup Function Call (Simple lookup function:)

15 Database Lookup Function Source code to lookup page table & entries within a page while (iFrom<=iTo) { iThisIndex=(iFrom+iTo)/2; //divide the table into half cmpint = stardict_strcmp(str, get_first_on_page_key(iThisIndex)); //comparing if (cmpint>0) // if the word is in second half, iFrom=iThisIndex+1; //reduce searching range by cutting first half else if (cmpint<0) // if the word is in first half, iTo=iThisIndex-1; //reduce searching range by cutting second half else {// if the word is found bFound=true; //mark the flag break; //need no more search, break the loop }

16 Advantages Configurable Faster Multilingual Free dictionary files Background function Copying

17 Future work Loading dictionary Automatically load all possible dictionary files from the user specified directory. For large index file (>4MB), use segmented loading method. Change the “ entry per page ” according to the total number of word entry in all dictionary. Searching algorithm Adding rule search and fuzzy search function.

18 Future work New dictionary file addition through one-click function. Dictionary file creation code. Camera support for dictionary search. Support for more languages in the menu. Currently, only English is used in the menus.


Download ppt "FREEDIC A SymbianOS based multilingual dictionary for the Nokia 7710 Chong Poh Kit ; Dao Yuan; SeungHyun Whang."

Similar presentations


Ads by Google