| Commit | Line | Data |
|---|---|---|
| 7e5dbb93 | 1 | |
| a4ce718f JH |
2 | GENERAL INFORMATION |
| 3 | ------------------- | |
| 7e5dbb93 | 4 | |
| fae24be6 JH |
5 | This module implements the Porter-Stemmer algorithm, version 2, to improve |
| 6 | English-language searching with the Drupal built-in Search module. Information | |
| 7 | about the algorithm can be found at | |
| a4ce718f | 8 | http://snowball.tartarus.org/algorithms/english/stemmer.html |
| 7e5dbb93 | 9 | |
| fae24be6 JH |
10 | Stemming reduces a word to its basic root or stem (e.g. 'blogging' to 'blog') so |
| 11 | that variations on a word ('blogs', 'blogger', 'blogging', 'blog') are | |
| 12 | considered equivalent when searching. This generally results in more relevant | |
| 13 | results. | |
| a4ce718f | 14 | |
| 9e4f7505 JH |
15 | Note that a few parts of the Porter Stemmer algorithm work better for American |
| 16 | English than British English, so some British spellings will not be stemmed | |
| 17 | correctly. | |
| a4ce718f | 18 | |
| 73ea7032 | 19 | This module will use the PECL "stem" library's implementation of the Porter |
| fae24be6 JH |
20 | Stemmer algorithm, if it is installed on your server. If the PECL "stem" library |
| 21 | is not available, the module uses its own PHP implementation of the | |
| 73ea7032 JH |
22 | algorithm. The output is the same in either case. More information about the |
| 23 | PECL "stem" library: http://pecl.php.net/package/stem | |
| 24 | ||
| a4ce718f JH |
25 | |
| 26 | INSTALLATION | |
| 27 | ------------ | |
| fae24be6 | 28 | |
| a4ce718f JH |
29 | See the INSTALL.txt file for installation instructions. |
| 30 | ||
| 31 | ||
| 32 | TESTING | |
| 33 | ------- | |
| 34 | ||
| fae24be6 JH |
35 | The Porter Stemmer module includes tests for the stemming algorithm and |
| 36 | functionality. If you would like to run the tests, enable the core Testing | |
| 37 | module, and then navigate to Administer > Configuration / Development / Testing. | |
| a4ce718f | 38 | |
| fae24be6 JH |
39 | Each "Stemming output" test for the Porter Stemmer module includes approximately |
| 40 | 2000 individual word stemming tests (which test the module against a standard | |
| 41 | word list downloaded from the site above). Due to the way output is displayed | |
| 42 | in SimpleTest, you may run into browser timeout or memory issues if you try to | |
| 43 | run all 16 of the "Stemming output" tests during the same test run. | |
| 73ea7032 JH |
44 | |
| 45 | Tests are provided both for the internal algorithm and the PECL library. | |
| fae24be6 JH |
46 | |
| 47 | There are also functional tests and tests for some of the internal steps of the | |
| 48 | stemming algorithm. |