pypi / snowballstemmer
snowballstemmer
What changed in snowballstemmer 2 to 3, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-26.
18 breaking1 deprecations31 new APIs and options1 performance11 behavior and defaults5 tooling23 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initsnowballstemmer 356 changes
Breaking changes 15
The compiler now emits an error when output to stdout is requested, because some target languages require multiple output files.
Generated Ada stemmer names are prefixed with S_ to avoid collisions with Ada keywords.
The command no longer prints the chosen stemmer to stdout, so stemmed output is not preceded by extra text.
These Snowball commands now update the slice end when modifying text.
The compiler reports division by zero for $x /= 0 and continues after reporting a division-by-zero error instead of exiting immediately.
Finnish stemming now handles apostrophes, improves illative fallback, allows ø with -hön, and removes the illative form -hun.
insert '' is now warned about as a no-op and generates no code.
Generated Java classes no longer implement Serializable, reflecting concerns about this serialization approach.
Generated Javascript code now uses modules and classes, with the way among functions are called reworked.
Changes suffix handling, removes trailing apostrophes as a final step, and no longer removes -er- before normal suffixes.
The option now specifies the import name for the base class in generated stemmers, and defaults to B.
Polish stemming now removes an optional apostrophe after removing a suffix.
Python's generated stem external is no longer hard-coded with an underscore; the build now uses -eprefix _ to keep it non-public as stemWord() calls it.
The compiler now rejects -vprefix for target languages that do not support it; it is currently implemented only for C/C++.
C variable access generated with -vprefix now uses getter functions instead of macro magic, changing the syntax for accessing Snowball variables from C.
Deprecations 1
The compiler now emits warnings when legacy Snowball language features are used.
New APIs and options 11
The make variable ARFLAGS can specify flags for ar; its default flags are now -cr.
Using - as the Snowball source file now reads source from standard input.
Adds coverage tracking for exercised among strings, functions, and grouping characters.
A Czech stemming algorithm has been added.
A Persian (Farsi) stemming algorithm has been added.
A PHP code generator has been added; it requires PHP 8.3 or later.
A Polish stemming algorithm has been added.
Set SAVETMP=1 with make check_utf8 to save output as tmp.txt on error for debugging.
A Sesotho stemming algorithm has been added.
This make variable allows passing compiler options such as -comments and -coverage during development and debugging.
A Zig backend has been added; it requires Zig 0.16.0 or later.
Performance 1
Eligible variables are generated as target-language locals rather than global or object state, reducing stemmer state and often access overhead.
Behavior and default changes 7
attach '' is now warned about as a no-op and generates no code.
The -c++ target now generates C++ classes, uses C++ bool and loop-variable scoping, and throws exceptions for allocation failures and internal errors.
The option is now supported for every target language, allowing external names that collide with target-language keywords to be prefixed.
Javascript generators now generate public functions for all externals.
The output option is optional; without it, outputs use the first source filename with target-appropriate extensions.
The output path may include an extension, allowing an alternative generated source extension such as .cxx, .cc, or .cpp.
The input and output options are now optional; unknown arguments are reported with usage, and command-line parsing errors exit with status 1.
Tooling 2
A make target was added to assist comparing generated code before and after a compiler change.
A Dart code generator has been added.
Fixes and other changes 19
Fixes a segmentation fault that could occur after reporting an error for a string command without a string variable name or string literal.
The package adds a classifier indicating support for Python 3.14.
The compiler now checks the right-hand expression of an integer test for variable uses, preventing incorrect localisation of integer variables whose values should persist between function calls.
Fix forwarding to PyStemmer, which previously called a method PyStemmer does not provide.
<- now updates the slice end.
The Snowball debug command now works for Ada using generated GNAT-specific code.
The Snowball debug command now works out of the box in generated C/C++ code without changing a runtime preprocessor conditional.
Danish stemming now handles apostrophes and restricts undoubling to valid cases, reducing potential damage to foreign words.
delete now updates the slice end.
Restores the skis → ski exception and adjusts handling of some words starting with inter.
Estonian stemming now handles apostrophes.
German stemming now handles apostrophes.
Italian stemming now handles elisions.
Norwegian stemming now handles apostrophes.
Fix invalid generated Pascal code for tail calls and calls to routines which always fail.
The flawed optimization is no longer applied, avoiding incorrect generated code when loop failure does not preserve the cursor.
The slice is now specified to be unset after =S, matching the state at program start.
Generated code for all target languages now restores the limit correctly after setlimit tomark.
The input and output options are now genuinely optional, matching the command syntax.
snowballstemmer 234 changes
Breaking changes 3
The algorithm is adjusted not to mangle numbers and tends to leave foreign words alone.
The algorithm now uses Portuguese suffixes instead of incorrect Spanish suffixes.
The algorithm now normalizes ё to е before stemming, which changes results when callers do not already perform that normalization.
New APIs and options 20
An Arabic stemming algorithm is added.
A Basque stemming algorithm is added.
A C# code generator is added, allowing Snowball algorithms to generate C# code.
A Catalan stemming algorithm is added.
A Greek stemming algorithm is added.
The compiler now supports the conventional help option.
A Hindi stemming algorithm is added.
An Indonesian stemming algorithm is added.
An Irish stemming algorithm is added.
A Javascript code generator is added, allowing Snowball algorithms to generate Javascript code.
This Snowball command measures Unicode length consistently across -utf8, -widechars, and default modes; under -utf8 it is O(n) in string length.
This Snowball command measures Unicode length consistently across -utf8, -widechars, and default modes; under -utf8 it is O(n) in string length.
A Lithuanian stemming algorithm is added.
A Nepali stemming algorithm is added.
A Pascal code generator is added, allowing Snowball algorithms to generate Pascal code.
A Python code generator is added, allowing Snowball algorithms to generate Python code.
A Rust code generator is added, allowing Snowball algorithms to generate Rust code.
A Tamil stemming algorithm is added.
String definitions can now use Unicode codepoints with the {U+1234} notation.
The compiler now supports the conventional version option.
Behavior and default changes 4
Relational operators in parentheses after
$can compare any two arithmetic expressions, avoiding a temporary variable in cases such as$(len > 3).The default classname is now derived from the output filename, so
-nis often no longer needed.Java SnowballProgram objects are now serializable.
The compiler accepts multiple source files, including files placed after or interspersed with options.
Tooling 3
A make target is added to run tests for Java.
A Go code generator is added, allowing Snowball algorithms to generate Go code.
In the C libstemmer_c distribution, this target now removes examples/*.o.
Fixes and other changes 4
The algorithm no longer mangles alphanumeric codes, including codes ending in a double digit.
French suffixes are recognized even when they begin with diaereses, and the algorithm versions were consolidated based on the Unicode version.
The header can now be included from C++ code through conditional extern "C".
C/C++ commands that inspect character values now fully handle 4-byte UTF-8 sequences, and grouping handling for a 3-byte sequence in backwardmode is fixed.