• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

hunspell.egg-info/H03-May-2022-9470

COPYINGH A D20-Feb-201834.3 KiB675553

COPYING.LESSERH A D20-Feb-20187.5 KiB166128

MANIFEST.inH A D20-Feb-201880 54

PKG-INFOH A D06-Aug-20183.8 KiB9470

README.mdH A D20-Feb-20182.8 KiB8360

hunspell.cppH A D20-Feb-201816.3 KiB563458

setup.cfgH A D06-Aug-201838 53

setup.pyH A D06-Aug-20182.3 KiB5846

README.md

1[![Build Status](https://travis-ci.org/blatinier/pyhunspell.png)](https://travis-ci.org/blatinier/pyhunspell)
2
3# About PyHunSpell
4
5**pyhunspell** is a set of Python bindings for the Hunspell spellchecker
6engine. It lets developers load Hunspell dictionaries, check words, get
7suggestions, add new words, etc. It also provides some basic morphological
8analysis related methods.
9
10See [ChangeLog](https://github.com/blatinier/pyhunspell/blob/master/CHANGELOG.md) for activity.
11
12See [Authors](https://github.com/blatinier/pyhunspell/blob/master/AUTHORS.md) for all contributors.
13
14# Installation
15
16Make sure that `python-dev` and `libhunspell-dev` are installed.
17
18You can install this package using pip:
19
20```
21pip install hunspell
22```
23
24Or from source using the following command as root:
25
26```
27python setup.py install
28```
29
30For OSX the version of the lib used to compile is hardcoded. If your installation fails, please try to clone the repo and change `main_module_kwargs['include_dirs']` in `setup.py` to the correct one and/or open an issue stating the problem and the hunspell version with the `.h` location in your system.
31
32For windows7 [@tallforasmurf](https://github.com/tallforasmurf) compiled a python 3.4 compatible version of the pyhunspell==0.3.3 package available here: http://pyhunspell.latinier.fr
33(Warning: Those windows compiled packages are not reviewed or tested). It could work for other windows version or python versions.
34
35# Documentation
36
37[Go here for some documentation](https://github.com/blatinier/pyhunspell/wiki/Documentation)
38
39# Usage
40```
41>>> import hunspell
42>>> hobj = hunspell.HunSpell('/usr/share/hunspell/en_US.dic', '/usr/share/hunspell/en_US.aff')
43>>> hobj.spell('spookie')
44False
45>>> hobj.suggest('spookie')
46['spookier', 'spookiness', 'spook', 'cookie', 'bookie', 'Spokane', 'spoken']
47>>> hobj.spell('spooky')
48True
49>>> hobj.analyze('linked')
50[' st:linked', ' st:link fl:D']
51>>> hobj.stem('linked')
52['linked', 'link']
53>>> hobj.spell('spookie')
54False
55>>> hobj.add('spookie')
56>>> hobj.spell('spookie')
57True
58>>> hobj.remove('spookie')
59>>> hobj.spell('spookie')
60False
61```
62
63# Troubleshooting
64
65On MacOS Sierra with python 3.5 you can come across this error:
66```
67fatal error: /Applications/XXX-bla-bla-bla-XXX/usr/bin/lipo: can't figure out the architecture type of: /var/folders/bla-bla-bla/XXX.out
68```
69It might be solved by doing `brew unlink apple-gcc42`. See #31 and regebro/hovercraft#80.
70
71# Misc
72
73Saw a bug ? Wan't a feature ? Go fill an issue [here](https://github.com/blatinier/pyhunspell/issues)
74
75For information, version naming (introduced for 0.4.0) is based on Hungarian cities ordered by population except Budapest.
76The reason why is that hunspell stands for Hungarian Spell.
77
78# License
79
80PyHunspell itself is licensed under the LGPL version 3 or later, see
81lgpl-3.0.txt and gpl-3.0.txt. The files in the debian/ directory and setup.py
82are licensed under the GPL version 3.
83