mirror of
https://github.com/yanyiwu/cppjieba.git
synced 2025-07-18 00:00:12 +08:00
bak befor replace unicode with utf8
This commit is contained in:
parent
140ce134b6
commit
3da92a2e1a
2
Trie.cpp
2
Trie.cpp
@ -188,7 +188,7 @@ int main()
|
||||
//ChUnicode chUniStr[16];
|
||||
//int uniLen = utf8ToUnicode(utf, sizeof(utf), chUniStr);
|
||||
//cout<<trie.find(chUniStr, uniLen)<<endl;
|
||||
char utf[1024] = "我来到北京清华大学";
|
||||
char utf[1024] = "我来到北京清华大学3D电视";
|
||||
char buf[1024];
|
||||
ChUnicode chUniStr[1024];
|
||||
//cout<<sizeof(utf)<<endl;
|
||||
|
4
Trie.h
4
Trie.h
@ -19,10 +19,11 @@ namespace CppJieba
|
||||
typedef uint16_t ChUnicode;
|
||||
typedef map<ChUnicode, struct TrieNode*> TrieNodeHashMap;
|
||||
|
||||
struct TrieNode
|
||||
struct TrieNode
|
||||
{
|
||||
TrieNodeHashMap hmap;
|
||||
bool isLeaf;
|
||||
|
||||
unsigned int count;
|
||||
string tag;
|
||||
TrieNode()
|
||||
@ -79,6 +80,7 @@ namespace CppJieba
|
||||
{
|
||||
private:
|
||||
TrieNode* _root;
|
||||
vector<TrieNode> _nodeVec;
|
||||
public:
|
||||
typedef TrieNodeIterator iterator;
|
||||
public:
|
||||
|
Loading…
x
Reference in New Issue
Block a user