Porter's (1980) stemmer strips English suffixes in five steps of rules $(\text{condition})\ S_1 \rightarrow S_2$; within a step only the longest matching suffix is considered. The key condition is the measure $m$ of the remaining stem, its count of vowel-consonant alternations in the form $[C](VC)^m[V]$. So -ing comes off whenever the stem keeps a vowel, but -er only when $m > 1$: warming becomes warm and warmer stays whole. On the 28,390 alphabetic words of Reuters-21578 it leaves 20,906 stems (73.6 percent), mostly through steps 1 and 4. It is not idempotent: 1,134 words (4.0 percent) change again when restemmed. NLTK's default mode disagrees with the original on 590 Reuters words, so an index must record which version built it.
Run on the thesis student's four Arctic sentences in the architecture article, the Porter stemmer turned warms and warming into warm, declining into declin, and climate into climat. It left warmer whole, and it cut ice to ic. What rule strips the ending from warming but spares the one on warmer, and why does ice lose its e? Two rules with different conditions do the first: -ing comes off whenever a vowel is left behind, while -er comes off only from a stem longer, in a sense defined below, than warm. A third rule removes a final e from a stem of measure 1 unless the stem ends consonant-vowel-consonant, as hop does and ic does not.
Martin Porter's suffix-stripping algorithm (Porter, 1980) is short, defined in an eight-page paper, and it is the most common algorithm for stemming English (Manning, Raghavan, and Schütze, 2008, §2.2.4). Its rules are simple, and their power comes from how they are conditioned. Each rule removes or replaces a suffix only if what remains is long enough, measured in a specific way, to be plausibly a stem. That condition is what lets the algorithm turn replacement into replac while leaving cement alone. It is also what keeps the -er on warmer.
Here is the route. First we define the measure, Porter's count of a stem's length. Then we list the five steps of rules, with the examples from Porter's paper. Next we trace whole words, the Arctic words among them. Finally we run the algorithm over the Reuters-21578 vocabulary and look at its faults and variants. Stemming and Lemmatization compares it with other stemmers; this article assumes its terms, such as over-stemming.
Consonants, vowels, and the measure
Here is the idea in one sentence. A suffix may come off only if the stem left behind still contains enough alternations of vowel and consonant, and the measure counts those alternations.
Porter defines a vowel as one of a, e, i, o, u, or a y that follows a consonant. Any other letter is a consonant. So y is a consonant in yes and toy, and a vowel in by and happy.
Write a maximal run of consonants as $C$ and a maximal run of vowels as $V$. Every word then has the form
$$[C](VC)^m[V],$$
an optional initial run of consonants, then $m$ repetitions of a vowel run followed by a consonant run, then an optional final run of vowels. The number $m$ is the measure of the word or stem. Roughly, it counts syllables that end in a consonant. But it is computed from letters alone, not from pronunciation. Porter's examples:
| Measure | Examples |
|---|---|
| $m = 0$ | tr, ee, tree, y, by |
| $m = 1$ | trouble, oats, trees, ivy |
| $m = 2$ | troubles, private, oaten, orrery |
For example, trouble is $C$ (tr) $V$ (ou) $C$ (bl) $V$ (e), which has one $VC$ pair, so $m = 1$.
Computing $m$ by hand takes two passes over the word. First label every letter C or V, using the rule for y. Then count the places where a V is immediately followed by a C. Each such place ends a vowel run and starts a consonant run, so it marks exactly one $VC$ in the form above:
| Word | Letters labeled | Runs | $m$ |
|---|---|---|---|
| tree | CCVV |
$C\,V$ | 0 |
| by | CV |
$C\,V$ | 0 |
| ivy | VCV |
$(VC)\,V$ | 1 |
| happy | CVCCV |
$C\,(VC)\,V$ | 1 |
| trouble | CCVVCCV |
$C\,(VC)\,V$ | 1 |
| troubles | CCVVCCVC |
$C\,(VC)(VC)$ | 2 |
| orrery | VCCVCV |
$(VC)(VC)\,V$ | 2 |
| syzygy | CVCVCV |
$C\,(VC)(VC)\,V$ | 2 |
| generalization | CVCVCVCVCVCVVC |
$C\,(VC)^6$ | 6 |
The y rule is visible in the last rows. In happy the final y follows the consonant p, so it is a vowel. In syzygy the first y follows s and is a vowel, and the z is a consonant. The second y follows z and is a vowel, and so on alternately.
Adding a letter at the end never lowers the measure and raises it by at most one. The label of a letter depends only on the letter itself and, for y, on the letter before it, so appending a letter changes no earlier label. The measure counts the places where a V is immediately followed by a C. The new letter adds one such place if it is a consonant after a vowel, and none otherwise. That is why troubles has $m = 2$ while trouble has $m = 1$: the final s turns the trailing $V$ into a complete $VC$.
Example (the measure of warm). Warm, the stem left if warmer loses its -er, has measure 1. It is labeled CVCC: the consonant w, the vowel a, and the consonants rm. That is $C\,(VC)$, so $m = 1$.
Measures alone do nothing. They become decisions through the conditions attached to each rule.
Rules and conditions
Each rule has the form
$$(\text{condition})\ S_1 \rightarrow S_2,$$
meaning: if the word ends in the suffix $S_1$, and the stem, the part of the word before $S_1$, satisfies the condition, replace $S_1$ with $S_2$. $S_2$ is often empty. Conditions combine the measure with four further tests on the stem:
*S: the stem ends with s;*L,*Tand*Zsay the same of l, t and z;*v*: the stem contains a vowel;*d: the stem ends with a double consonant, such as -tt or -ss;*o: the stem ends consonant-vowel-consonant, where the final consonant is not w, x, or y, as in -wil or -hop.
Example (what *o excludes). Snow, box and tray each end consonant-vowel-consonant, and none satisfies *o, because the final consonants are w, x and y (the y of tray follows a vowel, so it is a consonant). The condition marks short stems that need a final e restored, and the exclusion keeps the e off these three. Filing loses -ing, and since fil has $m = 1$ and satisfies *o, step 1b restores the e to give file. Snowing and boxing lose -ing and stay snow and box, not snowe and boxe.
Within each step, when several rules match, only the one with the longest matching suffix is considered. If its condition fails, nothing in that step applies. The steps run in sequence, each operating on the output of the one before.
The five steps
The steps below list every rule, with Porter's example for each. Each example shows the effect of that rule alone, not the final stem. For instance, relational becomes relate in step 2 and ends as relat after step 5a.
Step 1: plurals and past participles
Step 1a handles plurals:
| Rule | Example |
|---|---|
| SSES → SS | caresses → caress |
| IES → I | ponies → poni, ties → ti |
| SS → SS | caress → caress |
| S → | cats → cat |
Step 1b handles -ed and -ing:
| Rule | Example |
|---|---|
| ($m > 0$) EED → EE | feed → feed, agreed → agree |
(*v*) ED → |
plastered → plaster, bled → bled |
(*v*) ING → |
motoring → motor, sing → sing |
The *v* condition is what keeps bled and sing intact: removing the ending would leave bl or s, which contain no vowel. If the second or third rule succeeds, a cleanup rule restores endings that the removal damaged:
| Rule | Example |
|---|---|
| AT → ATE | conflat(ed) → conflate |
| BL → BLE | troubl(ed) → trouble |
| IZ → IZE | siz(ed) → size |
(*d and not (*L or *S or *Z)) → single letter |
hopp(ing) → hop, tann(ed) → tan, but fall(ing) → fall, hiss(ing) → hiss, fizz(ed) → fizz |
($m = 1$ and *o) → E |
fail(ing) → fail, fil(ing) → file |
Example (rating and declining). Rating loses -ing and gets its e back as rate, but declining, which also loses -ing, does not become decline. Declin does not end in at, bl or iz, and it does not end in a double consonant. That leaves the last cleanup rule, which needs $m = 1$, and declin has $m = 2$. The stem stays declin.
Step 1c turns a final y into i if the stem contains a vowel: happy → happi, but sky → sky.
Step 2: double suffixes to single ones
Every rule in step 2 has the condition $m > 0$:
| Rule | Example | Rule | Example |
|---|---|---|---|
| ATIONAL → ATE | relational → relate | IZATION → IZE | vietnamization → vietnamize |
| TIONAL → TION | conditional → condition | ATION → ATE | predication → predicate |
| ENCI → ENCE | valenci → valence | ATOR → ATE | operator → operate |
| ANCI → ANCE | hesitanci → hesitance | ALISM → AL | feudalism → feudal |
| IZER → IZE | digitizer → digitize | IVENESS → IVE | decisiveness → decisive |
| ABLI → ABLE | conformabli → conformable | FULNESS → FUL | hopefulness → hopeful |
| ALLI → AL | radicalli → radical | OUSNESS → OUS | callousness → callous |
| ENTLI → ENT | differentli → different | ALITI → AL | formaliti → formal |
| ELI → E | vileli → vile | IVITI → IVE | sensitiviti → sensitive |
| OUSLI → OUS | analogousli → analogous | BILITI → BLE | sensibiliti → sensible |
Several examples end in i because step 1c has already turned their final y into i: differently reaches step 2 as differentli.
Step 3: further suffixes
Every rule has the condition $m > 0$:
| Rule | Example |
|---|---|
| ICATE → IC | triplicate → triplic |
| ATIVE → | formative → form |
| ALIZE → AL | formalize → formal |
| ICITI → IC | electriciti → electric |
| ICAL → IC | electrical → electric |
| FUL → | hopeful → hope |
| NESS → | goodness → good |
Step 4: removing suffixes from long stems
Step 4 removes a final suffix when the remaining stem has $m > 1$, which requires at least two $VC$ sequences:
| Suffix | Example | Suffix | Example |
|---|---|---|---|
| AL | revival → reviv | ION (stem ends in s or t) | adoption → adopt |
| ANCE | allowance → allow | OU | homologou → homolog |
| ENCE | inference → infer | ISM | communism → commun |
| ER | airliner → airlin | ATE | activate → activ |
| IC | gyroscopic → gyroscop | ITI | angulariti → angular |
| ABLE | adjustable → adjust | OUS | homologous → homolog |
| IBLE | defensible → defens | IVE | effective → effect |
| ANT | irritant → irrit | IZE | bowdlerize → bowdler |
| EMENT | replacement → replac | ||
| MENT | adjustment → adjust | ||
| ENT | dependent → depend |
The measure condition is what protects short words. Replacement loses -ement because the remaining stem replac has $m = 2$. Cement keeps it, because the remainder would be c, with $m = 0$. Here the longest-match rule matters as well. -ement is the longest matching suffix, and once its condition fails, the shorter -ment and -ent are not tried.
Example (warmer). Step 4 does not remove the -er of warmer. The rule needs $m > 1$, and warm has $m = 1$, as computed above. Warmer reaches the end of the algorithm unchanged.
Step 5: tidying up
Step 5a removes a final e:
| Rule | Example |
|---|---|
| ($m > 1$) E → | probate → probat, rate → rate |
($m = 1$ and not *o) E → |
cease → ceas |
Step 5b reduces a final double l: ($m > 1$ and *d and *L) → single letter, so controll → control but roll → roll.
The rules are now complete. The next section shows how they combine on whole words.
Worked traces
Running whole words through all five steps shows how the steps combine.
The Arctic words
| Word | Step | Rule applied | Result |
|---|---|---|---|
| warms | 1a | S → | warm |
| warming | 1b | ING → (stem warm contains a vowel) | warm |
| warmer | 4 | ER → needs $m > 1$; warm has $m = 1$ | warmer |
| declining | 1b | ING → (stem declin, $m = 2$, so no cleanup) | declin |
| climate | 5a | E → (stem climat, $m = 2$) | climat |
| ice | 5a | E → (stem ic, $m = 1$, ends vowel-consonant, so not *o) |
ic |
So warming loses its ending because step 1b asks only for a vowel, and warmer keeps its own because step 4 asks for $m > 1$.
generalizations
| Step | Rule applied | Result |
|---|---|---|
| 1a | S → | generalization |
| 2 | IZATION → IZE (stem general, $m = 3$) | generalize |
| 3 | ALIZE → AL (stem gener, $m = 2$) | general |
| 4 | AL → (stem gener, $m = 2$) | gener |
The final stem is gener. Generous reaches the same stem more quickly. Step 1a removes its final s, as it would from any plural, and step 4 removes the remaining -ou from gener ($m = 2$). General and generous are therefore merged, an over-stemming error.
hopefulness
| Step | Rule applied | Result |
|---|---|---|
| 2 | FULNESS → FUL (stem hope, $m = 1$) | hopeful |
| 3 | FUL → (stem hope, $m = 1$) | hope |
| 5a | E → needs $m > 1$, or $m = 1$ and not *o; hop has $m = 1$ and ends consonant-vowel-consonant |
hope (unchanged) |
The *o condition keeps the final e, because hop with the e removed would look like a different word.
relational
| Step | Rule applied | Result |
|---|---|---|
| 2 | ATIONAL → ATE (stem rel, $m = 1$) | relate |
| 4 | ATE → needs $m > 1$; rel has $m = 1$ | relate (unchanged) |
| 5a | E → (stem relat, $m = 2$) | relat |
conditional
| Step | Rule applied | Result |
|---|---|---|
| 2 | TIONAL → TION (stem condi, $m = 1$) | condition |
| 4 | ION → needs $m > 1$ and a stem ending in s or t; condit has $m = 2$ and ends in t | condit |
Step 2 deliberately turns -tional into -tion rather than removing it. Step 4 can then treat conditional exactly as it treats condition, and both end as condit. Step 2's other rules follow the same design: they reduce a compound suffix to a simpler one that a later step already knows how to remove.
rating
| Step | Rule applied | Result |
|---|---|---|
| 1b | ING → (stem rat contains a vowel); cleanup AT → ATE | rate |
| 4 | ATE → needs $m > 1$; r has $m = 0$ | rate (unchanged) |
| 5a | E → needs $m > 1$, or $m = 1$ and not *o; rat has $m = 1$ and ends consonant-vowel-consonant |
rate (unchanged) |
The cleanup rules of step 1b restore the e that -ing removal destroyed, so that rating and rate meet at rate. The *o condition in step 5a then keeps that e, for the same reason as in hopefulness. Compare hopping, where the cleanup instead removes a doubled consonant. Hopp becomes hop, the same stem as hop and hops.
agreed and feed
| Word | Step | Rule applied | Result |
|---|---|---|---|
| agreed | 1b | EED → EE (stem agr, $m = 1$) | agree |
| agreed | 5a | E → (stem agre, $m = 1$, ends in a vowel, so not *o) |
agre |
| feed | 1b | EED → EE needs $m > 0$; f has $m = 0$ | feed |
Because -eed is the longest matching suffix of feed, the rule for -ed is never considered, and feed survives intact rather than becoming fe.
controlling
| Step | Rule applied | Result |
|---|---|---|
| 1b | ING → (stem controll contains a vowel); the double l is kept, since the cleanup exempts l, s, and z | controll |
| 5b | LL → L (word controll, $m = 2$) | control |
Step 1b keeps the double l so that falling can become fall rather than fal. Step 5b removes it later, and only for words long enough ($m > 1$) that the result is still plausible: controll becomes control, while fall stays fall.
happiness, formality and electrical
None of the traces above passes through step 1c into step 2, or through step 3 into step 4. These three do.
| Word | Step | Rule applied | Result |
|---|---|---|---|
| happiness | 1a | SS → SS (the identity rule; the word is unchanged) | happiness |
| happiness | 3 | NESS → (stem happi, $m = 1$) | happi |
| formality | 1c | Y → I (stem formalit contains a vowel) | formaliti |
| formality | 2 | ALITI → AL (stem form, $m = 1$) | formal |
| formality | 4 | AL → needs $m > 1$; form has $m = 1$ | formal |
| electrical | 3 | ICAL → IC (stem electr, $m = 2$) | electric |
| electrical | 4 | IC → (stem electr, $m = 2$) | electr |
Happiness ends as happi, the stem that step 1c gives happy, so the noun and the adjective meet. Formality reaches step 2 only because step 1c has first turned its y into i: the rule is written for -aliti, not -ality. Electrical shows step 3 preparing a suffix for step 4, as step 2 did for conditional. Electricity ends at the same electr.
All these stems were checked against the NLTK implementation of the original algorithm, and the traces were produced by tools/experiments/textproc/porter_trace.py.
The demo below runs the same algorithm in the browser. It labels each letter of a word C or V and brackets the $VC$ pairs that make up the measure. For every step it lists:
- the rule with the longest matching suffix;
- the stem that rule would leave, and that stem's measure;
- whether the condition holds.
The button feeds the current stem back in, which shows the non-idempotence discussed below.
The traces show single words. The next section measures the algorithm on a whole vocabulary.
Strengths and faults
Porter's own evaluation reduced a vocabulary of 10,000 words to 6,370 distinct stems, shrinking the vocabulary by about a third. On the Cranfield 200 test collection, retrieval with its stems was slightly better than with a much more elaborate suffix-removal system, though the difference was small (Porter, 1980). The vocabulary reduction measures conflation, not retrieval effectiveness.
The algorithm needs no dictionary and runs in one pass per step. It conflates far less aggressively than iterative stemmers such as Lancaster. Its typical errors are described in stemming and lemmatization: over-stemming derived words such as general and generous, and under-stemming irregular forms such as ran and run. The original algorithm also gives odd results on some short words: news becomes new, was becomes wa, and ice becomes ic.
The algorithm on a real vocabulary
Run over the 28,390 distinct alphabetic words of the Reuters-21578 newswire collection, the algorithm produces 20,906 distinct stems, 73.6 percent of the vocabulary. That is a smaller reduction than in Porter's own test, which kept 63.7 percent (6,370 stems from 10,000 words). The likely reason is that a news vocabulary contains many names and abbreviations that carry no suffixes. Just over half the words, 14,669, are changed at all. Of these, 11,177 are changed by a single step, 2,895 by two, 557 by three, and 40 by four.
Example (rules against work). Steps 2 and 3 hold 27 of the algorithm's suffix rules, against 19 in step 4, and do little of its work: they change 3.5 and 1.4 percent of the words. The compound suffixes they handle, such as -ization and -fulness, are rare. The figure shows how the work divides among the steps:
The bulk of the conflation comes from the plural and -ed/-ing rules of step 1 and from step 4. (These counts come from tools/experiments/textproc/porter_stats.py.)
One further property matters in practice: the algorithm is not idempotent. Applying it to its own output can shorten a stem further, so university becomes univers, and univers becomes univ. The reason is that a stem can end in letters that look like a suffix. univers ends in s, which step 1a removes, leaving univer. That ends in -er, which step 4 removes, since univ has $m = 2$. This is not rare. Of the 28,390 Reuters words, 1,134 (4.0 percent) have stems that change when stemmed again, among them some of the most frequent words in the collection:
| Word | Stem | Stem of the stem |
|---|---|---|
| increase | increas |
increa |
| because | becaus |
becau |
| japanese | japanes |
japan |
| financial | financi |
financ |
| agreed | agre |
agr |
| proposal | propos |
propo |
| use | us |
u |
Of those 1,134 words, 1,076 settle after one more pass, 57 after two, and one after three. That one is a misspelling, rapeseeed, the longest chain in the collection: it becomes rapesee, rapese, rapes, and finally rape. Code that stems a term that has already been stemmed will look up the wrong term, as my first indexer did. That article counts 1,060 such words among 27,959, or 3.8 percent, where this one counts 1,134 among 28,390. Both counts are of Reuters-21578. They differ because the vocabularies come from different tokenizers (a regular expression here, NLTK's tokenizer with a letters-only filter there) and because this article uses the original algorithm and that one NLTK's default mode, described next.
A subtler mismatch arises between two versions of the algorithm.
Implementations and variants
Porter later observed that many published implementations of his algorithm contained errors, and he distributed reference implementations to address this (Porter, 2001). Those reference implementations themselves depart from the published rules in three minor points, which Porter lists on his algorithm page, adding that they may go back to the program from which the published algorithm was derived:
- they add a step 2 rule LOGI → LOG, so that archaeology meets archaeological;
- they replace ABLI → ABLE with BLI → BLE, so that possibly meets possible;
- they leave words of one or two letters alone.
The third point matters for very common words. A one-letter word passes through the published algorithm unchanged in any case, but a two-letter word can lose a final s in step 1a: the published rules turn as into a and is into i, and the reference programs leave both whole. This site's stemmer, app/porter.py, follows the published rules and has no length test, so it stems is to i, as NLTK's original mode does. The site's search index adds the reference programs' length test around it, stemming only words of three or more letters, because by the published rules a stray s would stem to the empty string and es to e; How This Search Works traces the stemmer's place in that index.
"The Porter stemmer" can therefore mean the published algorithm or the reference code. Even correct implementations may differ deliberately. NLTK's PorterStemmer, for instance, applies by default a set of extensions to the original algorithm, and an option selects the original (NLTK Project, documentation of nltk.stem.porter). The two modes give different stems for some words:
| Word | Original algorithm | NLTK default |
|---|---|---|
| dying | dy |
die |
| skies | ski |
sky |
| news | new |
news |
| ice | ic |
ice |
An index built with one mode and queried with the other will silently fail to match such words. The differences are not confined to curiosities. On the Reuters vocabulary the two modes disagree on 590 words (2.1 percent), and many of them are common. The original algorithm reduces is to i, they to thei, may to mai, and today to todai, where NLTK's default leaves them whole. The Snowball English stemmer disagrees with the original on 1,160 words (4.1 percent), including was and has, which the original reduces to wa and ha.
These counts come from tools/experiments/textproc/porter_stats.py. It also checks that the traced implementation used for this article agrees with NLTK's original mode and with this site's own stemmer on 251,369 words. Recording the exact stemmer and mode with the index is part of the analysis consistency described in designing a modular search engine.
Porter's own revision, the English stemmer of the Snowball project and often called Porter2, fixes several faults of the original. For example, it leaves news and dying as news and die. On his algorithm page Porter recommends it for practical work. He describes the original as frozen, and still the right choice for experiments that must be exactly repeatable.
Worked problems
The second and third problems are exercises from chapter 2 of the course text (Manning, Raghavan, and Schütze, 2008), restated and solved in our own words. The first and fourth are posed on this article's rules. Every label, measure and stem is checked by tools/experiments/textproc/porter_trace.py, which also confirms that the site's own stemmer gives the same stems.
Problem 1. Find the measure of private, oaten, yes, crying, arctic and seabird.
Solution. The measures are 2, 2, 1, 1, 2 and 2. Label each letter, then count the places where a V is immediately followed by a C.
| Word | Letters labeled | V-then-C places | $m$ |
|---|---|---|---|
| private | CCVCVCV |
i-v, a-t | 2 |
| oaten | VVCVC |
a-t, e-n | 2 |
| yes | CVC |
e-s | 1 |
| crying | CCVVCC |
i-n | 1 |
| arctic | VCCCVC |
a-r, i-c | 2 |
| seabird | CVVCVCC |
a-b, i-r | 2 |
The y rule decides two of them. In yes the y is the first letter, follows no consonant, and is a consonant. In crying it follows the consonant r and is a vowel, so yi is one vowel run and the word has a single $VC$. The final vowel of private adds nothing, because no consonant follows it.
Problem 2 (Exercise 2.4 of the course text). The rule group of step 1a is SSES → SS, IES → I, SS → SS, S → (empty). (a) What is the identity rule SS → SS for? (b) What does this group alone make of circus, canaries and boss? (c) What rule would stem pony to match ponies? (d) The stems of ponies and pony look odd. Does that harm retrieval?
Solution. (a) It protects words ending in -ss. Only the rule with the longest matching suffix is considered, and for caress or boss that is SS → SS, which changes nothing. Without it the longest match would be S →, and caress would become cares.
(b) Circus becomes circu, canaries becomes canari, and boss stays boss. Circus ends in a single s after u, so only S → matches. Canaries ends in -ies, the longest match, which becomes i. Boss ends in -ss and is caught by the identity rule. The first result is an error of this rule group: circus is not a plural.
(c) A rule Y → I. Ponies becomes poni by IES → I, and pony is untouched by step 1a, so the two would stay apart. Porter's algorithm has the rule as step 1c, with the condition that the stem contains a vowel: pon does, so pony becomes poni as well.
(d) No. A stem is a key for matching and is never shown to a user. What matters is that the forms of a word reach the same key and that unrelated words do not. poni joins pony and ponies, which is the purpose, so nothing is lost by its not being a word.
Problem 3 (Exercise 2.3). The Porter stemmer gives each of the following pairs one stem. Verify that, and say which pairs should not be conflated: abandon and abandonment; absorbency and absorbent; marketing and markets; university and universe; volume and volumes.
Solution. All five pairs do share a stem, and the fourth pair, with some queries the third, should be kept apart.
| Pair | Rules that fire | Common stem |
|---|---|---|
| abandon, abandonment | none; step 4 MENT → (stem abandon, $m = 3$) | abandon |
| absorbency, absorbent | 1c Y → I, 2 ENCI → ENCE, 4 ENCE → (stem absorb, $m = 2$); 4 ENT → | absorb |
| marketing, markets | 1b ING → (stem market contains a vowel); 1a S → | market |
| university, universe | 1c Y → I, 4 ITI → (stem univers, $m = 3$); 5a E → | univers |
| volume, volumes | 5a E → (stem volum, $m = 2$); 1a S →, then 5a E → | volum |
Abandon and abandonment, absorbency and absorbent, and volume and volumes are forms of one concept, and a searcher for one wants the other. University and universe have unrelated meanings, so this conflation only lowers precision; it is the over-stemming error named in Stemming and Lemmatization. Marketing and markets are related by derivation, but a query about marketing, the business activity, gains little from documents about stock markets, so this pair helps some queries and harms others. The judgment is about meaning and is not something the rules can make.
Problem 4. Trace sensibilities through the algorithm, and compare its stem with that of sensible.
Solution. Both end as sensibl.
| Step | Rule applied | Result |
|---|---|---|
| 1a | IES → I | sensibiliti |
| 2 | BILITI → BLE (stem sensi, $m = 1$) | sensible |
| 4 | IBLE → needs $m > 1$; sens has $m = 1$ | sensible (unchanged) |
| 5a | E → (stem sensibl, $m = 2$) | sensibl |
Step 1a produces the -biliti ending that step 2 is written for, and step 2 turns the noun into the adjective. From there the word is treated exactly as sensible is: step 4 finds -ible but leaves it, because sens has only one $VC$, and step 5a removes the final e, because sensibl is labeled CVCCVCC and has $m = 2$. A second pass leaves sensibl unchanged, so this stem is one of the 96 percent that are stable under restemming.
What we have learned
The Porter stemmer is five steps of suffix rules, and its judgment lies in the conditions. The measure $m$ counts vowel-consonant alternations in what a rule would leave. Requiring $m > 1$ keeps the -er on warmer and the -ement on cement. On Reuters the algorithm keeps 73.6 percent of the vocabulary as distinct stems, does most of its work in steps 1 and 4, and is not idempotent. Its versions differ on enough common words that an index must record which one built it.
Every word here was spelled correctly. A query with a typing error in it matches no term, however it is stemmed. The next article, Spelling Correction and Phonetic Matching, establishes how a system finds the word the user meant: by edit distance to the dictionary's terms, then by frequency.
References
- Manning, C. D., Raghavan, P., and Schütze, H. (2008). Introduction to Information Retrieval, section 2.2.4. Cambridge University Press. record · 102 pages
- NLTK Project. Documentation of the module
nltk.stem.porter. https://www.nltk.org/api/nltk.stem.porter.html record - Porter, M. F. (1980). An algorithm for suffix stripping. Program, 14(3), 130–137. record · 6 pages
- Porter, M. F. (2001). Snowball: A language for stemming algorithms. https://snowballstem.org/texts/introduction.html record · 2 pages
- Porter, M. F. The Porter stemming algorithm. https://tartarus.org/martin/PorterStemmer/ record
Reviewed: verified, 16 Nov 2026 · citations checked, 16 Nov 2026 · editorial review, 23 Nov 2026 · 10 revisions