Class FinderIndexerStemmerPorter_En

Description

Porter English stemmer class for the Finder indexer package.

This class was adapted from one written by Richard Heyes. See copyright and link information above.

  • since: 2.5

Located in /administrator/components/com_finder/helpers/indexer/stemmer/porter_en.php (line 22)

FinderIndexerStemmer
   |
   --FinderIndexerStemmerPorter_En
Variable Summary
static string $_regex_consonant
static string $_regex_vowel
Method Summary
static boolean _cvc (string $str)
static boolean _doubleConsonant (string $str)
static integer _m (string $str)
static boolean _replace (string &$str, string $check, string $repl, [integer $m = null])
static string _step1ab (string $word)
static string _step1c (string $word)
static string _step2 (string $word)
static string _step3 (string $word)
static string _step4 (string $word)
static string _step5 (string $word)
string stem (string $token, string $lang)
Variables
static string $_regex_consonant = '(?:[bcdfghjklmnpqrstvwxz]|(?<=[aeiou])y|^y)' (line 30)

Regex for matching a consonant.

  • since: 2.5
  • access: private
static string $_regex_vowel = '(?:[aeiou]|(?<![aeiou])y)' (line 37)

Regex for matching a vowel

  • since: 2.5
  • access: private

Inherited Variables

Inherited from FinderIndexerStemmer

FinderIndexerStemmer::$cache
Methods
static method _cvc (line 434)

Checks for ending CVC sequence where second C is not W, X or Y

  • return: Result
  • since: 2.5
  • access: private
static boolean _cvc (string $str)
  • string $str: String to check
static method _doubleConsonant (line 418)

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.

  • return: Result
  • since: 2.5
  • access: private
static boolean _doubleConsonant (string $str)
  • string $str: String to check
static method _m (line 395)

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

  • return: The m count
  • since: 2.5
  • access: private
static integer _m (string $str)
  • string $str: The string to return the m count for
static method _replace (line 363)

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.

  • return: Whether the $check string was at the end of the $str string. True does not necessarily mean that it was replaced.
  • since: 2.5
  • access: private
static boolean _replace (string &$str, string $check, string $repl, [integer $m = null])
  • string &$str: String to check
  • string $check: Ending to check for
  • string $repl: Replacement string
  • integer $m: Optional minimum number of m() to meet
static method _step1ab (line 91)

Step 1

  • since: 2.5
  • access: private
static string _step1ab (string $word)
  • string $word: The token to stem.
static method _step1c (line 141)

Step 1c

  • since: 2.5
  • access: private
static string _step1c (string $word)
  • string $word: The token to stem.
static method _step2 (line 162)

Step 2

  • since: 2.5
  • access: private
static string _step2 (string $word)
  • string $word: The token to stem.
static method _step3 (line 217)

Step 3

  • since: 2.5
  • access: private
static string _step3 (string $word)
  • string $word: The token to stem.
static method _step4 (line 254)

Step 4

  • since: 2.5
  • access: private
static string _step4 (string $word)
  • string $word: The token to stem.
static method _step5 (line 321)

Step 5

  • since: 2.5
  • access: private
static string _step5 (string $word)
  • string $word: The token to stem.
stem (line 49)

Method to stem a token and return the root.

  • return: The root token.
  • since: 2.5
  • access: public
string stem (string $token, string $lang)
  • string $token: The token to stem.
  • string $lang: The language of the token.

Redefinition of:
FinderIndexerStemmer::stem()
Method to stem a token and return the root.

Inherited Methods

Inherited From FinderIndexerStemmer

FinderIndexerStemmer::getInstance()
FinderIndexerStemmer::stem()

Documentation generated on Mon, 25 Jun 2012 13:58:51 -0500 by phpDocumentor 1.4.4