Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

12th edition

133544613, 978-0133544619

More Books

Students also viewed these Databases questions

Question

Question What is a Roth 401(k) feature?

Answered: 1 week ago