JSPM

stemmer_pl

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 38
  • Score
    100M100P100Q77221F
  • License MIT

Stemmer for Polish language. It is based on Porter's stemming algoritm.

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

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