Splotch SourceForge.net Logo

Splotch is an Eliza clone developed by Duane Fields at TAMU in 1992. The first Eliza was written by Weizenbaum as a 'computer program for the study of natural language communication between man and machine' and surprised its creator with its effectiveness in convincing some that it was a real person. The first Eliza implementations were designed to mimic Rogerian psychotherapists who treated patients by making them talk about their problems. Splotch, on the other hand, was intended to mimic someone chatting on IRC. As such, it has quite an informal style of conversation and makes a good and quite entertaining conversationist.

Splotch's heart and soul lie in a set of conversation templates prepared by its designer back in 1992. They have pretty much survived unchanged to this day. Splotch accepts a sentence from the user, matches it against the template library, selects the best match, then returns a response.

If you want to see how well such a simple mechanism works, try Splotch out for yourselves. There are two demos of Splotch available on this web-site.
1. Eliza (Splotch) with a Textual Interface
2. Talking Splotch (Hear her talk!)

Sample Conversation With Eliza

Splotch> Hello! Let's chat
hi, let's!
S> hi!
what's up!
S> changing the tires on my dodge
why are you changing tyres on your dodge?
S> because it feels good
come on!
S> I should work on my math
don't be silly
S> grr....


The following screenshot shows the chat window opened by running 'ChatTool' as a Java application (executing 'java ChatTool'). This brings up Splotch in a frame. The same frame appears when Splotch is opened using the ChatApplet.



Type something and hit send.

I promise you this is a blast: click here for a demo with voice capabilities.


To run the program, unzip the classes and enter the directory into which they get extracted (a directory called Splotch).

Run the Java class "Eliza" to start the program. If the Java environment is installed and you are using a unix or DOS shell, the command to execute is "java Eliza".

To bring Eliza up in an applet, you would create a html file that looks like the one below.

<APPLET CODE="ChatApplet" ARCHIVE="splotch.jar" WIDTH=0 HEIGHT=0>

Then, build a jar file with all the .class files and the 'words' subdirectory found in the Splotch directory. Name the jar file splotch.jar. Place it in the same location as the html file you created.

When you open the html file in a browser, the applet will appear in a popup window and allow you to chat with it.

If you want to embed the chat applet in your page, use the QuietApplet instead. A little bit of html and Javascript code is needed to make the interface to the user because the QuietApplet provides no UI capabilities. Here is some html and JavaScript code that exercises the QuietApplet. (In fact, this is the code used in the demo above).

<APPLET NAME="Splotch" CODE="QuietApplet" ARCHIVE="splotch.jar" WIDTH=0 HEIGHT=0>
<SCRIPT LANGUAGE="javascript">
// Keeps the text area limited to 20 lines in length
var sentences = new Array() ;
var count = 0 ;
function addToTextArea(textArea, str) {
	var text = "" ;
	if (count >= 20) {
		for (i = 1; i < 20 ; ++i) {
			sentences[i-1] = sentences[i] ;
		--count ;
	for (i = 0; i <= count ; ++i) {
		text = text+sentences[i]+'\n' ;
	textArea.value = text;
	count++ ;
// Reads the value in the text field and computes a response
function SpeakButton() {
	var str = document.MyForm.text1.value ;
	if (str != "") {
		addToTextArea(document.MyForm.text_area, "> "+str) ;
		document.MyForm.text1.value="waiting..." ;
		var resp = document.Splotch.getResponse(str) ;
		addToTextArea(document.MyForm.text_area, resp) ;
		document.MyForm.text1.value="" ;
	document.MyForm.text1.focus() ;
<FORM NAME="MyForm" onSubmit="SpeakButton(); return false">
	<P><textarea id=text_area name=text_area rows="20" cols="60"></textarea></P>
		<INPUT id=text1 name=text1 size="50">&nbsp;
		<INPUT id=button6 name=button6 type="button" value="Send" onclick="SpeakButton()">
	<p>Type something and hit send.</p>


The software can be downloaded as source code using CVS. A jar file (suitable for use as an applet archive) is available for download as well. Click to download the jar.

Yes, we are still working on getting drops from the sources in CVS. We might also need to create different branches for the template library for different uses that the tool might be put to.

License Agreement

There are two License Agreements in use here. The first is the GPL (GNU General Public License) and the second is the LGPL (GNU Lesser General Public License).

All the code borrowed from the original Splotch is distributed under the GPL. This includes main.dict, syn.dict (which are the brains of the tool) and all the word list files under the directory 'words'. These were originally distributed under the GPL and cannot be used in software that is not GPLed.

The code that has subsequently been contributed, in Java, Perl and Python is distributed under the LGPL. In essence, if you wish to make Splotch an integral part of a program that you do not distribute under the GPL, you would have to write your own templates and word lists to go with the program, but you can use all of the Java, Perl or Python code.

So, let me make it clear what is GPLed and what isn't. The Java, Perl and Python code and anything that this code generates is under the LGPL. Everything else is under the GPL. The copyright holders reserve the right to the change this demarcation (without loosening any existing licenses) should future developments necessitate it.


The following additions and features are needed for Splotch.