1. Trang chủ
  2. » Giáo án - Bài giảng

Bài giảng Cấu trúc dữ liệu,Phần cuối

8 356 0
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 8
Dung lượng 0,95 MB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Chapter 19Web Crawler... Chapter Objectives• Provide a case study example from problem statement through implementation • Demonstrate how hash tables and graphs can be used to solve a

Trang 1

Chapter 19

Web Crawler

Trang 2

Chapter Objectives

• Provide a case study example from

problem statement through

implementation

• Demonstrate how hash tables and

graphs can be used to solve a problem

Trang 3

Copyright © 2005 Pearson

Addison-Wesley All rights

Web Crawler

• A web crawler is a system that

searches the web, beginning with a

user-designated we page, looking for a designated target string

• A web crawler follows all of the links on

each page that it encounter until there are no more pages or until it reaches a designated limit

Trang 4

Web Crawler

• For this case study, we will create a

graphical web crawler with the

following requirements

– Enter a designated starting web page – Enter a target string for which to search – Limit the search to 50 pages

– Display the results when done

Trang 5

Copyright © 2005 Pearson

Addison-Wesley All rights

Web Crawler - Design

• Our web crawler system consists of

three high-level components:

– The driver

– The graphical user interface

– The web crawler implementation

• Makes use of graphs and hashtables

Trang 6

Web Crawler - Design

• The algorithm for the web crawler is as

follows

– Add the starting page to a HashSet of pages to

be searched and to our graph

– Remove a page from the set of pages to be

searched

– Search the page for the target string

• If string exists, add page to list of results

– Search the page for links

• If links have not already been searched, add them to

Trang 7

Copyright © 2005 Pearson

Addison-Wesley All rights

FIGURE 19.1 User interface design

Trang 8

FIGURE 19.2

UML description

Ngày đăng: 16/07/2014, 01:00

TỪ KHÓA LIÊN QUAN

🧩 Sản phẩm bạn có thể quan tâm

w