improved ingredient parser

This commit is contained in:
vabene1111
2021-06-18 17:36:31 +02:00
parent 7aa71dc744
commit 256c1a7d41
2 changed files with 27 additions and 15 deletions

View File

@@ -53,7 +53,10 @@ def test_ingredient_parser():
"50 g smör eller margarin": (50, "g", "smör eller margarin", ""),
"3,5 l Wasser": (3.5, "l", "Wasser", ""),
"3.5 l Wasser": (3.5, "l", "Wasser", ""),
"400 g Karotte(n)": (400, "g", "Karotte(n)", "")
"400 g Karotte(n)": (400, "g", "Karotte(n)", ""),
"400g unsalted butter": (400, "g", "butter", "unsalted"),
"2L Wasser": (2, "L", "Wasser", ""),
"1 (16 ounce) package dry lentils, rinsed": (1, "package", "dry lentils, rinsed", "16 ounce"),
}
# for German you could say that if an ingredient does not have
# an amount # and it starts with a lowercase letter, then that