translate from java pure code to processing
in
Contributed Library Questions
•
4 months ago
Hi, i'm trying to implement in Processing the example about the use of CLEVERBOT in java. The library can be found
here, but I have some difficulties.
The example in java is below. How can I implement this example in Processing?
package com.google.code.chatterbotapi.test;
import com.google.code.chatterbotapi.*;
public class ChatterBotApiTest {
public static void main(String[] args) throws Exception {
ChatterBotFactory factory = new ChatterBotFactory();
ChatterBot bot1 = factory.create(ChatterBotType.CLEVERBOT);
ChatterBotSession bot1session = bot1.createSession();
ChatterBot bot2 = factory.create(ChatterBotType.PANDORABOTS, "b0dafd24ee35a477");
ChatterBotSession bot2session = bot2.createSession();
String s = "Hi";
while (true) {
System.out.println("bot1> " + s);
s = bot2session.think(s);
System.out.println("bot2> " + s);
s = bot1session.think(s);
}
}
}
1