Any AutoCorrect updates? Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
kunkel321
Posts: 976
Joined: 30 Nov 2015, 21:19

Any AutoCorrect updates?

Post by kunkel321 » 21 Dec 2020, 13:49

Of course I'm referring to the excellent (and ubiquitous?) AutoCorrect.ahk script by Jim B.
https://www.autohotkey.com/download/AutoCorrect.ahk
It's so awesome that it even corrected "ubiqutious" as I typed the first sentence -- LOL.

It was written in 2007. Partly it is based on the Wikipedia list
https://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings/For_machines

As others have said, the English language hasn't chaged much but there might to a few new things that can be added. The Wikipedia article gets updated pretty often, but there's no way to figure out which misspellings were added since 2007.

I have my own version of the AutoCorrect script. It has a couple of things added in the main list, but it's mostly the same as the original. I tried setting up a draftable comparison of my current list vs Wikipedia's current list
https://draftable.com/compare/fOMOAkjrqILD

It doesn't seem to work though.... It flags nearly every line as being deleted and replaced. I tried doing "compare docs" with MS Word and it wasn't much better. Note that many of the Wiki list items have multple possible corrections, such as
amature->armature, amateur
Many of the differences are US vs UK English. I mostly kept the US replacements and kept the words that I thought I'd be more likely to use (such as "amateur").

Anyway, I also culled the :: and the replacements (so that the lists only had the hotstring components). Then compared them, but that didn't help either.

So two questions:
Does anyone know if there is a list of "recent additions" of common English misspellings.
Also, Does anyone have any awesome improvements to the AutoCorrect.ahk functionality in general that they're willing to share?
ste(phen|ve) kunkel

User avatar
kunkel321
Posts: 976
Joined: 30 Nov 2015, 21:19

Re: Any AutoCorrect updates?

Post by kunkel321 » 28 Dec 2020, 16:11

I deleted (my own) last three replies. I had used Excel to systematically look for any "new" frequently-misspelled words that exsisted in the Wikipedia article, but were absent in Joe's 2007 AutoCorrect.ahk script. At first I thought that I had located several hundred, but over several days I fugured out that Joe already has included essentially all of them. Several dozen are absent from the main ahk list because they were (cleverly) applied as special hotstrings that can get triggered in the beginning, middle, or end of a misspelled word. Several hundred more of the items from Wikipedia are commented-out near the end of Jim's code. They are the "Ambiguous" items.

As previously indicated (then deleted), many of the Wikipedia items have muliple possible replacements, such as ::accension::accession, ascension. Some of those got cleaned up and put into the main ahk list, but 500+ items are in the Ambiguous list.

EDIT: This whole exercise turned out to be a bit of a waste of time with regard to my OP. It was good practice in working with Excel though... I guess. And since I have the spreadsheet already made, I'll post the redundancies in the original AutoCorrect.ahk (we'll see if I end up deleting this part too -- heh).

Anyway... Comaring the main list (with word beg/mid/endings), suggests these duplicate items.
(sorted by hotkey, not appearance in the list)
Spoiler
Note however, that several of these are actually different because of cAsE sensitivity, etc.


Lastly, if anyone is curous, the Excel setup for this is,
-copy and paste Jim's list into column A, starting at row 2.
-paste this into cell B2 =LEFT(RIGHT(A2,LEN(A2)-FIND("~",SUBSTITUTE(A2,":","~",2))),FIND("::",RIGHT(A2,LEN(A2)-FIND("~",SUBSTITUTE(A2,":","~",2))))-1) and copy/paste down the column. This extracts just the hotstring.
-paste this into cell C2 =COUNTIF(B:B,B2) and paste down.
-Press Ctrl+T to convert to a Table, then filter by column C.

To reformat from Wikipedia's abandonned->abandoned into hotsting format,
-copy/paste, starting at cell A1
-paste this into B1 ="::"&SUBSTITUTE(A1,"->","::") and paste down
ste(phen|ve) kunkel

User avatar
kunkel321
Posts: 976
Joined: 30 Nov 2015, 21:19

Re: Any AutoCorrect updates?

Post by kunkel321 » 29 Jan 2023, 11:57

Since folks are starting to recreate classic v1 "script showcase" scripts in AHK v2, I wanted to bump this thread to the top. Notice the spoiler item in the above reply that lists a couple of duplicate entries in the original 2007 AutoCorrect.ahk script. My above discussion of Excel is irrelevant and can be ignored.

EDIT: I should more clearly state my reason for posting this reply... I'm hoping that someone will (at some point) recreate AutoCorrect.ahk for AHKv2. If anyone does this, they can benefit from my previous work of identifying several duplicate hotstrings in the original script.
ste(phen|ve) kunkel

User avatar
kunkel321
Posts: 976
Joined: 30 Nov 2015, 21:19

Re: Any AutoCorrect updates?  Topic is solved

Post by kunkel321 » 10 Feb 2023, 17:06

Update: Here is AutoCorrect.ahk for v2.
Spoiler
As seen in this thread
viewtopic.php?f=82&t=113523&p=506282#p506282
I had worked on updating the "Hotstring Helper" part of the script, then I realized that it had already been updated for AHKv2 and posted as a code sample in the help docs, here
https://www.autohotkey.com/docs/v2/lib/Hotstring.htm#ExHelper

The new one in the AHK help docs is better anyway, because of the regex they've used. So I took that version, and pasted it into the code above. The original 2007 AutoCorrect.ahk also has a tool to COrrect DOuble CAps at the beginning of words. It is commented-out by default. The below code has a version of this converted to v2 (also commented-out).

Really the only other thing that needed to get updated for v2, is that the Return at line 212 needed braces. Everything else (all the single line hotstrings) was able to stay the same. Please DO NOTE that I corrected the duplicate items that are discussed in the second post of this thread. Moslty I left the duplicate, but commented it out and put a comment as to why.

It's worth noting that the AutoCorrect.ahk linked in the v2 docs, here
https://www.autohotkey.com/docs/v2/Hotstrings.htm#AutoCorrect
Is the 2007 version for AHKv1.

Bonus:
Spoiler
ste(phen|ve) kunkel

Raghava Doregowda
Posts: 130
Joined: 06 Nov 2022, 01:48

Re: Any AutoCorrect updates?

Post by Raghava Doregowda » 04 Jun 2023, 04:50

Hey everyone, To this existing autocorrect script,
1) Is it possible to add a minor AI integrated operation of autocorrect wherein, the word which you keep correcting all the time is adaptable? Like if I keep making mistakes while typing out "sene" ==>
"scene" and not "sene"==>"seen", the script learns by itself to correct the incorrect word (sene) to "scene" and not "seen"? It would be a gamechanger as it would understand how I type. I know there's the concept of global/static variables needed which do not "reset" upon shutting down the computer which I'm not very sure how to implement myself.
2) Please check out this link and analyze the same. viewtopic.php?f=76&t=112927
3) Long pressing one letter should automatically fill the most "probable" word (after calculating the probablities, permutations and method of typing of a user through adaptivity coding)
4) Essentially a system like Android and IOS keyboard autofill system.

User avatar
kunkel321
Posts: 976
Joined: 30 Nov 2015, 21:19

Re: Any AutoCorrect updates?

Post by kunkel321 » 05 Jun 2023, 07:52

I believe TypingAid has an ability to learn frequently-used words. Not for "autocorrect" purposes though. It's more like a "word completion" thing...
viewtopic.php?t=5644
ste(phen|ve) kunkel

Post Reply

Return to “Ask for Help (v1)”