SkillAgentSearch skills...

Stmr.c

Porter Stemmer algorithm in C

Install / Use

/learn @wooorm/Stmr.c
About this skill

Quality Score

0/100

Supported Platforms

Universal

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

Related

  • stemmer — Same algorithm in JavaScript
  • stmr — CLI in C

License

MIT © Titus Wormer

<!-- Definitions -->
View on GitHub
GitHub Stars46
CategoryDevelopment
Updated9d ago
Forks8

Languages

C

Security Score

95/100

Audited on Mar 22, 2026

No findings