Ejemplo n.º 1
0
def user_input(message="Hello"):
    reply = None

    while not reply:
        reply = recognize()
    communicator.send_to_ui("user", reply)
    return reply.lower()
Ejemplo n.º 2
0
def user_input(message="Hello"):
    reply = None

    while not reply:
        reply = recognize()
    communicator.send_to_ui("user", reply)
    return reply.lower()
Ejemplo n.º 3
0
def say(what):
    command = {
        "Darwin": "say",
        "Linux": "espeak"
    }[platform.system()]

    call([command, what])
    communicator.send_to_ui("jeeves", what)
Ejemplo n.º 4
0
def user_input(message):
    print(message)
    reply = None

    while not reply:
        reply = recognize()
    communicator.send_to_ui("user", reply)
    return reply
Ejemplo n.º 5
0
 def __init__(self, sentence):
     communicator.send_to_ui("user", sentence)
     self.words = nltk.word_tokenize(sentence)
Ejemplo n.º 6
0
 def __init__(self, sentence):
     communicator.send_to_ui("user", sentence)
     sentence = self.command_exists(sentence)
     self.words = nltk.word_tokenize(sentence)
     print self.words
Ejemplo n.º 7
0
 def __init__(self, sentence):
     communicator.send_to_ui("user", sentence)
     sentence = self.command_exists(sentence)
     self.words = nltk.word_tokenize(sentence)
     print self.words
Ejemplo n.º 8
0
def say(what):
    command = {"Darwin": "say", "Linux": "espeak"}[platform.system()]

    call([command, what])
    communicator.send_to_ui("jeeves", what)
Ejemplo n.º 9
0
 def __init__(self, sentence):
     communicator.send_to_ui("user", sentence)
     self.words = nltk.word_tokenize(sentence)