Package Exports
- stemmer_pl
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (stemmer_pl) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
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_plAPI
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: fajnLicense
MIT, see license file