stemmer_pl

1.0.1 • Public • Published

stemmer_pl

Test suite Build Status JavaScript Style Guide Project Status: Active – The project has reached a stable, usable state and is being actively developed.

Stemmer for Polish language, based on Porter's algorithm.

It's not perfect, as I do not have background in linguistics, but I hope it's good enough. It is solely based on this python implementation.

About this package

This package provides a simple stemmer for Polish language. For provided word it extracts its stem by cutting off its affixes (prefixes and suffixes).

For example:

  • fajni -> fajn
  • chłopców -> chłopc
  • grzecznie -> grzeczn
  • najlepszy -> lep

Installation

npm install stemmer_pl

API

getStem(word: string) -> string

Return stem for given word. If no affixes were cut off it returns the same word.

Usage

import getStem from 'stemmer_pl'

const stem = getStem('fajni')
console.log(stem) // expected output: fajn

License

MIT, see license file

Package Sidebar

Install

npm i stemmer_pl

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

26.1 kB

Total Files

6

Last publish

Collaborators

  • meoke