--- id: sastrawi version: "1.0.1" license: MIT license_treatment: permissive maintenance: active --- # Sastrawi — Library for stemming Indonesian (Bahasa) text License: permissive · Maintenance: active · Downloads: 79.9K/mo ## What it is and what it does Sastrawi is a Python port of the original PHP Sastrawi project for Indonesian language stemming. It takes inflected Indonesian words and reduces them to their root form by removing affixes and morphological markers, which is a common preprocessing step in Indonesian text analysis and natural language processing tasks. The package provides a factory-based API: you instantiate a StemmerFactory, create a stemmer instance, and call its stem() method on text. It handles both single words and full sentences, stripping prefixes, suffixes, and other morphological variations specific to Indonesian grammar. With no external runtime dependencies and a permissive MIT license, it integrates easily into Indonesian NLP pipelines. Use it for: - Preprocess Indonesian text for search engines or information retrieval systems to normalize word variations - Reduce Indonesian documents to root forms before feeding them into machine learning classifiers or topic models - Build Indonesian language chatbots or question-answering systems that need to match user queries to base word forms - Analyze Indonesian social media or news text by normalizing inflected words for frequency analysis or sentiment detection ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Sastrawi reduces inflected Indonesian words to their base form (stem) by removing prefixes, suffixes, and other morphological variations. Yes, if you need Indonesian stemming. The package is stable, has no dependencies, and carries a permissive license. The 2016 release date is a concern for Python version compatibility—verify it works with your target Python version before relying on it in production. ## Install pip install sastrawi uv add sastrawi poetry add sastrawi ## Installing Sastrawi Before you install: Low friction install with no runtime dependencies. Last release was in 2016, but the repository remains active with recent commits and is marked production-stable. License in practice: MIT license permits free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects. Quickstart: pip install Sastrawi from Sastrawi.Stemmer.StemmerFactory import StemmerFactory factory = StemmerFactory() stemmer = factory.create_stemmer() output = stemmer.stem('Perekonomian Indonesia sedang dalam pertumbuhan') print(output) # ekonomi indonesia sedang dalam tumbuh Verify before relying: - Whether the package supports modern Python versions beyond what was current in 2016 - Performance characteristics on large Indonesian text corpora - Accuracy of stemming against standard Indonesian linguistic benchmarks ## Package facts - License: MIT (permissive) - Python support: unspecified - Install friction: low - Maintenance: active - Downloads: 79.9K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags indonesian text stemming, bahasa indonesia stemmer, indonesian language processing, morphological analysis indonesian, indonesian nlp stemming, reduce indonesian word forms, indonesian linguistic preprocessing, indonesian-nlp, morphological-analysis [View on SkillFed](https://skillfed.io/packages/sastrawi) · [View on PyPI](https://pypi.org/project/sastrawi/)