| [ Index ] |
|
Code source de CMS made simple 1.0.5 |
[Code source] [Imprimer] [Statistiques]
Copyright (c) 2005 Richard Heyes (http://www.phpguru.org/) All rights reserved.
| Poids: | 415 lignes (12 kb) |
| Inclus ou requis: | 0 fois |
| Référencé: | 0 fois |
| Nécessite: | 0 fichiers |
Classe: PorterStemmer - X-Ref
PHP5 Implementation of the Porter Stemmer algorithm. Certain elements| PorterStemmer() X-Ref |
| Regex for matching a vowel |
| Stem($word) X-Ref |
| Stems a word. Simple huh? param: string $word Word to stem return: string Stemmed word |
| step1ab($word) X-Ref |
| Step 1 |
| step1c($word) X-Ref |
| Step 1c param: string $word Word to stem |
| step2($word) X-Ref |
| Step 2 param: string $word Word to stem |
| step3($word) X-Ref |
| Step 3 param: string $word String to stem |
| step4($word) X-Ref |
| Step 4 param: string $word Word to stem |
| step5($word) X-Ref |
| Step 5 param: string $word Word to stem |
| replace(&$str, $check, $repl, $m = null) X-Ref |
| Replaces the first string with the second, at the end of the string. If third arg is given, then the preceding string must match that m count at least. param: string $str String to check param: string $check Ending to check for param: string $repl Replacement string param: int $m Optional minimum number of m() to meet return: bool Whether the $check string was at the end |
| m($str) X-Ref |
| What, you mean it's not obvious from the name? m() measures the number of consonant sequences in $str. if c is a consonant sequence and v a vowel sequence, and <..> indicates arbitrary presence, <c><v> gives 0 <c>vc<v> gives 1 <c>vcvc<v> gives 2 <c>vcvcvc<v> gives 3 param: string $str The string to return the m count for return: int The m count |
| doubleConsonant($str) X-Ref |
| Returns true/false as to whether the given string contains two of the same consonant next to each other at the end of the string. param: string $str String to check return: bool Result |
| cvc($str) X-Ref |
| Checks for ending CVC sequence where second C is not W, X or Y param: string $str String to check return: bool Result |
| Généré le : Tue Apr 3 18:50:37 2007 | par Balluche grâce à PHPXref 0.7 |