in src/classes/qaexample.py [0:0]
def get_example_answer_type(self):
"""For an example with multiple answers (potentially of different types) this function
decides what type of answer the query likely needs for substitutions.
"""
answer_type_counts = Counter(
[answer.answer_type for answer in self.gold_answers if answer.answer_type]
)
most_common_types = answer_type_counts.most_common(1)
if most_common_types:
return most_common_types[0][0]
return None