Germandrummer92 / TalkingRobot

PSE
0 stars 0 forks source link

NLU parses the wrong (?) keywords. #11

Closed Germandrummer92 closed 10 years ago

Germandrummer92 commented 10 years ago

Input after login:

recipe

Expected Keyword parse:

recipe

Real Keyword Parse:

[kitchen assistance].

I don't think this is correct, or is it? If yes we have to add those keywords to the Dictionary obviously. Same thing happens for these inputs (Some of these might not be keywords we actually have, so no worries on those).

Inputs after login:

ingredient ingredients kitchen tool kitchen tools

Expected parse:

ingredient ingredients kitchen tool kitchen tools origin country steps recipe steps

Real Parse:

[recipe assistance]. nothing [kitchen assistance]. nothing nothing nothing nothing [kitchen assistance]. (????? should definitely be recipe assistance if at all).

I'm still not sure if these parses are intended for the recipe assistance etc. instead of the word itself, but since we have all the words defined, it would be definitely easier now if it just passes the word.

Tested by adding the following code:

DMPhase.setPhaseResult(Main main) {
        //If nothing has been parsed, handle Error

        main.setDmResult(null);
        int i =0;
        for (String s : Main.giveMain().getNluResult().get(0)) {
            System.out.println("Keyword" + " " + i + ": " + s);
        }
}
narigaoka commented 10 years ago

for recipe steps it recognizes "recipe" and ignores "step". that's why it gets added to kitchen assistance again. we will try to fix the error. it seems like the PhoenixAdapter class puts the wrong parts of the output of Phoenix into the output, as the output of Phoenix should look like: [kitchen assistance].recipe

Germandrummer92 commented 10 years ago

So it's supposed to parse [kitchen assistance].recipe ? Hmm, I think we have to change the DMPhase then, as it expects it to only be recipe when looking for corresponding keywords

narigaoka commented 10 years ago

nono, it is supposed to return "recipe" to the Dm

narigaoka commented 10 years ago

phoenix was supposed to have the output "[kitchen_assistance].recipe" and PhoenixAdapter was supposed to remove "[kitchen_assistance].", so the nlu would return "recipe". But Phoenix only had the output "[kitchen_assistance]." instead of "[kitchen_assistance].recipe" so something went wrong ... but we fixed it a bit. Can you try if it works now?

we have also added country and origin to the keywords

Germandrummer92 commented 10 years ago

Okay, this seems to have been fixed. For some reason recipe is still making the dialog switch wrongly, but that's the DM's fault...