PorterStemFilter
所謂Stemming,可以稱為詞根化,這里有個(gè)overview。在英語這樣的拉丁語系里面,單詞有多種變形。比如加上-ed、-ing、-ly等等。在分詞的時(shí)候,如果能夠把這些變形單詞的詞根找出了,對搜索結(jié)果是很有幫助的。Stemming算法有很多了,三大主流算法是Porter stemming algorithm、Lovins stemming algorithm、Lancaster (Paice/Husk) stemming algorithm,還有一些改進(jìn)的或其它的算法。這個(gè)PorterStemFilter里面調(diào)用的一個(gè)PorterStemmer就是Porter Stemming algorithm的一個(gè)實(shí)現(xiàn)。
所謂Stemming,可以稱為詞根化,這里有個(gè)overview。在英語這樣的拉丁語系里面,單詞有多種變形。比如加上-ed、-ing、-ly等等。在分詞的時(shí)候,如果能夠把這些變形單詞的詞根找出了,對搜索結(jié)果是很有幫助的。Stemming算法有很多了,三大主流算法是Porter stemming algorithm、Lovins stemming algorithm、Lancaster (Paice/Husk) stemming algorithm,還有一些改進(jìn)的或其它的算法。這個(gè)PorterStemFilter里面調(diào)用的一個(gè)PorterStemmer就是Porter Stemming algorithm的一個(gè)實(shí)現(xiàn)。