The retrieval condition acquisition unit receives a logical operation
expression of the keywords as a retrieval condition from a user. The
matching document retrieval unit acquires a list of the document IDs
corresponding to the keywords inputted, from the word index of the
document information storage unit, and applies a specified logical
operation to the result to acquire the matching document IDs. The related
keyword calculation unit acquires the keywords extracted from the
matching documents retrieved by the matching document retrieval unit as
the related keywords, and calculates the degrees of relatedness of each
of the matching documents. The related part extraction unit accumulates
the degrees of relatedness of the related keywords as to each of the
matching documents, and extracts the sentences with the appearance orders
in the text kept, in the order of the sentence having a higher
accumulated value, until the total length of the sentences extracted
becomes longer than a predetermined length. The related part output unit
displays the sentences acquired by the related part extraction unit as a
retrieval result to the user. Thus, the document retrieval device of the
invention extracts the related parts of documents that meet the retrieval
intention of the user.