Skip to content

wooorm/stmr.c

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

stmr(3) Build Status Coverage Status

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

In fact, this is just a refactored version of the initial ANCI C implementation.

Installation

CLib:

$ clib install wooorm/stmr.c

Ore 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);
}

License

MIT © Titus Wormer

About

Porter Stemmer algorithm in C

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published