"12 kg something" breaks into 4 tokens, but it considers 1 to be a quantity and 2 to be a unit so it returns: #Munchie::Food:0x007fedc1b0dab8 @tokens=[text: 1 something, text: something]
Also for some reason kg returns grams, even though the token parser works correctly:
Munchie.parse("1 kg something")
=> #Munchie::Food:0x007fedc1b15920 @tokens=[1 (weight: 1 grams, metric), text: something]
Again, it has the correct tokens, just need to pull them out correctly.
"12 kg something" breaks into 4 tokens, but it considers 1 to be a quantity and 2 to be a unit so it returns: #Munchie::Food:0x007fedc1b0dab8 @tokens=[text: 1 something, text: something]
Also for some reason kg returns grams, even though the token parser works correctly:
Munchie.parse("1 kg something")
=> #Munchie::Food:0x007fedc1b15920 @tokens=[1 (weight: 1 grams, metric), text: something]
Again, it has the correct tokens, just need to pull them out correctly.