Skip to content
Snippets Groups Projects
Commit 6ec5a95f authored by Esteban Prince, Liam (UG - Computer Science)'s avatar Esteban Prince, Liam (UG - Computer Science)
Browse files

Update test_parser.py

parent 3fbcccc7
No related branches found
No related tags found
No related merge requests found
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment