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 

GNU Aspell (Spell Checker)

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Utilities & Resources
View previous topic :: View next topic  
Author Message
MsgBox



Joined: 17 Nov 2005
Posts: 179
Location: Leicester, UK

PostPosted: Tue Sep 12, 2006 11:22 pm    Post subject: GNU Aspell (Spell Checker) Reply with quote

Hello

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

GNU Aspell


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
Back to top
View user's profile Send private message Visit poster's website
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10474

PostPosted: Tue Sep 12, 2006 11:34 pm    Post subject: Reply with quote

I think I might use something like this. Thanks!
Back to top
View user's profile Send private message Send e-mail
PhiLho



Joined: 27 Dec 2005
Posts: 6721
Location: France (near Paris)

PostPosted: Wed Sep 13, 2006 8:44 am    Post subject: Reply with quote

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.
_________________
vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")
Back to top
View user's profile Send private message Visit poster's website
Micahs



Joined: 01 Dec 2006
Posts: 343

PostPosted: Sat Mar 17, 2007 1:45 am    Post subject: Reply with quote

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.


_________________
Back to top
View user's profile Send private message
PhiLho



Joined: 27 Dec 2005
Posts: 6721
Location: France (near Paris)

PostPosted: Sat Mar 17, 2007 8:14 am    Post subject: Reply with quote

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! Smile )
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...
_________________
vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")
Back to top
View user's profile Send private message Visit poster's website
Laszlo



Joined: 14 Feb 2005
Posts: 4065
Location: Pittsburgh

PostPosted: Sat Mar 17, 2007 5:06 pm    Post subject: Reply with quote

another Laszlo that rocks (Németh László) Very Happy
Back to top
View user's profile Send private message
oldHacker



Joined: 05 Feb 2008
Posts: 4
Location: the land of enchantment

PostPosted: Thu Jun 12, 2008 6:12 pm    Post subject: Reply with quote

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! Smile )
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.
Back to top
View user's profile Send private message
HelgeFin



Joined: 04 Apr 2007
Posts: 8

PostPosted: Fri Aug 01, 2008 8:52 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
HugoV



Joined: 27 May 2007
Posts: 617

PostPosted: Fri Aug 01, 2008 10:24 am    Post subject: Reply with quote

See
http://www.autohotkey.com/forum/viewtopic.php?t=32955
Back to top
View user's profile Send private message
HelgeFin



Joined: 04 Apr 2007
Posts: 8

PostPosted: Fri Aug 01, 2008 11:00 am    Post subject: Reply with quote

Yeah, you're right Hunspell looks like THE standard:

http://en.wikipedia.org/wiki/Hunspell
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Utilities & Resources All times are GMT
Page 1 of 1

 
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