CppJieba"(Jieba)"C++
include/cppjieba/*.hpp``include
utf8
Linux
, Mac OSX
, Windows
g++ (version >= 4.1 is recommended) or clang++
;cmake (version >= 2.6 is recommended)
;git clone --depth=10 --branch=master git://github.com/yanyiwu/cppjieba.git
cd cppjieba
mkdir build
cd build
cmake ..
make
():
make test
./demo
[demo] Cut With HMM
/////
[demo] Cut Without HMM
//////
[demo] CutAll
//////
[demo] CutForSearch
//////////////////
[demo] Insert User Word
/
[demo] CutForSearch Word With Offset
[{"word": "", "offset": 0}, {"word": "", "offset": 6}, {"word": "", "offset": 12}, {"word": "", "offset": 18}, {"word": "", "offset": 21}, {"word": "", "offset": 27}, {"word": "", "offset": 30}, {"word": "", "offset": 27}, {"word": "", "offset": 21}, {"word": "", "offset": 36}, {"word": "", "offset": 36}, {"word": "", "offset": 45}, {"word": "", "offset": 48}, {"word": "", "offset": 51}, {"word": "", "offset": 54}, {"word": "", "offset": 60}, {"word": "", "offset": 66}, {"word": "", "offset": 54}, {"word": "", "offset": 72}]
[demo] Tagging
CEO
[:r, :v, :n, :n, :n, :n, :uj, :x, :v, :m, :x, :r, :d, :v, :v, :nr, :x, :t, CEO:eng, :x, :v, :n, :n, :x]
[demo] Keyword Extraction
CEO
[{"word": "CEO", "offset": [93], "weight": 11.7392}, {"word": "", "offset": [72], "weight": 10.8562}, {"word": "", "offset": [78], "weight": 10.6426}, {"word": "", "offset": [21], "weight": 10.0089}, {"word": "", "offset": [111], "weight": 9.49396}]
test/demo.cpp
.
MPSegment
Output:
///
//////
///////////
HMMSegment
///
/////
////////////////
MixSegment
///
/////
//////////
FullSegment
//////
//////
////////////////////
QuerySegment
//////
/////
///////////////////////
MP,HMM,Mix
MixMPHMM""
Full
QueryMixFull
dict/user.dict.utf8
:
//////
:
/////
CEO
["CEO:11.7392", ":10.8562", ":10.6426", ":10.0089", ":9.49396"]
test/demo.cpp
.
CEO
[":r", ":v", ":n", ":n", ":n", ":n", ":uj", ":x", ":v", ":m", ":x", ":r", ":d", ":v", ":v", ":nr", ":x", ":t", "CEO:eng", ":x", ":v", ":n", ":n", ":x"]
test/demo.cpp
.
(dict/user.dict.utf8
)
nz
[":r", ":v", ":nz", ":n", ":n", ":n", ":n", ":n", ":uj", ":x", ":v", ":m", ":x", ":r", ":d", ":v", ":v", ":nr", ":x", ":t", ":f", ":n", ":x", ":v", "CEO:eng", ":x", ":v", ":x", ":x", ":v", ":n", ":n", ":x"]
Web-Demo (chrome)
[Jieba]
This project exists thanks to all the people who contribute.
[]:https://github.com/yanyiwu/cppjieba/wiki/CppJieba%E4%BB%A3%E7%A0%81%E8%AF%A6%E8%A7%A3 [issue25]:https://github.com/yanyiwu/cppjieba/issues/25 [exjieba]:falood/exjieba [KeywordServer]:yanyiwu/keyword_server [ngx_http_cppjieba_module]:yanyiwu/ngx_http_cppjieba_module [dict.367W.utf8]:qinwf/BigDict [cjieba]:yanyiwu/cjieba [jieba_rb]:altkatz/jieba_rb [iosjieba]:yanyiwu/iosjieba [SqlJieba]:yanyiwu/sqljieba [Jieba]:http://yanyiwu.com/work/2015/06/14/jieba-series-performance-test.html [pg_jieba]:jaiminpan/pg_jieba [gitbook-plugin-search-pro]:https://plugins.gitbook.com/plugin/search-pro [cppjieba-server]:yanyiwu/cppjieba-server [phpjieba]:jonnywang/phpjieba [perl5-jieba]:https://metacpan.org/pod/distribution/Lingua-ZH-Jieba/lib/Lingua/ZH/Jieba.pod [jieba-dlang]:shove70/jieba [simple]:wangfenjin/simple