plint

French poetry validator (local mirror of https://gitlab.com/a3nm/plint)
git clone https://a3nm.net/git/plint/
Log | Files | Refs | README

commit d7c04b0f6cbf165720881422f20cadc60eabe641
parent 7cdf3686f96e9e7bfd191bed623b5e5ade0e0519
Author: Antoine Amarilli <a3nm@a3nm.net>
Date:   Sun, 27 Jul 2014 12:27:59 +0200

final 'Y' can cause hiatus

thanks to Robert Rapilly, <57D82C09-8FBA-42F2-A238-B688692258C1@orange.fr>

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

diff --git a/verse.py b/verse.py @@ -255,7 +255,7 @@ class Verse: if self.chunks[i+1][0]['text'][0] in consonants: w[-1]['error'] = "ambiguous" self.chunks[i+1][0]['error'] = "ambiguous" - elif is_vowels(w[-1]['text']) and not w[-1]['text'].endswith('e'): + elif (is_vowels(w[-1]['text']) or w[-1]['text'] == 'Y') and not w[-1]['text'].endswith('e'): if (is_vowels(self.chunks[i+1][0]['text']) and 'no_hiatus' not in self.chunks[i+1][0].keys()): if ''.join(x['text'] for x in w) not in no_hiatus: