[Python Chatbot, IBM Watson AI]

Google Eliza Talk

What is Eliza?


Eliza is a simulation of a Rogerian psychotherapist, provided a startlingly human-like interaction, written at the MIT Artificial Intelligence Laboratory by Joseph Weizenbaum between 1964 and 1966. At that time, people started to treat Eliza as a real human psychotherapist and develop emotional linkage to it, which was not Joseph expected. 

What is Google?


Google is a multinational, publicly-traded organization built around the company’s hugely popular search engine. But it has also become the verb means searching information online or the clean search and simple interface. But if we consider the text generated from Google result, they are opinions or thought generated from millions of Internet users online. In this perspective, Google is the window to the internet users' mind.

Google + Eliza

What is Google Eliza Talk?

Google Eliza Talk is a programme that takes “What topic to do you want Google to talk with Eliza” and “How many times do you want Google to talk with Eliza” as input, and create a conversation between Google and Eliza, until the users' IP are blocked by Google. 


From the initial user input, google search the input as keyword and pick one of the sentence from the result pages as input to Eliza. Then Google add the previous result and Eliza’s question as new search keyword. It is a conversation between 2 programme, but it is also organic as the contents are dynamically genereated from the internet users. 

You can use this layout block as a little about me blurb or use it on top of projects to and add a description. To edit the copy, just click right in here.

Algorithm

In order to build the same app your computer, you have to prepare the following modules:


1. requests, utllib2 or mechanize (to get the element from webpage)

2. re

3. BeautifulSoup

4. TextBlob


Components

Eliza Programme

The Eliza programme is written at MIT Artificial Intelligence Laboratory by Joseph Weizenbaum. I translated the programme into python logics.

Random Function

The random function is to filter out the sentences from Google search result which contains "…", to prevent the sentence selection return non-complete sentence for the input to Eliza’s question and for the new search.

Text Generation Function

The text generate function use the module of “Request” to get the information from the first page of Google result. And then use module of “Beautiful Soup” to get the text which in the class “st” in the Google search result page. 


Sentiment Function

The sentiment function takes all the text from the first page from Google result as input and calculate the polarity and subjectivity of those text. Thus display the emotion of Google. 



Console Function

The console function collect the input from the users, i.e. "What do you want Google to discuss with Eliza" and "How many times do you want Google to talk with Eliza?" or to quit the programme. It prints out what Eliza and Google said for every 2 seconds. 


Future Functions




With the TextBlob module, it is easy to detect the words in terms of phrases, verbs, objects, adjectives, etc. The programme can display the pitures of the locations, adjectives, and nouns, etc, when Google is responding to Eliza, makes the conversation be more human-like. 






With the TextBlob module, it can achieve sentiment score analysis, to give the emotion to the results from Google. It can be liked to my last project – Emotional Identifier, to express the emotion from Google by lights. 



The  IBM Watson Personality Analysis, it can analysis at least 3500 words and ideally 6000 to have an analysis for the text and give personality for a target. Therefore, in the future, the programme and connected to it and get the perosonality of Google after taking with Eliza.



This idea can be implemented outside the Google Eliza Talk programme, but also possible because of the text analysis programme, like TextBlob. It can make possible of displaying images related to the phrases/ noun that the text is mentioning with the reading. Turn text into visual form and make the reading more understandable for people who are more good at visual

Selected Conversations


Google Said:

I can't remember ever seeing any NPC by that name, but some of the townsfolk talk about someone named Eliza or Ellie.

Eliza Answered:

What would it take for you to remember ever seeing any npc by that name, but some of the townsfolk talk about someone named eliza or ellie?

Google Said:

But what can you say, you just can't say no to a challenge.

Eliza Answered:

I see.

Google Said:

When friends ask you to do something you don't want to do, do you invent an elaborate excuse?

Eliza Answered:

Perhaps the answer lies within yourself?

Google Said:

The future becomes an excuse for postponing action.




Google Said:

I can't remember ever seeing any NPC by that name, but some of the townsfolk talk about someone named Eliza or Ellie.


Eliza Answered:

What would it take for you to remember ever seeing any npc by that name, but some of the townsfolk talk about someone named eliza or ellie?


Google Said:

But what can you say, you just can't say no to a challenge.


Eliza Answered:

I see.


Google Said:

When friends ask you to do something you don't want to do, do you invent an elaborate excuse?


Eliza Answered:

Perhaps the answer lies within yourself?


Google Said:

The future becomes an excuse for postponing action.




Eliza Answered:

Let's change focus a bit… Tell me about your family.


Google Said:

The future becomes an excuse for postponing action.


Eliza Answered:

How does that make you feel?


Google Said:

BECOME AN UPWORK SUPERSTAR.very anxious that we talk to the right person.


Eliza Answered:

I see.


Google Said:

If you act impulsively and rashly at work, you will likely lose much more than your self-respect.


Eliza Answered:

How does that make you feel?


Google Said:

Pretty obvious.


  • Eliza Answered:Google Inc
  • pretty obvious.It’s Nice That


[ Google feel Peaceful '_' ]


I am Sam.


[ ELIZA '_' ]

How long have you been sam?


[ Google feel Excited ^o^ ]


I Am Sam will likely make you say, "Wow!I am Sam script at the Internet Movie Script Database.


[ ELIZA '_' ]

Let's change focus a bit… Tell me about your family.


[ Google feel Excited ^o^ ]


No.


[ ELIZA '_' ]

How does that make you feel?


[ Google feel Excited ^o^ ]


Oh, no, I see a darkness.


[ ELIZA '_' ]

I see. And what does that tell you?


[ Google feel Excited ^o^ ]


Oh no, I see a darkness.


[ ELIZA '_' ]

Very interesting.


[ Google feel Excited ^o^ ]