AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

AutoReplace
Goto page Previous  1, 2
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Thu Sep 13, 2007 7:14 pm    Post subject: Reply with quote

Dewi Morgan wrote:
I promised some time ago to update this... List is now all merged into one, 4598-item long list. Total file is 5469 lines long, 134k. www.autohotkey.net/~anonymous/AutoCorrect/autocorrect.ahk

There is stil the above list of interesting things to code for it, but I have at least got the incredibly tedious merging part out the way. Huzzah!
Great work on the merging! Although it must have been many hours of tedium, it's likely that hundreds will benefit.

I also like your fix for -ign to become -ing, and your new feature "word endings". I notice you already have the following word endings:
Code:
:?:bilites::bilities
:?:bilties::bilities
As a further improvement, would it be possible to add the following without causing ambiguity/overlap with any legitimate English words?:
Code:
:?:blity::bility
:?:blities::blities
If so, it would make obsolete all of the following (and possibly correct many new words not yet in the list):
Code:
::availablity::availability
::compatiblity::compatibility
::compatiblities::compatibilities
::incompatiblity::incompatibility
::incompatiblities::incompatibilities
::possiblity::possibility
::possiblities::possibilities
::reliablity::reliability
::responsiblity::responsibility
::responsiblities::responsibilities

Until a decision is made, I've added ::responsiblities::responsibilities (it will be obsolete if the new endings are okay). I also removed ::responsibilites::responsibilities due to it being covered by an existing word ending.

I like your btu->but replacement. I added the second line below as a possible further improvement (it uses semicolon instead of comma):
Code:
:?:, btu::, but ; Not just replacing "btu", as that is a unit of heat.
:?:; btu::; but

I moved and changed:
Code:
::supercede::supersede
::superceeded::superseded
...to become word beginnings as:
Code:
:*:supercede::supersede
:*:superceed::supersede
...because it gives broader coverage (e.g. supercedes->supersedes). I suspect there are many other cases that could be similarly simplified, but that is probably a job for another day (perhaps you could put it on your to-do list as a low priority).

Was there any reason to omit the following?:
Code:
;-------------------------------------------------------------------------------
;  Capitalise dates
;-------------------------------------------------------------------------------
::monday::Monday
::tuesday::Tuesday
::wednesday::Wednesday
::thursday::Thursday
::friday::Friday
::saturday::Saturday
::sunday::Sunday

::january::January
::february::February
::march::March
::april::April
; ::may::May  ; Disabled because it matches the common word "may".
::june::June
::july::July
::august::August
::september::September
::october::October
::novemeber::November
::december::December
I temporarily put them back in, but we can discuss pro's and con's.

I removed the following settings:
- Unnecessary for .ahk files: #AllowSameLineComments
- Already in effect due to presence of hotstrings: #Persistent
- Doesn't do anything for hotstrings (they already use SendInput by default): SendMode Input

I temporarily removed the following because I don't fully understand the pro's and con's. Maybe we can discuss:
#HotString nomouse
#Hotstring EndChars `n `t

I updated the following section to use a sneaky method that avoids replacing words with exact versions of themselves:
Code:
;------------------------------------------------------------------------------
; Fix for -ign instead of -ing.
; Words to exclude: (could probably do this by return without rewrite)
; From: http://www.morewords.com/e nds-with/gn/
;------------------------------------------------------------------------------
#Hotstring B0  ; Turns off automatic backspacing for the following hotstrings.
::align::
::antiforeign::
::arraign::
::assign::
::benign::
::campaign::
::champaign::
::codesign::
::coign::
::condign::
::consign::
::coreign::
::cosign::
::countercampaign::
::countersign::
::deign::
::deraign::
::design::
::eloign::
::ensign::
::feign::
::foreign::
::indign::
::malign::
::misalign::
::outdesign::
::overdesign::
::preassign::
::realign::
::reassign::
::redesign::
::reign::
::resign::
::sign::
::sovereign::
::unbenign::
return  ; This makes the above hotstrings do nothing so that they override the ign->ing rule below.

#Hotstring B  ; Turn back on automatic backspacing for all subsequent hotstrings.
:?:ign::ing

Here's the revised script under its new filename (not yet published publicly): www.autohotkey.com/download/AutoCorrect.ahk

Finally, I can see that you updated and reorganized the info in the header. It looks much nicer now. Feel free to credit yourself somewhere because you've made some huge improvements.

Thanks for all your hard work. This has really become a great auto-correct script!

UPDATE: After testing the new version for a few weeks, I've replaced the old version with the new one at www.autohotkey.com/download/OtherDownloads.htm
Back to top
View user's profile Send private message Send e-mail
RJFerret
Guest





PostPosted: Thu Jan 17, 2008 1:10 am    Post subject: Reply with quote

Sorry to necro-post but I had to add:

Code:
#Hotstring SI ; SendInput so typing doesn't intersperse


So when I typed things like "aesop fables" it didn't come out as "fÆsop ables" or worse!

-Randy
Back to top
RJFerret
Guest





PostPosted: Fri Jan 18, 2008 8:47 am    Post subject: Reply with quote

So SendInput worked better (stopped the interspersed typing) but created a new problem, the backspacing seems to go too far sometimes or in the wrong place (so I tried changing it to SendPlay but that behaved identically).

I end up with things like "together unthe teh" (with two spaces between "the" and "teh") instead of "together under the".

Any suggestions? Thanks!

-Randy
Back to top
Laszlo



Joined: 14 Feb 2005
Posts: 4012
Location: Pittsburgh

PostPosted: Sun Feb 10, 2008 8:22 pm    Post subject: Reply with quote

AHK’s hotstring processing has limitations. One is speed/interference with user typing. Sometimes setting “Process Priority,,R” (real time process) helps.

The other limitation is the inability to react to script generated keystrokes. If you have a keyboard manager, which sends keys in place of others, or changes the case of typed letters, no hotsring sees those changes. This prevents AutoCorrect to be used with this type of scripts.
Back to top
View user's profile Send private message
TestPilot



Joined: 26 Jun 2007
Posts: 46

PostPosted: Mon Mar 10, 2008 2:08 pm    Post subject: Reply with quote

Hey, I was using AutoWikiBrowser software and noticed it find and replace LOTS of misspellings that not corrected by current version of AutoHotkey AutoCorrect script I use on my PC. And all those misspellings were found in real life Wikipedia articles. I give you few examples:

varoius → various
manuvers → maneuvers
uncomfirmed → unconfirmed
reseach → research
orphange → orphanage
protray → portray

You can test popularity of any misspelling by doing Google test: if Google finds more then 50 000 pages with of misspelled word and suggest correct spelling - then it might be worth of adding rule for particular misspelling.

But there is a problem - program are using regular expressions to do auto corrections. It is so called RegExTypoFix: http://en.wikipedia.org/wiki/User:Mboverload/RegExTypoFix

You can see rules base at: http://en.wikipedia.org/wiki/Wikipedia:AutoWikiBrowser/Typos

Could those corrections possibly be embedded into current script?

And last but not least: current version are fixing "wanna" with "want to". This is ridiculous - you could not in a right mind misspell one with another. It is always a matter of persons choice. With such logic script writer can make "ass"->"butt" rule. But I do think such force correcting someones styling choices with software that advertise itself as typos corrector is a plain wrong. I know, scrips saying in a comments: "Some entries ... are clearly a matter of deliberate personal writing style (wanna, colour)" But it is still keep correcting it Evil or Very Mad That is suxx Sad
Back to top
View user's profile Send private message
ehh
Guest





PostPosted: Mon Mar 10, 2008 4:55 pm    Post subject: Reply with quote

Quote:
And last but not least: current version are fixing "wanna" with "want to". This is ridiculous - you could not in a right mind misspell one with another. It is always a matter of persons choice.


you can edit the script to fit your needs can't you? you said it yourself, it's a matter of choice. Rolling Eyes [/quote]
Back to top
daonlyfreez



Joined: 16 Mar 2005
Posts: 745
Location: Berlin

PostPosted: Mon Mar 10, 2008 5:46 pm    Post subject: Reply with quote

(Especially the second posting in) this thread might interest users of this script:

German/English and vice versa Spelling and Translation Files
_________________
(sorry, homesite offline atm)
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
TestPilot



Joined: 26 Jun 2007
Posts: 46

PostPosted: Tue Mar 11, 2008 12:20 am    Post subject: Reply with quote

ehh wrote:

you can edit the script to fit your needs can't you? you said it yourself, it's a matter of choice. Rolling Eyes

Sure I edited that out. But it is still not nice to include that correction into default version of the script.

Don't get me wrong - it is an excellent script that really helps, and AHK is awesome program that helps me save time on daily basis plus make my Internet browsing experience fun Razz Big respect to anyone involved in AHK/scripts creation.

I wish I can modify AutoCorrect script myself to include those regular expressions, instead of begging here Rolling Eyes But I might try to read docs and rewrite AutoCorrect tomorrow Twisted Evil Not sure if I succeed Embarassed
Back to top
View user's profile Send private message
TestPilot



Joined: 26 Jun 2007
Posts: 46

PostPosted: Tue Mar 11, 2008 8:44 pm    Post subject: Reply with quote

Ahh, script looks too cryptic for me...

Btw, if regexp base could be included then AHK script would fix typos in quite a few languages - there are 7 language versions so far on wiki.
Back to top
View user's profile Send private message
TestPilot



Joined: 26 Jun 2007
Posts: 46

PostPosted: Thu Mar 13, 2008 1:16 am    Post subject: Reply with quote

Ok I made it Embarassed
2200 typofixing regular expressions included Razz
It is not perfect, so I need someone to betatest and possibly optimize it. Preferably someone with AutoCorrect experience.
Back to top
View user's profile Send private message
TestPilot



Joined: 26 Jun 2007
Posts: 46

PostPosted: Sun Mar 16, 2008 3:58 am    Post subject: Reply with quote

Regex based typo fixing script - I started new topic about it: http://www.autohotkey.com/forum/viewtopic.php?t=29733
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group