npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

multilingual-stemmer

v2.2.1

Published

Word stemming for 35 languages and Early Modern English via 36 Snowball 3.2.0 algorithms compiled to WebAssembly. TypeScript · Node.js · Browser · Zero dependencies.

Readme

import { english, ukrainian, earlyModernEnglish } from 'multilingual-stemmer';

english('running');
ukrainian('книгами');
earlyModernEnglish('bringeth');

Results: run, книг, bring.

Install

npm install multilingual-stemmer

Requires Node.js ≥ 22. ESM only.

Usage

Named language functions

Each algorithm is available as a named function. Its WASM stemmer instance is created on the first call and cached.

import { english, russian, french } from 'multilingual-stemmer';

english('fruitlessly');
russian('бегущий');
french('mangeons');

Results: fruitless, бег, mange.

createStemmer(language)

The factory returns a reusable function for stemming words with the selected algorithm.

import { createStemmer, Languages } from 'multilingual-stemmer';

const stemUkrainian = createStemmer('uk');
const stemHistoricalEnglish = createStemmer('earlymodernenglish');
const stemEnglish = createStemmer(Languages.English);

stemUkrainian('акварельний');
stemHistoricalEnglish('bringeth');
stemEnglish('running');

Results: акварел, bring, run. Early Modern English is also available through Languages.EarlyModernEnglish.

stem(language, word)

import { stem, Languages } from 'multilingual-stemmer';

stem('uk', 'книгами');
stem('earlymodernenglish', 'bringeth');
stem(Languages.Ukrainian, 'акварельний');

Select an algorithm using an ISO 639-1 code, a Languages.X member, or the earlymodernenglish identifier for historical English. Numeric enum values are implementation details and are not guaranteed to remain stable between versions. Use string identifiers when saving configuration.

Algorithms expect lowercase words. Tokenization and case normalization are the caller’s responsibility.

Browser

The browser export condition selects the browser entry point. WASM initializes automatically on import through top-level await; no separate init() call is needed. Your bundler must support ESM, top-level await, and .wasm assets referenced with new URL(..., import.meta.url).

import { ukrainian, earlyModernEnglish } from 'multilingual-stemmer';

const result = ukrainian('книгами');
const historicalResult = earlyModernEnglish('bringeth');

TypeScript

Type declarations are included. IsoCode contains the ISO 639-1 codes of 35 languages; Language also accepts Languages.X members and earlymodernenglish.

import { createStemmer } from 'multilingual-stemmer';
import type { IsoCode, Language } from 'multilingual-stemmer';

const code: IsoCode = 'uk';
const variant: Language = 'earlymodernenglish';
const stem = createStemmer(variant);

Supported algorithms

| Language / variant | String identifier | Function | |---|---|---| | Arabic | ar | arabic | | Armenian | hy | armenian | | Basque | eu | basque | | Catalan | ca | catalan | | Czech | cs | czech | | Danish | da | danish | | Dutch | nl | dutch | | Early Modern English | earlymodernenglish | earlyModernEnglish | | English | en | english | | Esperanto | eo | esperanto | | Estonian | et | estonian | | Finnish | fi | finnish | | French | fr | french | | German | de | german | | Greek | el | greek | | Hindi | hi | hindi | | Hungarian | hu | hungarian | | Indonesian | id | indonesian | | Irish | ga | irish | | Italian | it | italian | | Lithuanian | lt | lithuanian | | Nepali | ne | nepali | | Norwegian | no | norwegian | | Persian | fa | persian | | Polish | pl | polish | | Portuguese | pt | portuguese | | Romanian | ro | romanian | | Russian | ru | russian | | Serbian | sr | serbian | | Sesotho | st | sesotho | | Spanish | es | spanish | | Swedish | sv | swedish | | Tamil | ta | tamil | | Turkish | tr | turkish | | Ukrainian | uk | ukrainian | | Yiddish | yi | yiddish |

Early Modern English is a separate historical variant. Use en, Languages.English, or english for modern English.

Upgrading to 2.2.0

Snowball 3.2.0 removes the French colloquial elision z', changing the stems of affected words. Rebuild affected French search indexes so documents and queries use the same algorithm version.

See CHANGELOG.md for the full release history.

How it works

Snowball algorithm sources are compiled to Rust and then to WebAssembly with wasm-pack. TypeScript 7 compiles the wrapper that provides language functions and the stemmer factory for Node.js and browsers. The npm package includes the WASM binary. Development requires Node.js ≥ 24.14; the published library supports Node.js ≥ 22.

Stemming maps different word forms to a common stem for search and text analysis. The stem is not necessarily a dictionary word; stemming is different from lemmatization.

License

The project’s own code is licensed under MIT; see LICENSE. It uses rust-stemmers and Snowball 3.2.0. Full third-party copyright notices and license terms are included in THIRD_PARTY_NOTICES, which ships with the npm package.