A non-transitory computer-readable recording medium in which storing a knowledge generation program executable by a computer to perform:
- storing knowledge representing a cause or coping method corresponding to an event, the knowledge usable by workers in order to identify the cause or coping method corresponding to the event;
- extracting, from the work record, a sentence different from the cause or coping method included in the knowledge and corresponding to the event, the sentence related to the event;
- obtaining a plurality of groups of character strings from a past work record that are likely to represent the cause or coping method corresponding to the event, by:
- for each character string, defining an n-dimensional vector having a plurality of elements respectively corresponding to a plurality of predetermined words, such that each element is set to a value of 1 when the character string includes the predetermined word corresponding to the element and is set to a value of 0 when the character string does not include the predetermined word corresponding to the element;
- performing K-means clustering on the n-dimensional vector for each character string to generate a plurality of vector clusters corresponding to the plurality of groups of character strings, such that each character string belongs to the group corresponding to the vector cluster to which the n-dimensional vector for the character string has been cluster;
- selecting, from among the plurality of groups of character strings, a group of character strings, based on a similarity between each of the groups of character strings and a first character string of the extracted sentence that is likely to represent the cause or coping method, by:
- defining an n-dimensional vector for the first character string having a plurality of elements respectively corresponding to the plurality of predetermined words, such that each element is set to a value of 1 when the first character string includes the predetermined word corresponding to the element and is set to a value of 0 when the first character string does not include the predetermined word corresponding to the element;
- calculating a distance between the n-dimensional vector for the first character string and a center of each cluster;
- selecting the group of character strings corresponding to the cluster for which the distance that has been calculated is smallest;
- selecting a second character string from the selected group of character strings by:
- calculating a distance between the n-dimensional vector for each character string in the selected group of character strings and the center of the cluster corresponding to the selected group of character strings;
- selecting, as the second character string, the character string in the selected group of character strings for which the distance that has been calculated is smallest;
- replacing the first character string in the work record with the second character string;
- and
- generating new knowledge based on a length of each of the character strings included in the selected group of character strings when a predetermined condition regarding a confirmation status of the work record in which the first character string has been replaced with the second character string is satisfied, wherein
- the predetermined condition is that the second character string is selected a plurality of times from a same group of character strings and the work record in which the first character string has been replaced with the second character string is confirmed a predetermined number of times without any correction to the selected second character string, and
- the knowledge is generated as work is performed and the work records are accordingly generated.