diff --git a/preprocessor.py b/preprocessor.py index 9151c504655e5b1e2974331964f37f4c808761ff..57c9c8a3525c624b7c3994385c4db9d5c40e1a31 100644 --- a/preprocessor.py +++ b/preprocessor.py @@ -3,9 +3,11 @@ import json with open('recipes/vegancupcakes.json', 'r') as f: recipes = json.load(f) -# Add a space before and after every unit if there isn't one already +# Add a space before and after the character if there isn't one already +# all ubits +# - # For example, converts "10g" to "10 g" -def separateUnits(): +def surround(): # parse JSON for each Unit in Ingredients for ingredient in recipes['Ingredients']: # unit is any value of key Unit or Alternative in units.json @@ -26,8 +28,8 @@ def disambiguateUnits(): # Use heuristics such as "bake" refers to temperatures within the baking range (say 160 to 250) # Defaults to manual intervention unless confidence is very high def addMissingUnits(): - -# Replace certain characters with space to ease tokenization -# Characters to be replaced by " " -# "-" -def separateTokens(): \ No newline at end of file + pass + +# Check that everything in the database conforms to the schema +def conform(): + pass \ No newline at end of file