AutoHotkey Community

It is currently May 26th, 2012, 10:19 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 10 posts ] 
Author Message
PostPosted: September 13th, 2006, 12:22 am 
Offline

Joined: November 17th, 2005, 10:14 pm
Posts: 196
Location: Leicester, UK
Hello

I have found a great little spell checker.
It hasn't been updated recently, but, hey-ho!

GNU Aspell
Image

GNU Aspell's home page wrote:
GNU Aspell is a Free and Open Source spell checker designed to eventually replace Ispell. It can either be used as a library or as an independent spell checker. Its main feature is that it does a superior job of suggesting possible replacements for a misspelled word than just about any other spell checker out there for the English language. Unlike Ispell, Aspell can also easily check documents in UTF-8 without having to use a special dictionary. Aspell will also do its best to respect the current locale setting. Other advantages over Ispell include support for using multiple dictionaries at once and intelligently handling personal dictionaries when more than one Aspell process is open at once.


GNU Aspell (Win32 version)
GNU Aspell

Use with this code to spell check any text or word you want:
Code:
~Lbutton & S::
~CapsLock & S::
   WinGet Id, Id, A
   Clipboard=
   If GetKeyState("CapsLock","P")
      Send {CapsLock Up}{s Up}^c
   Else
      Send {LButton Up}{s Up}^c
   ClipWait 2
   TmpFile = %TEMP%\SpellCheckerTmp.txt
   FileDelete %TmpFile%
   FileAppend %Clipboard%, %TmpFile%
   Run aspell.exe check "%TmpFile%"
   WinWaitActive ahk_class ConsoleWindowClass
   WinWaitClose ahk_class ConsoleWindowClass
   FileRead Clipboard, %TmpFile%
   WinActivate ahk_id %Id%
   WinWaitActive ahk_id %Id%
   Send ^v
Return


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 13th, 2006, 12:34 am 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
I think I might use something like this. Thanks!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 13th, 2006, 9:44 am 
Offline

Joined: December 27th, 2005, 1:46 pm
Posts: 6837
Location: France (near Paris)
Mmm, I never could make it work, perhaps I had a wrong Win32 version, or I used the wrong method. I could try again.
I still have these files:
aspell-fr-0.50-3.tar.bz2
Aspell-0-50-3-3-Setup.exe
aspell-0.50.4.1-vc6bin.zip
aspell-0.60.3.exe
Aspell-en-0.50-2-3.exe
aspell-en-0.51-1.tar.bz2
Aspell-fr-0.50-3-3.exe

As you can see, it is a bit confusing.
Ispell is supposed to be better than Aspell, too, at least for non-English languages.

_________________
Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 17th, 2007, 2:45 am 
Offline

Joined: December 1st, 2006, 9:27 am
Posts: 460
I got it working (WinXP SP2 US-English), but I think I will keep looking. I want something that looks a little less cludgy. The result is displayed in a command prompt window. You have to type the number of the correct word, with no clicking. Feature-wise, it's cool but it's not for me.

Image

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 17th, 2007, 9:14 am 
Offline

Joined: December 27th, 2005, 1:46 pm
Posts: 6837
Location: France (near Paris)
Nice that you revive this topic, because I recently discovered Hunspell, a derivative and successor of MySpell, which can use ASpell's dictionaries (which are quite numerous).
FYI, Hunspell seems to have become the official spellchecker of Open Office, via the UNO interface (don't ask me details on the later! :-) )
I haven't explored the API yet, but it would be interesting to find if it exists in form of DLL and if it can be used from AutoHotkey.
I might explore this someday, but if somebody else want to give a try, he is welcome, as I have other things to do right now...

_________________
Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 17th, 2007, 6:06 pm 
Offline

Joined: February 14th, 2005, 4:05 pm
Posts: 4710
Location: Boulder, CO
another Laszlo that rocks (Németh László) :D


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 12th, 2008, 7:12 pm 
Offline

Joined: February 6th, 2008, 12:26 am
Posts: 14
Location: the land of enchantment
PhiLho wrote:
Nice that you revive this topic, because I recently discovered Hunspell, a derivative and successor of MySpell, which can use ASpell's dictionaries (which are quite numerous).
FYI, Hunspell seems to have become the official spellchecker of Open Office, via the UNO interface (don't ask me details on the later! :-) )
I haven't explored the API yet, but it would be interesting to find if it exists in form of DLL and if it can be used from AutoHotkey.
I might explore this someday, but if somebody else want to give a try, he is welcome, as I have other things to do right now...

if anyone is interested there is an example at code project: Spell Checking Edit Control (Using HunSpell) that includes a dll example.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 1st, 2008, 9:52 am 
Offline

Joined: April 4th, 2007, 8:25 pm
Posts: 12
After I changed the line with "Run" with this:

Code:
RunWait "C:\Programme\Aspell\bin\aspell.exe"  --lang=en --personal="C:\Dokumente und Einstellungen\h\Eigene Dateien\My Dropbox\ref\Aspell\KohDic.txt" check "%TEMP%\SpellCheckerTmp.txt"

and commented out the next two lines, it works great for me now.
The importanted change is "Run" -> "RunWait"

The whole thing (with Windows+3 as Hotkey) looks like this now:

Code:
#3:: ; Spellcheck
   SoundBeep
   WinGet Id, Id, A
   Clipboard=
   If GetKeyState("CapsLock","P")
      Send {CapsLock Up}{3 Up}^c
   Else
      Send {LButton Up}{3 Up}^c
   ClipWait 2
   TmpFile = %TEMP%\SpellCheckerTmp.txt
   FileDelete %TmpFile%
   FileAppend %Clipboard%, %TmpFile%
   RunWait "C:\Programme\Aspell\bin\aspell.exe"  --lang=en --personal="C:\Dokumente und Einstellungen\h\Eigene Dateien\My Dropbox\ref\Aspell\KohDic.txt" check "%TEMP%\SpellCheckerTmp.txt"
   ;WinWaitActive,Aspell ; ahk_class ConsoleWindowClass
   ;WinWaitClose,Aspell; ahk_class ConsoleWindowClass
   FileRead Clipboard, %TmpFile%
   WinActivate ahk_id %Id%
   WinWaitActive ahk_id %Id%
   Send ^v
Return


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 1st, 2008, 11:24 am 
Offline

Joined: May 27th, 2007, 9:41 am
Posts: 4999
See
http://www.autohotkey.com/forum/viewtopic.php?t=32955


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 1st, 2008, 12:00 pm 
Offline

Joined: April 4th, 2007, 8:25 pm
Posts: 12
Yeah, you're right Hunspell looks like THE standard:

http://en.wikipedia.org/wiki/Hunspell


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 4 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group