{"id":19300655,"url":"https://github.com/fantomas42/mots-vides","last_synced_at":"2025-04-22T10:31:58.225Z","repository":{"id":26166588,"uuid":"29612099","full_name":"Fantomas42/mots-vides","owner":"Fantomas42","description":"Python library for managing stop words in many languages.","archived":false,"fork":false,"pushed_at":"2015-05-11T13:18:06.000Z","size":528,"stargazers_count":12,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2024-10-04T16:39:39.859Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Fantomas42.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-21T20:42:54.000Z","updated_at":"2023-08-18T00:39:53.000Z","dependencies_parsed_at":"2022-07-25T11:02:08.561Z","dependency_job_id":null,"html_url":"https://github.com/Fantomas42/mots-vides","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fantomas42%2Fmots-vides","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fantomas42%2Fmots-vides/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fantomas42%2Fmots-vides/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fantomas42%2Fmots-vides/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Fantomas42","download_url":"https://codeload.github.com/Fantomas42/mots-vides/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223892994,"owners_count":17220834,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T23:15:26.758Z","updated_at":"2024-11-09T23:15:27.328Z","avatar_url":"https://github.com/Fantomas42.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"==========\nMots vides\n==========\n\n|travis-develop| |coverage-develop|\n\nPython library for managing common stop words in 39 languages.\n\n.. contents::\n\nUsage\n=====\n\nSimple\n------\n\nBetter than a long speech, here a direct introduction: ::\n\n  \u003e\u003e\u003e from mots_vides import stop_words\n\n  \u003e\u003e\u003e english_stop_words = stop_words('en')\n  \u003e\u003e\u003e text = \"\"\"\n  ... Even though using \"lorem ipsum\" often arouses curiosity\n  ... due to its resemblance to classical Latin,\n  ... it is not intended to have meaning.\n  ... \"\"\"\n\n  \u003e\u003e\u003e print(english_stop_words.rebase(text))\n  XXXX XXXXXX XXXXX \"lorem ipsum\" XXXXX arouses curiosity\n  XXX XX XXX resemblance XX classical Latin,\n  XX XX XXX intended XX XXXX meaning.\n\n  \u003e\u003e\u003e print(english_stop_words.rebase(text, '').split())\n  ['\"lorem', 'ipsum\"', 'arouses', 'curiosity', 'resemblance',\n  'classical', 'Latin,', 'intended', 'meaning.']\n\nAdvanced\n--------\n\n*Mots vides* also provides two classes for managing the stop words in your\nlanguage.\n\n``StopWord`` which is a container for a collection of stop words.\nBy default is language agnostic, but can be easily manipulated to create\nthe collection: ::\n\n  \u003e\u003e\u003e from mots_vides import StopWord\n\n  \u003e\u003e\u003e french_stop_words = StopWord('french', ['le', 'la', 'les'])\n  \u003e\u003e\u003e french_stop_words += StopWord('french', ['un', 'une', 'des'])\n  \u003e\u003e\u003e french_stop_words += ['or', 'ni', 'car']\n  \u003e\u003e\u003e french_stop_words += 'assez'\n  \u003e\u003e\u003e french_stop_words += u'aussitôt'\n  \u003e\u003e\u003e print(sorted(french_stop_words))\n  ['assez', u'aussitôt', 'car', 'des', 'la', 'le', 'les', 'ni', 'or', 'un', 'une']\n\n``StopWordFactory`` is a factory for initializing ``StopWord`` objects by\nlanguage and the appropriate collection of stop words. ::\n\n  \u003e\u003e\u003e from mots_vides import StopWordFactory\n\n  \u003e\u003e\u003e factory = StopWordFactory()\n  \u003e\u003e\u003e french_stop_words = factory.get_stop_words('french')\n  \u003e\u003e\u003e print(len(french_stop_words))\n  577\n\nYou can also use international language code to query a collection: ::\n\n  \u003e\u003e\u003e french_stop_words = factory.get_stop_words('fr')\n  \u003e\u003e\u003e print(len(french_stop_words))\n  577\n\nIf the required language does not exist a ``StopWordError`` is raised,\nunless the ``fail_safe`` parameter is set to ``True``: ::\n\n  \u003e\u003e\u003e klingon_stop_words = factory.get_stop_words('klingon')\n  StopWordError: Stop words are not available in \"klingon\".\n  \u003e\u003e\u003e klingon_stop_words = factory.get_stop_words('klingon', fail_safe=True)\n  \u003e\u003e\u003e print(len(klingon_stop_words))\n  0\n\nSupported languages\n===================\n\n* Arabic\n* Armenian\n* Basque\n* Bengali\n* Bulgarian\n* Catalan\n* Chinese\n* Czech\n* Danish\n* Dutch\n* English\n* Finnish\n* French\n* Galician\n* German\n* Greek\n* Hindi\n* Hungarian\n* Indonesian\n* Irish\n* Italian\n* Japanese\n* Korean\n* Latvian\n* Lithuanian\n* Marathi\n* Norwegian\n* Persian\n* Polish\n* Portuguese\n* Romanian\n* Russian\n* Slovak\n* Spanish\n* Swedish\n* Thai\n* Turkish\n* Ukrainian\n* Urdu\n\nCompatibility\n=============\n\nTested with Python 2.6, 2.7, 3.2, 3.3, 3.4.\n\nAuthors\n=======\n\n* https://github.com/Fantomas42\n* https://github.com/chrisdavisgithub\n\nNotes\n=====\n\n*Mots vides* means *stop words* in french.\n\nInspired from https://github.com/Alir3z4/python-stop-words\n\nChangelog\n=========\n\n2015.5.11\n---------\n\n- Fix cache system for Python 3\n\n2015.2.6\n--------\n\n- Fix potential issue in factory.get_available_languages\n\n2015.2.5\n--------\n\n- Fix packaging\n- Add a rebaser command script\n\n2015.2.4\n--------\n\n- Initial release\n\n2015.1.21.dev0\n--------------\n\n- Development release\n\n.. |travis-develop| image:: https://travis-ci.org/Fantomas42/mots-vides.png?branch=develop\n   :alt: Build Status - develop branch\n   :target: http://travis-ci.org/Fantomas42/mots-vides\n.. |coverage-develop| image:: https://coveralls.io/repos/Fantomas42/mots-vides/badge.png?branch=develop\n   :alt: Coverage of the code\n   :target: https://coveralls.io/r/Fantomas42/mots-vides\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffantomas42%2Fmots-vides","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffantomas42%2Fmots-vides","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffantomas42%2Fmots-vides/lists"}