Delicious Bookmark this on Delicious Share on Facebook SlashdotSlashdot It! Digg! Digg



PHP : Function Reference : Swish Functions : SwishResult->stem

SwishResult->stem

Stems the given word ()
array SwishResult->stem ( string word )

Example 2512. Basic () example

<?php

try {

   
$swish = new Swish("ext/swish/tests/index.swish-e");
   
$results = $swish->query("testing OR others");

   if (
$result = $results->nextResult()) {
       
var_dump($result->stem("testing")); //the results fully depend on the stemmer used in th index
       
var_dump($result->stem("others"));
   }

} catch (
SwishException $e) {
   echo
"Error: ", $e->getMessage(), "\n";
}

?>

The above example will output something similar to:

array(1) {
 [0]=>
 string(4) "test"
}
array(1) {
 [0]=>
 string(5) "other"
}

Change Language


Follow Navioo On Twitter
Swish::__construct
Swish->getMetaList
Swish->getPropertyList
Swish->prepare
Swish->query
SwishResult->getMetaList
SwishResult->stem
SwishResults->getParsedWords
SwishResults->getRemovedStopwords
SwishResults->nextResult
SwishResults->seekResult
SwishSearch->execute
SwishSearch->resetLimit
SwishSearch->setLimit
SwishSearch->setPhraseDelimiter
SwishSearch->setSort
SwishSearch->setStructure
eXTReMe Tracker