This section is concerned with the scheme of applying the proposed KNN version which was described in section 3.3 to the keyword extraction task. Before doing so, we need to transform the task into one where machine learning algorithms are applicable as the flexible and adaptive models. We prepare the words which are labeled with ‘keyword’ or ‘not’ as the sample data. The words are encoded into numerical vectors by the scheme which was described in section 3.2. Therefore, in this section, we describe the process of extracting keywords from texts automatically using the proposed KNN with the view of the keyword extraction into a classification task.