Custom ELIZA data
2.2 — Physical Computing
I wanted to make ELIZA speak the things I have written in the script, and also keep the original ability to simulate general talk about anything. To do that I had to change elizadata.js
file which has such structure:
I replaced the initial phrase with the new one, which has directions on how to use the doll:
var elizaInitials = [
"Hi, my name is Misty and I would be happy to talk about you. If you have any body part which bothers you and you want to know which thoughts cause that, you can insert a needle in respective part of me. To talk to me, squeeze my head while talking.",
];
Then, according to the structure, I defined keywords and replies according to the structure. Also, I have set ranks to each keyword, which were higher, than those for the original keywords of ELIZA, so she could always answer relevantly. For example:
See the Pen dRzWea by Roman Trilo (@romantrilo) on CodePen.