5. An information processing apparatus for calculating a score of matching a sentence with a pattern, the apparatus comprising: an input unit receiving as inputs a sentence to be analyzed, an index value indexing how a linguistic unit in said sentence tends to modify another, and a query pattern; and a score calculation unit calculating a matching score indexing the degree of matching of said sentence with said query pattern, said matching score being represented by a function having at least a variable, said variable being an index value with which a dependency relation included in said query pattern is associated; wherein said score calculation unit calculates said score by attempting association between a substructure of said query pattern and a range in said sentence and performing recursive calculation in said substructure and said range while storing a partial calculation result of said function in a memory area for reusing said result.
18. The information processing apparatus according to claim 5 , wherein said sentence to be analyzed is at least one of a projective two-way and one-way sentence, and said query pattern is a subtree of a projective dependency tree.