{ "info": { "author": "Esukhia development team", "author_email": "esukhiadev@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Topic :: Text Processing :: Linguistic" ], "description": "# sympound-python\n\nThis library is an implementation of the [SymSpellCompound](https://github.com/wolfgarbe/SymSpell) algorithm in Python. It was initially forked from [rcourivaud/symspellcompound](https://github.com/rcourivaud/symspellcompound) although most of the code has been rewritten.\n\n# Installation\n\n```\npip install sympound\n```\n\n# Documentation\n\nIf you want a quick complete example, see [example.py](example.py).\n\n### Creating the sympound object\n\nThe first step is to create an `sympound` object, the constructor takes two main arguments:\n\n- `distancefun` is a function that will be used to compute the distance between two strings. It takes two arguments (the two strings to compare). You typically want to use a function computing the [Damerau-Levenshtein distance](https://en.wikipedia.org/wiki/Damerau%E2%80%93Levenshtein_distance), but you can get more creative and use keyboard distances.\n- `maxDictionaryEditDistance` is the maximum distance that will be pre-computed. Increasing this parameter will return more suggestions, but also make the memory print much larger\n\n### adding dictionaries\n\nThen some dictionaries can be added through the `load_dictionary(filename)` function, typically taking a file path as argument. The format of the dictionary is typically either a list of words (one per line), or a list of word and frequency (separated by a space). See [example-dict.txt](example-dict.txt) for an example.\n\nYou can also add entries directly with `create_dictionary_entry(key, count)` where `key` is the valid string and `count` the frequency associated with it. This is the advised method to use if your data is not in a simple format like the previously described dictionary.\n\nA lot of computations happen at this stage and adding a large number of entries can easily take more than one minute, so we provide two functions to save the analyzed ductionaries as a pickle: `save_pickle(filename)` and `load_pickle(filename)`, both taking a file path as argument. Note that the pickled is gzipped.\n\n### Lookup\n\nOnce the dictionaries are loaded, you can get suggestions for a string by calling `lookup_compound(str, edit_distance_max)`, where `str` is the string you want to analyze and `edit_distance_max` is the maximum distance you want suggestions for.\n\nThe function returns a sorted list of `SuggestItem`s, containing three fields:\n\n- `term` being the suggested fixed string\n- `distance` being the distance with the original string\n- `count` being the frequency if given in the dictionary\n\n# Maintainance\n\nUpload on pip:\n\n```\npython setup.py sdist\ntwine upload dist/*\n```\n\n# Copyright\n\nThe code is Copyright Esukhia, 2018, and is distributed under the [MIT License](LICENSE).", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Esukhia/sympound-python", "keywords": "spell check", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "sympound", "package_url": "https://pypi.org/project/sympound/", "platform": "", "project_url": "https://pypi.org/project/sympound/", "project_urls": { "Homepage": "https://github.com/Esukhia/sympound-python", "Source": "https://github.com/Esukhia/sympound-python", "Tracker": "https://github.com/Esukhia/sympound-python/issues" }, "release_url": "https://pypi.org/project/sympound/0.6.0/", "requires_dist": null, "requires_python": ">=3", "summary": "Python implementation of SymSpell Compound", "version": "0.6.0" }, "last_serial": 4283082, "releases": { "0.2.0": [ { "comment_text": "", "digests": { "md5": "fb440fd516e8d728675c62fe6e3f0cbb", "sha256": "d5ac44fe9f6591a9b14eefef1c256508ddc9ee075b9dad88fb85dd86d024c6d9" }, "downloads": -1, "filename": "sympound-0.2.0.tar.gz", "has_sig": false, "md5_digest": "fb440fd516e8d728675c62fe6e3f0cbb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7020, "upload_time": "2018-06-16T16:58:57", "url": "https://files.pythonhosted.org/packages/0f/cc/3391ccb5ba3615c2b4b0cf2718ca002c33b30e49937bcb23542797518566/sympound-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "a326a8a293b4ea5818234b4261c0d96f", "sha256": "b022bebc44d30b7ae7383bfa80afd5176f60d015f08c0c73a2c68f46a0f7b241" }, "downloads": -1, "filename": "sympound-0.3.0.tar.gz", "has_sig": false, "md5_digest": "a326a8a293b4ea5818234b4261c0d96f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6961, "upload_time": "2018-08-16T09:06:18", "url": "https://files.pythonhosted.org/packages/d9/05/c72379a1847852407aa68ae921bf2f1d3397cff2e025f58cfe8a88584587/sympound-0.3.0.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "520ba15e50a7561ed6fa100163688e05", "sha256": "492c33714b60ba5973b06d8c8edf675ba0a598eacf42cb90b84b2c39c2372cca" }, "downloads": -1, "filename": "sympound-0.4.0.tar.gz", "has_sig": false, "md5_digest": "520ba15e50a7561ed6fa100163688e05", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 6844, "upload_time": "2018-08-17T08:34:56", "url": "https://files.pythonhosted.org/packages/98/22/5c3ff9fbae5d68379bbcc5484264b223a70bb52c552e0b2dbe0342a1977b/sympound-0.4.0.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "e71085784b17c620fb16751cdc409376", "sha256": "fccfce7ffe989ee9418dfbdb60d463b102a875f6dade67c2386dabf16de3c97d" }, "downloads": -1, "filename": "sympound-0.5.0.tar.gz", "has_sig": false, "md5_digest": "e71085784b17c620fb16751cdc409376", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 6846, "upload_time": "2018-08-21T11:46:54", "url": "https://files.pythonhosted.org/packages/71/86/1b316ad28f5afcbe573964e3164750d515260ca481504747d3de836f3ecf/sympound-0.5.0.tar.gz" } ], "0.6.0": [ { "comment_text": "", "digests": { "md5": "ceab0b40dafe72d4a471f97a3cb41655", "sha256": "247f59f3c11d5ad6a59911a5a615b5a8aef8c8dd4736d419a29dc01e1ee8ad56" }, "downloads": -1, "filename": "sympound-0.6.0.tar.gz", "has_sig": false, "md5_digest": "ceab0b40dafe72d4a471f97a3cb41655", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 6868, "upload_time": "2018-09-18T10:47:25", "url": "https://files.pythonhosted.org/packages/4c/36/3b463aeec546bf99bb6f74582019fabb710726a1d58342a5e8414515addd/sympound-0.6.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ceab0b40dafe72d4a471f97a3cb41655", "sha256": "247f59f3c11d5ad6a59911a5a615b5a8aef8c8dd4736d419a29dc01e1ee8ad56" }, "downloads": -1, "filename": "sympound-0.6.0.tar.gz", "has_sig": false, "md5_digest": "ceab0b40dafe72d4a471f97a3cb41655", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 6868, "upload_time": "2018-09-18T10:47:25", "url": "https://files.pythonhosted.org/packages/4c/36/3b463aeec546bf99bb6f74582019fabb710726a1d58342a5e8414515addd/sympound-0.6.0.tar.gz" } ] }