From 3c4f2a3e8285da1cf304c820dd8c64f9466d51db Mon Sep 17 00:00:00 2001 From: wvengen Date: Mon, 29 Mar 2021 16:58:13 +0200 Subject: [PATCH] Add abbreviation for "half om half" --- lib/food_ingredient_parser/loose/scanner.rb | 4 ++-- lib/food_ingredient_parser/strict/grammar/common.treetop | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/food_ingredient_parser/loose/scanner.rb b/lib/food_ingredient_parser/loose/scanner.rb index 9548e47..7b4bdcc 100644 --- a/lib/food_ingredient_parser/loose/scanner.rb +++ b/lib/food_ingredient_parser/loose/scanner.rb @@ -23,8 +23,8 @@ class Scanner www\.[-_\/:%.A-Za-z0-9]+ )/xi, *%w[ - a.o.p b.g.a b.o.b c.a c.i d.e d.m.v d.o.c d.o.p d.s e.a e.g e.u f.i.l f.o.s i.a - i.d i.e i.g.m.e i.g.p i.m.v i.o i.v.m l.s.l n.a n.b n.o n.v.t o.a o.b.v p.d.o + a.o.p b.g.a b.o.b c.a c.i d.e d.m.v d.o.c d.o.p d.s e.a e.g e.u f.i.l f.o.s h.o.h + i.a i.d i.e i.g.m.e i.g.p i.m.v i.o i.v.m l.s.l n.a n.b n.o n.v.t o.a o.b.v p.d.o p.g.i q.s s.l s.s t.o.v u.h.t v.g v.s w.a w.o w.v vit denat alc vol conc subsp min max ca ].map {|s| /\A#{Regexp.escape(s)}\b\.?/i} diff --git a/lib/food_ingredient_parser/strict/grammar/common.treetop b/lib/food_ingredient_parser/strict/grammar/common.treetop index 5127499..d327261 100644 --- a/lib/food_ingredient_parser/strict/grammar/common.treetop +++ b/lib/food_ingredient_parser/strict/grammar/common.treetop @@ -102,6 +102,7 @@ module FoodIngredientParser::Strict::Grammar 'e.u'i / 'f.i.l'i / 'f.o.s'i / + 'h.o.h'i / 'i.a'i / 'i.d'i / 'i.e'i /