OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

SOLUTION: to import autocorrect files

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Writer
View previous topic :: View next topic  
Author Message
haroldmunn
General User
General User


Joined: 31 Dec 2006
Posts: 47

PostPosted: Fri Oct 05, 2007 9:11 am    Post subject: SOLUTION: to import autocorrect files Reply with quote

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.

Very satisfying!
Back to top
View user's profile Send private message
haroldmunn
General User
General User


Joined: 31 Dec 2006
Posts: 47

PostPosted: Fri Oct 05, 2007 10:06 am    Post subject: where to find autocorrect.txt on the internet Reply with quote

The file autocorrect.txt (with approx 900 corrections) can be found at
http://forum.addonsmirror.net/index.php?showtopic=4125

Download the "autocorrect.xpi" file and open it with an archiver. Autocorrect.txt is inlcuded.

Special symbols such as

|c<>©
|r<>®
|s<>§
|o<>²
|e<>³
qtr<>¼
hlf<>½
tqtr<>¾

do not seem to work. You can simply delete those lines.
Back to top
View user's profile Send private message
foxcole
Super User
Super User


Joined: 19 Jan 2006
Posts: 2771
Location: Minneapolis, Minnesota

PostPosted: Fri Oct 05, 2007 10:33 am    Post subject: Reply with quote

Wow!! Awesome job!!

Thank you, hmunn! This is very useful.
_________________
Cheers!
---Fox

WinXP Pro SP2, OOo Portable 2.3.1, OOo local 2.4 RC4
New OpenOffice forum: http://user.services.openoffice.org/en/forum/
Manuals: http://documentation.openoffice.org/manuals/index.html
Back to top
View user's profile Send private message AIM Address Yahoo Messenger
haroldmunn
General User
General User


Joined: 31 Dec 2006
Posts: 47

PostPosted: Fri Oct 05, 2007 2:23 pm    Post subject: Thanks Reply with quote

Thanks, Foxcole, I appreciate your comments.

The only trick is to be sure it works for someone else! It's so easy to make assumptions and skip steps, so let me know if it works for you.

Harold
Back to top
View user's profile Send private message
daniel1212a
General User
General User


Joined: 02 May 2007
Posts: 17
Location: MA

PostPosted: Mon Oct 08, 2007 5:25 pm    Post subject: Reply with quote

Thanks for the tutorial. But i have a acor1033.dat file from OOo 1.15 that i would like to import into ver. 2.3. It is 56 kb because a lot has been added (if this is the right one). Would just changing the name and replacing the new one in 2.3 with the old one do it, or should i just stick to adding the path to the autocor folder as i have been. And how about auto text? Thanks.
_________________
"Believe on the Lord Jesus Christ and thou shalt be saved. "
Back to top
View user's profile Send private message Visit poster's website
haroldmunn
General User
General User


Joined: 31 Dec 2006
Posts: 47

PostPosted: Mon Oct 08, 2007 11:53 pm    Post subject: Reply with quote

My suggestion is simply to try it and see. I don't have an acor1003.dat file, so can't experiment for you.

If it doesn't work, then try opening your acor1033.dat file using an archive program, and see if it has the same kind of layout I described in the tutorial, and, if not, just use a text editor to make the necessary adjustments.

You asked about auto text. I haven't tried importing that, but I expect the procedure would be similar. Perhaps someone else has tried importing that and has some ideas.

Good luck!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Writer All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group