Question: Problem 3 POS for classification Robots and chat bots receive different commands to do certain tasks. Write a simple pragram that receive interactions in the
Problem POS for classification
Robots and chat bots receive different commands to do certain tasks.
Write a simple pragram that receive interactions in the form of a sentence and return:
A tuple of command objectegGrab book if the sentence is a command
None if the sentence is not a command
To write this function, you can utilize a Partofspeech tagger or namedentity recognizer from libraries like NLTK and Spacy.
Consider the following EXAMPLE sentences:
Commands:
Grab the book
Fetch the ball
Open the jar
Not commands:
Hey, how is it going?
How is your day today?
Do you like the weather?
This list is not exhaustive, your function should be able to handle more cases.
Expected outcome:
A function that performs the task
Test the function with the above provided Commands Not Commands examples and print the output
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
