Git Product home page Git Product logo

indicstemmer's Introduction

LibIndic Stemmer

Build Status Coverage Status

LibIndic's stemmer module may be used to extract stems of the words in a sentence. It is implemented in a rule-based model and follows iterative suffix stripping to handle multiple levels of inflection. Right now, it supports Malayalam language only.

Installation

  1. Clone the repository git clone https://github.com/libindic/indicstemmer.git
  2. Change to the cloned directory cd indicstemmer
  3. Run setup.py to create installable source python setup.py sdist
  4. Install using pip pip install dist/libindic-stemmer*.tar.gz

Note: Prefer using virtualenv for installation as the library is in experimental stage

Usage

Input: String <str> containing words word1 word2 word3 ...
Output: Dict <dict> of the format
{
    'word1': {
                        'stem': 'stem1',
                        'inflection': ['tag1', 'tag2', ...]
             },
    'word2': {
                        'stem': 'stem2',
                        'inflection': ['tag1', 'tag2', ...]
             },
    .
    .
    .
}

>>> from libindic.stemmer import Stemmer
>>> stemmer = Stemmer()
>>> result = stemmer.stem(language='malayalam', text=രാമന്റെ വീട്ടിലേക്ക്')
>>> for word, output in result.items():
...    print word, " : ", output['stem'], " : ", output['inflection']
രാമന്റെ  :  രാമൻ  :  ['SAMB1']
വീട്ടിലേക്ക്  :  വീട്  :  ['MISC1', 'ADH1', 'UDH1']

For more details read the docs

indicstemmer's People

Contributors

balasankarc avatar arushidogra avatar copyninja avatar diadara avatar jishnu7 avatar

Watchers

Shehin Fn avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.