homophones

find homophones in French
git clone https://a3nm.net/git/homophones/
Log | Files | Refs

commit b67f3475fbccee6566774c793dae6037ff725897
parent 03e442aae8bead9ed958bf83dc9d5be2ce18f308
Author: Antoine Amarilli <a3nm@a3nm.net>
Date:   Thu, 10 May 2018 00:20:56 +0200

use definition

Diffstat:
homophones.py | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/homophones.py b/homophones.py @@ -34,6 +34,9 @@ total_groups = 0 for k in sorted(phons, key=(lambda x: max(y[5] for y in phons[x]))): v = phons[k] + #if len(set([x[6] for x in v])) < 2: + if len(set([x[1] for x in v])) < 2: + continue if len(set([x[6] for x in v])) < 2: continue print(" + ".join(("%s (%s %s %s)" % (w[0], w[2], w[3], w[4]) for w in v)))