Question

I am trying to implement porter stemming algorithm but i am stuck at this point:

Step 1b

(m>0) EED -> EE                    feed      ->  feed
                                   agreed    ->  agree
(*v*) ED  ->                       plastered ->  plaster
                                   bled      ->  bled
(*v*) ING ->                       motoring  ->  motor
                                   sing      ->  sing

Isn't the m of feed equal 1? feed >> [c]vvc[] >>[c]vc[].

If it was so why didn't he convert feed to fee i know it is wrong ,can any one clear that up?

you can check the original algorithim here http://tartarus.org/~martin/PorterStemmer/def.txt

thanks

Was it helpful?

Solution

m of 'feed' is indeed 1. Yet, you need to re-read the document carefully. The m in the condition refers to the measure of the stem, that is you need to calculate in after the replacement. In your case to check if feed -> fee is valid, you calculate m(fee) = 0, hence you don't do the replacement.

Also thanks for the algorithm! It was interesting!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top