From e5607c72eb69be1e1ce2b7dbcd5127bb9ab33e7b Mon Sep 17 00:00:00 2001 From: Albert V Date: Tue, 13 Oct 2015 10:59:25 +0200 Subject: [PATCH] Fix #110 --- pattern/text/fr/inflect.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pattern/text/fr/inflect.py b/pattern/text/fr/inflect.py index e04b7001..dca14c70 100644 --- a/pattern/text/fr/inflect.py +++ b/pattern/text/fr/inflect.py @@ -77,10 +77,16 @@ def pluralize(word, pos=NOUN, custom={}): #### SINGULARIZE ################################################################################### +singular_irregular = { + "yeux": u"œil", +} + def singularize(word, pos=NOUN, custom={}): if word in custom: return custom[word] w = word.lower() + if w in singular_irregular: + return singular_irregular[w] # Common articles, determiners, pronouns: if pos in ("DT", "PRP", "PRP$", "WP", "RB", "IN"): if w == "du" : return "de"