Skip to content
Snippets Groups Projects
Commit 52b52190 authored by Danny Allen's avatar Danny Allen
Browse files

Update ChatWindow.java

parent 2690e99d
No related branches found
No related tags found
No related merge requests found
......@@ -30,11 +30,6 @@ import org.alicebot.ab.MagicBooleans;
import org.alicebot.ab.MagicStrings;
import org.alicebot.ab.PCAIMLProcessorExtension;
import com.google.code.chatterbotapi.ChatterBot;
import com.google.code.chatterbotapi.ChatterBotFactory;
import com.google.code.chatterbotapi.ChatterBotSession;
import com.google.code.chatterbotapi.ChatterBotType;
import cse332.misc.WordReader;
import javafx.application.Platform;
import javafx.embed.swing.JFXPanel;
......@@ -53,7 +48,6 @@ public class ChatWindow {
private final StringBuilder content;
public String theirUsername;
public Chat esession;
public ChatterBotSession csession;
private final WordSuggestor[] markov;
private final UMessageServerConnection connection;
private final SpellingCorrector checker;
......@@ -86,15 +80,6 @@ public class ChatWindow {
this.esession = new Chat(bot);
}
else if (this.theirUsername.equals("cleverbot")) {
ChatterBotFactory factory = new ChatterBotFactory();
ChatterBot bot1;
try {
bot1 = factory.create(ChatterBotType.CLEVERBOT);
this.csession = bot1.createSession();
} catch (Exception e) {
}
}
}
/**
......@@ -388,13 +373,6 @@ public class ChatWindow {
receiveMessage(this.esession.multisentenceRespond(msg));
return;
}
else if (this.theirUsername.equals("cleverbot")) {
try {
receiveMessage(this.csession.think(msg));
return;
} catch (Exception e) {
}
}
else {
try {
this.connection.m_channel(this.theirUsername, msg);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment