Example #1
0
 def recognize_entity(self, string):
     result = []
     words = string.lower().split()
     for contact in CONTACT_NUMBERS.keys():
         if contact.lower() in words:
             recognized_entity = {
                 "sort": "contact",
                 "grammar_entry": contact
             }
             result.append(recognized_entity)
     return result