Skip to content

Commit

Permalink
fix: remove pdo and pgi regex
Browse files Browse the repository at this point in the history
One ingredient of the full product can be pdo or cgi, it's not a good
proxy
  • Loading branch information
raphael0202 committed Aug 28, 2023
1 parent 1e36c85 commit 008bd9d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 25 deletions.
2 changes: 0 additions & 2 deletions data/ocr/label_flashtext.txt
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,6 @@ en:vegan||vegan
en:vegan||veganoveganistisch
en:vegan||vegetalien
en:vegan||végétalien
en:pdo||appellation d'origine controlee
en:pdo||appellation d'origine contrôlée
en:french-beef||viande bovine francaise
en:french-beef||viande bovine française
en:french-pork||le porc francais
Expand Down
23 changes: 0 additions & 23 deletions robotoff/prediction/ocr/label.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,19 +72,6 @@ def process_es_bio_label_code(match) -> str:
field=OCRField.full_text_contiguous,
),
],
"en:pgi": [
OCRRegex(
re.compile(
r"indication g[ée]ographique prot[eé]g[eé]e|Indicazione geografica protetta|geschützte geografische angabe",
re.I,
),
field=OCRField.full_text_contiguous,
),
OCRRegex(
re.compile(r"(?<!\w)(?:IGP|BGA|PGI)(?!\w)"),
field=OCRField.full_text_contiguous,
),
],
"fr:label-rouge": [
OCRRegex(
re.compile(r"d[ée]cret du 0?5[./]01[./]07", re.I),
Expand All @@ -95,16 +82,6 @@ def process_es_bio_label_code(match) -> str:
field=OCRField.full_text_contiguous,
),
],
"en:pdo": [
OCRRegex(
re.compile(r"(?<!\w)(?:PDO|AOP|DOP)(?!\w)"),
field=OCRField.full_text_contiguous,
),
OCRRegex(
re.compile(r"appellation d'origine prot[eé]g[eé]e", re.I),
field=OCRField.full_text_contiguous,
),
],
"fr:aoc": [
OCRRegex(
re.compile(r"(?<!\w)(?:AOC)(?!\w)"), field=OCRField.full_text_contiguous
Expand Down

0 comments on commit 008bd9d

Please sign in to comment.