31. The recording medium according to claim 24 , wherein the program causes the computer to calculate the feature value representing the adjacent context in the position of the target word string on the basis of frequencies of words appearing within a certain distance from the position of the target word string or frequencies of attributes of the words.
24. A non-transitory computer-readable recoding medium that stores a program which causes a computer to execute the processes of: receiving a recognition result and a target word string which is specified in the recognition result; generating an alternative candidate word string in a position of the target word string; training a classifier which is configured to discriminate between the target word string and the alternative candidate word string; extracting a feature value representing an adjacent context in the position of the target word string; determining whether a true word string in the position of the target word string is the target word string or the alternative candidate word string by using the classifier and the feature value; and calculating a confidence measure of the target word string on the basis of the determination result.