| 1 |
<?php |
<?php |
| 2 |
// $Id: porterstemmer.test,v 1.1.2.3 2009/10/21 23:39:54 jhodgdon Exp $ |
// $Id: porterstemmer.test,v 1.1.2.4 2009/10/21 23:47:22 jhodgdon Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 30 |
|
|
| 31 |
// See if the PECL stemming library is installed |
// See if the PECL stemming library is installed |
| 32 |
|
|
| 33 |
$this->has_pecl_stem = FALSE; |
$this->has_pecl_stem = _porterstemmer_pecl_loaded(); |
|
|
|
|
if (extension_loaded( 'stem')) { |
|
|
$this->has_pecl_stem = TRUE; |
|
|
} |
|
|
else { |
|
|
// dynamic loading of extensions is going away in PHP 6, so leave this |
|
|
// check here! |
|
|
if (function_exists( 'dl' )) { |
|
|
$this->has_pecl_stem = dl('stem.so'); |
|
|
} |
|
|
} |
|
|
|
|
|
$this->has_pecl_stem = $this->has_pecl_stem && |
|
|
function_exists('stem_english'); |
|
|
|
|
| 34 |
} |
} |
| 35 |
|
|
| 36 |
/** |
/** |