{ "info": { "author": "Prashant Sinha", "author_email": "prashant+git@noop.pw", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5" ], "description": "![Elasticsearch Synonyms](docs/banner.png)\n\n[![Build Status][travis-img-url]][travis-href]\n[![PyPI Version][pypi-v-shield-url]][pypi-href]\n\nThis repository contains a curated dataset of synonyms in [Solr Format][1]. These\nsynonyms can be used for [Elasticsearch Synonym Token Filter][2] configuration.\n\nAdditional helper tools in this repository:\n\n- `synlint`: Commandline tool to lint and validate the synonym files.\n- `synonyms.sublime-syntax`: Syntax highlighting file for Sublime Text 3.\n\nIf you're using Elasticssearch with Django, you might find [`dj-elasticsearch-flex`][es_flex] useful.\n\n## Why?\n\nTrying to configure Synonyms in Elasticsearch, I found that docs for it are surprisingly scattered.\nThe docs that are available do not do much justice either and miss out many corner cases.\n\nFor instance, an incorrect Solr mapping: `hello, world,` would be happily added in index configuration.\nHowever, as soon as you'd try to re-open the index, you'd get a `malform_input_exception` [(discussion thread)][4].\n\nThis repository solves such problems by with a linter tool that can be used to validate the synonym\nfiles beforehand.\n\n## Datasets\n\nThe synonym files in `data/` can be used directly in elasticsearch configuration.\n\nFollowing datasets are currently available:\n- `be-ae`: British English and American English Spellings. From [AVKO.org](https://to.noop.pw/2sNor7C).\n\n## Installation\n\nIf you want to use the `synlint` tool, install the package from PIP using:\n```shell\npip install elasticsearch-synonym-toolkit\n```\n\nThe Python Package is installed as `es_synonyms`. This will also install a linter tool,\n`es-synlint`. Use it with:\n\n```shell\nes-synlint [synonymfile]\n```\n\n## Usage\n\nIn most cases, you'd want to use this module as a helper for loading validated synonyms from a file or a url:\n```python\nfrom es_synonyms import load_synonyms\n\n# Load synonym file at some URL:\nbe_ae_syns = load_synonyms('https://to.noop.pw/2sI9x4s')\n# Or, from filesystem:\nother_syns = load_synonyms('data/be-ae.synonyms')\n```\n\nConfiguring [Synonym Tokenfilter][2] with [Elasticsearch DSL Py][3], is very easy, too:\n```python\nfrom elasticsearch_dsl import analyzer, token_filter\n\nbe_ae_syns = load_synonyms('https://to.noop.pw/2sI9x4s')\n\n# Create a tokenfilter\nbrit_spelling_tokenfilter = token_filter(\n 'my_tokenfilter', # Any name for the filter\n 'synonym', # Synonym filter type\n synonyms=be_ae_syns # Synonyms mapping will be inlined\n)\n# Create analyzer\nbrit_english_analyzer = analyzer(\n 'my_analyzer',\n tokenizer='standard',\n filter=[\n 'lowercase',\n brit_spelling_tokenfilter\n ])\n```\n\nTo use the underlying linter, you can import `SynLint` class.\n\n## Development\n\n- Clone this repository.\n- Install package dependencies via `pip` with: `pip install -r requirements.txt`.\n- To run tests:\n```shell\n./panda test:all\n```\n\n## License\n\nThe tools and codes are licensed under MIT.\nThe datasets are used under fair use and are derivative of the original sources. \n\n[1]: https://cwiki.apache.org/confluence/display/solr/Filter+Descriptions#FilterDescriptions-SynonymFilter\n[2]: https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-synonym-tokenfilter.html#analysis-synonym-tokenfilter\n[3]: https://elasticsearch-dsl.readthedocs.io/en/latest/persistence.html#analysis\n[4]: https://discuss.elastic.co/t/synonym-using-a-file-is-not-working-malformed-input-exception/60487\n[es_flex]: https://github.com/prashnts/dj-elasticsearch-flex\n[travis-img-url]: https://travis-ci.org/prashnts/elasticsearch-synonyms.svg?branch=master\n[travis-href]: https://travis-ci.org/prashnts/elasticsearch-synonyms\n[pypi-href]: https://pypi.python.org/pypi/elasticsearch-synonym-toolkit\n[pypi-v-shield-url]: https://img.shields.io/pypi/v/elasticsearch-synonym-toolkit.svg\n", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/prashnts/elasticsearch-synonym/tarball/0.2.3", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/prashnts/elasticsearch-synonyms", "keywords": "elasticsearch-synonym-toolkit", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "elasticsearch-synonym-toolkit", "package_url": "https://pypi.org/project/elasticsearch-synonym-toolkit/", "platform": "", "project_url": "https://pypi.org/project/elasticsearch-synonym-toolkit/", "project_urls": { "Download": "https://github.com/prashnts/elasticsearch-synonym/tarball/0.2.3", "Homepage": "https://github.com/prashnts/elasticsearch-synonyms" }, "release_url": "https://pypi.org/project/elasticsearch-synonym-toolkit/0.2.3/", "requires_dist": null, "requires_python": "", "summary": "Toolkit for Elasticsearch Synonym files.", "version": "0.2.3" }, "last_serial": 2979516, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "5ade35db50e6795c05e35536b69a897a", "sha256": "e4f43e78b5fcd59ed999ef942c07163aa7b11871718ab4bbdf36e10f22a82c0a" }, "downloads": -1, "filename": "elasticsearch_synonym_toolkit-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "5ade35db50e6795c05e35536b69a897a", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 7228, "upload_time": "2017-06-17T11:51:02", "url": "https://files.pythonhosted.org/packages/ee/53/1c6ea6605f923158942a760b25978d979b22221740bd37d928046a59098e/elasticsearch_synonym_toolkit-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ad02e85f2bec6c657f29d365a8f0536a", "sha256": "a8c0ac0d9de139d7ee670aa36555542bc02a53c21ee036921e4ea3876df5dfd7" }, "downloads": -1, "filename": "elasticsearch-synonym-toolkit-0.1.0.tar.gz", "has_sig": false, "md5_digest": "ad02e85f2bec6c657f29d365a8f0536a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4006, "upload_time": "2017-06-17T11:50:57", "url": "https://files.pythonhosted.org/packages/b7/79/38b5d9c0ca29c0a675811dce01895c66e3c98d8c591479160fd488b627a4/elasticsearch-synonym-toolkit-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "6447110355a7c68318fbda5a93947420", "sha256": "11bdc30979082526e8a676dd00375b4788981cb08db207097963157c573c3f27" }, "downloads": -1, "filename": "elasticsearch_synonym_toolkit-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "6447110355a7c68318fbda5a93947420", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 7277, "upload_time": "2017-06-17T11:59:23", "url": "https://files.pythonhosted.org/packages/84/95/48482d63693e6e51c920e72ffee1e75db0423e6b9e5082cba5e3f2ca9ba7/elasticsearch_synonym_toolkit-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9cf969ac4d4240996b0b38e6fb5397bc", "sha256": "46690b2029620ff6e5d5242a1a203ba4be4be31f7cf1d8974a845f00e155ebc7" }, "downloads": -1, "filename": "elasticsearch-synonym-toolkit-0.1.1.tar.gz", "has_sig": false, "md5_digest": "9cf969ac4d4240996b0b38e6fb5397bc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4151, "upload_time": "2017-06-17T11:59:18", "url": "https://files.pythonhosted.org/packages/5b/a6/dfcbf02a798ec07ad0674aabf7eebdacc9554455025e128fcaba9914c63a/elasticsearch-synonym-toolkit-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "a3d4b383f70e2a4c19479be828b2c09e", "sha256": "0925833070254dabadc8ba887ca8e68c24ea106eff2f87d8e8c824ecb21cad18" }, "downloads": -1, "filename": "elasticsearch_synonym_toolkit-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "a3d4b383f70e2a4c19479be828b2c09e", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 7456, "upload_time": "2017-06-17T12:11:03", "url": "https://files.pythonhosted.org/packages/e0/83/9b66f6f81a07ff60f726da24d21bbaa6922622b64c21521b4b8c6a3d83ac/elasticsearch_synonym_toolkit-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ec66e28b05774f35e1b32d450591523e", "sha256": "0165ddd163802ce2019f6906605b0f6a68afc0ff3c87e107eff27beb3d80f434" }, "downloads": -1, "filename": "elasticsearch-synonym-toolkit-0.1.2.tar.gz", "has_sig": false, "md5_digest": "ec66e28b05774f35e1b32d450591523e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4248, "upload_time": "2017-06-17T12:10:57", "url": "https://files.pythonhosted.org/packages/54/1a/eff7b6b85df6a4ff6cf702c895fcec9f3f4bbf511d4156638a98c29f5d4a/elasticsearch-synonym-toolkit-0.1.2.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "ebcb0c7cd015c52e9c61ce8986cb7c5e", "sha256": "a418b0936fa7408aec4a2a50d188a37282c73ca422a768c1affa9902ff85d71e" }, "downloads": -1, "filename": "elasticsearch_synonym_toolkit-0.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "ebcb0c7cd015c52e9c61ce8986cb7c5e", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 8834, "upload_time": "2017-06-26T12:42:52", "url": "https://files.pythonhosted.org/packages/36/82/2c82352dbff8b889b8fe99db78e9f648c869df24cbc7218cf1ac3059c7f1/elasticsearch_synonym_toolkit-0.2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a756d6f59e79b890f157139fcd31b4ba", "sha256": "513e49e60081ca1947289b4d586f27c803e6c5e4daa1719b34df27f429449a71" }, "downloads": -1, "filename": "elasticsearch-synonym-toolkit-0.2.1.tar.gz", "has_sig": false, "md5_digest": "a756d6f59e79b890f157139fcd31b4ba", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5189, "upload_time": "2017-06-26T12:42:48", "url": "https://files.pythonhosted.org/packages/58/13/7744758eb317bd04c8400cfdc6543cbf5cc2b416d03fd8bba934ed11b251/elasticsearch-synonym-toolkit-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "4f3f3e1c92c6ae02bf225663792dbcfb", "sha256": "0623c82d6979c9fb96359609474cf2edf1d60e8e76f57b5fa6600a39b0dfaf12" }, "downloads": -1, "filename": "elasticsearch_synonym_toolkit-0.2.2-py3-none-any.whl", "has_sig": false, "md5_digest": "4f3f3e1c92c6ae02bf225663792dbcfb", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 10468, "upload_time": "2017-06-26T13:23:33", "url": "https://files.pythonhosted.org/packages/c7/7f/7fcb3ecd130f1722cfb0798f9c8e9ab22c201f7cb68e4f27ab05d0cd0fea/elasticsearch_synonym_toolkit-0.2.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ca7590302c1b3b5f6ad5d3090976f4b5", "sha256": "44cd6bb099849cafa2f527e8048e3387e61c06f5e053152646bf3c81467b3316" }, "downloads": -1, "filename": "elasticsearch-synonym-toolkit-0.2.2.tar.gz", "has_sig": false, "md5_digest": "ca7590302c1b3b5f6ad5d3090976f4b5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6020, "upload_time": "2017-06-26T13:23:28", "url": "https://files.pythonhosted.org/packages/0f/ca/c5c319fbd5cd7b14754c46d9df9b551f1a705b46213e255884c1c4028e29/elasticsearch-synonym-toolkit-0.2.2.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "80d975d6f032f474f4f80dd549ae9e22", "sha256": "b31b07c04a1f5b5a59fe5c37387da693a7034918fa081a2270e253864d96cc6b" }, "downloads": -1, "filename": "elasticsearch_synonym_toolkit-0.2.3-py3-none-any.whl", "has_sig": false, "md5_digest": "80d975d6f032f474f4f80dd549ae9e22", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 10469, "upload_time": "2017-06-26T13:33:06", "url": "https://files.pythonhosted.org/packages/bf/1f/58fdab00ead00a59a1226938d24b6a01a38225362bc64194ab65475c8edc/elasticsearch_synonym_toolkit-0.2.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ac87ceb4df32e4c07e9b6f1ecdad30d6", "sha256": "4e7c813fa19ea4a81735a3132469580fab1e7a9a999b47b63b4ee7e3f9d274fd" }, "downloads": -1, "filename": "elasticsearch-synonym-toolkit-0.2.3.tar.gz", "has_sig": false, "md5_digest": "ac87ceb4df32e4c07e9b6f1ecdad30d6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7066, "upload_time": "2017-06-26T13:33:02", "url": "https://files.pythonhosted.org/packages/9c/7c/c6832b2fd175d6cb4fce7e53426b45685faefad524f5610dc9dba84618a6/elasticsearch-synonym-toolkit-0.2.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "80d975d6f032f474f4f80dd549ae9e22", "sha256": "b31b07c04a1f5b5a59fe5c37387da693a7034918fa081a2270e253864d96cc6b" }, "downloads": -1, "filename": "elasticsearch_synonym_toolkit-0.2.3-py3-none-any.whl", "has_sig": false, "md5_digest": "80d975d6f032f474f4f80dd549ae9e22", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 10469, "upload_time": "2017-06-26T13:33:06", "url": "https://files.pythonhosted.org/packages/bf/1f/58fdab00ead00a59a1226938d24b6a01a38225362bc64194ab65475c8edc/elasticsearch_synonym_toolkit-0.2.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ac87ceb4df32e4c07e9b6f1ecdad30d6", "sha256": "4e7c813fa19ea4a81735a3132469580fab1e7a9a999b47b63b4ee7e3f9d274fd" }, "downloads": -1, "filename": "elasticsearch-synonym-toolkit-0.2.3.tar.gz", "has_sig": false, "md5_digest": "ac87ceb4df32e4c07e9b6f1ecdad30d6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7066, "upload_time": "2017-06-26T13:33:02", "url": "https://files.pythonhosted.org/packages/9c/7c/c6832b2fd175d6cb4fce7e53426b45685faefad524f5610dc9dba84618a6/elasticsearch-synonym-toolkit-0.2.3.tar.gz" } ] }