]
for e in entities:
// for some reason wit adds additional quotes around entities
e["value"] = e["value"].strip(""")
data = {}
if intent:
data[INTENT] = intent
After Change
for e in entities:
entity_name = e["entity"]
if ":" not in entity_name:
continue
(name, role) = entity_name.rsplit(":", 1)
e[ENTITY_ATTRIBUTE_TYPE] = name
e[ENTITY_ATTRIBUTE_ROLE] = role