1. A system for generating a retrieval condition for retrieving a target character string from texts by pattern matching, the system comprising: a memory; and a processor in communication with the memory, the processor being configured to perform operations comprising: dividing 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 is less than or equal to a reference frequency; retrieving the target character string based on the retrieval condition; and determining whether a second text has an attribute that depends from the target character string by using logistic regression to identify a frequency at which the converted character string matches the second text as an explanatory variable, wherein the explanatory variable is part of the first text, and wherein the retrieval condition of matching the target character string and not matching the converted character string is generated based on the explanatory variable having a positive correlation with the converted character string that has the attribute.