1 / 18

FREEDIC

FREEDIC. A SymbianOS based multilingual dictionary for the Nokia 7710 Chong Poh Kit ; Dao Yuan; SeungHyun Whang. Contents. GUI Background monitoring Classes design Loading dictionary Lookup Function Advantages Future work. GUI. Format of Dictionary file

miriam
Download Presentation

FREEDIC

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

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. 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.

  9. 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.

  10. Example of loading .ifo file

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

  12. Database Lookup Function • SimpleLookup • Compare the searching word in INDEX file and than read the offset to the DATA file. • Interface of SimpleLookup Function • 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.)

  13. Lookup Function Call (Simple lookup function:)

  14. 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 } }

  15. Advantages • Configurable • Faster • Multilingual • Free dictionary files • Background function • Copying

  16. 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.

  17. 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.

More Related