def __handle_question_query(self, message):
    search_phrase = message.data['phrase']
    self.bus.emit(message.response({'phrase': search_phrase, 'skill_id': self.skill_id, 'searching': True}))
    result = self.CQS_match_query_phrase(search_phrase)
    if result:
        match = result[0]
        level = result[1]
        answer = result[2]
        callback = (result[3] if (len(result) > 3) else None)
        confidence = self.__calc_confidence(match, search_phrase, level)
        self.bus.emit(message.response({'phrase': search_phrase, 'skill_id': self.skill_id, 'answer': answer, 'callback_data': callback, 'conf': confidence}))
    else:
        self.bus.emit(message.response({'phrase': search_phrase, 'skill_id': self.skill_id, 'searching': False}))
def __handle_question_query(self, message):
    search_phrase = message.data['phrase']
    self.bus.emit(message.response({'phrase': search_phrase, 'skill_id': self.skill_id, 'searching': True}))
    result = self.CQS_match_query_phrase(search_phrase)
    if result:
        match = result[0]
        level = result[1]
        answer = result[2]
        callback = (result[3] if (len(result) > 3) else None)
        confidence = self.__calc_confidence(match, search_phrase, level)
        self.bus.emit(message.response({'phrase': search_phrase, 'skill_id': self.skill_id, 'answer': answer, 'callback_data': callback, 'conf': confidence}))
    else:
        self.bus.emit(message.response({'phrase': search_phrase, 'skill_id': self.skill_id, 'searching': False}))