SwishResult->stem
Stems the given word
&reftitle.description;
arraySwishResult->stem
stringword
&warn.experimental.func;
Stems the word based on the fuzzy mode used during indexing.
Each result object is linked with its index, so the results are based on this index.
&reftitle.parameters;
word
The word to stem.
&reftitle.returnvalues;
Returns array containing the stemmed word variants (usually just one).
&reftitle.errors;
Throws SwishException on error.
&reftitle.examples;
Basic SwishResult->stem example
query("testing OR others");
if ($result = $results->nextResult()) {
var_dump($result->stem("testing")); //the results fully depend on the stemmer used in the index
var_dump($result->stem("others"));
}
} catch (SwishException $e) {
echo "Error: ", $e->getMessage(), "\n";
}
?>
]]>
&example.outputs.similar;
string(4) "test"
}
array(1) {
[0]=>
string(5) "other"
}
]]>