#include #include #include "../src/headers.h" using namespace CppJieba; MPSegment seg; HMMSegment hmmseg; bool init(const char * const dictPath, const char * const modelPath) { if(!seg.init(dictPath)) { cout<<"seg init failed."< res; string line; while(getline(ifile, line)) { if(!line.empty()) { seg.cut(line, res); cout< res; string line; while(getline(ifile, line)) { if(!line.empty()) { hmmseg.cut(line, res); cout< res; string line; while(getline(ifs, line)) { seg.cut(line, res); } } bool dispose() { if(!seg.dispose()) { cout<<"seg dispose failed."<\n" <<"options:\n" <<"\t--algorithm\tSupported encoding methods are [cutDAG, cutHMM] for now. \n\t\t\tIf not specified, the default is cutDAG\n" <<"\t--dictpath\tIf not specified, the default is "<