Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please fill the code below # your implementation In [1]: # import all packages import nltk from nltk import word_tokenize, pos_tag, ne_chunk from nltk import

image text in transcribedimage text in transcribedPlease fill the code below # your implementation

In [1]: # import all packages import nltk from nltk import word_tokenize, pos_tag, ne_chunk from nltk import Tree II II II raw = In [2]: # Tokenize sentence: """John was born in Liverpool, to Julia and Alfred Lennon" tokens = word_tokenize(raw) tokens Exercise 2 Extract only PERSON entities In [8]: # Exercise2, extract all the entities of specific type def get_type_chunks (text, label): # your implementation return entity get_type_chunks (raw, 'PERSON') Out[8]: ['John', 'Alfred Lennon']

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

Step: 3

blur-text-image

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

Professional Microsoft SQL Server 2014 Administration

Authors: Adam Jorgensen, Bradley Ball

1st Edition

111885926X, 9781118859261

More Books

Students also viewed these Databases questions

Question

a. What is the purpose of the team?

Answered: 1 week ago

Question

What is the basis for Security Concerns in Cloud Computing?

Answered: 1 week ago

Question

Describe the three main Cloud Computing Environments.

Answered: 1 week ago