From 209f42a9076a5ca54c80bd7b486a2584407fa930 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Moreno=20Garc=C3=ADa?= Date: Sat, 9 May 2015 15:29:25 +0200 Subject: [PATCH] Update normalize function example --- README.rst | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 386021c..9d81423 100644 --- a/README.rst +++ b/README.rst @@ -49,7 +49,13 @@ It's also possible to send a list of normalizations to apply, which will be exec from normalizr import Normalizr normalizr = Normalizr(language='en') - print(normalizr.normalize('Who let the dog out?', ['whitespaces', 'punctuation'])) + + normalizations = [ + 'remove_extra_whitespaces', + ('replace_punctuation', {'replacement': ' '}) + ] + + print(normalizr.normalize('Who let the dog out?', normalizations)) Output: