Collection of stopwords for multiple languages, using ISO 639-1 language code.
Maintained. Last release 5 months ago, commits in 1 of the last 26 weeks. Weaker on commit activity and release cadence.
pip install stopwordsisostopwordsiso
Collection of stopwords for multiple languages, using ISO 639-1 language code.
This Python package is based on Stopwords ISO project by Gene Diaz. You can see the full list of stopwords in every language available there. Contribution to the word lists should also happen there.
Comparable packages also published on npm and bower.
Installation
pip install stopwordsiso
Usage
import stopwordsiso
stopwordsiso.has_lang("th") # True if there are stopwords for Thai
stopwordsiso.langs() # frozenset of all supported ISO 639-1 language codes
from stopwordsiso import stopwords
stopwords("en") # English stopwords
stopwords(["de", "id", "zh"]) # German, Indonesian, and Chinese stopwords
stopwords("xxx") # an empty set will be returned for unknown language
Stopwords data
The entire collection is in JSON format and can be found at
stopwords-iso.json in your stopwordsiso/
Python package directory.
You are free to use this collection any way you like.
Stopwords for each language is a list value with a key of respective language in ISO 639-1 language code, like this:
{
"af": [ "aan", "af", "al", "as" ],
"ar": [ "آض", "آمينَ", "آه", "آهاً" ],
}
If you wish to add, remove, or update some of the stopwords, please go to Stopwords ISO project at https://github.com/stopwords-iso.
Credits
- Gene Diaz, stopwords compilation, npm and bower packages
- Arthit Suriyawongkul, Python utility and pip package (was originally at )