2

每当我尝试加载 Alice 的目标文件时,我都会收到关于未找到标签的各种错误,但是当我修复这些错误时,我会收到一个错误,我不知道如何修复。没有实现目标的东西,但是当我查看目标类时,它正在执行它:?我的代码:

public static String input()
{
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    //System.out.println("you say>");
    String input = "";
    try 
    {
        input = in.readLine();
    } catch (IOException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }
    return input;
}




public static void main(String[] args) throws Exception
{
     Chat ch=new Chat();        
     AliceBotMother mother = new AliceBotMother();        
     mother.setUp();
     AliceBot bot = mother.newInstance();
     System.err.println(bot.respond("welcome"));
 while(true)
 {
     String input = Chat.input();
         // while the user saying 'bye'
         if(Chat.END.equalsIgnoreCase(input))
             break;
         // do some respond..
         System.err.println("Alice>" + bot.respond(input));
 }
4

1 回答 1

5

Chatterbean 是一个不再受支持的旧 Java 程序。您应该在https://code.google.com/p/program-ab/上安装较新的 Java AIML 2.0 库 Program AB

于 2013-03-15T13:16:55.440 回答