Re: AutoCorrect for v2
Posted: 07 Apr 2024, 02:05
Yeah some shouldn't be there, like:
::it's final::its final
::it's final::its final
Let's help each other out
https://www.autohotkey.com/boards/
https://www.autohotkey.com/boards/viewtopic.php?f=83&t=120220
I got rid of that, combining some of the functionality into the current "AutoCorrectsLog."...This constantly records keyboard input, but has a really short memory. It remembers approximately the last 7 words typed, and (on BS) logs them along with the autocorrect that was just triggered...
Just download https://desktop.github.com and once you have an account go to the app and File-> New repository -> select your path to your code
Thanks for the tips. I'm moving the Git part of this discussion to the "off-topic" subforum, so we don't have a bunch of clutter in this (v2 scripts) sub forum...willwade wrote: ↑07 Apr 2024, 15:12Just download https://desktop.github.com and once you have an account go to the app and File-> New repository -> select your path to your code
Then once happy press Push in the top right
Yeah I had a bunch of it's ... --> its ... ones in previous versions of the AutoCorrct2 script. (Including that one.) I think most were introduced with this Wikipedia grammar list
Code: Select all
x:B0X*:it's current::f("its current") ; Fixes 1 word
; Is it current? Yeah, it's current.
:B0X*:it's end::f("its end") ; Fixes 1 word
:B0X*:it's entire::f("its entire") ; Fixes 1 word
x:B0X*:it's former::f("its former") ; Fixes 1 word
; Who cares? It's former employees that are concerned.
:B0X*:it's goal::f("its goal") ; Fixes 1 word
:B0X*:it's name::f("its name") ; Fixes 1 word
:B0X*:it's own::f("its own") ; Fixes 1 word
:B0X*:it's performance::f("its performance") ; Fixes 1 word
x:B0X*:it's source::f("its source") ; Fixes 1 word
; What kindo of code is this? It's source code.
:B0X*:it's successor::f("its successor") ; Fixes 1 word
:B0X*:it's tail::f("its tail") ; Fixes 1 word
:B0X*:it's theme::f("its theme") ; Fixes 1 word
:B0X*:it's timeslot::f("its timeslot") ; Fixes 1 word
:B0X*:it's toll::f("its toll") ; Fixes 1 word
:B0X*:it's website::f("its website") ; Fixes 1 word
Did you make the abbrev. finder site? That's pretty cool.willwade wrote: ↑10 Apr 2024, 11:28FYI - in the making of this little tool https://abbreviation-finder.streamlit.app - I discovered espanso. It's neat. Its cross platform (win, Linux, Mac) and Free and Opensource. Some of the packages look similar to this AutoCorrect tool e.g https://hub.espanso.org/typofixer-en https://hub.espanso.org/contractions-en https://hub.espanso.org/misspell-en-uk and this is a neat idea https://hub.espanso.org/autocomplete-en
yes thats mekunkel321 wrote: ↑10 Apr 2024, 15:56Did you make the abbrev. finder site? That's pretty cool.willwade wrote: ↑10 Apr 2024, 11:28FYI - in the making of this little tool https://abbreviation-finder.streamlit.app - I discovered espanso. It's neat. Its cross platform (win, Linux, Mac) and Free and Opensource. Some of the packages look similar to this AutoCorrect tool e.g https://hub.espanso.org/typofixer-en https://hub.espanso.org/contractions-en https://hub.espanso.org/misspell-en-uk and this is a neat idea https://hub.espanso.org/autocomplete-en
Espanso seems interesting. I'm a bit leery that there's a .bat file, but no uninstaller... Does this thing install stuff all over your system?
@willwade - you seem like you're doing great work and I'm super excited to see if you're able to make the SLM work in this context. I'd love to try the abbreviation finder but am dealing with documents that include PII and may be privileged. Is it possible to run locally?willwade wrote: ↑11 Apr 2024, 02:03yes thats mekunkel321 wrote: ↑10 Apr 2024, 15:56Did you make the abbrev. finder site? That's pretty cool.willwade wrote: ↑10 Apr 2024, 11:28FYI - in the making of this little tool https://abbreviation-finder.streamlit.app - I discovered espanso. It's neat. Its cross platform (win, Linux, Mac) and Free and Opensource. Some of the packages look similar to this AutoCorrect tool e.g https://hub.espanso.org/typofixer-en https://hub.espanso.org/contractions-en https://hub.espanso.org/misspell-en-uk and this is a neat idea https://hub.espanso.org/autocomplete-en
Espanso seems interesting. I'm a bit leery that there's a .bat file, but no uninstaller... Does this thing install stuff all over your system?
espanso - just use the standalone version for windows to try it out. It's pretty minimal. I'm not finding too many files everywhere, personally.
The process of converting shouldn't be too difficult... The _HS() system uses a second parameter for certain situations, whereas the f() system does not. I supposed that probably has to be changed by hand. But otherwise, I think you could find-and-replaceJasonosaj wrote: ↑11 Apr 2024, 10:06@kunkel321 - I have been going through the process of converting my _HS() hotstrings to call your f() function. One of the major problems is sorting. Do you have any recommendations in terms of how to order the various option sets to avoid nullification (e.g., beginnings, middles, ends / :*:, :*?:, )?
Code: Select all
::_HS ----> :temp:_HS
:: ----> :B0X:
:*: ----> :B0X*:
:?: ----> :B0X?:
:*?: ----> :B0X*?:
then
:temp:_HS ----> ::_HS
You can drop your logging function into _HS, rename it f(), and you should be good to go. I did it yesterday evening and everything seems to be doing great. I have been experiencing some issues with an incorrect number of backspaces being sent (particularly with very short hotstrings, e.g., :B0XC:i::f("I")) though.kunkel321 wrote: ↑11 Apr 2024, 18:25The process of converting shouldn't be too difficult... The _HS() system uses a second parameter for certain situations, whereas the f() system does not. I supposed that probably has to be changed by hand. But otherwise, I think you could find-and-replaceJasonosaj wrote: ↑11 Apr 2024, 10:06@kunkel321 - I have been going through the process of converting my _HS() hotstrings to call your f() function. One of the major problems is sorting. Do you have any recommendations in terms of how to order the various option sets to avoid nullification (e.g., beginnings, middles, ends / :*:, :*?:, )?:B0X with :(edit: No, not that... see bottom) and _HS(" with f(" Unless I'm mistaken(?)
As far as the sorting and conflicting trigger strings, I'm thinking that will be the same, no matter which you use, or even if you just use vanilla default formatting (such as :?:toin::tion)
Strictly speaking, using the terminology from the manual, when one item "nullifies" the other, the order doesn't matter. One will always make the other invisible. With the "conflicting" trigger strings though, order often does matter, and usually the longer (superset) trigger string needs to appear before/above the shorter (subset) one. If, by luck, they fall that way alphabetically, then it's all good. Otherwise (once you've identified them) you have to manually move them up higher in your code.
I don't really have a good way to do that yet... Presently, I have a "===Do Not Sort===" group of about 50 autocorrect items that appear above the main list. I sort the sublist, but I do not sort/mix it with the rest of the 5k entries.
As I type this, it occurs to me that the B0X options always appear before the other options (*/?/C). I suppose we could make it so the 'do not sort' items B0X, and the main list was XB0. That would allow sorting them all in one fell swoop. IDK.
FYI, Here is that manual, if anyone is curious.
hh2 and AC Manual 2-15-2024.zip
The relevant part is pages 14 and 15.
Maybe try: Find-and-replaceEdit: Even better.... Get TED NotePad (which is free).Code: Select all
::_HS ----> :temp:_HS :: ----> :B0X: :*: ----> :B0X*: :?: ----> :B0X?: :*?: ----> :B0X*?: then :temp:_HS ----> ::_HS
find and replace like this:
Extra comments: If anyone sees this information about changing from Deskolada's _HS() function for hotstrings, to the f() function, they should consider some important differences... The reason that I made the f() system, was so that I could log my autocorrects, then analyze them later, to see which ones got "backspaced" for being erroneous corrections. Because of this, my boilerplate hotstrings (such as ::;hand::have a nice day) never use the f() function. There's no need to analyze those, because they NEVER get entered by accident. For the same reason, a hotstring such as "::;mylogin::username{Tab}password" would never need to be sent via the f() function.
Descolada's _HS() is more encompassing, and is made to accommodate all of these different scenarios. The only disadvantage is that the _HS() funciton doesn't log the hotstrings that are used.
So...
* If you are interested in logging and analyzing your autocorrects, use the f() system in this thread.
* If you are not interested on logging, but want the ability to use more hotstring options (send modes, key delay, etc), then use the _HS() system here: viewtopic.php?f=83&t=122865
For proper credit; I will again point out that the f() function uses Descolada's InputBuffer Class. If it weren't for the InputBuffer Class, the f() function wouldn't really be usable. Descolada has also recently created a Class that mimics AHK's native hotstring "case conformation" abilities. I probably won't integrate that into my own version of AutoCorrect, because I never really type in all caps.
Last note: I still plan to make a version "HotString Helper 2.0" that is compatible with the _HS() format. It's on the back burner right now, but I can make it a priority if anyone is waiting for it...
I thought about doing that! So far I haven't done it because, for my limited use of the function (only for autocorrection hotstrings), it has a bunch of features that would never be used. ...Also because I can barely understand how it works--LOL.Jasonosaj wrote: ↑12 Apr 2024, 11:12You can drop your logging function into _HS, rename it f(), and you should be good to go. I did it yesterday evening and everything seems to be doing great. I have been experiencing some issues with an incorrect number of backspaces being sent (particularly with very short hotstrings, e.g., :B0XC:i::f("I")) though.
Code: Select all
#Hotstring ZXB0
Code: Select all
; ===== Trigger strings to nullify the potential misspellings that are indicated. ======
; Used the word "corrects" in place of fix to avoid double-counting these as potential fixes.
:B0:Savitr:: ; (Important Hindu god) Here for :?:itr::it, which corrects 366 words.
:B0:Vaisyas:: ; (A member of the mercantile and professional Hindu caste.) Here for :?:syas::says, which corrects 12 words.
:B0:Wheatley:: ; (a fictional artificial intelligence from the Portal franchise) Here for :?:atley::ately, which corrects 162 words.
Code: Select all
:B0X*:beute::f("beaute") ; Fixes 6 words
:B0X*:beuti::f("beauti") ; Fixes 19 words
:B0X*:beuty::f("beauty") ; Fixes 3 words
Code: Select all
:B0X*:eyte::f("eye") ; Fixes 109 words
Code: Select all
:B0X*:eyt::f("yet") ; Fixes 1 word