intent_name: {"utterances": dataset_json["utterances"]}
for intent_name, dataset_json in intent_datasets_json.items()
}
entities = dict()
for dataset in intent_datasets_json.values():
for entity, data in dataset["entities"].items():
if entity not in entities:
After Change
if ent_name not in ents:
ents[ent_name] = ent
elif ent_name not in BUILTIN_ENTITIES:
ents[ent_name].utterances.extend(ent.utterances)
ents = {
entity_name: entity.json
for entity_name, entity in iteritems(ents)
}