Stmr.c Save

Porter Stemmer algorithm in C

Project README

stmr(3) Build Status Coverage Status

Martin Porter’s Stemming algorithm as a C library. There’s also a CLI: stmr(1).

Installation

clib:

clib install wooorm/stmr.c

Or clone the repo.

Usage

int stem(char *pointer, int start, int end)

#include <stdio.h>
#include <string.h>
#include "stmr.h"

int
main(int argc, char **argv) {
  char *word = argv[1];

  int end = stem(word, 0, strlen(word) - 1);

  word[end + 1] = 0;

  printf("%s", word);
}
  • stemmer — Same algorithm in JavaScript
  • stmr — CLI in C

License

MIT © Titus Wormer

Open Source Agenda is not affiliated with "Stmr.c" Project. README Source: wooorm/stmr.c
Stars
36
Open Issues
0
Last Commit
3 years ago
Repository
License
MIT

Open Source Agenda Badge

Open Source Agenda Rating