Research Article

[Retracted] MKA: A Scalable Medical Knowledge-Assisted Mechanism for Generative Models on Medical Conversation Tasks

Algorithm 2

Pseudocode of the topic detector.
Algorithm 2: the detection of the question topic
Input:
Key phrase set . ( is the set for disease topic, is the set for symptom topic, is the set for drug topic, is the set for check topic, is the set for the positive food topic, and is the set for the negative food topic.)
The patient question in conversation turn .
Similarity coefficient for checking whether the phrase is inside of the patient question
Output:
Question topic tuple in conversation turn
Main:
1: ={}
2: for in do
3:   for in do
4:       ifthen
5:         ifthen
6:            Append the “disease” topic in
7:         else ifthen
8:            Append the “symptom” topic in
9:         else ifthen
10:            Append the “drug” topic in
11:         else ifthen
12:            Append the “check” topic in
13:         else ifthen
14:            Append the “recommended food” topic in
15:         else ifthen
16:            Append the “not recommended food” topic in
17:       end if
18:   end for
19: end for