Martin Porter’s Stemming algorithm as a C CLI. There’s also an API: stmr(3).
clib:
clib install wooorm/stmr
Or clone the repo, then make install
.
Usage: stmr [options] file
Options:
-h, --help output usage information
-v, --version output version number
-e, --eval string output stemmed word
Usage:
# stem a word
$ stmr -e nationalism
# nation
# print stems
$ stmr in.txt
# write stems to out.txt
$ stmr in.txt > out.txt
# stdin and stdout
$ echo "Internationalise" | stmr
# internationalis