diff options
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 |
