Saturday, October 11, 2014

The word_stem() function

The word_stem() function returns the root stem of the specified varchar word. 

Ex:- select word_stem('catlike');

Result:- Cat

To understand this function one has to understand what is stemming??

A stemmer for English, for example, should identify the string "cats" (and possibly "catlike", "catty" etc.) as based on the root "cat", and "stemmer", "stemming", "stemmed" as based on "stem". A stemming algorithm reduces the words "fishing", "fished", and "fisher" to the root word, "fish". On the other hand, "argue", "argued", "argues", "arguing", and "argus" reduce to the stem "argu" (illustrating the case where the stem is not itself a word or root) but "argument" and "arguments" reduce to the stem "argument".

To know more please refer the below link

http://en.wikipedia.org/wiki/Stemming

No comments :