Spell-check engine?
Mike C. Fletcher
mcfletch at rogers.com
Fri Oct 18 18:59:55 EDT 2002
aspell.sourceforge.net (GNU Aspell) appears to be a post-pspell project
(tries to bind together aspell and pspell). I'd been wanting to find
something a little more portable (i.e. something that can compile be
installed without dragging the entire Cygwin environment with it) and
hopefully something already wrapped in Python :) .
However, since you suggested it, I ran SWIG across the aspell.h file
(which appears to include the bulk of the useful interface) and it was
successful in generating a wrapper, though it complained a lot about
potential memory leaks. I haven't been able to make the aspell.exe
binary give me a suggestion yet (though it obviously can do so according
to the docs). Neither have I tried to compile the SWIG wrapper (since I
don't have a proper build environment for Cygwin Python + SWIG).
There are times when I wonder just how long a CLI will take to get here
so this kind of silliness can just go away.
I have no interest whatsoever in re-inventing the wheel of the engine
(to mix a metaphor) here, I was just curious if there was a solution
that was readily available that these projects could use. I'm beginning
to think that a simple pipe to a binary of aspell/ispell (ugly as that
sounds) is the most practical approach.
Okay, off to real work now,
Mike
Terry Hancock wrote:
>On Friday 18 October 2002 01:00 pm, python-list-request at python.org wrote:
>
>
>>Anyone have a fairly standard spell-check engine available for use from
>>Python? That is, something with an interface something like this:
>>
>>
>
>I don't know of any ready-made solutions, and could use one myself, so
>if you find something, please post. I immediately imagine using a wrapper
>for ispell or aspell or the pspell library though I am ignorant of how to do
>that. I was able to find a few interesting leads, though:
>
>ispell: http://fmg-www.cs.ucla.edu/geoff/ispell.html
>
>aspell: http://aspell.sourceforge.net
>
>pspell: http://sourceforge.net/project/showfiles.php?group_id=2791
> http://www.fifi.org/doc/libpspell-dev/man-html/manual.html
>
>The last is a library, which would suggest the strategy of using
>SWIG or Pyrex or some other python extension method to make
>the C++ library available to Python.
>
>Certainly these can do the things you want, and I have seen
>programs that use the libraries.
>
...
>Alternatively, if you want a pure-python approach, I'm pretty sure that
>
...
_______________________________________
Mike C. Fletcher
Designer, VR Plumber, Coder
http://members.rogers.com/mcfletch/
More information about the Python-list
mailing list