[FONT=Arial]hi [/FONT]?
i use porter algorithm for stemming words (stemming is the process of reducing inflected (or sometimes derived) words to their word stem, base or root form—generally a written word form. The stem need not be identical to the morphological root of the word; it is usually sufficient that related words map to the same stem, even if this stem is not in itself a valid root. for example, should identify the string
“cats” (and possibly “catlike”, “catty” etc.) as based on the root
“cat”, and “stems”, “stemmer”, “stemming”, “stemmed” as based on “stem”.) i hope you understand stemming now,,,
my porter algorithm have some problem,,,like Germany should remain Germany but its turn to “Germani” and family should remain same but changes to “famili” and military and beauty ,,,or “friendly” should turn to “friend” but its change to “friendli” or its make “uniqu” or “awesom” the letter “E” is deleted,,,and many problem like this,,, is there any porter better than this porter algorithm or other algorithm?
its current porter algorithm that i am using:
is exist in this link “
and with this example you can use this class in other files ?
[code=php]
require_once ‘porter.php’;
$stem = PorterStemmer::Stem($word);
$stem_words[] = $stem;
i am waiting for your valuable helps…