commit f577a1e2f79cfe2365521cf5a0d735be54dcccd2
parent b2880bccf07aaad7809617681689e3f6bb2968fb
Author: Antoine Amarilli <a3nm@a3nm.net>
Date: Fri, 20 Sep 2013 15:14:06 +0200
only elide "-ées" at verse ending, not e.g. "réel"
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/verse.py b/verse.py
@@ -233,8 +233,11 @@ class Verse:
if (pos >= len(self.chunks) - 1
and self.chunks[pos]['text'] in ['ie', 'ée']):
return [1]
+ # elide "-ée" and "-ées", but be specific (beware of e.g. "réel")
if (pos >= len(self.chunks) - 2
- and self.chunks[pos]['text'] in ['ée']):
+ and self.chunks[pos]['text'] == 'ée'
+ and (pos == len(self.chunks) - 1
+ or self.chunks[len(self.chunks)-1]['text'] == 's')):
return [1]
if 'elidable' in self.chunks[pos]:
return [0 if x else 1 for x in self.chunks[pos]['elidable']]