Repository navigation
Releases: MrRefactoring/multilingual-stemmer
Releases · MrRefactoring/multilingual-stemmer
Release list
v2.2.1
Documentation and package metadata patch for 2.2.0.
Fixed
- Restore English README, changelog, contribution guide, Rust README, and test corpus provenance.
- Restore the English npm package description and translate explanatory third-party notices into English.
- Correct the GitHub release notes for 2.2.0 to English.
v2.2.0
Upgrade to Snowball 3.2.0 with Ukrainian and Early Modern English support. The package now provides 36 algorithms: 35 languages and historical English.
New algorithms
import { ukrainian, earlyModernEnglish, createStemmer, Languages } from 'multilingual-stemmer';
ukrainian('книгами');
earlyModernEnglish('bringeth');
createStemmer('uk')('акварельний');
createStemmer('earlymodernenglish')('bringeth');
createStemmer(Languages.EarlyModernEnglish)('bringeth');Results: книг, bring, акварел, bring, bring.
Changes and compatibility
- Regenerate all algorithms and synchronize the Rust runtime with Snowball 3.2.0.
- French now removes the colloquial elision
z'. Rebuild affected French search indexes so documents and queries use the same algorithm version. - Use
Languages.Xmembers or string identifiers. Specific numeric enum values are not part of the API contract. - The published library supports Node.js ≥22 and browsers. Development and builds require Node.js ≥24.14.
- Update dependencies to TypeScript 7, Vitest 5, pnpm 12, wasm-opt 2 / Binaryen 132, and wasm-bindgen 0.2.129; update GitHub Actions.
- Clear
distbefore builds and include full third-party license notices in the npm package.
Verification
- 63 tests covering all 36 algorithms.
- Install the npm tarball in a clean project and verify all 2,471,881 corpus words on Node.js 22.0.0.
- Validate the TypeScript consumer and a Vite production build in Chrome with 1,264 browser checks.
v2.1.1 — fix broken npm package
Fixed
- The published npm package was missing
dist/browser/— the WASM binary and its glue code —
which made every import fail withERR_MODULE_NOT_FOUND.wasm-packwrites a.gitignore
containing*into its output directory and npm honours nested.gitignorefiles when packing,
so the whole directory was silently dropped from the tarball.prepare.tsnow removes that file
along with the otherwasm-packleftovers. Affects 2.0.0 and 2.1.0, both unusable
v2.1.0 — Snowball 3.1.1, Sesotho, 34 languages
Added
- Sesotho (
st) stemmer — new in Snowball 3.1.0, brings the total to 34 languages - Test corpus
voc_st.txt/res_st.txtfrom snowball-data
Changed
- All stemmers regenerated from Snowball 3.1.1 (were Snowball 3.0.0)
- Stemming results change for words containing apostrophes and elisions in
Danish,
Estonian,Finnish,German,Italian,Lithuanian,NorwegianandPolish English—skisstems toskiagain (regression introduced upstream in Snowball 3.0.0)Danish— undoubling restricted to consonant pairs that actually occur in DanishFinnish— illative fallback now removes-nwhen the vowel before-han/-hen/-hin/-hon/-hän/-hön
does not match; illative form-hunremovedLithuanian—-er-is no longer removed before regular suffixes- Test corpora for
Danish,Estonian,Finnish,French,GermanandNorwegiansynced with snowball-data - Dev dependencies updated:
pnpm 11.19.0,@types/node 22.20.1,tsx 4.23.2,vitest 4.1.10,wasm-pack 0.15.0
Fixed
- Node.js entry no longer logs
using deprecated parameters for the initialization function—
the WASM binary is passed toinit()as{ module_or_path }
Note
Sesothois inserted alphabetically into theLanguagesenum, so the numeric values of
SpanishthroughYiddishshift by one. Code usingLanguages.Xor ISO codes is unaffected;
hardcoded numeric values are not.
v2.0.0
Added
- 16 new languages compiled from Snowball 3.0.1 sources:
Armenian,Basque,Catalan,Czech,Esperanto,Estonian,Hindi,Indonesian,Irish,Lithuanian,Nepali,Norwegian,Persian,Polish,Serbian,Yiddish - Finnish added to supported languages in README (was already implemented)
- Functional API — three levels of usage:
- Named language functions:
russian('бегущий')→'бег' - Factory:
createStemmer('ru')returns a reusable(word: string) => string - Raw:
stem('ru', 'бегущий')
- Named language functions:
- ISO 639-1 code support — pass
'ru','en', etc. alongsideLanguagesenum values - Browser support — conditional exports (
node/browser/default); single--target webWASM build shared by both environments; WASM initializes automatically on import, noinit()call needed - Interactive demo at
demo/index.html— word-by-word stemming diff with 33 language samples - GitHub Actions workflow deploying the demo to GitHub Pages
Changed
- Minimum Node.js version is now 22
- Package is now pure ESM (
"type": "module") — useimportinstead ofrequire - Entire codebase migrated from JavaScript to TypeScript 6 (
module: NodeNext) - SOLID architecture: single-responsibility modules, dependency injection via
iso-map.ts wasm-bindgenupdated from0.2.45to0.2.121- Rust codebase migrated to edition 2024 — removed
extern crate, updated module paths tocrate::prefix - Snowball runtime (
SnowballEnv,Among) replaced with official Snowball 3.0 version:i32positions, newgo_in_grouping/go_out_groupingmethods, all algorithms recompiled from source opt-level = "s"added to release profile (optimize for size)- Test suite migrated to Vitest, one test per language (43 tests total)
packageManagerfield set topnpm@11
Removed
- Class-based
new Stemmer(Languages.X)API (replaced by functional API above) - CommonJS support — package is ESM-only
serde/serde_derivedependencies