维基百科PageRank
世界上最简单的维基百科爬虫和页面排名器。
要抓取一组页面并创建图表:
String[] searchTerms = {"term1", "term2"};
int max_nodes = 1000;
String outputFileName = "file_name.txt"
WikiCrawler w = new WikiCrawler("/wiki/title_of_start_page", searchTerms, max_nodes, outputFileName);
w.crawl();
计算上图的页面排名:
double eps = 0.05; //pagerank convergence criteria
PageRank p = new PageRank(outputFileName, eps);
String[] top100 =
2021-10-29 08:14:05
8KB
Java
1