plint

French poetry validator
git clone https://a3nm.net/git/plint/
Log | Files | Refs | README

commit f63c32115d7651f9e80f039fc2659d05e8b0dda6
parent e36b56e8f044e93ff97f66966588dd5de13de3d1
Author: Antoine Amarilli <a3nm@a3nm.net>
Date:   Sat, 21 Dec 2013 00:41:21 +0100

move diaeresis import to the required function only

Diffstat:
vowels.py | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vowels.py b/vowels.py @@ -4,7 +4,6 @@ """Compute the number of syllabes taken by a vowel chunk""" from common import strip_accents -from diaeresis import lookup def clear(x): return (x['text'] + ' ') if 'wordend' in x else x['text'] @@ -41,6 +40,7 @@ def make_query(chunks, pos): ''.join([x[::-1] for x in cleared[:pos][::-1]])) def possible_weights_ctx(chunks, pos): + from diaeresis import lookup chunk = chunks[pos] q = make_query(chunks, pos) #print (q)