mirror of
https://github.com/yanyiwu/cppjieba.git
synced 2025-07-18 00:00:12 +08:00
modify segment.cpp
This commit is contained in:
parent
fd7ff031d0
commit
2641b1d0a3
@ -1,7 +1,7 @@
|
||||
PROJECT(CPPJIEBA)
|
||||
SET(CMAKE_INSTALL_PREFIX /usr)
|
||||
ADD_DEFINITIONS(-std=c++0x -O3)
|
||||
ADD_DEFINITIONS(-DCPPJIEBA_GBK)
|
||||
#ADD_DEFINITIONS(-DCPPJIEBA_GBK)
|
||||
ADD_SUBDIRECTORY(src)
|
||||
ADD_SUBDIRECTORY(dicts)
|
||||
ADD_SUBDIRECTORY(scripts)
|
||||
|
@ -17,8 +17,14 @@ void cut(const ISegment * seg, const char * const filePath)
|
||||
if(!line.empty())
|
||||
{
|
||||
res.clear();
|
||||
seg->cut(line, res);
|
||||
cout<<join(res.begin(), res.end(),"/")<<endl;
|
||||
if(!seg->cut(line, res))
|
||||
{
|
||||
LogError("seg cut failed.");
|
||||
}
|
||||
else
|
||||
{
|
||||
print(join(res.begin(), res.end(), "/"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user