Importing Word autocorrect into LibreOffice/OpenOffice

This procedure will require
1. a text editor with  ability to search and replace with regular expressions (I use NoteTab, free on  the internet)
2. an archiver with viewing capability (I use WinRar, free on  the internet)
3. A list of bad and good words in text format separated by  some arbitrary symbol. (I used the autocorrect.txt file from Thunderbird email.)

(Autocorrect.txt from Thunderbird email comes in that format and has  over 900 common mis-spellings with corrections. To find autocorrect.txt in  Thunderbird: do a search for the file, or look in Thunderbird’s extension folder  for a folder ending in “117}”, and open that folder. Using your text editor,  open autocorrect.txt and it contains entries such as the following:

monday<>Monday
tuesday<>Tuesday
wednesday<>Wednesday
abscence<>absence
acces<>access
accesories<>accessories
accidant<>accident
….

When you have a text file of  errors and corrections separated by some symbol such as <> (as above), you  are ready to import it into Open Office.)

Do the following:

1.  Open your list of corrections (in the format above) in your text editor.
2.  Do search and replace-all for the following 3 operations:

1. Search for  ^ (regular expression) and replace all with this exact phrase:

<block-list:block block-list:abbreviated-name=”

(you must  include the trailing double-quote)

Your list should now look like this:

<block-list:block block-list:abbreviated-name=” monday<>Monday
<block-list:block block-list:abbreviated-name=” tuesday<>Tuesday
<block-list:block block-list:abbreviated-name=” accidant<>accident
……

2. Search for <> (or whatever separating symbol you  have used) and replace all with this exact phrase:

” block-list:name=”

(you must include both double-quotes)

Your list should look like  this:

<block-list:block block-list:abbreviated-name=”monday”  block-list:name=”Monday
<block-list:block  block-list:abbreviated-name=”tuesday” block-list:name=”Tuesday
<block-list:block block-list:abbreviated-name=”accidant”  block-list:name=”accident
….

(note that there MUST be a single  blank space between the double-quote following the error and the text:  block-list:name.)

“monday” block-list:name

3. Search for $  (regular expression) and replace all with this exact phrase:

“/>

(you must include the double-quote)

Your list should now look  like this:

<block-list:block block-list:abbreviated-name=”monday”  block-list:name=”Monday”/>
<block-list:block  block-list:abbreviated-name=”tuesday” block-list:name=”Tuesday”/>
<block-list:block block-list:abbreviated-name=”accidant”  block-list:name=”accident”/>
….

Your list of corrections is  now ready to be placed in the Open Office autocorrect list.

1. Close  Open Office.
2. Locate a file beginning with acor_ It will likely be  acor_en-US.dat or acor_en-CA.dat or whatever language you are using. This file  is in the ….\user\autocorrect folder in your Open Office profile.
There  will be more than one such file if you use autocorrect with more than one  language.
3. Make a copy of this file (e.g. “copy of acor_en_US.dat” and  save it in the same folder so that you can re-use it if you make an error.)
4. Open the file acor_en_US.dat (or whatever your file is called) using your  archiver. (You might have to right-click on the file, then Open with, then  choose your archiver program.)
5. In the archiver window, click once on a  file called “DocumentList.xml”
6. Use your archiver’s View command to open  this file in your text editor.
7. The very last entry in this file is:  ></block-list:block-list>
8. Place your cursor immediately between  the “><“. Like this:
> |</block-list:block-list>
(Your  cursor MUST be immediately between the two angle-brackets.)
9. Go to your  data file (the list of errors and corrections you created above) and copy the  entire file (Crtl-A, then Ctrl-C)
10. Go to your acor_en_US.dat file, (be  sure your cursor is in the position explained above) and insert your data  (Ctrl-V)
11. Save this file.
12. Go to your archiver and it will ask if  you want to update the archive. Answer Yes.
13. You’re done! Close the  archiver and your text editor.
14. Open a document with Open Office, go to  Tools/Autocorrect/Replace and you will find all your corrections there, ready to  use, adjust or delete as you wish

Advertisements

Published by:

Robert W Kingett

Robert Kingett is a gay blind journalist, and author, with many publications in magazines, anthologies, and blogs. He has judged many writing contests and has won many awards for his writings and advocacy.

Categories Uncategorized