aboutsummaryrefslogtreecommitdiffstats
path: root/fun/lemm.py
diff options
context:
space:
mode:
authorThibaut Horel <thibaut.horel@gmail.com>2015-03-09 16:03:44 -0400
committerThibaut Horel <thibaut.horel@gmail.com>2015-03-09 16:03:44 -0400
commit1b36d2a4b4d04eaea480037d0456767200dba73e (patch)
treef04a5977dd38d24db3e42a62dc9f681c2607fd1a /fun/lemm.py
parent843f75943d25f4e180493142b6da0968621b9a78 (diff)
downloadcascades-1b36d2a4b4d04eaea480037d0456767200dba73e.tar.gz
Add fun stuff
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