Help Center » Web Browsers, Add-ons

want to create dictionary add-on to firefox 3 -any simple solutions please

(13 posts)
  1. Anonymous
    Unregistered

    I want to create a dictionary add on to firefox 3.
    I have looked at some earlier posts on the web and I couldn't find persdict.dat which I suspect existed in earlier versions. Please correct me if I am wrong.

    Secondly, without having any programming or language experience, I am searching for a quick and dirty copy paste info to create such dictionary.

    ie: could I forexample open ms word dll spell check file with a program of your suggestion and copy and paste the word list onto already existing dictionary of mozilla firefox/dictionary/en-US.dic file or something similar

    or any other simple and dirty solutions please

    Posted 5 months ago #
  2. Anonymous
    Unregistered

    If you want to add bulk of custom words you can go to dictionaries folder which resides in Firefox installation folder and open the dictionary file ( usually with extension .dic) of your language in a plain text editor and append the set of words to the bottom of the file.

    Alternatively you can add the custom words to the custom dictionary file.The name of the custom dictionary is “persdict.dat” (short for “personal dictionary”), and is located in the following location (depending on operating system):

    Windows Vista
    
    C:\users\[username]\AppData\Roaming\Mozilla\Firefox\Profiles\
    [unique-alphanumeric-string].default\persdict.dat
    Windows XP
    
    C:\Documents and Settings\[username]\ApplicationData\Mozilla\Firefox\Profiles\
    [unique-alphanumeric-string].default\persdict.dat
    
    Mac OS X
    
    ~/Library/Application Support/Firefox/Profiles/[unique-alphanumeric-string].default/persdict.dat
    
    Linux
    ~/.mozilla/firefox/[unique-alphanumeric-string].default/persdict.dat

    Of course, the [username] (for Windows) and [unique-alphanumeric-string] will vary depending on your unique configuration. Once you have located the target file, “persdict.dat“, open it with a text editor and edit according to your needs. The file itself is simply a list of words that you have chosen to add to the dictionary by right-clicking in Firefox and selecting “Add to dictionary“.

    Note that “persdict.dat” will not be found in the above mentioned locations, unless you added custom words to the the dictionary. You can add a custom word marked as a typo to the dictionary by simply right-clicking and choosing - you guessed it - “Add to Dictionary” from the context menu.

    Posted 5 months ago #
  3. Anonymous
    Unregistered

    Thank you Sparx.
    I appreciate your time and explanation.

    I'll go crazy to try to find th “persdict.dat”.

    I have added several words several times several close browsers and full search on the pc it is not located at all.

    I have searched the net to find a sample file and cannot find it either.

    Would you please copy the essential parts and paste here so that I could create and place such file in the mentioned location

    all the best

    and on an earlier question, is there anyway to view ms word word spellcheck dll which lists all the words I need to paste

    Posted 5 months ago #
  4. Anonymous
    Unregistered

    I have listed few words and created “persdict.dat” file and placed it under such location.

    Now if I misspelled than the one I listed it is underlined in red as I expected when I right click with the mouse it doesn't show the correct version I have placed in the “persdict.dat” file.

    I wonder what else is in that “persdict.dat” file other than listed words

    or

    it is supposed to be working only if they are at

    Mozilla firefox/dictionary/en-US.dic file or something similar, not the “persdict.dat” file in the first place to spell checking/correcting functionability

    Posted 5 months ago #
  5. Anonymous
    Unregistered

    @Alev: I assume your system is set to display hidden and system files. If not, perhaps you need to enable those settings from within the FOLDER OPTIONS applet.

    In any case, adding a word to the persdict.dat file will result in that word being treated as an exception - meaning that particular word will be bypassed and NOT recognised as an error. However, if you add the word to the .dic file, and a similar word is enountered, the spellcheck *will* offer your newly added word as a suggestion. If you want this functionality, add your words to the .dic file.

    Posted 5 months ago #
  6. Anonymous
    Unregistered

    Appreciate your response again Sparx.

    My system is set to display hidden and system files OK.

    It is good to know that persdic doesn't actually act as spellcheck.

    Now I need more info on adding the word to the .dic file.

    I did open it with a text editor and seen some numbers etc such as.

    -------------------------
    56029
    0/nm
    0th/pt
    1/n1
    1st/p
    1th/tc
    2/nm
    2nd/p
    2th/tc
    3/nm
    3rd/p
    3th/tc
    4/nm
    4th/pt
    -----------------

    does that mean I need special coding?

    and another question:
    I have :
    en-US.aff
    en-US.dic

    means US english I guess

    so if I need to create another dictionary say, esperanto

    how would I go creating :
    esparento.aff
    and esparento.dic

    I guess I need bit more comprehensive set of instructions etc.

    Would you point me to the right direction to solve this creating & adding a special dictionary for firefox 3 please

    best regards

    Posted 5 months ago #
  7. Anonymous
    Unregistered

    Well, the simplest way would be to install the Language Pack and Dictionary from here.

    I've checked and Esperanto is listed as available.

    FYI - Mozilla applications' dictionaries are compatible with those offered by OpenOffice.org

    So, I'd advise you to read the guide there. Although, I do believe that most languages already have a pre-made dictionary/language pack available for download.

    Posted 5 months ago #
  8. Anonymous
    Unregistered

    esperanto was just an example, really, I was after two different dictionaries and one is a Turkish spell checker to be more specific and the other one is a "made up dictionary" and not relating to any known languages whatsoever So Turkish forexample is not listed in firefox or openoffice dictionary list.

    I have found the http://lingucomponent.openoffice.org/dictionary.html link very useful but some of the instructions to follow is beyond my capacity unless I could find some cut and paste template to start my own version.

    Any suggestions please?

    Posted 5 months ago #
  9. Anonymous
    Unregistered

    Alev: Merely adding words to the end of the en-us.dic file will only result in increasing the size of the dictionary. This means that more words will be recognized as being correctly spelled, rather than being wrongly tagged as a mis-spelled.

    The .aff files are where the geekiness comes into play... The .aff files contain the rules for offering suggestions. Open up the .aff file in Notepad or some other plain text editor and have a look.

    WRT to your need for Turkish Language - http://www.mozilla-europe.org/tr/

    If your "made-up" dictionary has no relation to any other language, I suggest you merely add the words of this "made-up" language to the end of the .dic file, one word on each line.

    Posted 5 months ago #
  10. Anonymous
    Unregistered

    Thank you again, Sparx.

    1) http://www.mozilla-europe.org/tr/ link provides firefox with Turkish interface - no Turkish dictionary or spellchecker unfortunately.

    2)I need the misspelt words underlined red and when right mouse click on I want the possible correct alternative listed and and when clicked I want it replaces the misspelt with the one I clicked on as it does with English. So what you said gives me what I need please.

    Would you also please clarify on that, that adding a wordlist will not only recognise as misspelt but also give me some closer word options on right mouse click and will replace the missspelt one with the one I pick.

    And a perhaps some basic intro on do's and don't's while working with the .dic / .aff files, please, if you could.

    I am sorry that this tread is going a bit longer than one expects

    Posted 5 months ago #
  11. Anonymous
    Unregistered

    Alev: Like I've mentioned earlier, open the en-us.aff file in Notepad and take a look @ the rules that are included. I'm no expert but seems to me that you'd know better to formulate language based rules for the language you're familiar with.

    I found some instructions for you here - http://www.linux.com/articles/51675

    I'm afraid that's the best I can do for now. I'd encourage you to try and attempt something, perhaps as a side project which can help the OpenSource movement in the future.

    Also, if you're searching, be on the look out for HunSpell dictionaries as those are what are in use for Firefox 3.

    Posted 5 months ago #
  12. Anonymous
    Unregistered

    Appreciate your response very much again Sparx
    I'll check on the linux site immediately.
    I have also contacted few mozilla people and none responded at all.
    So you have shown more concern and provided more info.

    cheers

    Posted 5 months ago #
  13. Anonymous
    Unregistered

    There is zemberek project for Turkic languages.
    http://code.google.com/p/zemberek/
    http://www.openoffice.org.tr/ Turkiye use zemberek Beta spell check..
    You should visit their web sites and examine their word lists.

    Posted 5 months ago #

RSS feed for this topic

Reply

You must log in to post.