A pattern matching method for matching between a first symbol sequence and
a second symbol sequence which is shorter than the first symbol sequence
is provided. The method includes the steps of performing DP matching
between the first and second symbol sequences to create a matrix of the
DP matching transition, detecting the maximum length of lengths of
consecutive correct answers based on the matrix of the DP matching
transition, and calculating similarity based on the maximum length.