Skip to content

Commit

Permalink
Initial revision
Browse files Browse the repository at this point in the history
  • Loading branch information
rfk committed Feb 5, 2005
0 parents commit 3373888
Show file tree
Hide file tree
Showing 12 changed files with 1,687 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .project
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>pyenchant</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.python.pydev.PyDevBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.python.pydev.pythonNature</nature>
</natures>
</projectDescription>
504 changes: 504 additions & 0 deletions LICENSE.txt

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions MANIFEST.in
@@ -0,0 +1,6 @@

include enchant/enchant.i
include enchant/enchant.h
include LICENSE.txt
recursive-include tools *

101 changes: 101 additions & 0 deletions README.txt
@@ -0,0 +1,101 @@

pyenchant: Python bindings for the Enchant spellchecker
========================================================

This package provides a set of Python language bindings for the Enchant
spellchecking library.


What is Enchant?
----------------

Enchant is used to check the spelling of words and suggest corrections
for words that are miss-spelled. It can use many popular spellchecking
packages to perform this task, including ispell, aspell and MySpell. It
is quite flexible at handling multiple dictionaries and multiple
languages.

More information is available on the Enchant website:

http://www.abisource.com/enchant/


How do I use it?
----------------

For Windows users, there is an executable installer program which can be
used to install the software with a minimum of effort. Other users will
need to install from source.

Once the software is installed, python's on-line help facilities can
get you started. Launch python and issue the following commands:

>>> import enchant
>>> help(enchant)


Installing with the Windows Installer
-------------------------------------

Download and run the windows installer program. It will automatically
detect your python installation and set up pyenchant accordingly.

WARNING: if you have another version of enchant installed on your
system, the windows installer may cause it to stop working.
It is recommended that you install pyenchant from source
in this case.

The windows installer version provides a pre-compiled enchant library
as well as several supporting libraries. Several commonly-used
dictionaries are installed into:

<YOUR_PYTHON_ROOT>\Lib\site-packages\enchant\ispell.

Additional language dictionaries are available for download from:

http://prdownloads.sourceforge.net/abiword/

The required file will be named 'abispell-LANG.i386.zip' where LANG is
the appropriate language tag. Download the zip file, and extract the
contained .hash file into the above directory. The new language should
be detected automatically.


Installing from Source
----------------------

First, you must already have the enchant library installed on our system.
You will also need access to a C compiler.

This package is distributed using the standard Python 'distutils' framework.
If you have the necessary prerequisites, all that should be required to
install is to execute the following command in the current directory:

python setup.py install



Who is responsible for all this?
--------------------------------

The credit for Enchant itself goes to Dom Lachowicz. Find out more details
on the Enchant website listed above. Full marks to Dom for producing such
a high-quality library.

The heavy lifting of creating language bindings was taken care of using
SWIG, an excellent open-source tool designed for just this purpose:

http://www.swig.org/

Finally, the glue to put it all together was written by me, Ryan Kelly.
I needed a decent spellchecker for another project I am working on, and
all the solutions turned up by google were either extremely non-portable
(e.g. opening a pipe to ispell) or had completely disappeared from the web
(what happened to SnakeSpell?) It was also a great excuse to teach myself
to use SWIG, and even a little bit of the Python/C API.

Comments, suggestions, bugs and other feedback can be directed to:

rynklly@users.sourceforge.net


8 changes: 8 additions & 0 deletions TODO.txt
@@ -0,0 +1,8 @@


* make sure all help messages fit in the console
* raise Exception/Warning if no providers are found
* find a way to avoid using the registry to record dict locations
* check with the enchant guys about free_dict corrupting the
cache of dict objects

0 comments on commit 3373888

Please sign in to comment.