diff --git a/lexer.py b/lexer.py
new file mode 100644
index 0000000000000000000000000000000000000000..2fac1ca833c5553e178bcbeb3138df61e8218cad
--- /dev/null
+++ b/lexer.py
@@ -0,0 +1,44 @@
+import json
+
+def lex(raw):
+    tokens = {}
+
+    splitted = raw.split()
+
+    types = ['ingredients',
+            'units',
+            'utensils',
+            'prepositions',
+            'articles',
+            'conjunctions',
+            'adjectives']
+
+    with open('database/ingredients.json', 'r') as f:
+        ingredients = json.load(f)
+
+    with open('database/units.json', 'r') as f:
+        units = json.load(f)
+
+    while len(splitted):
+        currentToken = splitted[0]
+
+        if currentToken in ingredients:
+            tokenType = "Ingredient"
+
+        elif currentToken in units:
+            tokenType = "Unit"
+
+        elif currentToken.isdigit():
+            tokenType = "Digit"
+
+        else:
+            tokenType = "Unknown"
+
+        tokens[currentToken] = tokenType
+        splitted = splitted[1:]
+        print(tokens)
+
+def isValid():
+    pass
+
+lex("Peel 300 g of potatoes and then cut into strips")
\ No newline at end of file
diff --git a/parser.py b/parser.py
deleted file mode 100644
index 15c6b4baf12d7df2cb65e437de45864c0d733a7a..0000000000000000000000000000000000000000
--- a/parser.py
+++ /dev/null
@@ -1,19 +0,0 @@
-def preprocess():
-
-# Return the next token from the input
-def lex(input):
-    tokens = []
-    
-    while len(input.split()):
-        if input is not None:
-            continue
-        
-        if input[0] in ingredients:
-            input = input[1:]
-        else:
-            raise Exception('Don\'t know what this is: {}'.format(input[0]))
-
-def parse():
-    preprocess()
-    lex(input)
-    isValid()
\ No newline at end of file