plint

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

commit a3b7355cb271f8d64762aca61b5919900cde5d7f
parent f11618d58b64bc08c07999a4dfc49e5281fa6c99
Author: Antoine Amarilli <a3nm@a3nm.net>
Date:   Sat,  1 Feb 2014 13:23:20 +0100

change feminine

Diffstat:
verse.py | 11+++++------
1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/verse.py b/verse.py @@ -345,12 +345,11 @@ class Verse: if not self.text.endswith('ent'): return ['M'] # verse ends with 'ent' - if not align: - return ['M', 'F'] - if align and align[-2]['weight'] == 0: - return ['F'] # mute -ent - if align and align[-2]['weight'] > 0 and align[-2]['text'] == 'e': - return ['M'] # non-mute "-ent" by the choice of metric + if align: + if align and align[-2]['weight'] == 0: + return ['F'] # mute -ent + if align and align[-2]['weight'] > 0 and align[-2]['text'] == 'e': + return ['M'] # non-mute "-ent" by the choice of metric possible = [] # now, we must check pronunciation? # "tient" vs. "lient" for instance, "excellent"...