Question: %%%%% Python Jupiter Notebook %%% research-papers.csv (Please check the google doc for data) https://docs.google.com/document/d/19C8hrhFjNR9wDXhRGjVdf1yKdxJfArZBjWV4O7DgocI/edit?usp=sharing Topics : Files , Dictinories , Functions query = input(What do
%%%%% Python Jupiter Notebook %%%
research-papers.csv (Please check the google doc for data)
https://docs.google.com/document/d/19C8hrhFjNR9wDXhRGjVdf1yKdxJfArZBjWV4O7DgocI/edit?usp=sharing
Topics : Files , Dictinories , Functions

query = input("What do you want to search for? ") results = search_papers(____, ____) # Write the rest of your code here for the program here
Question 4 - Write a program that can search the papers dataset based on terms in the title (9 points) Make a dictionary that maps each term in the paper titles to a list of papers whose titles contain that term (identified by the paper ID) Part A (5 pts): Write a search function Requirements .Name your function search_papers() Your function should take 2 parameters: 1) the query term to search for, and 2) your term_index from Question 3 . Your function should return a list of matching papers . Your function should not fail if the user enters a term that isn't in the term index: in that situation, your function should return an empty list (i.e., a list with 0 items in it) In [ ]: # Define your function here Part B (4 pts): Write a program that uses the search function Requirements *Print a message that tells the user how many results were found (hint: you can compute this by getting the length of the list of results, if your function was defined correctly) If there are matching papers, print out each matching paper ID, along with its paper title (retrieved from the paper_titles dictionary from Question 2) Here is an example of an input/output trace from a function and program that meets these requirements What do you want to search for? data There are 9 papers that match your search. 1960191312 empirical analysis of data breach litigation 2364071307 learning individual behavior using sensor data the case of gps traces a nd taxi drivers 2529452593 modeling user engagement in mobile content consumption with tapstream d ata and field experiment 2338895451 understanding user economic behavior in the city using large scale geot agged and crowdsourced data 2273081434 gaussian processes for independence tests with non iid data in causal i nference 2601121662 graph structure learning from unlabeled data for early outbreak detecti on 2575532943 graph structure learning from unlabeled data for event detection 1961666882 identifying emerging novel outbreaks in textual emergency department da 2243328796 predicting bundles of spatial locations from learning revealed preferen ce data Here is another example trace for a situation where the user's term isn't in the dictionary: What do you want to search for? mouse There are 0 papers that match your search
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
