#include "docwire.h"
#include <cassert>
#include <sstream>
 
int main(int argc, char* argv[])
{
using namespace docwire
std::stringstream out_stream
 
try
{
std::filesystem::path("data_processing_definition.doc") | content_type::detector{} | office_formats_parser{} | PlainTextExporter() | local_ai::model_chain_element("Detect sentiment:\n\n", std::make_shared<local_ai::model_runner>()) | out_stream
}
catch (const std::exception& e)
{
std::cerr << errors::diagnostic_message(e) << std::endl
return 1
}
assert(out_stream.str() == "positive")
 
return 0
}
posted on 2025-07-05 10:01  北京开发  阅读(4)  评论(0)    收藏  举报