1. A computer-implemented method for generating a retrieval condition for retrieving a target character string from texts by pattern matching, 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.
3. The method of to claim 1 , wherein the retrieval condition does not include any restriction based on the converted character string based on the ratio of the part which matches the converted character string and corresponds to the target character string among the words of the first text exceeding the reference frequency.