From a740fca8667c7d5ddc80129f8d918400fdfd0e0b Mon Sep 17 00:00:00 2001 From: yanyiwu Date: Thu, 24 Dec 2015 21:35:06 +0800 Subject: [PATCH] add english readme --- README.md | 6 ++-- README_EN.md | 83 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+), 3 deletions(-) create mode 100644 README_EN.md diff --git a/README.md b/README.md index a5a92ec..775418b 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# CppJieba +# CppJieba [English](README_EN.md) [![Build Status](https://travis-ci.org/yanyiwu/cppjieba.png?branch=master)](https://travis-ci.org/yanyiwu/cppjieba) [![Author](https://img.shields.io/badge/author-@yanyiwu-blue.svg?style=flat)](http://yanyiwu.com/) @@ -25,8 +25,8 @@ CppJieba是"结巴(Jieba)"中文分词的C++版本 ### 依赖软件 -* `g++ (version >= 4.1 recommended) or clang++`; -* `cmake (version >= 2.6 recommended)`; +* `g++ (version >= 4.1 is recommended) or clang++`; +* `cmake (version >= 2.6 is recommended)`; ### 下载和编译 diff --git a/README_EN.md b/README_EN.md new file mode 100644 index 0000000..04fcee5 --- /dev/null +++ b/README_EN.md @@ -0,0 +1,83 @@ +# CppJieba [简体中文](README.md) + +[![Build Status](https://travis-ci.org/yanyiwu/cppjieba.png?branch=master)](https://travis-ci.org/yanyiwu/cppjieba) +[![Author](https://img.shields.io/badge/author-@yanyiwu-blue.svg?style=flat)](http://yanyiwu.com/) +[![License](https://img.shields.io/badge/license-MIT-yellow.svg?style=flat)](http://yanyiwu.mit-license.org) + +## Introduction + +The Jieba Chinese Word Segmentation Implemented By C++ . + +## Usage + +### Dependencies + ++ `g++ (version >= 4.1 is recommended) or clang++`; ++ `cmake (version >= 2.6 is recommended)`; + +### Download & Compile + +```sh +git clone --depth=10 --branch=master git://github.com/yanyiwu/cppjieba.git +cd cppjieba +mkdir build +cd build +cmake .. +make +``` + +### Unit Testing + +``` +make test +``` + +## Demo + +``` +./demo +``` + +Output: + +``` +[demo] Cut With HMM +我/是/拖拉机/学院/手扶拖拉机/专业/的/。/不用/多久/,/我/就/会/升职/加薪/,/当上/CEO/,/走上/人生/巅峰/。 +[demo] Cut Without HMM +我/是/拖拉机/学院/手扶拖拉机/专业/的/。/不用/多久/,/我/就/会/升职/加薪/,/当/上/C/E/O/,/走上/人生/巅峰/。 +[demo] CutAll +我/是/拖拉/拖拉机/学院/手扶/手扶拖拉机/拖拉/拖拉机/专业/的/。/不用/多久/,/我/就/会升/升职/加薪/,/当上/C/E/O/,/走上/人生/巅峰/。[demo] CutForSearch +我/是/拖拉机/学院/手扶/手扶拖拉机/拖拉/拖拉机/专业/的/。/不用/多久/,/我/就/会/升职/加薪/,/当上/CEO/,/走上/人生/巅峰/。 +[demo] Insert User Word +男默/女泪 +男默女泪 +[demo] Locate Words +南京市, 0, 3 +长江大桥, 3, 7 +[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"] +``` + +Please see details in `test/demo.cpp`. + +## Cases + ++ [GoJieba] ++ [NodeJieba] ++ [simhash] ++ [exjieba] ++ [jiebaR] ++ [cjieba] ++ [jieba_rb] ++ [iosjieba] ++ [pg_jieba] ++ [ngx_http_cppjieba_module] ++ [gitbook-plugin-search-pro] + +## Contact + ++ Email: `i@yanyiwu.com` ++ QQ: 64162451 + +![image](http://7viirv.com1.z0.glb.clouddn.com/5a7d1b5c0d_yanyiwu_personal_qrcodes.jpg)