PHP Class TextAnalysis\Stemmers\SnowballStemmer

Author: yooper
Inheritance: implements TextAnalysis\Interfaces\IStemmer
Mostrar archivo Open project: yooper/php-text-analysis Class Usage Examples

Protected Properties

Property Type Description
$exceptions array A lookup table for manually setting stems on words
$lang the language specific stemmer to use

Public Methods

Method Description
__construct ( string $lang = 'english', array $exceptions = [] ) Initialize the snowball stemmer
__destruct ( )
stem ( string $token ) : string

Method Details

__construct() public method

Initialize the snowball stemmer
public __construct ( string $lang = 'english', array $exceptions = [] )
$lang string
$exceptions array

__destruct() public method

public __destruct ( )

stem() public method

public stem ( string $token ) : string
$token string
return string

Property Details

$exceptions protected_oe property

A lookup table for manually setting stems on words
protected array $exceptions
return array

$lang protected_oe property

the language specific stemmer to use
protected $lang