1. A computer program product comprising a computer readable storage medium having program instructions embodied therewith, the program instructions executable by a processor to cause the processor to perform a method, the method comprising: dividing, by a processor, a first text into words; generating a converted character string by performing at least one of appending at least one character in at least either one of previous and subsequent positions of the target character string; replacing at least one character of the target character string; generating the retrieval condition for retrieval candidates in the words of the first text, wherein the retrieval condition improves extraction accuracy of the target character string by determining that a retrieval candidate is an exclusion candidate based on the retrieval candidate being appended to the converted character string, and the retrieval candidate matching the target character string and not matching the converted character string based on a ratio of a part of the retrieval candidate which matches the converted character string and corresponds to the target character string that is less than or equal to a reference frequency; and retrieving the target character string based on the retrieval condition.