Skip to main content

Library for stemming Indonesian (Bahasa) text

Project description

Sastrawi is a simple Python library which allows you to reduce inflected words in Indonesian Language (Bahasa Indonesia) to their base form (stem).
This is Python port of the original Sastrawi project written in PHP.

Build Status Coverage Status

Installation

Sastrawi can be installed via pip, by running the following commands in terminal/command prompt : pip install Sastrawi

Example Usage

Run the following commands in Python interactive terminal :

# import Sastrawi package
from Sastrawi.Stemmer.StemmerFactory import StemmerFactory

# create stemmer
factory = StemmerFactory()
stemmer = factory.create_stemmer()

# stem
sentence = 'Perekonomian Indonesia sedang dalam pertumbuhan yang membanggakan'
output   = stemmer.stem(sentence)

print(output)
# ekonomi indonesia sedang dalam tumbuh yang bangga

print(stemmer.stem('Mereka meniru-nirukannya'))
# mereka tiru

Demo

Live demo : https://pysastrawi-demo.appspot.com/

Repository : https://github.com/har07/pystastrawi-demo

More Info

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Sastrawi-1.0.1.zip (211.7 kB view hashes)

Uploaded Source

Built Distribution

Sastrawi-1.0.1-py2.py3-none-any.whl (209.7 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page