@@ -27,6 +27,16 @@ namespace stemming
27
27
28
28
@par Algorithm:
29
29
30
+ <b>Step 0:</b>
31
+
32
+ - Replace ß with ss, ae with ä, oe with ö, ue with ü (unless preceded by q).
33
+
34
+ The rules here for ae, oe and ue were
35
+ added in Snowball 2.3.0, but were previously present as a variant of the
36
+ algorithm termed"german2". The condition on the replacement of ue prevents
37
+ the unwanted changing of quelle. Also note that feuer is not modified
38
+ because the first part of the rule changes it to feUer, so ue is not found.
39
+
30
40
<b>Step 1:</b>
31
41
32
42
Search for the longest among the following suffixes:
@@ -70,8 +80,9 @@ namespace stemming
70
80
class german_stem final : public stem<string_typeT>
71
81
{
72
82
public:
73
- german_stem () noexcept : m_transliterate_umlauts(false ) {}
74
- /* * @brief Set to true to use the variant algorithm that expands "ä" to "ae", etc...
83
+ /* * @brief Set to @c true (the default) to use the algorithm that expands "ä" to "ae", etc...
84
+ @details This should only be @c false if preferring to use the German algorithm prior
85
+ to the Snowball 2.3.0 standard.
75
86
@param transliterate_umlauts Whether to transliterate umlauted vowels.*/
76
87
void should_transliterate_umlauts (const bool transliterate_umlauts)
77
88
{ m_transliterate_umlauts = transliterate_umlauts; }
@@ -361,7 +372,7 @@ namespace stemming
361
372
}
362
373
}
363
374
}
364
- bool m_transliterate_umlauts;
375
+ bool m_transliterate_umlauts{ true } ;
365
376
};
366
377
}
367
378
0 commit comments