Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a WebPageIndex class that will contain the index representation of a web page. This class will help you transfer a web page (text file

image text in transcribed

Write a WebPageIndex class that will contain the index representation of a web page. This class will help you transfer a web page (text file in this assignment) into an AVLTreeMap, where each key refers to each word appearing in the document, and each value represents a list containing the positions of this word in the file. Your WebPageIndex class should satisfy the following requirements (you can create more instance variables/functions if you want): 1) Implement a __init --(self, file) function that initilizes an instance of Web- PageIndex from a txt file. Must have an attribute specifying the path of the file used for initilizing the WebPageIndex instance. Lower case all words appearing in the input file. 2) Implement a getCount(s) function that returns the number of times the words appeared on the page. 3) Test your WebPageIndex class using data/docl.txt

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

Databases And Information Systems 1 International Baltic Conference Dbandis 2020 Tallinn Estonia June 19 2020 Proceedings

Authors: Tarmo Robal ,Hele-Mai Haav ,Jaan Penjam ,Raimundas Matulevicius

1st Edition

303057671X, 978-3030576714

More Books

Students also viewed these Databases questions

Question

Advance warning and an explanation for the layoff.

Answered: 1 week ago