Germandrummer92 / TalkingRobot

PSE
0 stars 0 forks source link

Only outputs SocialBefore.json for the state, when entering a name. #2

Closed Germandrummer92 closed 10 years ago

Germandrummer92 commented 10 years ago

To reproduce:

Input: hello daniel

Expected Output: Hi, what's your name Yay. I've found your user history, . How may I help you

Real Output: Hi, what's your name Yay.

Germandrummer92 commented 10 years ago

Actually, I think the NLG always outputs the FIRST socialBefore sentence (which sometimes is null which leads to stuff like " . what is the country of origin" and the FIRST sentences sentence. So probably an error in the random number generation?

luizhsilva commented 10 years ago

Are you sure? Actually I got different ones from sentence.json. Sometimes "Hi, what's your name" and sometimes "Hey you, may I have your name". But yes, I guess maybe in the social there's a problem. There's also a problem that the NLG is never getting the Keywords from any state. I'll open an issue with that.

luizhsilva commented 10 years ago

Yep, I checked, and you are right. The random is working for the "sentences", but sometimes it's not being called. And socialAfter is not being called, somehow. I'll check that and try to fix it.

Germandrummer92 commented 10 years ago

For some reason now, if the SocialBefore is empty for the state it does the following:

Your next Input:hello dm.StartState The robot says: . Hello, can you tell me your name

so it tries to add the SocialBefore, even though it's just an empty string. Would that be fixed by making all the arrays containing an empty string, just an empty array and checking for the size of it before adding a social component?

luizhsilva commented 10 years ago

I will check that too. The problem there could also be the same that it was before in the replacement. The split method was being used wronlgy....

Germandrummer92 commented 10 years ago

This seems to have been fixed ? Reopen if not

luizhsilva commented 10 years ago

Yep, I fixed it.