大气与环境光学学报, 2017, 12 (3): 230, 网络出版: 2017-06-09
基于正文特征和网页结构的网页正文抽取方法
Method of Web Page Text Extraction Based on Text Feature and Page Structure
信息抽取 正文特征 网页结构 正文内容块 正则表达式 information extraction text features page structure text content block regular expressions
摘要
Web信息抽取技术一直是信息技术领域的研究热点。而且,近年来,DIV+CSS的网页布局方法开始普遍应用于网页设计中。基于此,提出了一种较为 简单和实用的基于正文特征和网页结构的新闻网页正文抽取方法。首先识别和提取网页正文内容块,然后利用正则表达式滤除内容块中的HTML标记 并提取网页正文。实验结果表明,该方法对正文抽取具有较高的通用性与准确率。
Abstract
Web information extraction technology has been a hot topic in the field of information technology. Moreover, in recent years, DIV + CSS page layout method was commonly used in web design. Based on this, a simple and practical method for the text extraction of news web pages based on text features and page structure is presented. The text content block on the page is identified and extracted firstly, and then regular expression is used to filter the HTML tag of content block and the main text of the web page is extracted. Experimental results show that the method has great universal property and accuracy rate in text extraction.
胡露露, 刘小勤, 孙凯. 基于正文特征和网页结构的网页正文抽取方法[J]. 大气与环境光学学报, 2017, 12(3): 230. HU Lulu, LIU Xiaoqin, SUN Kai. Method of Web Page Text Extraction Based on Text Feature and Page Structure[J]. Journal of Atmospheric and Environmental Optics, 2017, 12(3): 230.