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.1.1

Published

Word stemming for 34 languages (English, Arabic, Russian, French, German, Spanish, Turkish and more) via Snowball algorithms compiled to WebAssembly. TypeScript-first · Node.js · Browser · Zero dependencies.

Downloads

1,872

Readme


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

english('fruitlessly'); // → 'fruitless'
russian('бегущий');     // → 'бег'
german('laufenden');    // → 'lauf'

| ⚡ Zero config | 🌐 34 languages | 📦 WASM — no native addons | 🔷 TypeScript-first | 🖥 Node + Browser | |:-:|:-:|:-:|:-:|:-:|


Install

npm install multilingual-stemmer
# pnpm add multilingual-stemmer
# yarn add multilingual-stemmer

Requires Node.js ≥ 22. ESM only.


Usage

Named exports — one function per language

The fastest way to get started. Import the language you need and call it directly.

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

english('running');    // → 'run'
english('beautiful'); // → 'beauti'
french('mangeons');   // → 'mange'
spanish('corriendo'); // → 'corr'

Every function is lazy — the WASM stemmer is created on first call and cached automatically.

createStemmer(language) — reusable function

When you stem many words for the same language, create a stemmer once and reuse it:

import { createStemmer } from 'multilingual-stemmer';

const stem = createStemmer('en'); // ISO 639-1 code
const words = ['running', 'runs', 'runner', 'ran'];
words.map(stem); // → ['run', 'run', 'runner', 'ran']

Also accepts Languages enum values:

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

const stem = createStemmer(Languages.Russian);
stem('бегущий'); // → 'бег'

stem(language, word) — one-off

No setup, just call:

import { stem } from 'multilingual-stemmer';

stem('en', 'fruitlessly'); // → 'fruitless'
stem('ru', 'бегущий');     // → 'бег'
stem('de', 'laufenden');   // → 'lauf'

Browser

Works out of the box in Vite, webpack, and any modern bundler. The WASM binary loads automatically on import — no init() call needed.

import { english } from 'multilingual-stemmer';

// That's it. No setup, no init().
document.getElementById('result').textContent = english(inputWord);

TypeScript

Full types are included. The language parameter accepts either an ISO 639-1 string or the Languages enum — your choice.

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

// Both are valid:
stem(Languages.English, 'running');
stem('en', 'running');

// Type-safe ISO codes:
const code: IsoCode = 'ru';
const stemFn: (word: string) => string = createStemmer(code);

Supported languages

Arabic Armenian Basque Catalan Czech Danish Dutch English Esperanto Estonian Finnish French German Greek Hindi Hungarian Indonesian Irish Italian Lithuanian Nepali Norwegian Persian Polish Portuguese Romanian Russian Serbian Sesotho Spanish Swedish Tamil Turkish Yiddish


How it works

Stemming reduces a word to its root form, which is useful for search indexing, text analysis, and NLP pipelines. For example, running, runs, and runner all stem to run.

This package compiles the Snowball stemming algorithms (written in Rust via rust-stemmers) to WebAssembly. The WASM binary ships inside the npm package — no native addons, no build step, no external calls.


License

MIT — see LICENSE.

Based on rust-stemmers by CurrySoftware (MIT) and Snowball 3.1.1 (BSD-3-Clause).