From 2b91a296047d333563aa8295acf674d2032b0c4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Bournhonesque?= Date: Fri, 10 Nov 2023 16:40:47 +0100 Subject: [PATCH] update ingredient postprocessing patterns --- robotoff/prediction/ingredient_list/postprocess.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/robotoff/prediction/ingredient_list/postprocess.py b/robotoff/prediction/ingredient_list/postprocess.py index 37f8fd6988..bbb0c0bb3c 100644 --- a/robotoff/prediction/ingredient_list/postprocess.py +++ b/robotoff/prediction/ingredient_list/postprocess.py @@ -8,14 +8,20 @@ ASTERISK_SYMBOL = r"((\* ?=?|\(¹\)|\") ?)" FROM_ORGANIC_FARMING_FR = r"issus? de l'agriculture (biologique|bio|durable)" ORGANIC_MENTIONS_RE = re.compile( + # fr rf"{ASTERISK_SYMBOL}?ingr[ée]dients?( agricoles?)? {FROM_ORGANIC_FARMING_FR}" rf"|{ASTERISK_SYMBOL}?produits? {FROM_ORGANIC_FARMING_FR}" rf"|{ASTERISK_SYMBOL}?{FROM_ORGANIC_FARMING_FR}" + # en rf"|{ASTERISK_SYMBOL}organic( farming)?" + # de rf"|{ASTERISK_SYMBOL}?aus biologischer landwirtschaft" + # es rf"|{ASTERISK_SYMBOL}?procedentes del cultivo ecol[óo]gico" rf"|{ASTERISK_SYMBOL}?de cultivo ecol[óo]gico certificado" - rf"|{ASTERISK_SYMBOL}?ingredientes? ecol[óo]gicos?", + rf"|{ASTERISK_SYMBOL}?ingredientes? ecol[óo]gicos?" + # it + rf"|{ASTERISK_SYMBOL}?biologico", re.I, )