{ "info": { "author": "Matthew Seal", "author_email": "mseal007@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Topic :: Utilities" ], "description": "[![Build Status](https://travis-ci.org/MSeal/cython_hunspell.svg?branch=master)](https://travis-ci.org/MSeal/cython_hunspell)\n[![Build status](https://ci.appveyor.com/api/projects/status/vche84ngshvgergp/branch/master?svg=true)](https://ci.appveyor.com/project/MSeal/cython-hunspell/branch/master)\n[![PyPI version shields.io](https://img.shields.io/pypi/v/CyHunspell.svg)](https://pypi.python.org/pypi/CyHunspell/)\n[![PyPI pyversions](https://img.shields.io/pypi/pyversions/CyHunspell.svg)](https://pypi.python.org/pypi/CyHunspell/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n# CyHunspell\nCython wrapper on Hunspell Dictionary\n\n## Description\nThis repository provides a wrapper on Hunspell to be used natively in Python. The\nmodule uses cython to link between the C++ and Python code, with some additional\nfeatures. There's very little Python overhead as all the heavy lifting is done\non the C++ side of the module interface, which gives optimal performance.\n\nThe hunspell library will cache any corrections, you can use persistent caching by\nadding the `use_disk_cache` argument to a Hunspell constructor. Otherwise it uses\nin-memory caching.\n\n## Installing\n\nFor the simplest install simply run:\n\n pip install cyhunspell\n\nThis will attempt to install non-python depedencies on your behalf. You can speed this up by providing a libhunspell dependency ahead of time (see Non-Python Dependencies below).\n\n## Dependencies\ncacheman -- for (optionally asynchronous) persistent caching\n\n## Non-Python Dependencies\n\n### hunspell\nIf you don't have hunspell installed the library will download and build it for you.\n\nIf you want to use ubuntu's 1.6 installation on ubuntu distributions use the following before installing:\n\n sudo apt-get install libhunspell-1.6-0 libhunspell-dev\n\nThis is a faster installsudo apt-get install libhunspell-1.6-0 libhunspell-dev than the built-in download and compile.\n\nOlder versions of debian may only have 1.3.0 available, which you can install with\n\n sudo apt-get install libhunspell-1.3-0 libhunspell-dev\n\n## Features\nSpell checking & spell suggestions\n* See http://hunspell.sourceforge.net/\n\n## How to use\nBelow are some simple examples for how to use the repository.\n\n### Creating a Hunspell object\n from hunspell import Hunspell\n h = Hunspell()\n\nYou now have a usable hunspell object that can make basic queries for you.\n\n h.spell('test') # True\n\n### Spelling\nIt's a simple task to ask if a particular word is in the dictionary.\n\n h.spell('correct') # True\n h.spell('incorect') # False\n\nThis will only ever return True or False, and won't give suggestions about why it\nmight be wrong. It also depends on your choice of dictionary.\n\n### Suggestions\nIf you want to get a suggestion from Hunspell, it can provide a corrected label\ngiven a basestring input.\n\n h.suggest('incorect') # (u'incorrect', u'correction', u'corrector', u'correct', u'injector')\n\nThe suggestions are in sorted order, where the lower the index the closer to the\ninput string.\n\n### Stemming\nThe module can also stem words, providing the stems for pluralization and other\ninflections.\n\n h.stem('testers') # (u'tester', u'test')\n h.stem('saves') # (u'save',)\n\n### Bulk Requests\nYou can also request bulk actions against Hunspell. This will trigger a threaded\n(without a gil) request to perform the action requested. Currently just 'suggest'\nand 'stem' are bulk requestable.\n\n h.bulk_suggest(['correct', 'incorect'])\n # {'incorect': (u'incorrect', u'correction', u'corrector', u'correct', u'injector'), 'correct': ['correct']}\n h.bulk_stem(['stems', 'currencies'])\n # {'currencies': [u'currency'], 'stems': [u'stem']}\n\nBy default it spawns number of CPUs threads to perform the operation. You can\noverwrite the concurrency as well.\n\n h.set_concurrency(4) # Four threads will now be used for bulk requests\n\n### Dictionaries\nYou can also specify the language or dictionary you wish to use.\n\n h = Hunspell('en_CA') # Canadian English\n\nBy default you have the following dictionaries available\n* en_AU\n* en_CA\n* en_GB\n* en_NZ\n* en_US\n* en_ZA\n\nHowever you can download your own and point Hunspell to your custom dictionaries.\n\n h = Hunspell('en_GB-large', hunspell_data_dir='/custom/dicts/dir')\n\n### Asynchronous Caching\nIf you want to have Hunspell cache suggestions and stems you can pass it a directory\nto house such caches.\n\n h = Hunspell(disk_cache_dir='/tmp/hunspell/cache/dir')\n\nThis will save all suggestion and stem requests periodically and in the background.\nThe cache will fork after a number of new requests over particular time ranges and\nsave the cache contents while the rest of the program continues onward. You'll never\nhave to explicitly save your caches to disk, but you can if you so choose.\n\n h.save_cache()\n\nOtherwise the Hunspell object will cache such requests locally in memory and not\npersist that memory.\n\n## Platforms\n### Linux\nTested on Ubuntu and Fedora with pre-build binaries of Hunspell as well as\nautomatically build depedencies. It's inlikely to have trouble with other\ndistributions.\n\n### Windows\nThe base library comes with MSVC built Hunspell libraries and will link\nagainst those during runtime. These were tested on Windows 7, 8, 10 and\nsome on older systems. It's possible that a Python build with a newer\n(or much older) version of MSVC will fail to load these pre-built libraries.\n\n### Mac OSX\nSo far the library has been tested against 10.9 (Mavericks) and up. There\nshoudn't be any reason it would fail to run on any particular version of\nOSX.\n\n## Building source libraries\nSee libs/README\n\n## Navigating the Repo\n### hunspell\nPackage wrapper for the repo.\n\n### tests\nAll unit tests for the repo.\n\n## Language Preferences\n* Google Style Guide\n* Object Oriented (with a few exceptions)\n\n## TODO\n* Convert cacheman dependency to be optional\n\n## Known Workarounds\n- On Windows very long file paths, or paths saved in a different encoding than the system require special handling by Hunspell to load dictionary files. To circumvent this on Windows setups, either set `system_encoding='UTF-8'` in the `Hunspell` constructor or set the environment variable `HUNSPELL_PATH_ENCODING=UTF-8`. Then you must re-encode your `hunspell_data_dir` in UTF-8 by passing that argument name to the `Hunspell` constructor or setting the `HUNSPELL_DATA` environment variable. This is a restriction of Hunspell / Windows operations.\n\n## Known Issues\n- Exact spelling suggestions on different OS's differs slightly with identical inputs. This appears to be an issue with Hunspell 1.3 and not this library.\n- Older versions of pip and setuptools will build with incorrect windows DLL bindings and complain about \"ImportError: DLL load failed: %1 is not a valid Win32 application.\"\n- Sometimes windows machines won't find the build tools appropiately. You may need\nto 'SET VS100COMNTOOLS=%VSxxxCOMNTOOLS%' before installing. Python 3 usually wants the xxx as '140' and python 2 as '90'. There's not a lot the library can do to fix this, though pip and setuptools upgrades oftentimes resolve the issue by being smarter.\n- Ubuntu on windows needs autoconf and build tooling installed to function. Install `sudo apt-get install autoconf automake libtool build-essential pkg-config python python-dev`to enable build tooling to work.\n\n## Author\nAuthor(s): Tim Rodriguez and Matthew Seal\n\n## License\nMIT", "description_content_type": "text/markdown", "docs_url": null, "download_url": "https://github.com/MSeal/cython_hunspell/tarball/v1.3.2", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/MSeal/cython_hunspell", "keywords": "hunspell,spelling,correction", "license": "MIT + MPL 1.1/GPL 2.0/LGPL 2.1", "maintainer": "", "maintainer_email": "", "name": "CyHunspell", "package_url": "https://pypi.org/project/CyHunspell/", "platform": "", "project_url": "https://pypi.org/project/CyHunspell/", "project_urls": { "Download": "https://github.com/MSeal/cython_hunspell/tarball/v1.3.2", "Homepage": "https://github.com/MSeal/cython_hunspell" }, "release_url": "https://pypi.org/project/CyHunspell/1.3.2/", "requires_dist": null, "requires_python": "", "summary": "A wrapper on hunspell for use in Python", "version": "1.3.2" }, "last_serial": 5597961, "releases": { "1.0.1": [ { "comment_text": "", "digests": { "md5": "64b6eae2f93a633a385a6dc0e51f62d1", "sha256": "c6195b45aacca43a4f4a502371dd2961b9f38c28c5a092ab6376d0734e2f2b99" }, "downloads": -1, "filename": "CyHunspell-1.0.1.zip", "has_sig": false, "md5_digest": "64b6eae2f93a633a385a6dc0e51f62d1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1569914, "upload_time": "2014-06-12T22:35:35", "url": "https://files.pythonhosted.org/packages/8a/f1/c7b3826af777063bcc034ec25430e458cd4de7d66e84980f0bd58ab5636e/CyHunspell-1.0.1.zip" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "e8d3bfba021493fe4f05e45850bc030d", "sha256": "5b44c6e4b7bb98b31f684a39dd2e5ff1c19cf259dabec9a1a00a352a19f60d08" }, "downloads": -1, "filename": "CyHunspell-1.1.0.zip", "has_sig": false, "md5_digest": "e8d3bfba021493fe4f05e45850bc030d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3115594, "upload_time": "2014-06-14T18:34:15", "url": "https://files.pythonhosted.org/packages/c9/de/e9afc1b79e754953f88401d1714ee1d84b4b5c304d2a8ab55d1a26d370ea/CyHunspell-1.1.0.zip" } ], "1.1.3": [ { "comment_text": "", "digests": { "md5": "58e8c042646691f492729d8fe7867737", "sha256": "7cc5409a50dcd0f19771c50b34a6094851c2e047b9460f543f68db0846589276" }, "downloads": -1, "filename": "CyHunspell-1.1.3.tar.gz", "has_sig": false, "md5_digest": "58e8c042646691f492729d8fe7867737", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3308409, "upload_time": "2015-09-07T17:45:01", "url": "https://files.pythonhosted.org/packages/27/e8/e3cab74916a5341906d1f410d9d4af815a4addade50fe2e0cb3d4b667d20/CyHunspell-1.1.3.tar.gz" } ], "1.1.3.post1": [ { "comment_text": "", "digests": { "md5": "37c19475d772287e7e0cfc0912039a81", "sha256": "8ea4273fb5e1b35c7f1b4f3868571fe29e0d34ad7e1ab8b7aa2eb8f13b77218a" }, "downloads": -1, "filename": "CyHunspell-1.1.3.post1.zip", "has_sig": false, "md5_digest": "37c19475d772287e7e0cfc0912039a81", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3325974, "upload_time": "2015-09-07T17:31:08", "url": "https://files.pythonhosted.org/packages/f2/43/7991ddcf4365166b2e7a98055d7221d484d42f2ed02454cf3fe6465558e1/CyHunspell-1.1.3.post1.zip" } ], "1.1.4": [ { "comment_text": "", "digests": { "md5": "a606be545ac7464d390651f7358e8b32", "sha256": "001d44d5e8f5669fb9f98da92c6ef0d0da23bb30627feb23dbd0ccc1f67f545d" }, "downloads": -1, "filename": "CyHunspell-1.1.4.tar.gz", "has_sig": false, "md5_digest": "a606be545ac7464d390651f7358e8b32", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5539117, "upload_time": "2017-04-02T04:49:43", "url": "https://files.pythonhosted.org/packages/35/d2/c93b9de2ae3de1ead42138f19db505c8242c24e07bb08ad339e88c657a1f/CyHunspell-1.1.4.tar.gz" } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "d947aa4ec12f925097c0f5399202a329", "sha256": "a3c57f7b16259956d6d17ce82f89a242a4c8225d4c8ed31ed2c6033d5aa16e4b" }, "downloads": -1, "filename": "CyHunspell-1.2.0.tar.gz", "has_sig": false, "md5_digest": "d947aa4ec12f925097c0f5399202a329", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2962950, "upload_time": "2017-05-20T23:28:20", "url": "https://files.pythonhosted.org/packages/d6/90/5362efe7ccf0f785771ae657d981c5ddccc25158b04b7bbd2cccbf04a98e/CyHunspell-1.2.0.tar.gz" } ], "1.2.1": [ { "comment_text": "", "digests": { "md5": "8f5875f8dd8a7b8543f6609c4a7f157b", "sha256": "48c740750c951ef7e297f3c7f33016bb9f26656a2cb62a69b5ce6fb584fee1e5" }, "downloads": -1, "filename": "CyHunspell-1.2.1.tar.gz", "has_sig": false, "md5_digest": "8f5875f8dd8a7b8543f6609c4a7f157b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2962561, "upload_time": "2017-10-23T06:10:13", "url": "https://files.pythonhosted.org/packages/a0/c9/3a0a1940f2dc0f36b5426d1d6396f15578c7fbe1bcae97359b737f86e7b1/CyHunspell-1.2.1.tar.gz" } ], "1.3.0": [ { "comment_text": "", "digests": { "md5": "12875d07d2622704926abee1e8c2f426", "sha256": "a84603f451a823e6832d6e12be5ff86fbcfe171aa0e52c28671ddb1cd8a0d8e1" }, "downloads": -1, "filename": "CyHunspell-1.3.0.tar.gz", "has_sig": false, "md5_digest": "12875d07d2622704926abee1e8c2f426", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2755103, "upload_time": "2018-07-08T21:01:11", "url": "https://files.pythonhosted.org/packages/72/d3/f17298ceb2f5856798f9802b4efab1c46b2120e79ba92546af6e3fb92a1f/CyHunspell-1.3.0.tar.gz" } ], "1.3.1": [], "1.3.2": [ { "comment_text": "", "digests": { "md5": "980ba927f0fcf54c45e15526429cafbf", "sha256": "cec9015acf3a09d0e652406a83a1484cf80a93e72c8edaadef39045553ce1098" }, "downloads": -1, "filename": "CyHunspell-1.3.2.tar.gz", "has_sig": false, "md5_digest": "980ba927f0fcf54c45e15526429cafbf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2614881, "upload_time": "2019-07-29T06:50:39", "url": "https://files.pythonhosted.org/packages/5b/ae/ef8979f4519ed2105e3ae88a2b7ab50205aa5138440f13709ab2f6cd3acc/CyHunspell-1.3.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "980ba927f0fcf54c45e15526429cafbf", "sha256": "cec9015acf3a09d0e652406a83a1484cf80a93e72c8edaadef39045553ce1098" }, "downloads": -1, "filename": "CyHunspell-1.3.2.tar.gz", "has_sig": false, "md5_digest": "980ba927f0fcf54c45e15526429cafbf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2614881, "upload_time": "2019-07-29T06:50:39", "url": "https://files.pythonhosted.org/packages/5b/ae/ef8979f4519ed2105e3ae88a2b7ab50205aa5138440f13709ab2f6cd3acc/CyHunspell-1.3.2.tar.gz" } ] }