From 6ec5a95fd36ec1a0f4c93cba52008cf9004e3001 Mon Sep 17 00:00:00 2001
From: "Esteban Prince, Liam (UG - Computer Science)" <le00210@surrey.ac.uk>
Date: Thu, 13 Feb 2020 11:52:15 +0000
Subject: [PATCH] Update test_parser.py

---
 test_parser.py | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/test_parser.py b/test_parser.py
index e69de29..d87829c 100644
--- a/test_parser.py
+++ b/test_parser.py
@@ -0,0 +1,12 @@
+def valid():
+    parsedInput = input.preprocess().tokenise().parse()
+    return parsedInput.isValid()
+    # should also correctly identify each token as (in order)
+    
+input = "beat the butter and sugar with an electric whisk until well combined"
+valid(input)
+# input:    beat the butter and sugar with an electric whisk until well combined
+# parsed:   verb article ingredient conjunction ingredient preposition article utensil preposition adverb verb
+
+# input:    To make the buttercream, beat the butter, icing sugar and vanilla with an electric whisk until pale and creamy
+# parsed:   preposition verb article mixture verb article ingredient ingredient conjunction ingredient preposition article utensil preposition adjective conjunction adjective
-- 
GitLab