diff options
| author | Thibaut Horel <thibaut.horel@gmail.com> | 2015-03-09 16:03:44 -0400 |
|---|---|---|
| committer | Thibaut Horel <thibaut.horel@gmail.com> | 2015-03-09 16:03:44 -0400 |
| commit | 1b36d2a4b4d04eaea480037d0456767200dba73e (patch) | |
| tree | f04a5977dd38d24db3e42a62dc9f681c2607fd1a /fun/lemm.py | |
| parent | 843f75943d25f4e180493142b6da0968621b9a78 (diff) | |
| download | cascades-1b36d2a4b4d04eaea480037d0456767200dba73e.tar.gz | |
Add fun stuff
Diffstat (limited to 'fun/lemm.py')
| -rwxr-xr-x | fun/lemm.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/fun/lemm.py b/fun/lemm.py new file mode 100755 index 0000000..e854524 --- /dev/null +++ b/fun/lemm.py @@ -0,0 +1,10 @@ +#! /usr/bin/python2 +from nltk.stem import WordNetLemmatizer +import sys + +wnl = WordNetLemmatizer() + +for word in sys.stdin: + word = word.strip() + word = wnl.lemmatize(word) + print word |
