我如何编写一个程序,在里面,我可以调用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;
}发布于 2017-10-06 04:47:26
我建议你直接在论坛上询问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
https://stackoverflow.com/questions/46559870
复制相似问题