Skip to main content

Module porter

Module porter 

Source
Expand description

Porter (1980) stemming algorithm.

Reference: M. F. Porter, “An Algorithm for Suffix Stripping”, Program 14(3), 1980. Note that this is the original 1980 algorithm, not Porter2 (Snowball English) — they differ on edge cases such as agreed and feedeing. The output is intentionally identical to the upstream UQA stemmer contract so that BM25 doc frequencies match across engines.

Functions§

stem
stem_budgeted
Stem scalar text with reserved scratch/output buffers and cancellation checks.
stem_term_budgeted
Stem a complete lossless term, including isolated surrogate elements.