Skip to content

Commit 9107ca8

Browse files
committed
Update Readme.md for changes
1 parent e8cbff3 commit 9107ca8

File tree

1 file changed

+19
-28
lines changed

1 file changed

+19
-28
lines changed

Readme.md

Lines changed: 19 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,39 @@
1-
# stmr(1) [![Build Status](https://img.shields.io/travis/wooorm/stmr.c.svg?style=flat)](https://travis-ci.org/wooorm/stmr.c) [![Coverage Status](https://img.shields.io/coveralls/wooorm/stmr.c.svg?style=flat)](https://coveralls.io/r/wooorm/stmr.c?branch=master)
1+
# stmr([3](http://en.wikipedia.org/wiki/Man_page#Manual_sections)) [![Build Status](https://img.shields.io/travis/wooorm/stmr.c.svg?style=flat)](https://travis-ci.org/wooorm/stmr.c) [![Coverage Status](https://img.shields.io/coveralls/wooorm/stmr.c.svg?style=flat)](https://coveralls.io/r/wooorm/stmr.c?branch=master)
22

3-
Martin Porter’s Stemming algorithm<sup>[1](http://tartarus.org/martin/PorterStemmer/)</sup>.
3+
Martin Porter’s Stemming algorithm<sup>[1](http://tartarus.org/martin/PorterStemmer/)</sup> as a C library. There’s also a CLI: [stmr(1)](https://github.com/wooorm/stmr).
44

5-
In fact, this is just a refactored version of the [initial ANCI C implementation](http://tartarus.org/martin/PorterStemmer/c.txt), with a nice CLI.
5+
In fact, this is just a refactored version of the [initial ANCI C implementation](http://tartarus.org/martin/PorterStemmer/c.txt).
66

77
## Installation
88

9-
```
10-
$ make install
11-
```
12-
139
CLib:
14-
```
10+
```sh
1511
$ clib install wooorm/stmr.c
1612
```
1713

18-
## Usage
19-
20-
```
21-
Usage: stmr [options] file
14+
Ore clone the repo.
2215

23-
Options:
16+
## Usage
2417

25-
-h, --help output usage information
26-
-v, --version output version number
27-
-e, --eval string output stemmed word
18+
### int stem(char *pointer, int start, int end);
2819

29-
Usage:
20+
```c
21+
#include <stdio.h>
22+
#include <string.h>
23+
#include "stmr.h"
3024

31-
# stem a word
32-
$ stmr -e nationalism
33-
# nation
25+
int
26+
main(int argc, char **argv) {
27+
char *word = argv[1];
3428

35-
# print stems
36-
$ stmr in.txt
29+
int end = stem(word, 0, strlen(word) - 1);
3730

38-
# write stems to out.txt
39-
$ stmr in.txt > out.txt
31+
word[end + 1] = 0;
4032

41-
# stdin and stdout
42-
$ echo "Internationalise" | stmr
43-
# internationalis
33+
printf("%s", word);
34+
}
4435
```
4536
4637
## License
4738
48-
MIT © Titus Wormer
39+
MIT © [Titus Wormer](http://wooorm.com)

0 commit comments

Comments
 (0)