fix: cobotqa factoid super_conf if entities intersection
@@ -163,6 +163,8 @@ def respond():
if is_special_factoid_question(curr_uttr) and confidence > 0 and subject is None:
# for special factoid questions, original cobotqa response is found, assign conf to 1.0
+ entities = get_entities(curr_uttr)
+ if any([ent in response for ent in entities]):
confidence = 1.0
response = COBOTQA_EXTRA_WORDS.sub("", response).strip()
