Question: The file Question is a question about NLP Regular Expression. The code should follow the step as in the file Input and should have the

The file "Question" is a question about NLP Regular Expression. The code should follow the step as in the file "Input" and should have the outcome as in the file "Output". It requires to use the function "re.findall".

The file "Question" is a question about NLP Regular Expression. The codeshould follow the step as in the file "Input" and should havethe outcome as in the file "Output". It requires to use the

\f\fSuppose you have scraped the text shown below from an online source. Define function extract (text) which: . takes a piece of text (in the format of shown below) as an input . extracts data into a list of tuples using regular expression, e.g. [('Consumer Price Index', '+0.2%', 'Sep 2020'), ...] . returns the list of tuples In [129]: text=' ''Consumer Price Index: +0. 2: in Sep 2020 Unemployment Rate: +7.9% in Sep 2020 Producer Price Index: +0. 4% in Sep 2020 Employment Cost Index: +0.5% in 2nd Qtr of 2020 Productivity : +10.18 in 2nd Qtr of 2020 Import Price Index: +0.3% in Sep 2020 Export Price Index: +0. 6% in Sep 2020' ''

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 Programming Questions!