2

Alice aimlファイルを読み込もうとすると、タグが見つからないというさまざまなエラーが発生しますが、エラーを修正するとエラーが発生し、修正方法がわかりません。aimlは実装されていませんが、aimlクラスを見ると、それが実装されています:?私のコード:

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/にある新しいJavaAIML2.0ライブラリProgramABが必要です。

于 2013-03-15T13:16:55.440 に答える