簡體   English   中英

如何在我自己的程序中使用帶有函數的 ChatScript 庫?

[英]How can I use ChatScript Library with function in my own program?

我如何編寫一個程序,在其中調用 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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM