Use a spell check dictionary from Word?

Use a spell check dictionary from Word?

3
NewbieNewbie
3

    Jan 13, 2010#1

    Is it possible to use an existing spellcheck dictionary that I have been building up in Word 2003 for many years?

    I am thinking about migrating away from Office/Word to UltraEdit as all my work is text based. So I need a text editor that will allow me to use my existing spellcheck dictionary (and also provide other features such as macros).

    Thanks
    Andy

    6,604548
    Grand MasterGrand Master
    6,604548

      Jan 13, 2010#2

      I did not have a custom dictionary of Word (Office). So I used my Word 2007 and added some proper names to the user dictionary and looked on the file %appdata%\Microsoft\UProof\Custom.dic into which the words were saved by MS Word 2007. It was simply a Unicode encoded text file with 1 word per line using DOS line terminators which I could simply open in UltraEdit.

      I run the spell checker of UltraEdit - it is Aspell - and added those words to the default users dictionary because I also did not have a custom Aspell dictionary. Next I opened the 2 files en.prepl and en.pws created by Aspell in the configured personal data directory.

      The file en.prepl contained only the line

      personal_repl-1.1 en 0

      The file en.pws contained as first line

      personal_ws-1.1 en x

      and below this line the words with 1 word per line. x at top of the file was the number of words which is simply the number of lines minus 2 when the cursor is at bottom of the file. The 2 files were ANSI files using DOS line terminators.

      According to this simple and quick test it should be no problem to convert a users dictionary of MS Office to an Aspell users dictionary.

      Maybe you can find somewhere else more information on how to convert a MS Office dictionary to an Aspell dictionary. But if your dictionary is as simple as the one I quickly created with Word 2007, the conversion is really very simple.
      Best regards from an UC/UE/UES for Windows user from Austria

      3
      NewbieNewbie
      3

        Jan 13, 2010#3

        Thanks for this idea. It does work. I have opened the custom.dic file and am running the spell check in UltraEdit.

        Unfortunately, I've now got to click on "Add" more than 13,000 times!

        (It seems odd that Word should have a nice simple text file for a dictionary, and the text editor UltraEdit has something that is difficult to access. I would like to just cut and paste the list of 13,000 words into the UltraEdit dictionary).

        6,604548
        Grand MasterGrand Master
        6,604548

          Jan 14, 2010#4

          Okay, your custom.dic is also a simple Unicode text file. You don't have to add all 13.000 words by clicking on the Add button in the spell checking dialog for every word. I have this done only to create a custom dictionary for Aspell to get one and look on the file created.

          In UltraEdit at Advanced - Configuration - Spell Checker - Dictionary Directories you see the path of the folder where your personal dictionary files are stored by Aspell. You can also change in this dialog the folder for the personal dictionary files. Look into this folder. You should see already 2 files:

          language abbreviation.prepl
          language abbreviation.pws

          Open your custom.dic and the file language abbreviation.pws in UltraEdit. Select all in file custom.dic with Ctrl+A and copy it to clipboard with Ctrl+C. Switch to file *.pws with Ctrl+F6, select everything from start of line 2 to end of file with Ctrl+Shift+End and replace the existing words with Ctrl+V with the words from custom.dic.

          Look now on the status bar at bottom of the UltraEdit window. You should see here after the abbreviation Ln the line number of the blank line after the line with the last word. Subtract from this number the value 2 and go to end of the first line of the file with Ctrl+Home and key END. There is the number of words in the dictionary file. Replace this number with the just calculated number (number of last line minus 2) and save the file.

          The personal dictionary for Aspell should be now ready for usage.

          In the meantime I have found also the documentation for the 2 Aspell files, see Format of the Personal and Replacement Dictionaries. As you can read there the format is really as simple as written here. And after reading this single page documentation I now know that the file lang.prepl is the personal replacment dictionary file while the file lang.pws is the personal words dictionary file. Further with adding the optional encoding information utf-8 on the first line of both files and converting the files to UTF-8 using in UltraEdit File - Conversions - ASCII to UTF-8 (before pasting the words from custom.dic) it should be also possible to use words with Unicode characters in both personal dictionary files in aspell (not tested by me). The only difference I can see between documentation and the files created by Aspell during a spell check in UltraEdit is that the files do no start with .aspell. in the file name. The file names are just lang.extension. That could be a difference between Linux and Windows version of Aspell and is surely no problem.
          Best regards from an UC/UE/UES for Windows user from Austria

          3
          NewbieNewbie
          3

            Jan 15, 2010#5

            Thanks for all your help Mofi.

            I found another way to click the mouse 13,000 times. I used Autohotkey to program the keyboard to click the mouse and then rested a heavy weight on the key and then went to make a cup of tea!

            I am really getting to like UltraEdit. It's much nicer to use than Word.