stop-words

2025.11.4 · active · verified Thu Apr 16

A Python library providing curated lists of stop words across 34+ languages. Stop words are common words (like “the”, “is”, “at”) that are typically filtered out in natural language processing and text analysis tasks. It offers extensive language support, built-in caching for performance, and zero external dependencies. The current version is 2025.11.4 and it maintains a regular release cadence. [1, 9]

Common errors

Warnings

Install

Imports

Quickstart

Demonstrates how to fetch stop words for English and Spanish and apply them to a simple text string. It highlights the importance of lowercasing and punctuation removal for effective filtering. [1, 9]

from stop_words import get_stop_words

# Get English stop words
english_stop_words = get_stop_words('en')
print(f"English stop words (first 5): {english_stop_words[:5]}")

# Get Spanish stop words using full name
spanish_stop_words = get_stop_words('spanish')
print(f"Spanish stop words (first 5): {spanish_stop_words[:5]}")

# Example usage in text processing
text = "This is a sample sentence, demonstrating stop word removal."
filtered_words = [word.lower() for word in text.replace(',', '').replace('.', '').split() if word.lower() not in english_stop_words]
print(f"Filtered text: {' '.join(filtered_words)}")

view raw JSON →