rust-stop-words

Library Featured

Common stop words in many languages

Checked · Sources

Downloads
2,153,034
Dependents
25
Stars
26
Forks
5
Contributors
2
Commits
132
Latest release
0.10.1 ·

About

From the project README ·

About

Stop words are words that don't carry much meaning, and are typically removed as a preprocessing step before text analysis or natural language processing. This crate contains common stop words for a variety of languages. This crate uses stop word lists from Stopwords ISO and also from NLTK.

Usage

Use a language enum or its lookup code:

use stop_words::lookup;

if let Some(words) = lookup("en") {
    assert!(words.contains(&"the"));
}

// Unknown or disabled languages return None.
assert!(lookup("not-a-language").is_none());

lookup accepts a Language, a language code such as "en", or a borrowed String. It returns a static slice without allocating. Codes are matched exactly, without case or whitespace normalization.

With the iso or nltk feature enabled, lookup(stop_words::Language::English) returns the same list as lookup("en").

Read the full README

Language is the preferred language enum; the original LANGUAGE enum is deprecated since 0.10.1 and remains available for compatibility, including direct variant imports. Replace LANGUAGE with Language to migrate. They are distinct types accepted by both lookup functions. The existing get function is retained and panics for unknown or disabled languages. Call available_languages() to discover the codes enabled in a particular build.

For ISO languages, a lookup code is usually a two-letter ISO 639-1 code. Fictional constructed languages use three-letter codes (dot, dov, nav, qya, sjn, tlh, val), and NLTK-specific hinglish is supported when the nltk feature is enabled.

You can find a complete example of reading a text file and removing stop words here.

Features

FeatureDefaultContents
isoyesStopwords ISO lists
nltknoNLTK lists, including NLTK-only languages
constructednoExperimental fictional-language lists
allnoiso, nltk, and constructed together

Features are additive. Enabling constructed, for example, does not remove ISO or NLTK enum variants. When both iso and nltk provide a language, the NLTK list takes precedence, preserving the crate's existing behavior.

The crate continues to use the Rust 2021 edition.

Membership and customization

The crate returns static slices without allocating. For repeated membership checks or domain-specific changes, collect the slice into the set type your application needs:

use std::collections::HashSet;
use stop_words::lookup;

let Some(english) = lookup("en") else {
    return;
};
let mut words: HashSet<&str> = english.iter().copied().collect();
words.remove("computer"); // Preserve a meaningful domain term.
words.insert("project");  // Add an application-specific stop word.

assert!(!words.contains("computer"));
assert!(words.contains("project"));

Entries are returned as supplied by their source dataset. Normalize input and list entries consistently for case-insensitive matching; the crate does not impose language-dependent normalization.

Natural Language Availability

This crate supports all languages from Stopwords ISO and also from NLTK. Expand the table below to see a comprehensive description.

Language Coverage Table

ISO 639-1 CodeLanguageStopwords ISONLTK
aaAfar
abAbkhazian
afAfrikaans✓
akAkan
sqAlbanian✓
amAmharic
arArabic✓✓
anAragonese
hyArmenian✓
asAssamese
avAvaric
aeAvestan
ayAymara
azAzerbaijani✓
baBashkir
bmBambara
euBasque✓✓
beBelarusian✓
bnBengali✓✓
bhBihari languages
biBislama
boTibetan
bsBosnian
brBreton✓
bgBulgarian✓
myBurmese
caCatalan; Valencian✓✓
csCzech✓
chChamorro
ceChechen
zhChinese✓✓
cuChurch Slavic; Old Slavonic; Church Slavonic; Old Bulgarian; Old Church Slavonic
cvChuvash
kwCornish
coCorsican
crCree
cyWelsh
daDanish✓✓
deGerman✓✓
dvDivehi; Dhivehi; Maldivian
nlDutch; Flemish✓✓
dzDzongkha
elGreek, Modern (1453-)✓✓
enEnglish✓✓
eoEsperanto✓
etEstonian✓
eeEwe
foFaroese
faPersian✓
fjFijian
fiFinnish✓✓
frFrench✓✓
fyWestern Frisian
ffFulah
kaGeorgian
gdGaelic; Scottish Gaelic
gaIrish✓
glGalician✓
gvManx
gnGuarani
guGujarati✓
htHaitian; Haitian Creole
haHausa✓
heHebrew✓✓
hzHerero
hiHindi✓
hoHiri Motu
hrCroatian✓
huHungarian✓✓
igIgbo
isIcelandic
ioIdo
iiSichuan Yi; Nuosu
iuInuktitut
ieInterlingue; Occidental
iaInterlingua (International Auxiliary Language Association)
idIndonesian✓✓
ikInupiaq
itItalian✓✓
jvJavanese
jaJapanese✓
klKalaallisut; Greenlandic
knKannada
ksKashmiri
krKanuri
kkKazakh✓
kmCentral Khmer
kiKikuyu; Gikuyu
rwKinyarwanda
kyKirghiz; Kyrgyz
kvKomi
kgKongo
koKorean✓
kjKuanyama; Kwanyama
kuKurdish✓
loLao
laLatin✓
lvLatvian✓
liLimburgan; Limburger; Limburgish
lnLingala
ltLithuanian✓
lbLuxembourgish; Letzeburgesch
luLuba-Katanga
lgGanda
mkMacedonian
mhMarshallese
mlMalayalam
miMaori
mrMarathi✓
msMalay✓
mgMalagasy
mtMaltese
mnMongolian
naNauru
nvNavajo; Navaho
nrNdebele, South; South Ndebele
ndNdebele, North; North Ndebele
ngNdonga
neNepali✓
nnNorwegian Nynorsk; Nynorsk, Norwegian
nbBokmål, Norwegian; Norwegian Bokmål
noNorwegian✓✓
nyChichewa; Chewa; Nyanja
ocOccitan (post 1500)
ojOjibwa
orOriya
omOromo
osOssetian; Ossetic
paPanjabi; Punjabi
piPali
plPolish✓
ptPortuguese✓✓
psPushto; Pashto
quQuechua
rmRomansh
roRomanian; Moldavian; Moldovan✓✓
rnRundi
ruRussian✓✓
sgSango
saSanskrit
siSinhala; Sinhalese
skSlovak✓
slSlovenian✓✓
seNorthern Sami
smSamoan
snShona
sdSindhi
soSomali✓
stSotho, Southern✓
esSpanish; Castilian✓✓
scSardinian
srSerbian
ssSwati
suSundanese
swSwahili✓
svSwedish✓✓
tyTahitian
taTamil✓
ttTatar
teTelugu
tgTajik✓
tlTagalog✓
thThai✓
tiTigrinya
toTonga (Tonga Islands)
tnTswana
tsTsonga
tkTurkmen
trTurkish✓✓
twTwi
ugUighur; Uyghur
ukUkrainian✓
urUrdu✓
uzUzbek✓
veVenda
viVietnamese✓
voVolapük
waWalloon
woWolof
xhXhosa
yiYiddish
yoYoruba✓
zaZhuang; Chuang
zuZulu✓

NLTK also includes a non-ISO list for hinglish (lookup key: "hinglish") when the nltk feature is enabled.

Fictional Constructed Language Availability

The optional constructed feature provides small experimental lists for seven fictional languages. These lists were initially generated with ChatGPT in March 2023 rather than derived from authoritative corpora. Treat them as approximate starting points, not linguistically validated datasets. Source-backed corrections and corpus-derived replacements are welcome.

Language Coverage Table

ISO 639-3 CodeLanguage
qyaQuenya
sjnSindarin
tlhKlingon
mis (dot is used here)Dothraki
mis (dov is used here)Dovahzul
mis (nav is used here)Navi
mis (val is used here)High Valyrian
Runs on
GPU support unknown
What shows it
  • no dependency or feature matches a backend row
Native code
None found
  • No native code found
Python bindings
No Python binding crate found
License
Apache-2.0 OR MIT

Compare with similar projects

Order: strongest tier first, then most downloads, then name, with unmeasured values last. A library counts downloads over 30 days. An app counts binary downloads per release. An app with none counts its crate downloads over 30 days. ML Rust runs this catalogue, so its closest project always gets a row.

rust-stop-words beside the projects that share a topic with it
ProjectDownloadsDependentsStarsLatest releaseRuns on (GPU)Native codeLicense
rust-stop-words This page Featured

Common stop words in many languages

2,153,034 downloads over 30 days 25 26 0.10.1 GPU support unknown No native code found Apache-2.0 OR MIT
tokenizers Featured

Fastest implementation of the most used tokenizers in AI.

7,490,451 downloads over 30 days 1,021 11,230 0.23.2 GPU support unknown Binds native code: tikv-jemalloc-sys, onig_sys (feature default) Apache-2.0
tiktoken-rs Featured

Library for encoding and decoding with the tiktoken library in Rust

3,939,182 downloads over 30 days 449 410 0.12.1 GPU support unknown No native code found MIT
jieba-rs Featured

Jieba Chinese Word Segmentation in Rust

947,384 downloads over 30 days 60 992 0.11.0 GPU support unknown No native code found MIT
snowball Listed

Rust implementation of Snowball stemming algorithms for 33 languages

21,654 downloads over 30 days 3 891 0.1.0 GPU support unknown No native code found BSD-3-Clause
splintr Listed

Tokenizer for Rust and Python: pure Rust by default, with 18 bundled vocabularies and four backends covering BPE, SentencePiece and WordPiece. Its output matches Hugging Face tokenizers id for id on 14 model families, including GPT-2, Qwen, Whisper, T5 and BERT.

Python bindings

8,204 downloads over 30 days 7 63 0.22.2 GPU support unknown Binds native code: pcre2-sys (feature pcre2) MIT
xberg New

High-performance document intelligence library for Rust. Extract text, metadata, and structured data from PDFs, Office documents, images, and 107 formats and 371 programming languages via tree-sitter code intelligence with async/sync APIs.

26,095 downloads over 30 days 2 9,565 1.3.10 CUDA, Metal Binds native code: libheif-sys, libz-sys, xberg_libwpd, xberg_tesseract, clipper-sys and 4 more. Build uses a native toolchain: cc, bindgen (feature bindings), cmake (feature build-tesseract), pkg-config (feature dynamic-linking), vcpkg (feature dynamic-linking) MIT
Why FeaturedIt passes every Featured gate.

What it meets

  • It has 18 active dependents and 17 new dependents in 365 days. Featured needs 11 active dependents or 9 new dependents in 365 days.
  • Active dependents are at 100% of their peak. Featured needs at least 50%.
  • Docs are present. The release commit or a manifest ties the crate to the repository.
  • No vulnerability advisory stays unpatched past the grace window. At least one version is neither a prerelease nor 0.0.x.
  • The last activity is on 19 Sep 2026, 51 days ago. The rules expect an update within 1200 days. Dormancy rule

Exact rules: Featured library. The check on applied thresholds version 9.

Every rule outcome, as the check records it
  • expected-interval: version 0.10.1 base 300, doubled for 2153034 downloads per month, doubled for 18 active users: E = 1200 days
  • dormancy: last activity 2026-09-19, 51 days ago, E = 1200: active
  • featured: featured: active_users 18, new_adopters 17, former_glory 1

Measurements and sources

Each signal row shows the raw value, its source and the fetch date. The Sources list gathers every distinct source on this page. Movement needs more history.

Sources6 sources
Adoption18 active dependents, 17 new dependents in 365 days1 not measured
Adoption measurements
SignalValueSourceFetchedCounts
Active dependents18crates.io database dumpYes
New dependents (365 days)17crates.io database dumpYes
Peak active dependents17.5crates.io database dumpYes
Active dependents as a share of the peak1crates.io database dumpYes
Binary downloads per releaseNot measuredYes
MaintenanceLatest human commit: 51 days ago3 not measured
Maintenance measurements
SignalValueSourceFetchedCounts
Latest human commit2026-09-19GitHub repositoryYes
Latest release2026-09-19crates.io database dumpYes
First release2020-08-22crates.io database dumpYes
Latest version0.10.1crates.io database dumpYes
Days the oldest outside issue waits for a reply0GitHub repositoryYes
Maintainer replies over 365 days0GitHub repositoryYes
Repository archivedfalseGitHub repositoryYes
Repository gonefalseGitHub repositoryYes
Release commit or manifest in the repotruecrates.io packageYes
Published docstruecrates.io database dumpYes
Latest release fails cargo checkNot measuredYes
Build check dateNot measuredYes
Build check toolchainNot measuredYes
SecurityUnpatched vulnerabilities: none
Security measurements
SignalValueSourceFetchedCounts
Unpatched vulnerabilities past the grace windownoneRustSec advisory databaseYes
RustSec unmaintained advisorynoneRustSec advisory databaseYes
Deprecation noticenonecrates.io database dumpYes
Deprecated requirementnonecrates.io database dumpYes
Distribution25 releases, 2,153,034 downloads over 30 days5 not measured
Distribution measurements
SignalValueSourceFetchedCounts
Releases25crates.io database dumpYes
Downloads over 30 days2153034crates.io database dumpYes
Binary downloads over the last 3 releasesNot measuredYes
Homebrew installs on request over 365 daysNot measuredYes
Repology repository familiesNot measuredYes
Docker pull growth over 90 daysNot measuredYes
Docker pulls at the growth baselineNot measuredYes
Every version a prereleasefalsecrates.io database dumpYes
Every version 0.0.xfalsecrates.io database dumpYes
Every version yankedfalsecrates.io database dumpYes
Crate deleted from crates.iofalsecrates.io database dumpYes
Repository26 stars, 5 forks, 2 contributors, 132 commits. Stars alone never qualify a project.
Repository measurements
SignalValueSourceFetchedCounts
GitHub stars26GitHub repositoryYes — one part of the repository route
GitHub forks5GitHub repositoryYes — one part of the repository route
Contributors with a GitHub account2GitHub contributorsYes — one part of the repository route
Commits on the default branch132GitHub repositoryNo
Repository's main crate left out of the entrynonecrates.io database dumpYes
Facts that never count
Facts that never count measurements
SignalValueSourceFetchedCounts
LicenseApache-2.0 OR MITcrates.io database dumpNo
Runs on, from listed crates and their direct dependenciesGPU support unknowncrates.io database dumpNo
What shows each backendno dependency or feature matches a backend rowcrates.io database dumpNo
Native code, from listed crates and their dependenciesNo native code foundcrates.io database dumpNo
Python bindings, from direct dependencies of listed cratesNo Python binding crate foundcrates.io database dumpNo
Crates that depend on a listed crate directly25crates.io database dumpNo

Corrections and review history

Report a correction

No correction applies to this entry.

Judgments

A judgment enters only through an approved issue and a merged pull request.

No judgment applies to this entry.