drime

French rhyme dictionary with web and CLI interface
git clone https://a3nm.net/git/drime/
Log | Files | Refs | README

commit 1ec8172bcb6df8743139d885288ce54bc8174f22
parent 30056a11d28d514a7d0b34f057fe663b774cb30d
Author: Antoine Amarilli <a3nm@a3nm.net>
Date:   Sat, 26 Oct 2013 12:03:26 +0200

fix encoding glitch

Diffstat:
query.py | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/query.py b/query.py @@ -147,8 +147,10 @@ def do_query(word, phon, minsyll, maxsyll, elide, gender, classical, offset, siz and ',' not in row['orig']): continue # don't display the word if it has only one possible origin if classical: - rhyme = Rhyme(word.encode('utf-8'), constraint, phon=[phon]) - rhyme.restrict(Rhyme(row['word'].encode('utf-8'), constraint, phon=[row['phon']])) + rhyme = Rhyme(word.encode('utf-8'), constraint, + phon=[phon.encode('utf-8')]) + rhyme.restrict(Rhyme(row['word'].encode('utf-8'), constraint, + phon=[row['phon'].encode('utf-8')])) if not rhyme.satisfied(): continue # discard words following classical rules row['freq'] = float(row['freq'])