entities = self._dataset_metadata["entities"]
for parser in self.intent_parsers:
res = parser.parse(text, intents)
if is_empty(res):
continue
slots = res[RES_SLOTS]
scope = [BuiltInEntity.from_label(s[RES_ENTITY]) for s in slots
if is_builtin_entity(s[RES_ENTITY])]
resolved_slots = resolve_slots(text, slots, entities, language,
scope)
return parsing_result(text, intent=res[RES_INTENT],
slots=resolved_slots)
return empty_result(text)