aboutsummaryrefslogtreecommitdiffstats
path: root/fun/lemm.py
diff options
context:
space:
mode:
Diffstat (limited to 'fun/lemm.py')
-rwxr-xr-xfun/lemm.py10
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