From 1b36d2a4b4d04eaea480037d0456767200dba73e Mon Sep 17 00:00:00 2001 From: Thibaut Horel Date: Mon, 9 Mar 2015 16:03:44 -0400 Subject: Add fun stuff --- fun/lemm.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 fun/lemm.py (limited to 'fun/lemm.py') 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 -- cgit v1.2.3-70-g09d2