TStr TPorterStemmer::StemX(const TStr& s){ TChA buf = s; buf.ToUc(); int len = buf.Len(); char *p = buf.CStr(); if (len > 1 && p[len - 1] == 'S' && p[len - 2] == '\'') p[len - 2] = '\0'; else if (len > 0 && p[len - 1] == '\'') p[len - 1] = '\0'; return StemInPlace(p); }
TStr TPorterStemmer::Stem(const TStr& s) { TChA buf = s; buf.ToUc(); return StemInPlace(buf.CStr()); }