Patent ID: 7111011

Claim:
A document processing apparatus comprising: block dividing means for dividing input document data into blocks in a predetermined manner according to a structure of the document data; document structuring means for structuring the document data, thereby generating structured data, by parsing a block into which the document data is divided by said block dividing means according to the document structure of the block, and by adding tag information to text data constituting the block, said tag information indicating an attribute of the text data; and sentence extraction means for controlling an extraction of the text data according to the structured data and a predetermined condition, wherein the predetermined condition provides an indication of a method to be utilized to perform the extraction of the text data; wherein said document structuring means includes regular-expression determining means which refers to pattern information containing a two-dimensional regular expression for a two-dimensional character string and tag information associated with the regular expression, and which adds the tag information associated with the regular expression in pattern information to a character string in the block that matches the regular expression in the pattern information, before a sentence is extracted; and wherein the two-dimensional regular expression is expressed by two regular expressions, one regular expression indicating a head of a block using a one-dimensional regular expression, and another regular expression indicating a tail of the block using a one-dimensional regular expression, and by a number of lines which is permitted between the two regular expressions.