[Normalize] Add docstring to simplify()
authorSimon Chabot <simon.chabot@logilab.fr>
Wed, 24 Oct 2012 11:43:11 +0200
changeset 39 123be7546415
parent 38 9bcbce18a9ae
child 40 80b7baba500d
[Normalize] Add docstring to simplify()
normalize.py
--- a/normalize.py	Wed Oct 24 11:52:22 2012 +0200
+++ b/normalize.py	Wed Oct 24 11:43:11 2012 +0200
@@ -43,6 +43,12 @@
     return unormalize(sentence).lower()
 
 def simplify(sentence, lemmas = None, removeStopWords = True):
+    """ Simply the given sentence
+        0) If removeStopWords, then remove the stop word
+        1) If lemmas are given, the sentence is lemmatized
+        2) Set the sentence to lower case
+        3) Remove punctuation
+    """
     if lemmas:
         sentence = lemmatized(sentence, lemmas)
     sentence = sentence.lower()