Question: def get _ item _ from _ sentence ( customer _ sentence: str ) - > str: Extract and return the name
def getitemfromsentencecustomersentence: str str:
Extract and return the name of the item the customer is ordering from
their request sentence 'customersentence'.
Customers will only order from the menu using one of the following phrases:
"Please give me a combo of
"Can I have a combo
In the phrases listed above:
represents the name of the item.
combo of and combo are not required and may not be said.
Return the name of the item found in the customer's request eg "FRIES"
If the customer orders a combo, also return the string "COMBO" at the start
of the string, seperate by a space eg "COMBO HAMBUGER" If the
customer's request is unclear or the item name or combo item is invalid,
return "UNKNOWN" instead.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
