My favorites | Sign in
Project Logo
                
Search
for
Updated Apr 04, 2009 by sayamindu
Labels: Featured, Phase-Implementation
UsingPyHunspell  
Usage instructions

Usage

This page covers the basic functionalities of the extension.

Basic spell checking

>>> import hunspell
>>> hobj = hunspell.HunSpell('/usr/share/myspell/en_US.dic', '/usr/share/myspell/en_US.aff')
>>> hobj.spell('spookie')
False
>>> hobj.suggest('spookie')
['spookier', 'spookiness', 'spooky', 'spook', 'spoonbill']
>>> hobj.spell('spooky')
True
>>>

More fun

>>> import hunspell
>>> hobj = hunspell.HunSpell('/usr/share/myspell/en_US.dic', '/usr/share/myspell/en_US.aff')
>>> hobj.analyze('linked')
[' st:link fl:D']
>>> hobj.stem('linked')
['link']
>>> 

Comment by AlexsFreeCode, Sep 07, 2009

Can I use pyhunspell under Windows? If so, how do I install it?

Comment by sayamindu, Sep 15, 2009

I have never tried it - but theoretically, you should be able to use it (at least using mingw/cygwin and friends)


Sign in to add a comment
Hosted by Google Code