fix vec
This commit is contained in:
parent
7943c89b58
commit
25d938f3e6
@ -25,15 +25,15 @@ void BmmSegment::ConcreteSplit(iutf8string& phrase, uint32_t appid, vector<strin
|
||||
if (wordValid(key.stlstring(), appid) == true) {
|
||||
vector<string>::iterator iter = bmm_list.begin();
|
||||
bmm_list.insert(iter, key.stlstring());
|
||||
i -= key.length() - 1;
|
||||
i -= key.length();
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (j == phrase_sub.length() - 1) {
|
||||
vector<string>::iterator iter = bmm_list.begin();
|
||||
bmm_list.insert(iter, "" + phrase_sub[j]);
|
||||
i--;
|
||||
}
|
||||
i -= 1;
|
||||
}
|
||||
return;
|
||||
}
|
@ -56,4 +56,7 @@ void CustomSegment::ConcreteSplit(iutf8string& phrase, uint32_t appid, vector<st
|
||||
tmp = "";
|
||||
}
|
||||
}
|
||||
if(tmp != ""){
|
||||
vec.push_back(tmp);
|
||||
}
|
||||
}
|
@ -24,14 +24,14 @@ void FmmSegment::ConcreteSplit(iutf8string& phrase, uint32_t appid, vector<strin
|
||||
iutf8string key = phrase_sub.utf8substr(0, j);
|
||||
if (wordValid(key.stlstring(), appid) == true) {
|
||||
fmm_list.push_back(key.stlstring());
|
||||
i += key.length() - 1;
|
||||
i += key.length();
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (j == 1) {
|
||||
fmm_list.push_back(phrase_sub[0]);
|
||||
i++;
|
||||
}
|
||||
i += 1;
|
||||
}
|
||||
return;
|
||||
}
|
Loading…
Reference in New Issue
Block a user