Patent ID: 8196036
Filing Date: 2012-06-05
Classification: G06F

Abstract:
1. A method for converting a target-web page to plain text, comprising the following steps: (A) obtaining HTML source code of the -target web page; (B) executing a tag pre-processing procedure to extract a body portion of the HTML source code that is related to main content of the target web page, the body portion including a plurality of character strings and a plurality of tags among the character strings; (C) calculating length and position of each of the character strings in the body portion of the HTML source code to find a first predetermined percentage of the character strings in the body portion with the longest lengths, the number of character strings in the first predetermined percentage of the character strings in the body portion with the longest lengths corresponding to a product of the first predetermined percentage and the number of character strings in the body portion; (D) analyzing a number of position intervals between each of the character strings belonging to the first predetermined percentage of the character strings with the longest lengths and another one of the character strings belonging to the first predetermined percentage of the character strings with the longest lengths, and labeling the corresponding character strings as well as any other of the character strings disposed therebetween as belonging to a same block if the number of position intervals is not greater than a second predetermined value so as to find a largest block of the character strings; and (E) deleting the tags among the character strings in the largest block thus formed so as to obtain the main content of the target web page.