【问题标题】:How can I use ChatScript Library with function in my own program?如何在我自己的程序中使用带有函数的 ChatScript 库?
【发布时间】:2017-12-08 21:22:09
【问题描述】:

如何编写一个程序,在其中调用 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;
}

【问题讨论】:

    标签: chat bots chatscript


    【解决方案1】:

    我建议你直接在他监控的论坛上询问 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

    【讨论】:

      猜你喜欢
      • 2016-06-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-01-21
      • 2013-01-20
      • 1970-01-01
      相关资源
      最近更新 更多