Skip to content

Releases: MrRefactoring/multilingual-stemmer

v2.2.1

Choose a tag to compare

@MrRefactoring MrRefactoring released this 28 Oct 07:27

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.

Full changelog

v2.2.0

Choose a tag to compare

@MrRefactoring MrRefactoring released this 27 Oct 20:27

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.X members 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 dist before 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.

Full changelog

v2.1.1 — fix broken npm package

Choose a tag to compare

@MrRefactoring MrRefactoring released this 03 Aug 08:59

Fixed

  • The published npm package was missing dist/browser/ — the WASM binary and its glue code —
    which made every import fail with ERR_MODULE_NOT_FOUND. wasm-pack writes a .gitignore
    containing * into its output directory and npm honours nested .gitignore files when packing,
    so the whole directory was silently dropped from the tarball. prepare.ts now removes that file
    along with the other wasm-pack leftovers. Affects 2.0.0 and 2.1.0, both unusable

v2.1.0 — Snowball 3.1.1, Sesotho, 34 languages

Choose a tag to compare

@MrRefactoring MrRefactoring released this 03 Aug 08:44

Added

  • Sesotho (st) stemmer — new in Snowball 3.1.0, brings the total to 34 languages
  • Test corpus voc_st.txt / res_st.txt from 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, Norwegian and Polish
  • English — skis stems to ski again (regression introduced upstream in Snowball 3.0.0)
  • Danish — undoubling restricted to consonant pairs that actually occur in Danish
  • Finnish — illative fallback now removes -n when the vowel before -han/-hen/-hin/-hon/-hän/-hön
    does not match; illative form -hun removed
  • Lithuanian — -er- is no longer removed before regular suffixes
  • Test corpora for Danish, Estonian, Finnish, French, German and Norwegian synced 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 to init() as { module_or_path }

Note

  • Sesotho is inserted alphabetically into the Languages enum, so the numeric values of
    Spanish through Yiddish shift by one. Code using Languages.X or ISO codes is unaffected;
    hardcoded numeric values are not.

v2.0.0

Choose a tag to compare

@MrRefactoring MrRefactoring released this 10 May 16:32

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', 'бегущий')
  • ISO 639-1 code support — pass 'ru', 'en', etc. alongside Languages enum values
  • Browser support — conditional exports (node / browser / default); single --target web WASM build shared by both environments; WASM initializes automatically on import, no init() 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") — use import instead of require
  • Entire codebase migrated from JavaScript to TypeScript 6 (module: NodeNext)
  • SOLID architecture: single-responsibility modules, dependency injection via iso-map.ts
  • wasm-bindgen updated from 0.2.45 to 0.2.121
  • Rust codebase migrated to edition 2024 — removed extern crate, updated module paths to crate:: prefix
  • Snowball runtime (SnowballEnv, Among) replaced with official Snowball 3.0 version: i32 positions, new go_in_grouping / go_out_grouping methods, 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)
  • packageManager field set to pnpm@11

Removed

  • Class-based new Stemmer(Languages.X) API (replaced by functional API above)
  • CommonJS support — package is ESM-only
  • serde / serde_derive dependencies