#include #include #include "../src/headers.h" using namespace CppJieba; Segment seg; bool init(const char * const filePath) { if(!seg.init()) { cout<<"seg init failed."< res; string line; while(getline(ifile, line)) { res.clear(); if(!line.empty()) { seg.cutDAG(line, res); cout< mpss; getArgvMap(argc, argv, mpss); string enc = getMap(mpss, "--encoding", ""); string dictPath = getMap(mpss, "--dictpath", "../dicts/jieba.dict.gbk"); */ if(argc < 2) { cout<<"usage: \n\t"< [options]\n" <<"options:\n" <<"\t--dictpath\tIf is not specified, the default is ../dicts/jieba.dict.utf8\n" <<"\t--encoding\tSupported encoding methods are [gbk, utf-8] for now. \n\t\t\tIf is not specified, the default is utf8.\n" <<"example:\n" <<"\t"<