plint

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

commit 77d59b81ce5a54fe2d19da183ae6fd7f5f8f83b8
parent 372ea0312a650e0c546a759226eb72daf8ad36e0
Author: Antoine Amarilli <a3nm@a3nm.net>
Date:   Mon,  1 Aug 2011 02:13:39 -0400

woops, feminine detection was off

Diffstat:
metric.py | 7+++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/metric.py b/metric.py @@ -49,9 +49,12 @@ def feminine(align, verse): for a in sure_end_fem: if verse.endswith(a): return ['F'] - if verse.endswith('ent') and align[-2][1] == 0: + if not verse.endswith('ent'): + return ['M'] + # verse ends with 'ent' + if align[-2][1] == 0: return ['F'] # mute -ent - if verse.endswith('ent') and align[-2][1] > 0 and align[-2][0] == 'e': + if align[-2][1] > 0 and align[-2][0] == 'e': return ['M'] # non-mute "-ent" by the choice of metric # and now, what? "tient" vs. "lient" for instance, # TODO check pronunciation? :-/