예제 #1
0
파일: device.py 프로젝트: JohanRoland/CarAI
 def perform(self):
     out = []
     for con in CONTACT_NUMBERS.keys():
         number_entity = {
             "grammar_entry": con
         }
         out.append(number_entity)
     return out
예제 #2
0
파일: device.py 프로젝트: JohanRoland/CarAI
 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
예제 #3
0
파일: device.py 프로젝트: JohanRoland/CarAI
 def is_valid(self, selected_contact):
     number = CONTACT_NUMBERS.get(selected_contact)
     if number:
         return True
     return False
예제 #4
0
파일: device.py 프로젝트: JohanRoland/CarAI
 def perform(self, selected_contact):
     number = CONTACT_NUMBERS.get(selected_contact)
     number_entity = {
         "grammar_entry": number
     }
     return [number_entity]
예제 #5
0
파일: device.py 프로젝트: JohanRoland/CarAI
 def perform(self, selected_contact):
     number = CONTACT_NUMBERS.get(selected_contact)
     # TODO: Implement calling
     success = True
     return success