Skip to content

Commit

Permalink
Merge pull request #57 from robwilkes/entity_map_string_fix
Browse files Browse the repository at this point in the history
Fix. Issue #55. Treat entities and synonyms as strings when building entity_map
  • Loading branch information
treethought committed Jan 25, 2018
2 parents edaaf1d + afc18c7 commit 89996aa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api_ai/schema_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,9 @@ def build_user_says(self, intent):
mapping = {}
for a in [a for a in annotations if a]:
for annotation, entity in a.items():
mapping.update({annotation:entity})
mapping.update({str(annotation):str(entity)})
for synonym in self.get_synonyms(annotation, entity):
mapping.update({synonym:entity})
mapping.update({str(synonym):str(entity)})

for phrase in [p for p in phrases if p]:
if phrase != '':
Expand Down

0 comments on commit 89996aa

Please sign in to comment.