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 3 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, object)(eg.(Grab, book)) if the sentence is a command
None if the sentence is not a command
To write this function, you can utilize a Part-of-speech tagger or named-entity 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 blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!