Search engine like Google helps a user to efficiently find web page containing information relevant to...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Search engine like Google helps a user to efficiently find web page containing information relevant to their queries. One of the basic operations to find relevant information is string comparison which requires some basic text preprocessing. Given the following query text: "Python install for MAC" and three web pages with the following information: 1. Looking for Python with a different OS? Python for Windows, Linux/UNIX, Mac OS X, Other Want to help test development versions of Python? Prereleases, Docker images Looking for Python 2.7? See below for specific releases. 2. Python on a Macintosh running Mac OS X is in principle very similar to Python on any other Unix platform, but there are a number of additional features such as the IDE and the Package Manager that are worth pointing out. 3. Mac OS X 10.8 comes with Python 2.7 pre-installed by Apple. If you wish, you are invited to install the most recent version of Python 3 from the Python website. A current "universal binary" build of Python, which runs natively on the Mac's new Intel and legacy PPC CPU's, is available there. Write a program as instructed below to implement a simple search engine application. Convert the query text and web page texts to lower case Remove the punctuations (?, .) from the web page texts Convert the query text and web page texts to word lists and remove stop words from them stopwords = ['for', 'with', 'and', 'a', 'other', 'to', 'of, 'below', 'on', 'is', 'in', 'are', 'as', 'the', 'that', 'out', 'by', 'if', 'from', 'there'] Compare the query text with three web page texts and rank the webpages by their similarity to the query text. (similarity can be measured by the total number of times the words in the query text used in each webpage text) Sample output: Query text before comparisont python alty web page texts before comparison: [[looking", "python, airferent on", "python, windows, 11nux/unix" "ma", "x", want', 'help', 'test', 'development, 'versiona", "python", "prereleases" "docker", "images", looking, 'python' '27', 'a', 'specific', 'releases'), ('python", "macintosh, running", "mac", "o", "x", "principle", ry', 'similar', 'python","any', unix, platform, but', 'number', "additional', 'features', 'auch, ide", "packa ge', manager', 'worth', 'pointing'1, I'mac', 'on', 'x, 100', 'comes, "python, 27, "pre-installed', 'apple', 'y ou wish, you", invited', "install', 'nostrecent version", "python', '3", "python', website', 'current", niversal, binary", "build, python, which', 'runs, 'natively, mac's', 'new', 'intel', 'legacy', 'ppo', 'op uta, available 11 similarity of three web page texts to the query text: (5, 3, 61 Most similar web page to the query text: 3 Search engine like Google helps a user to efficiently find web page containing information relevant to their queries. One of the basic operations to find relevant information is string comparison which requires some basic text preprocessing. Given the following query text: "Python install for MAC" and three web pages with the following information: 1. Looking for Python with a different OS? Python for Windows, Linux/UNIX, Mac OS X, Other Want to help test development versions of Python? Prereleases, Docker images Looking for Python 2.7? See below for specific releases. 2. Python on a Macintosh running Mac OS X is in principle very similar to Python on any other Unix platform, but there are a number of additional features such as the IDE and the Package Manager that are worth pointing out. 3. Mac OS X 10.8 comes with Python 2.7 pre-installed by Apple. If you wish, you are invited to install the most recent version of Python 3 from the Python website. A current "universal binary" build of Python, which runs natively on the Mac's new Intel and legacy PPC CPU's, is available there. Write a program as instructed below to implement a simple search engine application. Convert the query text and web page texts to lower case Remove the punctuations (?, .) from the web page texts Convert the query text and web page texts to word lists and remove stop words from them stopwords = ['for', 'with', 'and', 'a', 'other', 'to', 'of, 'below', 'on', 'is', 'in', 'are', 'as', 'the', 'that', 'out', 'by', 'if', 'from', 'there'] Compare the query text with three web page texts and rank the webpages by their similarity to the query text. (similarity can be measured by the total number of times the words in the query text used in each webpage text) Sample output: Query text before comparisont python alty web page texts before comparison: [[looking", "python, airferent on", "python, windows, 11nux/unix" "ma", "x", want', 'help', 'test', 'development, 'versiona", "python", "prereleases" "docker", "images", looking, 'python' '27', 'a', 'specific', 'releases'), ('python", "macintosh, running", "mac", "o", "x", "principle", ry', 'similar', 'python","any', unix, platform, but', 'number', "additional', 'features', 'auch, ide", "packa ge', manager', 'worth', 'pointing'1, I'mac', 'on', 'x, 100', 'comes, "python, 27, "pre-installed', 'apple', 'y ou wish, you", invited', "install', 'nostrecent version", "python', '3", "python', website', 'current", niversal, binary", "build, python, which', 'runs, 'natively, mac's', 'new', 'intel', 'legacy', 'ppo', 'op uta, available 11 similarity of three web page texts to the query text: (5, 3, 61 Most similar web page to the query text: 3
Expert Answer:
Answer rating: 100% (QA)
Heres a Python program to implement a simple search engine application following the instructions you provided import string Define the stopwords list ... View the full answer
Related Book For
Strategic Management An Integrated Approach
ISBN: 978-1111825843
10th edition
Authors: Charles W. L. Hill, Gareth R. Jones
Posted Date:
Students also viewed these operating system questions
-
A series circuit has unequal resistors. Explain why the resistor with the lower resistance will operate at a lower temperature
-
Googles ease of use and superior search results have propelled the search engine to its num- ber one status, ousting the early dominance of competitors such as WebCrawler and Infos- eek. Even later...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
In programming challenge 8 of chapter 3, you created an application that converts celsius temperatures to fahrenheit. recall that the formula for performing this conversion isf = 1.8 * c + 32in the...
-
Two untethered astronauts on a space walk decide to take a break and play catch with a baseball. Describe what happens as the game of catch progresses.
-
Discuss the problem of political risk in the context of foreign direct investment, and the difficulties that companies may face as a result of it.
-
Look up three not-for-profit organization's Web sites and find a recent annual report or IRS filing. Many charities are also listed at http://www.charitynavigator.org. a. How much did each of the...
-
The payroll register for Jaffrey Company for the week ended May 16 indicated the following: Salaries.............. $1,250,000 Social security tax withheld..... 58,750 Medicare tax withheld..........
-
The Heinrich Tire Company recalled a tire in its subcompact line in December 2024. Costs associated with the recall were originally thought to approximate $42 million. Now, though, while management...
-
The date is January 10, 2023, and Maryton Hotels CFO George Smith is looking with dismay at his companys financial performance during 2022. Already facing stiff competition from other hotel chains as...
-
Data Analysis Assignment 1 Based upon the statistical methods and tests covered in our textbooks, students will sample from a data set using R Studio/R code to execute several sampling techniques and...
-
Create a timeline that displays the development of abnormal psychology. Include at least five to seven main milestones. write a 2-3 page paper summarizing five to seven important historical...
-
The chief financial officer (CFO) of Ayayai Corporation requested that the accounting department prepare a preliminary balance sheet on December 30, 2025, so that the CFO could get an idea of how the...
-
3 Given the following information, thoroughly address the financial health of this company. Company Industry 2022 2023 2023 Current ratio 0.71 0.59 1.20 Equity to asset ratio 0.30 0.20 0.80 Inventory...
-
You are a well-respected financial planning group, based in Toronto, Ontario. Two of your longest tenure clients, who are permanent Canadian residents, Mr. and Mrs. Patel, both age 63 live in North...
-
For each of the items indicate whether its amount affects the bank or book side of a bank reconciliation and is an addition or a subtraction in a bank reconciliation and whether a journal entry is...
-
x + 2x2 -x3 + x = 6 -X 1 * + x2 + 2x3 -x = 3 4 -x 2x = x + 2x3 + 2x = 14 1 2 1 x + x2 x3 + 2x^ 4 4 = 8 (a) Use Gauss - Jordan method to solve the above linear system (Ax) = (b). -1 (b) Find the...
-
Refrigerant-134a enters an adiabatic compressor as saturated vapor at 120 kPa at a rate of 0.3 m3/min and exits at 1-MPa pressure. If the isentropic efficiency of the compressor is 80 percent,...
-
1. What role has the employee-owned strategy had in the success of the company? 2. What opportunities and threats can be identified for KCI? Explain your reasoning. 4. What business-level strategies...
-
What kind of companies stand to gain the most from entering into strategic alliances with potential competitors? Why?
-
Discuss the Competitive Forces model (Figure 2.2) with reference to what you know about the U.S. airline industry. What does the model tell you about the level of competition in this industry?
-
For the project in Exercise 4, form a project graph with tasks on vertices.
-
Use Kruskal's algorithm to find a minimal cost spanning tree for a graph whose vertices are labeled \(\{1,2, \ldots, 8\}\) and whose edges have the costs below: 146 51 25 321 1321 - - - - 2 - 21 -...
-
A variation on the critical path problem is the task scheduling problem. In this problem, unlike the critical path problem, explicit attention is paid to how many workers are available to do tasks,...
Study smarter with the SolutionInn App