global variable not used correctly.
clemens.tolboom - March 2, 2009 - 16:27
| Project: | Dutch Stemmer |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | postponed (maintainer needs more info) |
Description
There is a global defined variable misalignment. I have to study the other stemmer modules first and write a few test before fixing this.
<?php
function dutchstemmer_step2($word, $r1, $r2) {
// Step 2:
// Delete suffix e if in R1 and preceded by a non-vowel, and then undouble the ending
if ($r1) {
if (preg_match('/(?<=[^aeiouyè])e$/u', $word, $matches, 0, $r1)) {
// TODO: this should be here to make any sense
// global $_dutchstemmer_step2;
$_dutchstemmer_step2= TRUE;
return dutchstemmer_undouble(preg_replace('/e$/u', '', $word, -1, $count));
}
}
return $word;
}
?>