willowjar / scratchNLP

2 stars 1 forks source link

Support punctuation in word phrases? #14

Open quachtina96 opened 5 years ago

quachtina96 commented 5 years ago

Consider the command: "scratch, if i say who's there then say king tut thats it"

Expected Behavior: . The Scratch text2speech extensions should say "king tut" when user says "who's there". The issue is that ScratchNLP only supports sentences without punctuation. This generates programs that are inconsistent with the speech recognizer in the speech2text Scratch Extension (which we do not yet have control over).

Current behavior When the command is being executed and the user says "who's there", the Scratch speech2text extension recognizes who's there, but the ScratchNLP has generated a program that checks for "whos there" -- the phrase without the punctuation.

[ "listenAndWait", [ "doIf", [ "=", [ "getSpeech" ], "whos there" ], [ [ "speakAndWait:", "king tut" ] ] ] ]