Xyaneon / LTUAssistant

An AI assistant like Google Now, Siri, Cortana, etc. for an LTU senior project.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"I want to schedule an event" crashes the assistant

Xyaneon opened this issue · comments

Either speak this or pass this sentence to the assistant, and it crashes with the following traceback:

Traceback (most recent call last):
  File "LTUAssistant.py", line 28, in <module>
    Integrate(" ".join(sys.argv[1:]))
  File "LTUAssistant.py", line 19, in Integrate
    (verb, verb_object, noun2, verb2, preposition) = CoreNLP.Parse(sentence)
  File "/home/christopher/LTUAssistant/CoreNLP.py", line 129, in Parse
    print("Changing verb to %s" % GetWords(sentence, verb))
  File "/home/christopher/LTUAssistant/CoreNLP.py", line 113, in GetWords
    return " ".join(parsed["tokens"][wordPositions[0]:wordPositions[1]])
TypeError: 'int' object has no attribute '__getitem__'

Seems like it is an issue with the CoreNLP part of the code, i'll look into it tomorrow.

Fixed in 6368b64

Although if you still want to actually parse the sentence, might possibly need some more changes, or could be doable now.