Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/2night/libstemmerd
Browse files Browse the repository at this point in the history
  • Loading branch information
trikko committed Mar 23, 2016
2 parents 3a4b68e + 5c6d367 commit 66c53f9
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,34 @@
# libstemmerd
libstemmer binding for d programming language.

## How to

```d
import std.stdio;
import stemmer;
void main()
{
// Print a list of available languages
writeln("Available languages: ");
foreach(stemmer; Stemmer.list)
writeln(" - ", stemmer);
// Create an english stemmer
Stemmer s = Stemmer("english");
// Try it!
assert(s.stem("testing") == "test");
assert(s.stem("test") == "test");
assert(s.stem("tested") == "test");
assert(s.stem("consist") == "consist");
assert(s.stem("consisted") == "consist");
assert(s.stem("consistency") == "consist");
assert(s.stem("consistent") == "consist");
assert(s.stem("consistently") == "consist");
assert(s.stem("consisting") == "consist");
assert(s.stem("consists") == "consist");
}
```

0 comments on commit 66c53f9

Please sign in to comment.