food_ingredient_parser 1.1.1 → 1.1.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 41da81db767bedd583db2794f44d39d710ddef58
4
- data.tar.gz: 9bc24f8e83d04fb608e8fba4364aa26117fd898b
2
+ SHA256:
3
+ metadata.gz: e65fb234a122c893fcb4de453e4cac07851d5000b848fa99d2b356002e187a60
4
+ data.tar.gz: c72d35c6fc978a6ddc139e3adf2059c24104221627f04857ba73aad159b29a0f
5
5
  SHA512:
6
- metadata.gz: 7634ebb4a8f3530cab515c5b27d2782df8c2521eb79df67ecbe08945360bcc27d68456d389d69a83808792145ecfb7094b3b97b5c33cbb17119642449813df88
7
- data.tar.gz: 3b5c5ed78b7c4e41211855523acaf2a4c519b0e021a32eb698a715f7dccf2beacde229593d8422b71ce7a5a55dc1e266347d263c6629a72cdb308556697f7d93
6
+ metadata.gz: 295728820e893f1277bb06cfdad572df1fde9d496df230caf55f41b23d124677131b004a5ca0b2a2e4a25b2273f98feb18840c47c6361ec474082d66d4fde7fb
7
+ data.tar.gz: 0ca48100273055b6c8f6e1d89bd1b44976e325cc9633080d6570e52cb6ef5d07dd419013d9b9aff67f95b6e4fac6ae12396c9248123daf4902d3eb97d84d1b28
data/README.md CHANGED
@@ -65,10 +65,10 @@ Usage: bin/food_ingredient_parser [options] --file|-f <filename>
65
65
  -s, --string INGREDIENTS Parse specified ingredient list.
66
66
  -q, --[no-]quiet Only show summary.
67
67
  -p, --parsed Only show lines that were successfully parsed.
68
+ -n, --noresult Only show lines that had no result.
68
69
  -r, --parser PARSER Use specific parser (strict, loose).
69
70
  -e, --[no-]escape Escape newlines
70
71
  -c, --[no-]color Use color
71
- -n, --noresult Only show lines that had no result.
72
72
  -v, --[no-]verbose Show more data (parsed tree).
73
73
  --version Show program version.
74
74
  -h, --help Show this help
@@ -185,10 +185,23 @@ So if you only use the stable interface (`parse`, `to_h` and `to_html`), you can
185
185
  to e.g. `~> 1.0`. If you depend on more, lock your version against e.g. `~> 1.0.0` and test when you
186
186
  upgrade to `1.1`.
187
187
 
188
+ ## Languages
189
+
190
+ While most of the parsing is language-independent, some parts need knowledge about certain words
191
+ (like abbreviations and amount specifiers). The gem was developed with ingredient lists in Dutch (nl),
192
+ plus a bit of English and German. Support for other languages is already good, but lacks in certain
193
+ areas: improvements are welcome (starting with a corpus in [data/](data/)).
194
+
195
+ Many ingredient lists from the USA are structured a bit differently than those from Europe, they
196
+ parse less well (that that's a matter of tine-tuning).
197
+
188
198
  ## Test data
189
199
 
190
- [`data/ingredient-samples-nl`](data/ingredient-samples-nl) contains about 150k
200
+ [`data/ingredient-samples-qm-nl`](data/ingredient-samples-qm-nl) contains about 150k
191
201
  real-world ingredient lists found on the Dutch market. Each line contains one ingredient
192
202
  list (newlines are encoded as `\n`, empty lines and those starting with `#` are ignored).
193
- The strict parser currently parses about three quarter, while the loose parser returns
194
- something for all of them.
203
+ The strict parser currently parses 80%, while the loose parser returns something for all of them.
204
+
205
+ ## License
206
+
207
+ This software is distributed under the [MIT license](LICENSE). Data may have a [different license](data/README.md).
@@ -41,8 +41,10 @@ def parse_single(s, parsed=nil, parser:, verbosity: 1, print: nil, escape: false
41
41
  if parsed
42
42
  puts(parsed.inspect) if verbosity > 1
43
43
  pp(parsed.to_h, color: color) if verbosity > 0
44
+ return true
44
45
  else
45
46
  puts "(no result: #{parser.parser.failure_reason})" if verbosity > 0
47
+ return false
46
48
  end
47
49
  end
48
50
 
@@ -63,6 +65,7 @@ def parse_file(path, parser:, verbosity: 1, print: nil, escape: false, color: fa
63
65
  pct_parsed = 100.0 * count_parsed / (count_parsed + count_noresult)
64
66
  pct_noresult = 100.0 * count_noresult / (count_parsed + count_noresult)
65
67
  puts "parsed #{colorize(color && "1;32", count_parsed)} (#{pct_parsed.round(1)}%), no result #{colorize(color && "1;31", count_noresult)} (#{pct_noresult.round(1)}%)"
68
+ return count_noresult
66
69
  end
67
70
 
68
71
  verbosity = 1
@@ -88,10 +91,10 @@ OptionParser.new do |opts|
88
91
 
89
92
  opts.on("-q", "--[no-]quiet", "Only show summary.") {|q| verbosity = q ? 0 : 1 }
90
93
  opts.on("-p", "--parsed", "Only show lines that were successfully parsed.") {|p| print = :parsed }
94
+ opts.on("-n", "--noresult", "Only show lines that had no result.") {|p| print = :noresult }
91
95
  opts.on("-r", "--parser PARSER", "Use specific parser (#{PARSERS.keys.join(", ")}).") {|p| parser_name = p&.downcase&.to_sym }
92
96
  opts.on("-e", "--[no-]escape", "Escape newlines") {|e| escape = !!e }
93
97
  opts.on("-c", "--[no-]color", "Use color") {|e| color = !!e }
94
- opts.on("-n", "--noresult", "Only show lines that had no result.") {|p| print = :noresult }
95
98
  opts.on("-v", "--[no-]verbose", "Show more data (parsed tree).") {|v| verbosity = v ? 2 : 1 }
96
99
  opts.on( "--version", "Show program version.") do
97
100
  puts("food_ingredient_parser v#{FoodIngredientParser::VERSION}")
@@ -108,8 +111,10 @@ if strings.any? || files.any?
108
111
  STDERR.puts("Please specify one of the known parsers: #{PARSERS.keys.join(", ")}.")
109
112
  exit(1)
110
113
  end
111
- strings.each {|s| parse_single(s, parser: parser, verbosity: verbosity, print: print, escape: escape, color: color) }
112
- files.each {|f| parse_file(f, parser: parser, verbosity: verbosity, print: print, escape: escape, color: color) }
114
+ success = true
115
+ strings.each {|s| success &= parse_single(s, parser: parser, verbosity: verbosity, print: print, escape: escape, color: color) }
116
+ files.each {|f| success &= parse_file(f, parser: parser, verbosity: verbosity, print: print, escape: escape, color: color) == 0 }
117
+ success or exit(1)
113
118
  else
114
119
  STDERR.puts("Please specify one or more --file or --string arguments (see --help).")
115
120
  end
@@ -4,6 +4,7 @@ module FoodIngredientParser
4
4
  def self.clean(s)
5
5
  s.gsub!("\u00ad", "") # strip soft hyphen
6
6
  s.gsub!("\u0092", "'") # windows-1252 apostrophe - https://stackoverflow.com/a/15564279/2866660
7
+ s.gsub!("‚", ",") # normalize unicode comma
7
8
  s.gsub!("aÄs", "aïs") # encoding issue for maïs
8
9
  s.gsub!("ï", "ï") # encoding issue
9
10
  s.gsub!("ë", "ë") # encoding issue
@@ -2,6 +2,7 @@ require_relative '../cleaner'
2
2
  require_relative 'scanner'
3
3
  require_relative 'transform/amount'
4
4
  require_relative 'transform/handle_missing_name'
5
+ require_relative 'transform/split_e_numbers'
5
6
 
6
7
  module FoodIngredientParser::Loose
7
8
  class Parser
@@ -20,6 +21,7 @@ module FoodIngredientParser::Loose
20
21
  s = FoodIngredientParser::Cleaner.clean(s) if clean
21
22
  n = Scanner.new(s).scan
22
23
  n = Transform::Amount.transform!(n) if n
24
+ n = Transform::SplitENumbers.transform!(n) if n
23
25
  n = Transform::HandleMissingName.transform!(n) if n && normalize
24
26
  n
25
27
  end
@@ -4,16 +4,31 @@ module FoodIngredientParser::Loose
4
4
  class Scanner
5
5
 
6
6
  SEP_CHARS = "|;,.".freeze
7
- MARK_CHARS = "¹²³⁴⁵ᵃᵇᶜᵈᵉᶠᵍªº⁽⁾†‡•°#^*".freeze
7
+ MARK_CHARS = "¹²³⁴⁵ᵃᵇᶜᵈᵉᶠᵍªº⁽⁾†‡•°▪◊#^˄*~".freeze
8
8
  PREFIX_RE = /\A\s*(ingredients|contains|ingred[iï][eë]nt(en)?(declaratie)?|bevat|dit zit er\s?in|samenstelling|zutaten)\b\s*[:;.]?\s*/i.freeze
9
- NOTE_RE = /\A\b(dit product kan\b|deze verpakking kan\b|kan sporen\b.*?\bbevatten\b|voor allergenen\b|allergenen\b|E\s*=|gemaakt in\b|geproduceerd in\b|bevat mogelijk\b|kijk voor meer\b|allergie-info|in de fabriek\b|in dit bedrijf\b|voor [0-9,.]+ (g\.?|gr\.?|ram|ml).*\bis [0-9,.]+ (g\.?|gr\.?|ram|ml).*\bgebruikt\b)/i.freeze
9
+ NOTE_RE = /\A\b(dit product kan\b|deze verpakking kan\b|kan sporen\b.*?\bbevatten\b|voor allergenen\b|allergenen\b|allergie[- ]informatie(\s*:|\b)|E\s*=|gemaakt in\b|geproduceerd in\b|bevat mogelijk\b|kijk voor meer\b|allergie-info|in de fabriek\b|in dit bedrijf\b|voor [0-9,.]+ (g\.?|gr\.?|ram|ml).*\bis [0-9,.]+ (g\.?|gr\.?|ram|ml).*\bgebruikt\b)/i.freeze
10
10
  # Keep in sync with +abbrev+ in the +Common+ grammar, plus relevant ones from the +Amount+ grammar.
11
- ABBREV_RE = Regexp.union(/\A(N°|°C|(ijzer|chroom|koper)\s*\(I+\)\s*[[:alnum:]]+)\b/i, *%w[
12
- 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
13
- 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
14
- 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
15
- min max ca
16
- ].map {|s| /\A#{Regexp.escape(s)}\b\.?/i}).freeze
11
+ ABBREV_RE = Regexp.union(
12
+ /\A(
13
+ N°\b |
14
+ °C\b |
15
+ (ijzer|chroom|koper)\s*\(I+\)\s*[[:alnum:]]+\b |
16
+ L\(\+\)[ -][[:alnum:]]+\b |
17
+ L\.\s+rhamnosus\b | L\.\s+acidophilus\b | L\.\s+casei\b | B\.\s+lactis | A\.\s+oryzae |
18
+ S\.\s+thermophilus\b | L\.\sbulgaricus\b |
19
+ T\.\s*aestivum\b(\s+vitt\.)? |
20
+ nucifera\s+L\. |
21
+ type\s+"\d+" |
22
+ E-e?\d{3}[a-z]?\s*\(i+\) |
23
+ www\.[-_\/:%.A-Za-z0-9]+
24
+ )/xi,
25
+ *%w[
26
+ 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
27
+ 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
28
+ 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
29
+ min max ca
30
+ ].map {|s| /\A#{Regexp.escape(s)}\b\.?/i}
31
+ ).freeze
17
32
 
18
33
  def initialize(s, index: 0)
19
34
  @s = s # input string
@@ -5,8 +5,9 @@ module FoodIngredientParser::Loose::Transform
5
5
 
6
6
  rule amount_from_name
7
7
  # just amount, amount in front or at the end
8
- ws* amount:amount ws+ name:(.*) /
9
- ws* amount:amount ws* /
8
+ ws* amount:amount ws+ name:(.*) /
9
+ ws* amount:amount_simple_percent ws* name:(.*) /
10
+ ws* amount:amount ws* /
10
11
  ws* name:( !amount word ( ws+ !amount word )* )+ ws* amount:amount ws*
11
12
  end
12
13
  end
@@ -0,0 +1,51 @@
1
+ require_relative '../node'
2
+
3
+ module FoodIngredientParser::Loose
4
+ module Transform
5
+ class SplitENumbers
6
+ # Transforms node tree to split e-number combinations.
7
+ #
8
+ # @note mark and amount is lost, this is not expected on e-numbers
9
+
10
+ SPLIT_RE = /\s*-\s*/.freeze
11
+ SINGLE_RE = /E-?\d{3}[a-z]?(?:\s*\(i+\))?/i.freeze
12
+ MATCH_RE = /\A\s*(#{SINGLE_RE})(?:#{SPLIT_RE}(#{SINGLE_RE}))+\s*\z/i.freeze
13
+
14
+ def self.transform!(node)
15
+ new(node).transform!
16
+ end
17
+
18
+ def initialize(node)
19
+ @node = node
20
+ end
21
+
22
+ def transform!
23
+ transform_node!(@node)
24
+ @node
25
+ end
26
+
27
+ private
28
+
29
+ def transform_node!(node)
30
+ if node.contains.any?
31
+ node.contains.each {|n| transform_node!(n) }
32
+ elsif node.name && m = MATCH_RE.match(node.name.text_value)
33
+ i = 0
34
+ while m = node.name.text_value.match(SPLIT_RE, i)
35
+ node.contains << new_node(node, i, m.begin(0)-1)
36
+ i = m.end(0)
37
+ end
38
+ node.contains << new_node(node, i, node.name.interval.last) if i <= node.name.interval.last
39
+ node.name = nil
40
+ end
41
+ end
42
+
43
+ def new_node(node, begins, ends)
44
+ offset = node.name.interval.first
45
+ new_node = Node.new(node.input, offset + begins .. offset + ends)
46
+ new_node.name = Node.new(node.input, new_node.interval)
47
+ new_node
48
+ end
49
+ end
50
+ end
51
+ end
@@ -9,6 +9,10 @@ module FoodIngredientParser::Strict::Grammar
9
9
  amount:amount_simple <AmountNode>
10
10
  end
11
11
 
12
+ rule amount_simple_percent
13
+ amount:(amount_simple_number ws* percent) <AmountNode>
14
+ end
15
+
12
16
  rule amount_simple
13
17
  ( (
14
18
  'of which'i / 'at least'i / 'minimal'i / 'maximal'i / 'less than'i / 'more than'i /
@@ -17,6 +21,7 @@ module FoodIngredientParser::Strict::Grammar
17
21
  ) ws* )?
18
22
  amount_simple_quantity
19
23
  ( ws+ (
24
+ 'of'i / 'or less of'i / 'or more of'i /
20
25
  'minimaal'i / 'minimum'i / 'van het uitlekgewicht'i / 'van het geheel'i /
21
26
  'min.'i / 'min'i / 'max.'i / 'max'i
22
27
  ) )?
@@ -32,6 +37,8 @@ module FoodIngredientParser::Strict::Grammar
32
37
 
33
38
  rule amount_simple_unit
34
39
  ( percent / ( ( 'procent' / 'percent' / 'gram'i / 'ml'i / 'mg'i / 'gr'i / 'g'i ) !char ) )
40
+ ( ws 'vol'i ( !char / '.' ) )?
41
+ ( ws* '℮' )?
35
42
  end
36
43
  end
37
44
  end
@@ -10,17 +10,22 @@ module FoodIngredientParser::Strict::Grammar
10
10
  end
11
11
 
12
12
  rule char
13
- [[:alnum:]] /
13
+ !mark [[:alnum:]] /
14
14
  fraction /
15
- [-/\`'´’+=_{}&] /
16
- [®™] /
17
- [¿?] / # weird characters turning up in names (e.g. encoding issues)
15
+ [-/\`'"´‘’+=_{}&] /
16
+ [®©™♣] /
17
+ [¿?¯] / # weird characters turning up in names (e.g. encoding issues)
18
18
  [₁₂₃₄₅₆₇₈₉] # can occur with vitamins
19
19
  end
20
20
 
21
21
  rule mark
22
22
  # mark referencing a footnote
23
- [¹²³⁴⁵ᵃᵇᶜᵈᵉᶠᵍªº] '⁾'? / '⁽' [¹²³⁴⁵ᵃᵇᶜᵈᵉᶠᵍªº] '⁾' / [†‡•°#^] / '*'+ / '(' ws* ( [†‡•°#^] / '*'+ ) ws* ')'
23
+ [¹²³⁴⁵ᵃᵇᶜᵈᵉᶠᵍªº] '⁾'? /
24
+ '⁽' [¹²³⁴⁵ᵃᵇᶜᵈᵉᶠᵍªº] '⁾' /
25
+ [˄^] digit /
26
+ [†‡•°▪◊#˄^~˛] /
27
+ '*'+ /
28
+ '(' ws* ( [†‡•°▪◊#˄^~˛] / '*'+ ) ws* ')'
24
29
  end
25
30
 
26
31
  rule digit
@@ -48,7 +53,12 @@ module FoodIngredientParser::Strict::Grammar
48
53
  end
49
54
 
50
55
  rule and
51
- ( 'and' / 'en' / 'und' / '&' ) !char
56
+ ( 'and' / 'en' / 'und' ) !char / '&'
57
+ end
58
+
59
+ rule e_number
60
+ ( 'E'i '-'? [0-9] [0-9] [0-9] [[:alpha:]]? )
61
+ ![[:alnum:]] / ( ws* '(' 'i'i+ ')' ) # e.g. "E450 (iii)"
52
62
  end
53
63
 
54
64
  rule abbrev
@@ -105,8 +115,13 @@ module FoodIngredientParser::Strict::Grammar
105
115
  'w.o'i /
106
116
  'w.v'i /
107
117
  # not auto-generated additions
108
- 'vit'i /
109
- 'denat'i
118
+ 'vit'i / # vitamin
119
+ 'denat'i / # denaturated
120
+ 'alc'i / # alcohol
121
+ 'vol'i / # volume
122
+ 'conc'i / # concentration
123
+ 'subsp'i / # subspecies
124
+ 'www.'i [-_\/:%.A-Za-z0-9]+
110
125
  )
111
126
  '.'? ![[:alpha:]]
112
127
  end
@@ -116,7 +131,14 @@ module FoodIngredientParser::Strict::Grammar
116
131
  (
117
132
  'N°'i /
118
133
  '°C'i /
119
- ( 'ijzer'i / 'chroom'i / 'koper'i ) ws* '(' 'I'i+ ')' ws* [[:alnum:]]+
134
+ ( 'ijzer'i / 'chroom'i / 'koper'i ) ws* '(' 'I'i+ ')' ws* [[:alnum:]]+ /
135
+ 'L(+)' ('-' / ws) [[:alnum:]]+ /
136
+ 'L.' ws+ 'rhamnosus'i / 'L.' ws+ 'acidophilus'i / 'L.' ws+ 'casei' / 'B.'i ws+ 'lactis'i / 'A.'i ws+ 'oryzae'i /
137
+ 'S.' ws+ 'thermophilus'i / 'L.' ws+ 'bulgaricus'i /
138
+ 'T.' ws* 'aestivum'i (ws+ 'vitt.'i)? /
139
+ 'nucifera' ws+ 'L.'i /
140
+ 'type'i ws+ '"' [0-9]+ '"' /
141
+ e_number
120
142
  ) ![[:alpha:]]
121
143
  end
122
144
  end
@@ -10,7 +10,8 @@ module FoodIngredientParser::Strict::Grammar
10
10
  end
11
11
 
12
12
  rule ingredient_coloned_inner_list
13
- contains:( ingredient_coloned_simple_with_amount_and_nest ws* ( '/'+ ws* ingredient_coloned_simple_with_amount_and_nest )* ) <ListNode>
13
+ contains:( ingredient_simple_e_number ( ws* dash ws* ingredient_simple_e_number )+ ) <ListNode> /
14
+ contains:( ingredient_coloned_simple_with_amount_and_nest ( ws* '/'+ ws* ingredient_coloned_simple_with_amount_and_nest )* ) <ListNode>
14
15
  end
15
16
 
16
17
  # @see IngredientSimple#ingredient_simple
@@ -21,7 +21,7 @@ module FoodIngredientParser::Strict::Grammar
21
21
 
22
22
  rule ingredient_nested_contains
23
23
  'contains'i /
24
- 'bevat'i
24
+ 'bevat'i / 'bevat o.a.'i / 'o.a.'i / 'met'i
25
25
  end
26
26
 
27
27
  end
@@ -9,10 +9,15 @@ module FoodIngredientParser::Strict::Grammar
9
9
  end
10
10
 
11
11
  rule ingredient_simple_with_amount
12
- pre:( '{' ws* )? amount:amount ws+ ing:ingredient_simple <IngredientNode> /
12
+ pre:( '{' ws* )? amount:amount ws+ ing:ingredient_simple <IngredientNode> /
13
+ pre:( '{' ws* )? amount:amount_simple_percent ws* ing:ingredient_simple <IngredientNode> /
13
14
  ing:ingredient_simple ws* amount:amount post:( ws* '}' )? (ws? mark:mark)? <IngredientNode> /
14
15
  ing:ingredient_simple <IngredientNode>
15
16
  end
16
17
 
18
+ rule ingredient_simple_e_number
19
+ name:e_number <IngredientNode>
20
+ end
21
+
17
22
  end
18
23
  end
@@ -5,14 +5,19 @@ module FoodIngredientParser::Strict::Grammar
5
5
  include Ingredient
6
6
 
7
7
  rule list_coloned
8
+ contains:( ( ws* list_coloned_ingredient ws* '.,')+ ws* list_coloned_ingredient ) <ListNode> /
9
+ contains:( ( ws* list_coloned_ingredient ws* '.,')+ ) <ListNode> /
8
10
  contains:( ( ws* list_coloned_ingredient ws* '.' )+ ws* list_coloned_ingredient ) <ListNode> /
9
11
  contains:( ( ws* list_coloned_ingredient ws* '.' )+ ) <ListNode> /
12
+ contains:( ( ws* list_coloned_ingredient ws* ';,')+ ws* list_coloned_ingredient ) <ListNode> /
13
+ contains:( ( ws* list_coloned_ingredient ws* ';,')+ ) <ListNode> /
10
14
  contains:( ( ws* list_coloned_ingredient ws* ';' )+ ws* list_coloned_ingredient ) <ListNode> /
11
15
  contains:( ( ws* list_coloned_ingredient ws* ';' )+ ) <ListNode> /
12
16
  contains:( ws* list_coloned_ingredient ) <ListNode>
13
17
  end
14
18
 
15
19
  rule list_coloned_inner_list
20
+ contains:( ingredient_simple_e_number ( ws* dash ws* ingredient_simple_e_number )+ ) <ListNode> /
16
21
  contains:( ingredient ( ws* ',' ws* ingredient )* ) <ListNode>
17
22
  end
18
23
 
@@ -40,7 +40,7 @@ module FoodIngredientParser::Strict::Grammar
40
40
  end
41
41
 
42
42
  rule root_mark_sentences_in_list
43
- ( ( ws* [,.;] / ws ) ws* root_mark_sentence_in_list )+
43
+ ( ( ws* [,.;] / ws )+ root_mark_sentence_in_list )+
44
44
  end
45
45
 
46
46
  rule root_mark_sentence_in_list
@@ -1,4 +1,4 @@
1
1
  module FoodIngredientParser
2
- VERSION = '1.1.1'
3
- VERSION_DATE = '2018-09-25'
2
+ VERSION = '1.1.6'
3
+ VERSION_DATE = '2020-11-19'
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: food_ingredient_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - wvengen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-25 00:00:00.000000000 Z
11
+ date: 2020-11-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: treetop
@@ -50,6 +50,7 @@ files:
50
50
  - lib/food_ingredient_parser/loose/transform/amount.rb
51
51
  - lib/food_ingredient_parser/loose/transform/amount_from_name.treetop
52
52
  - lib/food_ingredient_parser/loose/transform/handle_missing_name.rb
53
+ - lib/food_ingredient_parser/loose/transform/split_e_numbers.rb
53
54
  - lib/food_ingredient_parser/strict/grammar.rb
54
55
  - lib/food_ingredient_parser/strict/grammar/amount.treetop
55
56
  - lib/food_ingredient_parser/strict/grammar/common.treetop
@@ -86,8 +87,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
86
87
  - !ruby/object:Gem::Version
87
88
  version: '0'
88
89
  requirements: []
89
- rubyforge_project:
90
- rubygems_version: 2.6.13
90
+ rubygems_version: 3.0.3
91
91
  signing_key:
92
92
  specification_version: 4
93
93
  summary: Parser for ingredient lists found on food products.