如何在我自己的程序中使用ChatScript库函数?

问题描述:

我怎样才能写一个程序,它可以称为ChatScript程序,将我的输入文件传递给它,并获得结果作为输出文本文件?如何在我自己的程序中使用ChatScript库函数?

这是使用ChatScript库一个例子:

#include <fstream> 
#include <iostream> 
#include <string> 
#include <chatScript.h> //for example! 
using namespace std; 

int main() 
{ 
    ofstream output; 
    string str1, str2; 
    getline(cin, str1); 

    //This is the ChatScript function that i am looking for! 
    str2= ChatScript_input(str1); 

    output.open("output.txt"); 
    output<< "str2"; 
    output.close(); 

    return 0; 
} 

我建议你问ChatScript的开发者直接在论坛上,他监视https://www.chatbots.org/ai_zone/viewforum/44/ 希望这不是对这里的规则来发布链接到外部论坛。

据我所知CS打开一个套接字,通过它你应该与它沟通。 以下是说明如何完成的手册: https://github.com/bwilcox-1234/ChatScript/blob/master/WIKI/CLIENTS-AND-SERVERS/ChatScript-ClientServer-Manual.md