Research Article

Doctor Recommendation Model Based on Ontology Characteristics and Disease Text Mining Perspective

Algorithm 1

This module preprocesses the sample dataset using the following code. The aim is to segment words, remove stop words, and retain key parts or key symptoms with regard to patients’ condition description online.
The code is as the follows:
with open(“test.txt”) as f:
   document = f.read()
   document_cut = jieba.cut(document)
   result = “.join(document_cut)
   result = result.encode(“utf-8”)
   with open(“test2.txt”, “w”) as f2:
     f2.write(result)
  f.close()
  f2.close()