mirror of
https://github.com/yanyiwu/cppjieba.git
synced 2025-07-18 00:00:12 +08:00
remove Segment.init bug
This commit is contained in:
parent
5dd981f760
commit
a6faf599ae
@ -12,9 +12,11 @@ namespace CppJieba
|
||||
|
||||
bool Segment::init(const char* const dictFilePath)
|
||||
{
|
||||
bool retFlag;
|
||||
LogInfo(string_format("_trie.init(%s) start...", dictFilePath));
|
||||
_trie.init(dictFilePath);
|
||||
retFlag = _trie.init(dictFilePath);
|
||||
LogInfo("_trie.init end.");
|
||||
return retFlag;
|
||||
}
|
||||
|
||||
bool Segment::destroy()
|
||||
@ -327,7 +329,11 @@ using namespace CppJieba;
|
||||
int main()
|
||||
{
|
||||
Segment segment;
|
||||
segment.init("dicts/segdict.utf8.v2.1");
|
||||
if(!segment.init("../dicts/segdict.utf8.v2.1"))
|
||||
{
|
||||
cerr<<"1"<<endl;
|
||||
return 1;
|
||||
}
|
||||
//segment.init("dicts/jieba.dict.utf8");
|
||||
|
||||
vector<string> res;
|
||||
|
Loading…
x
Reference in New Issue
Block a user