stemmer_pl
v1.0.1
Published
Stemmer for Polish language. It is based on Porter's stemming algoritm.
Downloads
44
Readme
stemmer_pl
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