class_docstr: This class is used to prepare and separate word similarity datasets.
class_docstr_tok: ["This","class","is","used","to","prepare","and","separate","word","similarity","datasets","."]
docstr: This function is used to separate the original word similarity dataset.
  
  word similarity of noun: noun_rg.txt, noun_mc.txt, noun_ws353.txt, noun_ws353-sim.txt, noun_simlex.txt
  
  the lcs is in knowledge graph: graph_rg.txt, graph_mc.txt, graph_ws353.txt,
  graph_ws353-sim.txt, graph_simlex.txt
  
  both words are in knowledge graph:  type_rg.txt, type_mc.txt, type_ws353.txt, type_ws353-sim.txt,
  type_simlex.txt
  
  :param in_file: source dataset file
  :param out_file: target dataset file
  :param check_function: the function of mapping criteria for deciding the word pairs.
  :return:
docstr_tok: ["This","function","is","used","to","separate","the","original","word","similarity","dataset",".","word","similarity","of","noun",":","noun_rg.txt",",","noun_mc.txt",",","noun_ws353.txt",",","noun_ws353-sim.txt",",","noun_simlex.txt","the","lcs","is","in","knowledge","graph",":","graph_rg.txt",",","graph_mc.txt",",","graph_ws353.txt",",","graph_ws353-sim.txt",",","graph_simlex.txt","both","words","are","in","knowledge","graph",":","type_rg.txt",",","type_mc.txt",",","type_ws353.txt",",","type_ws353-sim.txt",",","type_simlex.txt",":","param","in_file",":","source","dataset","file",":","param","out_file",":","target","dataset","file",":","param","check_function",":","the","function","of","mapping","criteria","for","deciding","the","word","pairs",".",":","return",":"]
code: def separate_dataset(self, in_file, out_file, check_function):
      """
      This function is used to separate the original word similarity dataset.
  
      word similarity of noun: noun_rg.txt, noun_mc.txt, noun_ws353.txt, noun_ws353-sim.txt, noun_simlex.txt
  
      the lcs is in knowledge graph: graph_rg.txt, graph_mc.txt, graph_ws353.txt,
      graph_ws353-sim.txt, graph_simlex.txt
  
      both words are in knowledge graph:  type_rg.txt, type_mc.txt, type_ws353.txt, type_ws353-sim.txt,
      type_simlex.txt
  
      :param in_file: source dataset file
      :param out_file: target dataset file
      :param check_function: the function of mapping criteria for deciding the word pairs.
      :return:
      """
      out_data = []
      word_pairs, human = self.load_dataset(in_file)
      for i, pairs in enumerate(word_pairs):
          w1, w2 = pairs
          h = human[i]
          if check_function(w1, w2):
              out_data.append(" ".join([w1, w2, str(h)]))
      FileIO.save_list_file(
          "dataset/wordsim/%s.txt" % out_file, out_data
      )
  
imports: from __future__ import division, print_function
  import six
  from scipy.stats import spearmanr
  from scipy.stats import pearsonr
  from sematch.semantic.similarity import YagoTypeSimilarity
  from sematch.utility import FileIO
  import numpy
  from scipy.stats import t, norm
  from math import atanh, pow
  from numpy import tanh
  from sklearn.metrics import classification_report
  from sklearn.metrics import precision_recall_fscore_support
  from sklearn.metrics import accuracy_score
  from nltk import ConfusionMatrix
label_desc: Use image node_id 8 for calling the WordSimDataset obj's underlying member method code with example usage: obj.separate_dataset(in_file, out_file, check_function) without return types