mirror of
https://github.com/yanyiwu/cppjieba.git
synced 2025-07-18 00:00:12 +08:00
fixed the bug in the last commit
This commit is contained in:
parent
28bcb3bf57
commit
e9241d9025
@ -17,6 +17,7 @@ using namespace limonp;
|
||||
class SegmentBase: public ISegment {
|
||||
public:
|
||||
SegmentBase() {
|
||||
LoadSpecialSymbols();
|
||||
}
|
||||
virtual ~SegmentBase() {
|
||||
}
|
||||
@ -65,8 +66,6 @@ class SegmentBase: public ISegment {
|
||||
res.resize(res.size() + uRes.size());
|
||||
for(size_t i = 0; i < uRes.size(); i ++, offset++) {
|
||||
TransCode::encode(uRes[i], res[offset]);
|
||||
cout << __FILE__ << __LINE__ << endl;
|
||||
cout << res[offset] << endl;
|
||||
}
|
||||
}
|
||||
private:
|
||||
|
@ -18,7 +18,6 @@ TEST(MixSegmentTest, Test1) {
|
||||
const char* res2[] = {"B超"," ", "T恤"};
|
||||
vector<string> words;
|
||||
ASSERT_TRUE(segment.cut(str, words));
|
||||
cout << words << endl;
|
||||
ASSERT_EQ(words, vector<string>(res, res + sizeof(res)/sizeof(res[0])));
|
||||
ASSERT_TRUE(segment.cut(str2, words));
|
||||
ASSERT_EQ(words, vector<string>(res2, res2 + sizeof(res2)/sizeof(res2[0])));
|
||||
|
Loading…
x
Reference in New Issue
Block a user