Have ideas to improve npm?Join in the discussion! »

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

Install

npm i stemmer_pl

DownloadsWeekly Downloads

2

Version

1.0.1

License

MIT

Unpacked Size

26.1 kB

Total Files

6

Last publish

Collaborators

  • avatar