Merge remaining head into default
authorvincent.michel@logilab.fr
Tue, 22 Oct 2013 15:57:16 +0200
changeset 363 73f8afbe485d
parent 344 2bc47c2b1c0f (current diff)
parent 182 59d328a2a35f (diff)
child 364 a9a447c59ced
Merge remaining head into default
normalize.py
--- a/normalize.py	Tue Oct 22 15:56:01 2013 +0200
+++ b/normalize.py	Tue Oct 22 15:57:16 2013 +0200
@@ -108,6 +108,9 @@
         2) Set the sentence to lower case
         3) Remove punctuation
     """
+    if not isinstance(sentence, basestring):
+        return sentence
+
     if lemmas:
         sentence = lemmatized(sentence, lemmas)
     sentence = sentence.lower()