Full Code of yanyiwu/gosimhash for AI

master fb4843c9d995 cached
158 files
13.6 MB
3.6M tokens
526 symbols
1 requests
Copy disabled (too large) Download .txt
Showing preview only (19,418K chars total). Download the full file to get everything.
Repository: yanyiwu/gosimhash
Branch: master
Commit: fb4843c9d995
Files: 158
Total size: 13.6 MB

Directory structure:
gitextract_mj0hkj7m/

├── .github/
│   └── workflows/
│       ├── go.yml
│       └── stale-issues.yml
├── .gitignore
├── CHANGELOG.md
├── README.md
├── config.go
├── deps/
│   ├── simhash/
│   │   ├── .github/
│   │   │   └── workflows/
│   │   │       └── cmake.yml
│   │   ├── .gitignore
│   │   ├── .gitmodules
│   │   ├── .travis.yml
│   │   ├── CMakeLists.txt
│   │   ├── ChangeLog.md
│   │   ├── README.md
│   │   ├── benchmark/
│   │   │   ├── CMakeLists.txt
│   │   │   ├── benchmarking.cpp
│   │   │   └── lib/
│   │   │       ├── Simhasher_benchmark.h
│   │   │       ├── utils.h
│   │   │       └── vals.h
│   │   ├── example/
│   │   │   ├── CMakeLists.txt
│   │   │   └── demo.cpp
│   │   ├── include/
│   │   │   └── simhash/
│   │   │       ├── Simhasher.hpp
│   │   │       └── jenkins.h
│   │   ├── submodules/
│   │   │   └── cppjieba/
│   │   │       ├── .github/
│   │   │       │   └── workflows/
│   │   │       │       └── cmake.yml
│   │   │       ├── .gitignore
│   │   │       ├── .gitmodules
│   │   │       ├── CMakeLists.txt
│   │   │       ├── ChangeLog.md
│   │   │       ├── LICENSE
│   │   │       ├── README.md
│   │   │       ├── deps/
│   │   │       │   └── limonp/
│   │   │       │       ├── .github/
│   │   │       │       │   └── workflows/
│   │   │       │       │       └── cmake.yml
│   │   │       │       ├── .gitignore
│   │   │       │       ├── .gitmodules
│   │   │       │       ├── CMakeLists.txt
│   │   │       │       ├── ChangeLog.md
│   │   │       │       ├── LICENSE
│   │   │       │       ├── README.md
│   │   │       │       ├── include/
│   │   │       │       │   └── limonp/
│   │   │       │       │       ├── ArgvContext.hpp
│   │   │       │       │       ├── BlockingQueue.hpp
│   │   │       │       │       ├── BoundedBlockingQueue.hpp
│   │   │       │       │       ├── BoundedQueue.hpp
│   │   │       │       │       ├── Closure.hpp
│   │   │       │       │       ├── Colors.hpp
│   │   │       │       │       ├── Condition.hpp
│   │   │       │       │       ├── Config.hpp
│   │   │       │       │       ├── FileLock.hpp
│   │   │       │       │       ├── ForcePublic.hpp
│   │   │       │       │       ├── LocalVector.hpp
│   │   │       │       │       ├── Logging.hpp
│   │   │       │       │       ├── Md5.hpp
│   │   │       │       │       ├── MutexLock.hpp
│   │   │       │       │       ├── NonCopyable.hpp
│   │   │       │       │       ├── StdExtension.hpp
│   │   │       │       │       ├── StringUtil.hpp
│   │   │       │       │       ├── Thread.hpp
│   │   │       │       │       └── ThreadPool.hpp
│   │   │       │       └── test/
│   │   │       │           ├── CMakeLists.txt
│   │   │       │           ├── demo.cpp
│   │   │       │           ├── testdata/
│   │   │       │           │   ├── 1.conf
│   │   │       │           │   ├── StdExtension.data
│   │   │       │           │   ├── dict.gbk
│   │   │       │           │   ├── dict.utf8
│   │   │       │           │   ├── io_testfile
│   │   │       │           │   ├── jieba.dict.0.1.utf8
│   │   │       │           │   ├── jieba.dict.0.utf8
│   │   │       │           │   ├── jieba.dict.1.utf8
│   │   │       │           │   └── jieba.dict.2.utf8
│   │   │       │           ├── thread_pool_demo.cpp
│   │   │       │           └── unittest/
│   │   │       │               ├── CMakeLists.txt
│   │   │       │               ├── TArgvContext.cpp
│   │   │       │               ├── TBlockingQueue.cpp
│   │   │       │               ├── TBoundedQueue.cpp
│   │   │       │               ├── TCastFloat.cpp
│   │   │       │               ├── TClosure.cpp
│   │   │       │               ├── TColorPrint.cpp
│   │   │       │               ├── TConfig.cpp
│   │   │       │               ├── TFileLock.cpp
│   │   │       │               ├── TLocalVector.cpp
│   │   │       │               ├── TLogging.cpp
│   │   │       │               ├── TMd5.cpp
│   │   │       │               ├── TMutexLock.cpp
│   │   │       │               ├── TStdExtension.cpp
│   │   │       │               ├── TStringUtil.cpp
│   │   │       │               ├── TThread.cpp
│   │   │       │               ├── TThreadPool.cpp
│   │   │       │               └── gtest_main.cpp
│   │   │       ├── dict/
│   │   │       │   ├── README.md
│   │   │       │   ├── hmm_model.utf8
│   │   │       │   ├── idf.utf8
│   │   │       │   ├── jieba.dict.utf8
│   │   │       │   ├── pos_dict/
│   │   │       │   │   ├── char_state_tab.utf8
│   │   │       │   │   ├── prob_emit.utf8
│   │   │       │   │   ├── prob_start.utf8
│   │   │       │   │   └── prob_trans.utf8
│   │   │       │   ├── stop_words.utf8
│   │   │       │   └── user.dict.utf8
│   │   │       ├── include/
│   │   │       │   └── cppjieba/
│   │   │       │       ├── DictTrie.hpp
│   │   │       │       ├── FullSegment.hpp
│   │   │       │       ├── HMMModel.hpp
│   │   │       │       ├── HMMSegment.hpp
│   │   │       │       ├── Jieba.hpp
│   │   │       │       ├── KeywordExtractor.hpp
│   │   │       │       ├── MPSegment.hpp
│   │   │       │       ├── MixSegment.hpp
│   │   │       │       ├── PosTagger.hpp
│   │   │       │       ├── PreFilter.hpp
│   │   │       │       ├── QuerySegment.hpp
│   │   │       │       ├── SegmentBase.hpp
│   │   │       │       ├── SegmentTagged.hpp
│   │   │       │       ├── TextRankExtractor.hpp
│   │   │       │       ├── Trie.hpp
│   │   │       │       └── Unicode.hpp
│   │   │       └── test/
│   │   │           ├── CMakeLists.txt
│   │   │           ├── demo.cpp
│   │   │           ├── load_test.cpp
│   │   │           ├── testdata/
│   │   │           │   ├── curl.res
│   │   │           │   ├── extra_dict/
│   │   │           │   │   └── jieba.dict.small.utf8
│   │   │           │   ├── gbk_dict/
│   │   │           │   │   ├── hmm_model.gbk
│   │   │           │   │   └── jieba.dict.gbk
│   │   │           │   ├── jieba.dict.0.1.utf8
│   │   │           │   ├── jieba.dict.0.utf8
│   │   │           │   ├── jieba.dict.1.utf8
│   │   │           │   ├── jieba.dict.2.utf8
│   │   │           │   ├── load_test.urls
│   │   │           │   ├── review.100
│   │   │           │   ├── review.100.res
│   │   │           │   ├── server.conf
│   │   │           │   ├── testlines.gbk
│   │   │           │   ├── testlines.utf8
│   │   │           │   ├── userdict.2.utf8
│   │   │           │   ├── userdict.english
│   │   │           │   ├── userdict.utf8
│   │   │           │   └── weicheng.utf8
│   │   │           └── unittest/
│   │   │               ├── CMakeLists.txt
│   │   │               ├── gtest_main.cpp
│   │   │               ├── jieba_test.cpp
│   │   │               ├── keyword_extractor_test.cpp
│   │   │               ├── pos_tagger_test.cpp
│   │   │               ├── pre_filter_test.cpp
│   │   │               ├── segments_test.cpp
│   │   │               ├── textrank_test.cpp
│   │   │               ├── trie_test.cpp
│   │   │               └── unicode_test.cpp
│   │   └── test/
│   │       ├── CMakeLists.txt
│   │       ├── load_test.cpp
│   │       ├── testdata/
│   │       │   ├── news_content
│   │       │   ├── news_content.2
│   │       │   ├── news_content.3
│   │       │   └── news_content.4
│   │       └── unittest/
│   │           ├── CMakeLists.txt
│   │           ├── TJenkins.cpp
│   │           ├── TSimhash.cpp
│   │           └── gtest_main.cpp
│   └── update.sh
├── go.mod
├── simhash.cc
├── simhash.go
├── simhash.h
└── simhash_test.go

================================================
FILE CONTENTS
================================================

================================================
FILE: .github/workflows/go.yml
================================================
name: Go

on:
  push:
  pull_request:

jobs:
  build:
    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest]
        go-version: ['1.17', '1.18', '1.19', '1.20', '1.21', '1.22', '1.23']
    runs-on: ${{ matrix.os }}
    steps:
    - uses: actions/checkout@v2

    - name: Set up Go
      uses: actions/setup-go@v2
      with:
        go-version: ${{ matrix.go-version }}

    - name: Build
      run: go build -v ./...

    - name: Test
      run: go test -v ./...


================================================
FILE: .github/workflows/stale-issues.yml
================================================
name: Close Stale Issues

on:
  schedule:
    # Run on the 2nd of every month at 13:00 UTC
    - cron: '0 13 2 * *'

jobs:
  stale:
    runs-on: ubuntu-latest
    permissions:
      issues: write
      pull-requests: write

    steps:
    - uses: actions/stale@v5
      with:
        repo-token: ${{ secrets.GITHUB_TOKEN }}
        stale-issue-message: 'This issue has not been updated for over 5 years and will be marked as stale. If the issue still exists, please comment or update the issue, otherwise it will be closed after 7 days.'
        close-issue-message: 'This issue has been automatically closed due to inactivity. If the issue still exists, please reopen it.'
        days-before-issue-stale: 1825
        days-before-issue-close: 7
        stale-issue-label: 'Stale'
        exempt-issue-labels: 'pinned,security'
        operations-per-run: 100


================================================
FILE: .gitignore
================================================
tags
*swp
*.out
*.o
*.d
*.ut


================================================
FILE: CHANGELOG.md
================================================
# GoSimhash ChangeLog

## v1.2.0

+ README:demo: using gosimhash-demo repo instead of example/demo.go
+ api::New() args required -> optional

## v1.1.0

+ upgrade [simhash] to v1.1.1

## v1.0.0

+ add go.mod by `go mod init github.com/yanyiwu/gosimhash`
+ use github/actions to build and test.
+ upgrade [simhash] to v0.10.1

## v0.10.0

+ add coveralls testing.
+ add deps/ and remove simhash/ .
+ use [simhash] v0.10.0.

## v0.9.0

+ finished basic functions.

[simhash]:http://github.com/yanyiwu/simhash


================================================
FILE: README.md
================================================
# GoSimhash: Simhash Lib Powered by Golang

[![Test](https://github.com/yanyiwu/gosimhash/actions/workflows/go.yml/badge.svg)](https://github.com/yanyiwu/gosimhash/actions/workflows/go.yml)
[![GoDoc](https://godoc.org/github.com/yanyiwu/gosimhash?status.svg)](https://godoc.org/github.com/yanyiwu/gosimhash)
[![Coverage Status](https://coveralls.io/repos/yanyiwu/gosimhash/badge.svg?branch=master&service=github)](https://coveralls.io/github/yanyiwu/gosimhash?branch=master)
[![License](https://img.shields.io/badge/license-MIT-yellow.svg?style=flat)](http://yanyiwu.mit-license.org)

## Introduction

GoSimhash is a Go version of [simhash] algorithm.

## Usage

The sample code can be found at [gosimhash-demo](https://github.com/yanyiwu/gosimhash-demo/blob/main/demo.go)

[simhash]:http://github.com/yanyiwu/simhash



================================================
FILE: config.go
================================================
package gosimhash

import (
	"path"
	"runtime"
)

var (
	DICT_DIR        string
	DICT_PATH       string
	HMM_PATH        string
	USER_DICT_PATH  string
	IDF_PATH        string
	STOP_WORDS_PATH string
)

func init() {
	DICT_DIR = path.Join(path.Dir(getCurrentFilePath()), "deps/simhash/submodules/cppjieba/dict/")
	DICT_PATH = path.Join(DICT_DIR, "jieba.dict.utf8")
	HMM_PATH = path.Join(DICT_DIR, "hmm_model.utf8")
	USER_DICT_PATH = path.Join(DICT_DIR, "user.dict.utf8")
	IDF_PATH = path.Join(DICT_DIR, "idf.utf8")
	STOP_WORDS_PATH = path.Join(DICT_DIR, "stop_words.utf8")
}

const TOTAL_DICT_PATH_NUMBER = 5

func getDictPaths(args ...string) [TOTAL_DICT_PATH_NUMBER]string {
	dicts := [TOTAL_DICT_PATH_NUMBER]string{
		DICT_PATH,
		HMM_PATH,
		USER_DICT_PATH,
		IDF_PATH,
		STOP_WORDS_PATH,
	}
	for i := 0; i < len(args) && i < len(dicts); i++ {
		dicts[i] = args[i]
	}
	return dicts
}

func getCurrentFilePath() string {
	_, filePath, _, _ := runtime.Caller(1)
	return filePath
}


================================================
FILE: deps/simhash/.github/workflows/cmake.yml
================================================
name: CMake

on:
  push:
  pull_request:

jobs:
  build:
    # The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
    # You can convert this to a matrix build if you need cross-platform coverage.
    # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [
          ubuntu-20.04, 
          ubuntu-22.04, 
          macos-12,
          macos-13,
          macos-14,
          #windows-2019,
          #windows-2022,
        ]  
        cpp_version: [11, 14, 17, 20]
        build_type: [Release, Debug]


    steps:
    - uses: actions/checkout@v2
      with:
          submodules: recursive

    - name: Configure CMake
      run: cmake -B ${{github.workspace}}/build -DBUILD_TESTING=ON -DCMAKE_CXX_STANDARD=${{matrix.cpp_version}} -DCMAKE_BUILD_TYPE=${{matrix.build_type}}

    - name: Build
      run: cmake --build ${{github.workspace}}/build --config ${{matrix.build_type}}

    - name: Test
      working-directory: ${{github.workspace}}/build
      run: ctest -C ${{matrix.build_type}} --output-on-failure --verbose



================================================
FILE: deps/simhash/.gitignore
================================================
tags
*swp
*.out
*.o
*.d
*.ut
log
*.log
*.pyc
*.pyo
*.a
t.cpp
build
*.un~


================================================
FILE: deps/simhash/.gitmodules
================================================
[submodule "submodules/cppjieba"]
	path = submodules/cppjieba
	url = https://github.com/yanyiwu/cppjieba.git


================================================
FILE: deps/simhash/.travis.yml
================================================
language: cpp
before_install:
  - sudo apt-get install cmake
script: 
  - mkdir build
  - cd build
  - cmake ..
  - make
  - make test
compiler:
  - clang
  - gcc
notifications:
  recipients:
    - wuyanyi09@foxmail.com
  email:
    on_success: change
    on_failure: always


================================================
FILE: deps/simhash/CMakeLists.txt
================================================
cmake_minimum_required(VERSION 3.14)

PROJECT(simhash)

#OPTION(BENCHMARK "Build benchmarking library" ON)

INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/submodules/cppjieba/include
  ${PROJECT_SOURCE_DIR}/submodules/cppjieba/deps/limonp/include
  ${PROJECT_SOURCE_DIR}/include)

ADD_DEFINITIONS(-O3 -Wall -g)
IF(APPLE) 
    ADD_DEFINITIONS(-std=c++11)
endif()

ADD_SUBDIRECTORY(example)
ADD_SUBDIRECTORY(test)
ADD_SUBDIRECTORY(benchmark)

ENABLE_TESTING()
ADD_TEST(NAME ./test/test.run COMMAND ./test/test.run)
ADD_TEST(NAME ./test/load_test COMMAND ./test/load_test)
ADD_TEST(NAME ./demo COMMAND ./demo)


================================================
FILE: deps/simhash/ChangeLog.md
================================================
# ChangeLog

## v1.2.2

+ [googletest] removed submodule and add cmake-fetchcontent
+ [submodule] cppjieba v5.3.0 -> v5.3.1

## v1.2.1

+ [submodule] cppjieba v5.1.2 -> v5.3.0
+ [CI] macos,linux and c++[11,14,17,20]
+ [CMake] mini_required 2.6->3.5

## v1.2.0

+ [googletest] git submodule add googletest-1.6.0

## v1.1.1

+ [submodule] add submodules/cppjieba, and remove deps/cppjieba/ and remove dict/

## v1.1.0

+ [submodule] using git submodule, and add submodules/limonp.
+ [pr-28] merged.
+ [pr-27] merged.
+ [pr-26] merged.
+ [pr-21] merged.

## v1.0.0

+ [deps] update limonp to v0.6.2

## v0.10.1

+ upgrade cppjieba to v4.5.3

## v0.10.0

+ add new directory: `deps` for `cppjieba` and `limonp`
+ change `namespace Simhash` to `namespace simhash` 
+ mv `src/main.cpp` to `example/demo.cpp`
+ mv `src/` to `include/`

+ upgrade limonp to v0.5.4
+ upgrade cppjieba to v4.5.0

## v0.9.6

1. 升级 [CppJieba] 到 v4.1.2 版本。

## v0.9.5

1. 使用[CppJieba] v3.0.1 ,修复一些兼容性问题。

## v0.9.4

1. 更新[CppJieba]用以适配更加低版本的g++。
2. 更新[CppJieba]用以引入在关键词抽取过程中使用停用词(dict/stop_words.utf8)。
3. 增加性能测试。
4. 更新`KeywordExtractor`提高关键词抽取的速度,性能约提高1.3倍。


## v0.9.3

1. 更新[CppJieba]用以修复关于头文件包含的小bug

## v0.9.2

1. 完成simhash海明距离的计算
2. 修复关键词抽取后权重排序的bug

## v0.9.1

1. 完成分词,关键词抽取,simhash值计算的基本功能

[CppJieba]:https://github.com/yanyiwu/cppjieba.git


================================================
FILE: deps/simhash/README.md
================================================
# 专门针对中文文档的simhash算法库

[![Test](https://github.com/yanyiwu/simhash/actions/workflows/cmake.yml/badge.svg)](https://github.com/yanyiwu/simhash/actions/workflows/cmake.yml)
[![Platform](https://img.shields.io/badge/platform-Linux,macOS-green.svg?style=flat)](https://github.com/yanyiwu/simhash)
[![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)
[![Tag](https://img.shields.io/github/v/tag/yanyiwu/simhash.svg)](https://github.com/yanyiwu/simhash/releases)

## 简介

此项目用来对中文文档计算出对应的 simhash 值。 simhash 是谷歌用来进行文本去重的算法,现在广泛应用在文本处理中。

详见[simhash算法原理及实现]

## 特性

+ 使用 [CppJieba] 作为分词器和关键词抽取器
+ 使用 [jenkins] 作为 hash 函数
+ `hpp` 风格,所有源码都是 `.hpp` 文件里面,方便使用。 `没有链接,就没有伤害。`
+ 本项目的副产品项目:[simhash\_server] 提供了简单的 simhash HTTP 服务。

## 依赖

* g++ (version >= 4.1 recommended), or clang++ . 

## 用法

```sh
git clone --recurse-submodules https://github.com/yanyiwu/simhash.git
cd simhash
mkdir build
cd build
cmake ..
make
```

测试

```
make test
```

### 演示

```sh
./demo
```

结果如下:

```
文本:"我是蓝翔技工拖拉机学院手扶拖拉机专业的。不用多久,我就会升职加薪,当上总经理,出任CEO,走上人生巅峰。"
关键词序列是: ["蓝翔:11.7392", "CEO:11.7392", "升职:10.8562", "加薪:10.6426", "手扶拖拉机:10.0089"]
simhash值是: 17831459094038722629
100010110110和110001110011 simhash值的相等判断如下:
海明距离阈值默认设置为3,则isEqual结果为:0
海明距离阈值默认设置为5,则isEqual结果为:1
```

详情请看 [example/demo.cpp](example/demo.cpp)

### Benchmark
```sh
./benchmark/benchmarking
```
结果如下:
```
Running ./benchmark/benchmarking
Run on (16 X 2494.14 MHz CPU s)
CPU Caches:
  L1 Data 32 KiB (x16)
  L1 Instruction 32 KiB (x16)
  L2 Unified 4096 KiB (x16)
  L3 Unified 36608 KiB (x1)
Load Average: 0.07, 0.04, 0.03
***WARNING*** Library was built as DEBUG. Timings may be affected.
-------------------------------------------------------------------------------------------------
Benchmark                                                       Time             CPU   Iterations
-------------------------------------------------------------------------------------------------
BENCHMARK_Simhasher_extract_text50_top5                     13478 ns        13478 ns        52013
BENCHMARK_Simhasher_extract_text50_top10                    13843 ns        13843 ns        50833
BENCHMARK_Simhasher_extract_text50_top15                    13929 ns        13929 ns        49488
BENCHMARK_Simhasher_extract_text50_top20                    13842 ns        13842 ns        50541
BENCHMARK_Simhasher_extract_text500_top5                   184074 ns       184067 ns         3775
BENCHMARK_Simhasher_make_text50_top5                        14457 ns        14457 ns        48341
BENCHMARK_Simhasher_make_text50_top10                       15170 ns        15169 ns        46203
BENCHMARK_Simhasher_make_text50_top15                       15585 ns        15585 ns        44903
BENCHMARK_Simhasher_make_text50_top20                       15743 ns        15742 ns        44466
BENCHMARK_Simhasher_binaryStringToUint64                    0.000 ns        0.000 ns   1000000000
BENCHMARK_Simhasher_toBinaryString                           63.9 ns         63.9 ns     10937009
BENCHMARK_Simhasher_make_from_predefined_keywords5            423 ns          423 ns      1644823
BENCHMARK_Simhasher_make_from_predefined_keywords10           735 ns          735 ns       950156
BENCHMARK_Simhasher_make_from_predefined_keywords20          1364 ns         1364 ns       508935
BENCHMARK_Simhasher_make_from_predefined_keywords50          7876 ns         7875 ns        89006
BENCHMARK_Simhasher_make_from_predefined_keywords100        21409 ns        21409 ns        32743
BENCHMARK_Simhasher_make_from_predefined_keywords200        47469 ns        47468 ns        14728
BENCHMARK_Simhasher_make_from_predefined_keywords500       124316 ns       124314 ns         5627
BENCHMARK_Simhasher_make_from_predefined_keywords1000      251336 ns       251329 ns         2785
BENCHMARK_Simhasher_binaryStringToUint64_isEqual            0.000 ns        0.000 ns   1000000000
BENCHMARK_Simhasher_binaryStringToUint64_isEqual_10k        0.000 ns        0.000 ns   1000000000
BENCHMARK_Simhasher_binaryStringToUint64_isEqual_1000k      0.000 ns        0.000 ns   1000000000
```

## 客服

+ Email: `i@yanyiwu.com`
+ QQ: 64162451

![image](http://7viirv.com1.z0.glb.clouddn.com/5a7d1b5c0d_yanyiwu_personal_qrcodes.jpg)

[simhash算法原理及实现]:http://yanyiwu.com/work/2014/01/30/simhash-shi-xian-xiang-jie.html
[CppJieba]:https://github.com/yanyiwu/cppjieba
[jenkins]:https://github.com/seomoz/simhash-cpp/blob/master/src/hashes/jenkins.h
[simhash\_server]:https://github.com/yanyiwu/simhash_server





================================================
FILE: deps/simhash/benchmark/CMakeLists.txt
================================================
# file: CMakeLists.txt
# date: 2022-01-18


if(${CMAKE_VERSION} VERSION_GREATER "3.16.0" 
        AND BENCHMARK)
    message(
        STATUS 
        "CMake version is eligible for benchmarking and benchmarking flag is '${BENCHMARK}'.")
    
    include(FetchContent)
    set(FETCHCONTENT_QUIET FALSE)

    FetchContent_Declare(googlebenchmark
        GIT_REPOSITORY https://github.com.cnpmjs.org/google/benchmark.git 
        GIT_TAG v1.6.1
        GIT_PROGRESS TRUE
    )
    set(BENCHMARK_ENABLE_GTEST_TESTS OFF)
    FetchContent_MakeAvailable(googlebenchmark)

    add_executable(benchmarking ./benchmarking.cpp)
    target_link_libraries(benchmarking benchmark::benchmark)
endif()


================================================
FILE: deps/simhash/benchmark/benchmarking.cpp
================================================
/// file: benchmarking.cpp
/// date: 2022-01-17


#include <benchmark/benchmark.h>
#include "./lib/Simhasher_benchmark.h"

using namespace simhash_benchmark;


BENCHMARK(BENCHMARK_Simhasher_extract_text50_top5);
BENCHMARK(BENCHMARK_Simhasher_extract_text50_top10);
BENCHMARK(BENCHMARK_Simhasher_extract_text50_top15);
BENCHMARK(BENCHMARK_Simhasher_extract_text50_top20);

BENCHMARK(BENCHMARK_Simhasher_extract_text500_top5);


BENCHMARK(BENCHMARK_Simhasher_make_text50_top5);
BENCHMARK(BENCHMARK_Simhasher_make_text50_top10);
BENCHMARK(BENCHMARK_Simhasher_make_text50_top15);
BENCHMARK(BENCHMARK_Simhasher_make_text50_top20);


BENCHMARK(BENCHMARK_Simhasher_binaryStringToUint64);
BENCHMARK(BENCHMARK_Simhasher_toBinaryString);


BENCHMARK(BENCHMARK_Simhasher_make_from_predefined_keywords5);
BENCHMARK(BENCHMARK_Simhasher_make_from_predefined_keywords10);
BENCHMARK(BENCHMARK_Simhasher_make_from_predefined_keywords20);
BENCHMARK(BENCHMARK_Simhasher_make_from_predefined_keywords50);
BENCHMARK(BENCHMARK_Simhasher_make_from_predefined_keywords100);
BENCHMARK(BENCHMARK_Simhasher_make_from_predefined_keywords200);
BENCHMARK(BENCHMARK_Simhasher_make_from_predefined_keywords500);
BENCHMARK(BENCHMARK_Simhasher_make_from_predefined_keywords1000);


BENCHMARK(BENCHMARK_Simhasher_binaryStringToUint64_isEqual);
BENCHMARK(BENCHMARK_Simhasher_binaryStringToUint64_isEqual_10k);
BENCHMARK(BENCHMARK_Simhasher_binaryStringToUint64_isEqual_1000k);


BENCHMARK_MAIN();


================================================
FILE: deps/simhash/benchmark/lib/Simhasher_benchmark.h
================================================
/// file: Simhasher_benchmark.h
/// date: 2022-01-17


#ifndef __SIMHASHED_HENCHMARK_H__

#include <benchmark/benchmark.h>
#include "simhash/Simhasher.hpp"

#include "./vals.h"

using namespace simhash;


namespace simhash_benchmark {


int32_t top_n_keywords = 5;
uint64_t simhash64 = 0;
std::vector<std::pair<std::string, double> > keywords;


static void BENCHMARK_Simhasher_extract_text50_top5(
    benchmark::State& state) {
  keywords.clear();
  for (auto _ : state) {
    simhasher.extract(text50, keywords, 5);
  }
}


static void BENCHMARK_Simhasher_extract_text50_top10(
    benchmark::State& state) {
  keywords.clear();
  for (auto _ : state) {
    simhasher.extract(text50, keywords, 10);
  }
}


static void BENCHMARK_Simhasher_extract_text50_top15(
    benchmark::State& state) {
  keywords.clear();
  for (auto _ : state) {
    simhasher.extract(text50, keywords, 15);
  }
}


static void BENCHMARK_Simhasher_extract_text50_top20(
    benchmark::State& state) {
  keywords.clear();
  for (auto _ : state) {
    simhasher.extract(text50, keywords, 20);
  }
}


static void BENCHMARK_Simhasher_extract_text500_top5(
    benchmark::State& state) {
  keywords.clear();
  for (auto _ : state) {
    simhasher.extract(text500, keywords, 5);
  }
}


static void BENCHMARK_Simhasher_make_text50_top5(
    benchmark::State& state) {
  keywords.clear();
  for (auto _ : state) {
    simhasher.make(text50, 5, simhash64);
  }
}


static void BENCHMARK_Simhasher_make_text50_top10(
    benchmark::State& state) {
  keywords.clear();
  for (auto _ : state) {
    simhasher.make(text50, 10, simhash64);
  }
}


static void BENCHMARK_Simhasher_make_text50_top15(
    benchmark::State& state) {
  keywords.clear();
  for (auto _ : state) {
    simhasher.make(text50, 15, simhash64);
  }
}


static void BENCHMARK_Simhasher_make_text50_top20(
    benchmark::State& state) {
  keywords.clear();
  for (auto _ : state) {
    simhasher.make(text50, 20, simhash64);
  }
}


static void BENCHMARK_Simhasher_binaryStringToUint64(
    benchmark::State& state) {
  for (auto _ : state) {
    Simhasher::binaryStringToUint64(simhash_bin_str1); 
  }
}


static void BENCHMARK_Simhasher_toBinaryString(
    benchmark::State& state) {
  std::string res = "";
  for (auto _ : state) {
     Simhasher::toBinaryString(999999999, res);
  }
}


static void BENCHMARK_Simhasher_make_from_predefined_keywords5(
    benchmark::State& state) {
  for (auto _ : state) {
    Simhasher::make_from_predefined_keywords(keywords5);
  }
}


static void BENCHMARK_Simhasher_make_from_predefined_keywords10(
    benchmark::State& state) {
  for (auto _ : state) {
    Simhasher::make_from_predefined_keywords(keywords10);
  }
}


static void BENCHMARK_Simhasher_make_from_predefined_keywords20(
    benchmark::State& state) {
  for (auto _ : state) {
    Simhasher::make_from_predefined_keywords(keywords20);
  }
}


static void BENCHMARK_Simhasher_make_from_predefined_keywords50(
    benchmark::State& state) {
  for (auto _ : state) {
    Simhasher::make_from_predefined_keywords(keywords50);
  }
}


static void BENCHMARK_Simhasher_make_from_predefined_keywords100(
    benchmark::State& state) {
  for (auto _ : state) {
    Simhasher::make_from_predefined_keywords(keywords100);
  }
}


static void BENCHMARK_Simhasher_make_from_predefined_keywords200(
    benchmark::State& state) {
  for (auto _ : state) {
    Simhasher::make_from_predefined_keywords(keywords200);
  }
}


static void BENCHMARK_Simhasher_make_from_predefined_keywords500(
    benchmark::State& state) {
  for (auto _ : state) {
    Simhasher::make_from_predefined_keywords(keywords500);
  }
}


static void BENCHMARK_Simhasher_make_from_predefined_keywords1000(
    benchmark::State& state) {
  for (auto _ : state) {
    Simhasher::make_from_predefined_keywords(keywords1000);
  }
}


static void BENCHMARK_Simhasher_binaryStringToUint64_isEqual(
    benchmark::State& state) {
  for (auto _ : state) {
    Simhasher::isEqual(
        Simhasher::binaryStringToUint64(simhash_bin_str1), 
        Simhasher::binaryStringToUint64(simhash_bin_str2));
  }
}


void isEqual_n_times(int32_t n) {
  for (int32_t i = 0; i < n; ++i) {
    Simhasher::isEqual(
        Simhasher::binaryStringToUint64(simhash_bin_str1),
        Simhasher::binaryStringToUint64(simhash_bin_str2));
  }
}


static void BENCHMARK_Simhasher_binaryStringToUint64_isEqual_10k(
    benchmark::State& state) {
  for (auto _ : state) { isEqual_n_times(10000); }
}


static void BENCHMARK_Simhasher_binaryStringToUint64_isEqual_1000k(
    benchmark::State& state) {
  for (auto _ : state) { isEqual_n_times(1000000); }
}


} // simhash_benchmark

#endif




================================================
FILE: deps/simhash/benchmark/lib/utils.h
================================================
/// file: utils.h
/// date: 2022-01-18


#ifndef __UTILS_H__
#define __UTILS_H__

#include <vector>
#include <utility>
#include <string>


namespace simhash_benchmark {


std::vector<std::pair<std::string, double> > fake_keywords(
    int32_t num) {
  std::vector<std::pair<std::string, double> > keywords;
  double score = 1.0 / (double)num;
  for (int32_t i = 0; i < num; ++i) {
    std::string keyword = "fake_" + std::to_string(i);
    keywords.emplace_back(std::make_pair(keyword, score));
  }
  return keywords;
}


} // namespace simhash_benchmark 


#endif


================================================
FILE: deps/simhash/benchmark/lib/vals.h
================================================
/// file: vals.h
/// date: 2022-01-18


#ifndef __VALS_H__
#define __VALS_H__

#include <benchmark/benchmark.h>
#include "simhash/Simhasher.hpp"
#include "./utils.h"


using namespace simhash;


namespace simhash_benchmark {


Simhasher simhasher(
  "../submodules/cppjieba/dict/jieba.dict.utf8", "../submodules/cppjieba/dict/hmm_model.utf8", 
  "../submodules/cppjieba/dict/idf.utf8", "../submodules/cppjieba/dict/stop_words.utf8");


/// Text with length 50 chars.
std::string text50 = 
    "我是蓝翔技工拖拉机学院手扶拖拉机专业的。不用多久,我就会升职加薪,当上总经理,出任CEO,走上人生巅峰。";


/// Text with length 500. 
/// Ref to 'https://mp.weixin.qq.com/s/Zdwb7Qo-044fVzO1Di2krw'.
std::string text500 = R"(
火山主要是因地壳板块推挤,岩浆中的气体压力到达一定程度造成喷发所致。海底火山与陆地火山原理相同,都是地球内部能量在地表的一种释放,也都有死火山与活火山之分。据不完全统计,目前全球的海底火山超过2万多座,其中太平洋拥有50%以上,是地球上火山最多、最密集的地方。

汤加位于世界第二深海沟汤加海沟(最深10882米)以及太平洋板块与印度—澳大利亚板块俯冲边界,是环太平洋地震带的地壳活动强烈区。地壳强烈活动使得汤加频繁遭遇地震和海底火山喷发。最近几年来,汤加里氏6级以上的大地震就发生过多次。

汤加的洪阿哈阿帕伊岛是汤加附近海底、汤加—克尔马德克群岛火山弧的一部分,坐落在新西兰东北向北延伸至斐济的地壳俯冲带。该处地壳十分活跃,火山近年多次喷发。汤加首席地质学家库拉认为,上一次喷发是在2021年12月20日,但那次的威力并不大,此次喷发释放的能量为上一次的7倍以上。

海底火山喷发的破坏是全方位的。喷发出来的火山气体,包括甲烷和硫化物等会溶到水中,对附近海底生态造成毁灭性打击。火山喷发导致汤加全境迅速被火山灰遮盖,空气和水严重污染,引发的海啸导致海水倒灌,居民无法正常生活。

由于汤加的海底电缆在火山喷发中断裂,导致汤加瞬间“失联”,目前灾情与人员伤亡数字仍无法统计。
)"; 


// Simhash bin strings.
std::string simhash_bin_str1 = "100010110110";
std::string simhash_bin_str2 = "110001110011";


// Pre-defined keywords
std::vector<std::pair<std::string, double> > keywords5 = fake_keywords(5);
std::vector<std::pair<std::string, double> > keywords10 = fake_keywords(10);
std::vector<std::pair<std::string, double> > keywords20 = fake_keywords(20);
std::vector<std::pair<std::string, double> > keywords50 = fake_keywords(50);
std::vector<std::pair<std::string, double> > keywords100 = fake_keywords(100);
std::vector<std::pair<std::string, double> > keywords200 = fake_keywords(200);
std::vector<std::pair<std::string, double> > keywords500 = fake_keywords(500); 
std::vector<std::pair<std::string, double> > keywords1000 = fake_keywords(1000); 


} // namespace simhash_benchmark

#endif


================================================
FILE: deps/simhash/example/CMakeLists.txt
================================================
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR})

ADD_EXECUTABLE(demo demo.cpp)


================================================
FILE: deps/simhash/example/demo.cpp
================================================
#include <iostream>
#include <fstream>

//this define can avoid some logs which you don't need to care about.
#define LOGGER_LEVEL LL_WARN 

#include "simhash/Simhasher.hpp"
using namespace simhash;

int main(int argc, char** argv)
{
    Simhasher simhasher("../submodules/cppjieba/dict/jieba.dict.utf8", "../submodules/cppjieba/dict/hmm_model.utf8", "../submodules/cppjieba/dict/idf.utf8", "../submodules/cppjieba/dict/stop_words.utf8");
    string s("我是蓝翔技工拖拉机学院手扶拖拉机专业的。不用多久,我就会升职加薪,当上总经理,出任CEO,走上人生巅峰。");
    size_t topN = 5;
    uint64_t u64 = 0;
    vector<pair<string ,double> > res;
    simhasher.extract(s, res, topN);
    simhasher.make(s, topN, u64);
    cout<< "文本:\"" << s << "\"" << endl;
    cout << "关键词序列是: " << res << endl;
    cout<< "simhash值是: " << u64<<endl;


    const char * bin1 = "100010110110";
    const char * bin2 = "110001110011";
    uint64_t u1, u2;
    u1 = Simhasher::binaryStringToUint64(bin1); 
    u2 = Simhasher::binaryStringToUint64(bin2); 
    
    cout<< bin1 << "和" << bin2 << " simhash值的相等判断如下:"<<endl;
    cout<< "海明距离阈值默认设置为3,则isEqual结果为:" << (Simhasher::isEqual(u1, u2)) << endl; 
    cout<< "海明距离阈值默认设置为5,则isEqual结果为:" << (Simhasher::isEqual(u1, u2, 5)) << endl; 
    return EXIT_SUCCESS;
}


================================================
FILE: deps/simhash/include/simhash/Simhasher.hpp
================================================
#ifndef SIMHASH_SIMHASHER_HPP
#define SIMHASH_SIMHASHER_HPP

#include "cppjieba/KeywordExtractor.hpp"
#include "jenkins.h"

namespace simhash
{
    using namespace cppjieba;
    class Simhasher
    {
        private:
            enum{BITS_LENGTH = 64};
            jenkins _hasher;
            KeywordExtractor _extractor;
        public:
            Simhasher(const string& dictPath, const string& modelPath, const string& idfPath, const string& stopWords): _extractor(dictPath, modelPath, idfPath, stopWords)
            {}
            ~Simhasher(){};

            bool extract(const string& text, vector<pair<string,double> > & res, size_t topN) const
            {
                _extractor.Extract(text, res, topN);
                return true;
            }
            bool make(const string& text, size_t topN, vector<pair<uint64_t, double> >& res) const
            {
                vector<pair<string, double> > wordweights;
                if(!extract(text, wordweights, topN))
                {
                    XLOG(ERROR) << "extract failed";
                    return false;
                }
                res.resize(wordweights.size());
                for(size_t i = 0; i < res.size(); i++)
                {
                    res[i].first = _hasher(wordweights[i].first.c_str(), wordweights[i].first.size(), 0);
                    res[i].second = wordweights[i].second;
                }

                return true;
            }

            bool make(const string& text, size_t topN, uint64_t& v64) const
            {
                vector<pair<uint64_t, double> > hashvalues;
                if(!make(text, topN, hashvalues))
                {
                    return false;
                }
                vector<double> weights(BITS_LENGTH, 0.0);
                const uint64_t u64_1(1);
                for(size_t i = 0; i < hashvalues.size(); i++)
                {
                    for(size_t j = 0; j < BITS_LENGTH; j++)
                    {
                        weights [j] += (((u64_1 << j) & hashvalues[i].first) ? 1: -1) * hashvalues[i].second;
                    }
                }

                v64 = 0;
                for(size_t j = 0; j < BITS_LENGTH; j++)
                {
                    if(weights[j] > 0.0)
                    {
                        v64 |= (u64_1 << j);
                    }
                }
                
                return true;
            }
          
            /**
             * @brief
             * Directly calculate weighted hash of pre-defined keywords.
             */ 
            static uint64_t make_from_predefined_keywords(const std::vector< std::pair<std::string, double> >& keywords) {
                uint64_t v64 = 0;
                std::vector< std::pair<uint64_t, double> > hashvalues;
                jenkins _tmp_hasher;

                hashvalues.resize(keywords.size());
                for (int32_t i = 0; i < keywords.size(); ++i) {
                    hashvalues[i].first = _tmp_hasher(keywords[i].first.c_str(), keywords[i].first.size(), 0);
                    hashvalues[i].second = keywords[i].second;
                }

                vector<double> weights(BITS_LENGTH, 0.0);
                const uint64_t u64_1(1);
                for(size_t i = 0; i < hashvalues.size(); i++)
                {
                    for(size_t j = 0; j < BITS_LENGTH; j++)
                    {
                        weights [j] += (((u64_1 << j) & hashvalues[i].first) ? 1: -1) * hashvalues[i].second;
                    }
                }

                for(size_t j = 0; j < BITS_LENGTH; j++)
                {
                    if(weights[j] > 0.0)
                    {
                        v64 |= (u64_1 << j);
                    }
                }

                return v64;
            }

            static bool isEqual(uint64_t lhs, uint64_t rhs, unsigned short n = 3)
            {
                unsigned short cnt = 0;
                lhs ^= rhs;
#if 	defined(__GNUC__) ||  defined(__clang__)
                cnt = __builtin_popcountll(lhs);
#else
                /*
                 * FIXME: There are actually also builtin_popcount-like functions
                 * in other compilers..
                 * Anyway..Here, we just roll back to look-up table (8bits).
                 */
                static const int pop_lut[256] = {
                		0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4,
                		1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
                		1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
                		2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
                		1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
                		2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
                		2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
                		3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
                		1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
                		2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
                		2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
                		3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
                		2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
                		3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
                		3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
                		4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8,
                };

                while(lhs && cnt <= n)
                {
                	cnt += pop_lut[lhs & 0xff];
                	lhs >>= 8;
                }
#endif
                if(cnt <= n)
                {
                    return true;
                }
                return false;
            }

            static void toBinaryString(uint64_t req, string& res)
            {
                res.resize(64);
                for(signed i = 63; i >= 0; i--)
                {
                    req & 1 ? res[i] = '1' : res[i] = '0';
                    req >>= 1;
                }
            }

            static uint64_t binaryStringToUint64(const string& bin)
            {
                uint64_t res = 0;
                for(size_t i = 0; i < bin.size(); i++)
                {
                    res <<= 1;
                    if(bin[i] == '1')
                    {
                        res += 1;
                    }
                }
                return res;
            }

    };
}

#endif




================================================
FILE: deps/simhash/include/simhash/jenkins.h
================================================
#ifndef SIMHASH_HASHES_JENKINS_H
#define SIMHASH_HASHES_JENKINS_H

/* This code was taken from http://www.burtleburtle.net/bob/c/lookup3.c, and
 * under a public domain licence on May 25, 2012, reproduced below:
 * -----------------------------------------------------------------------------
 * lookup3.c, by Bob Jenkins, May 2006, Public Domain.
 * 
 * These are functions for producing 32-bit hashes for hash table lookup.
 * hashword(), hashlittle(), hashlittle2(), hashbig(), mix(), and final() 
 * are externally useful functions.  Routines to test the hash are included 
 * if SELF_TEST is defined.  You can use this free for any purpose.  It's in
 * the public domain.  It has no warranty.
 * 
 * You probably want to use hashlittle().  hashlittle() and hashbig()
 * hash byte arrays.  hashlittle() is is faster than hashbig() on
 * little-endian machines.  Intel and AMD are little-endian machines.
 * On second thought, you probably want hashlittle2(), which is identical to
 * hashlittle() except it returns two 32-bit hashes for the price of one.  
 * You could implement hashbig2() if you wanted but I haven't bothered here.
 * 
 * If you want to find a hash of, say, exactly 7 integers, do
 * a = i1;  b = i2;  c = i3;
 * mix(a,b,c);
 * a += i4; b += i5; c += i6;
 * mix(a,b,c);
 * a += i7;
 * final(a,b,c);
 * then use c as the hash value.  If you have a variable length array of
 * 4-byte integers to hash, use hashword().  If you have a byte array (like
 * a character string), use hashlittle().  If you have several byte arrays, or
 * a mix of things, see the comments above hashlittle().  
 * 
 * Why is this so big?  I read 12 bytes at a time into 3 4-byte integers, 
 * then mix those integers.  This is fast (you can do a lot more thorough
 * mixing with 12*3 instructions on 3 integers than you can with 3 instructions
 * on 1 byte), but shoehorning those bytes into integers efficiently is messy.
 * -----------------------------------------------------------------------------
 */

#include <cstring>      /* defined size_t */
#include <stdint.h>     /* defines uint32_t etc */
#include <sys/param.h>  /* attempt to define endianness */
#ifdef linux
# include <endian.h>    /* attempt to define endianness */
#endif

#define rot(x,k) (((x)<<(k)) | ((x)>>(32-(k))))

#define mix(a,b,c) \
{ \
  a -= c;  a ^= rot(c, 4);  c += b; \
  b -= a;  b ^= rot(a, 6);  a += c; \
  c -= b;  c ^= rot(b, 8);  b += a; \
  a -= c;  a ^= rot(c,16);  c += b; \
  b -= a;  b ^= rot(a,19);  a += c; \
  c -= b;  c ^= rot(b, 4);  b += a; \
}

#define final(a,b,c) \
{ \
  c ^= b; c -= rot(b,14); \
  a ^= c; a -= rot(c,11); \
  b ^= a; b -= rot(a,25); \
  c ^= b; c -= rot(b,16); \
  a ^= c; a -= rot(c,4);  \
  b ^= a; b -= rot(a,14); \
  c ^= b; c -= rot(b,24); \
}

/*
 * My best guess at if you are big-endian or little-endian.  This may
 * need adjustment.
 */
#if (defined(__BYTE_ORDER) && defined(__LITTLE_ENDIAN) && \
     __BYTE_ORDER == __LITTLE_ENDIAN) || \
    (defined(i386) || defined(__i386__) || defined(__i486__) || \
     defined(__i586__) || defined(__i686__) || defined(vax) || defined(MIPSEL))
# define HASH_LITTLE_ENDIAN 1
# define HASH_BIG_ENDIAN 0
#elif (defined(__BYTE_ORDER) && defined(__BIG_ENDIAN) && \
       __BYTE_ORDER == __BIG_ENDIAN) || \
      (defined(sparc) || defined(POWERPC) || defined(mc68000) || defined(sel))
# define HASH_LITTLE_ENDIAN 0
# define HASH_BIG_ENDIAN 1
#else
# define HASH_LITTLE_ENDIAN 0
# define HASH_BIG_ENDIAN 0
#endif

//#warning "Jenkins"


#include <iostream>

namespace simhash {
	struct jenkins {
		uint64_t operator()(const char* data, size_t len, uint64_t s) const {
			uint32_t a = static_cast<uint32_t>(s >> 32);
			uint32_t b = static_cast<uint32_t>(s & 0xffffffff);
			hashlittle2(static_cast<void*>(const_cast<char*>(data)),
				len, &a, &b);
			return (static_cast<uint64_t>(a) << 32) | static_cast<uint64_t>(b);
		}

		/*
		 * hashlittle2: return 2 32-bit hash values
		 *
		 * This is identical to hashlittle(), except it returns two 32-bit hash
		 * values instead of just one.  This is good enough for hash table
		 * lookup with 2^^64 buckets, or if you want a second hash if you're 
		 * not happy with the first, or if you want a probably-unique 64-bit 
		 * ID for the key.  *pc is better mixed than *pb, so use *pc first.  
		 * If you want a 64-bit value do something like:
		 *     "*pc + (((uint64_t)*pb) <<32)".
		 */
		void hashlittle2(
		    const void *key,         /* the key to hash */
		    size_t      length,      /* length of the key */
		    uint32_t   *pc,          // IN: primary initval, OUT: primary hash 
		    uint32_t   *pb) const {  // IN: secondary initval, OUT: secondary 
			uint32_t a,b,c;      /* internal state */

			union { const void *ptr; size_t i; } u;     /* needed for Mac Powerbook G4 */

			/* Set up the internal state */
			a = b = c = 0xdeadbeef + ((uint32_t)length) + *pc;
			c += *pb;

			u.ptr = key;
			if (HASH_LITTLE_ENDIAN && ((u.i & 0x3) == 0)) {
				const uint32_t *k = (const uint32_t *)key;         /* read 32-bit chunks */
#ifdef VALGRIND
				const uint8_t  *k8;
#endif

				/*------ all but last block: aligned reads and affect 32 bits of (a,b,c) */
				while (length > 12) {
					a += k[0];
					b += k[1];
					c += k[2];
					mix(a,b,c);
					length -= 12;
					k += 3;
				}

			    /*----------------------------- handle the last (probably partial) block */
			    /* 
			     * "k[2]&0xffffff" actually reads beyond the end of the string, but
			     * then masks off the part it's not allowed to read.  Because the
			     * string is aligned, the masked-off tail is in the same word as the
			     * rest of the string.  Every machine with memory protection I've seen
			     * does it on word boundaries, so is OK with this.  But VALGRIND will
			     * still catch it and complain.  The masking trick does make the hash
			     * noticably faster for short strings (like English words).
			     */
#ifndef VALGRIND
			    switch(length) {
				    case 12: c+=k[2]; b+=k[1]; a+=k[0]; break;
				    case 11: c+=k[2]&0xffffff; b+=k[1]; a+=k[0]; break;
				    case 10: c+=k[2]&0xffff; b+=k[1]; a+=k[0]; break;
				    case 9 : c+=k[2]&0xff; b+=k[1]; a+=k[0]; break;
				    case 8 : b+=k[1]; a+=k[0]; break;
				    case 7 : b+=k[1]&0xffffff; a+=k[0]; break;
				    case 6 : b+=k[1]&0xffff; a+=k[0]; break;
				    case 5 : b+=k[1]&0xff; a+=k[0]; break;
				    case 4 : a+=k[0]; break;
				    case 3 : a+=k[0]&0xffffff; break;
				    case 2 : a+=k[0]&0xffff; break;
				    case 1 : a+=k[0]&0xff; break;
				    case 0 : *pc=c; *pb=b; return;  /* zero length strings require no mixing */
			    }
#else /* make valgrind happy */
			    k8 = (const uint8_t *)k;
			    switch(length) {
				    case 12: c+=k[2]; b+=k[1]; a+=k[0]; break;
				    case 11: c+=((uint32_t)k8[10])<<16;  /* fall through */
				    case 10: c+=((uint32_t)k8[9])<<8;    /* fall through */
				    case 9 : c+=k8[8];                   /* fall through */
				    case 8 : b+=k[1]; a+=k[0]; break;
				    case 7 : b+=((uint32_t)k8[6])<<16;   /* fall through */
				    case 6 : b+=((uint32_t)k8[5])<<8;    /* fall through */
				    case 5 : b+=k8[4];                   /* fall through */
				    case 4 : a+=k[0]; break;
				    case 3 : a+=((uint32_t)k8[2])<<16;   /* fall through */
				    case 2 : a+=((uint32_t)k8[1])<<8;    /* fall through */
				    case 1 : a+=k8[0]; break;
				    case 0 : *pc=c; *pb=b; return;  /* zero length strings require no mixing */
			    }
#endif /* !valgrind */
			} else if (HASH_LITTLE_ENDIAN && ((u.i & 0x1) == 0)) {
				const uint16_t *k = (const uint16_t *)key;         /* read 16-bit chunks */
				const uint8_t  *k8;
			    /*--------------- all but last block: aligned reads and different mixing */
			    while (length > 12) {
					a += k[0] + (((uint32_t)k[1])<<16);
					b += k[2] + (((uint32_t)k[3])<<16);
					c += k[4] + (((uint32_t)k[5])<<16);
					mix(a,b,c);
					length -= 12;
					k += 6;
			    }

			    /*----------------------------- handle the last (probably partial) block */
			    k8 = (const uint8_t *)k;
			    switch(length) {
			    case 12: c+=k[4]+(((uint32_t)k[5])<<16);
			             b+=k[2]+(((uint32_t)k[3])<<16);
			             a+=k[0]+(((uint32_t)k[1])<<16);
			             break;
			    case 11: c+=((uint32_t)k8[10])<<16;     /* fall through */
			    case 10: c+=k[4];
			             b+=k[2]+(((uint32_t)k[3])<<16);
			             a+=k[0]+(((uint32_t)k[1])<<16);
			             break;
			    case 9 : c+=k8[8];                      /* fall through */
			    case 8 : b+=k[2]+(((uint32_t)k[3])<<16);
			             a+=k[0]+(((uint32_t)k[1])<<16);
			             break;
			    case 7 : b+=((uint32_t)k8[6])<<16;      /* fall through */
			    case 6 : b+=k[2];
			             a+=k[0]+(((uint32_t)k[1])<<16);
			             break;
			    case 5 : b+=k8[4];                      /* fall through */
			    case 4 : a+=k[0]+(((uint32_t)k[1])<<16);
			             break;
			    case 3 : a+=((uint32_t)k8[2])<<16;      /* fall through */
			    case 2 : a+=k[0];
			             break;
			    case 1 : a+=k8[0];
			             break;
			    case 0 : *pc=c; *pb=b; return;  /* zero length strings require no mixing */
			    }
			} else {                        /* need to read the key one byte at a time */
			    const uint8_t *k = (const uint8_t *)key;
			    /*--------------- all but the last block: affect some 32 bits of (a,b,c) */
			    while (length > 12) {
					a += k[0];
					a += ((uint32_t)k[1])<<8;
					a += ((uint32_t)k[2])<<16;
					a += ((uint32_t)k[3])<<24;
					b += k[4];
					b += ((uint32_t)k[5])<<8;
					b += ((uint32_t)k[6])<<16;
					b += ((uint32_t)k[7])<<24;
					c += k[8];
					c += ((uint32_t)k[9])<<8;
					c += ((uint32_t)k[10])<<16;
					c += ((uint32_t)k[11])<<24;
					mix(a,b,c);
					length -= 12;
					k += 12;
			    }

			    /*-------------------------------- last block: affect all 32 bits of (c) */
			    switch(length) {                 /* all the case statements fall through */
			    case 12: c+=((uint32_t)k[11])<<24;
			    case 11: c+=((uint32_t)k[10])<<16;
			    case 10: c+=((uint32_t)k[9])<<8;
			    case 9 : c+=k[8];
			    case 8 : b+=((uint32_t)k[7])<<24;
			    case 7 : b+=((uint32_t)k[6])<<16;
			    case 6 : b+=((uint32_t)k[5])<<8;
			    case 5 : b+=k[4];
			    case 4 : a+=((uint32_t)k[3])<<24;
			    case 3 : a+=((uint32_t)k[2])<<16;
			    case 2 : a+=((uint32_t)k[1])<<8;
			    case 1 : a+=k[0];
			             break;
			    case 0 : *pc=c; *pb=b; return;  /* zero length strings require no mixing */
			    }
			}

			final(a,b,c);
			*pc=c; *pb=b;
		}
	};
}

#endif


================================================
FILE: deps/simhash/submodules/cppjieba/.github/workflows/cmake.yml
================================================
name: CMake

on:
  push:
  pull_request:

env:
  # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
  BUILD_TYPE: Release

jobs:
  build:
    # The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
    # You can convert this to a matrix build if you need cross-platform coverage.
    # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [
          ubuntu-20.04, 
          ubuntu-22.04, 
          macos-12,
          macos-13,
          macos-14,
          windows-2019,
          windows-2022,
        ]  
        cpp_version: [11, 14, 17, 20]

    steps:
      - name: Check out repository code
        uses: actions/checkout@v2
        with:
            submodules: recursive

      - name: Configure CMake
        # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
        # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
        # run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
        run: cmake -B ${{github.workspace}}/build -DBUILD_TESTING=ON -DCMAKE_CXX_STANDARD=${{matrix.cpp_version}} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}

      - name: Build
        # Build your program with the given configuration
        # run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
        run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

      - name: Test
        working-directory: ${{github.workspace}}/build
        # Execute tests defined by the CMake configuration.  
        # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
        run: ctest -C ${{env.BUILD_TYPE}}
      


================================================
FILE: deps/simhash/submodules/cppjieba/.gitignore
================================================
tags
*.demo
*swp
*.out
*.o
*.d
*.ut
log
main
lib*.a
*_demo
segdict*
prior.gbk
tmp
t.*
*.pid
build


================================================
FILE: deps/simhash/submodules/cppjieba/.gitmodules
================================================
[submodule "deps/limonp"]
	path = deps/limonp
	url = https://github.com/yanyiwu/limonp.git


================================================
FILE: deps/simhash/submodules/cppjieba/CMakeLists.txt
================================================
CMAKE_MINIMUM_REQUIRED (VERSION 3.5)
PROJECT(CPPJIEBA)

INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/deps/limonp/include
  ${PROJECT_SOURCE_DIR}/include)

if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
    set (CMAKE_INSTALL_PREFIX "/usr/local/cppjieba" CACHE PATH "default install path" FORCE )
endif()

if(NOT DEFINED CMAKE_CXX_STANDARD)
    set(CMAKE_CXX_STANDARD 11)
endif()
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

ADD_DEFINITIONS(-O3 -Wall -g)

ADD_SUBDIRECTORY(test)

ENABLE_TESTING()
ADD_TEST(NAME ./demo COMMAND ./demo)
if(NOT MSVC)
	ADD_TEST(NAME ./test/test.run COMMAND ./test/test.run)
	ADD_TEST(NAME ./load_test COMMAND ./load_test)
endif()


================================================
FILE: deps/simhash/submodules/cppjieba/ChangeLog.md
================================================
# CHANGELOG

## v5.3.1

+ [cmake] fetch googletest
+ [submodules] rm test/googletest

## v5.3.0

+ [c++17,c++20] compatibility
+ limonp version 0.6.7 -> 0.9.0

## v5.2.0

+ [CI] windows-[2019,2022]
+ [googletest] v1.6.0->v1.10.0
+ [CI] ubuntu version from 20 to 22, macos version from 12 to 14
+ [CMake] mini_required 2.6->3.5 and fix CXX_VERSION variable passed from cmd
+ [CI] matrix and multi cpp version [11, 14]

## v5.1.3

+ [googletest] git submodule add googletest-1.6.0

## v5.1.2

+ [submodule:deps/limonp] upgrade to v0.6.7

## v5.1.1

+ Merged [pr-186](https://github.com/yanyiwu/cppjieba/pull/186)

## v5.1.0

+ Merged [feature: add RemoveWord api from gojieba/pull/99 #172](https://github.com/yanyiwu/cppjieba/pull/172)

## v5.0.5

+ Merged [pr-171 submodule update limonp to v0.6.6 #171](https://github.com/yanyiwu/cppjieba/pull/171)

## v5.0.4

+ Merged [pr-168 limonp as submodule #168](https://github.com/yanyiwu/cppjieba/pull/168)

## v5.0.3

+ Upgrade [limonp](https://github.com/yanyiwu/limonp) -> v0.6.3

## v5.0.2

+ Upgrade [limonp](https://github.com/yanyiwu/limonp) -> v0.6.1

## v5.0.1

+ Make Compiler Happier.
+ Add PHP, DLang Links.

## v5.0.0

+ Notice(**api changed**) : Jieba class 3 arguments -> 5 arguments, and use KeywordExtractor in Jieba

## v4.8.1

+ add TextRankExtractor by [@questionfish] in [pull request 65](https://github.com/yanyiwu/cppjieba/pull/65)
+ add Jieba::ResetSeparators api for some special situation, for example in [issue67](https://github.com/yanyiwu/cppjieba/issues/67)
+ fix [issue70](https://github.com/yanyiwu/cppjieba/issues/70)
+ support (word, freq, tag) format in user_dict, see details in [pr74](https://github.com/yanyiwu/cppjieba/pull/74)

## v4.8.0

+ rewrite QuerySegment, make `Jieba::CutForSearch` behaves the same as [jieba] `cut_for_search` api
+ remove Jieba::SetQuerySegmentThreshold

## v4.7.0

api changes:

+ override Cut functions, add location information into Word results;
+ remove LevelSegment;
+ remove Jieba::Locate;

upgrade:

+ limonp -> v0.6.1

## v4.6.0

+ Change Jieba::Locate(deprecated) to be static function.
+ Change the return value of KeywordExtractor::Extract from bool to void.
+ Add KeywordExtractor::Word and add more overrided KeywordExtractor::Extract

## v4.5.3

+ Upgrade limonp to v0.6.0

## v4.5.2

+ Upgrade limonp to v0.5.6 to fix hidden trouble.

## v4.5.1

+ Upgrade limonp to v0.5.5 to solve macro name conficts in some special case. 

## v4.5.0

+ 在 Trie 中去除之前糟糕的针对 uint16 优化的用数组代替 map 的设计,
该设计的主要问题是前提 unicode 每个字符必须是 uint16 ,则无法更全面得支持 unicode 多国字符。 
+ Rune 类型从 16bit 更改为 32bit ,支持更多 Unicode 字符,包括一些罕见汉字。

## v4.4.1

+ 使用 valgrind 检查内存泄露的问题,定位出一个HMM模型初始化的问题导致内存泄露的bug,不过此内存泄露不是致命问题,
因为只会在词典载入的时候发生,而词典载入通常情况下只会被运行一次,故不会导致严重问题。
+ 感谢 [qinwf] 帮我发现这个bug,非常感谢。

## v4.4.0

+ 加代码容易删代码难,思索良久,还是决定把 Server 功能的源码剥离出这个项目。
+ 让 [cppjieba] 回到当年情窦未开时清纯的感觉,删除那些无关紧要的server代码,让整个项目轻装上阵,专注分词的核心代码。
+ By the way, 之前的 server 相关的代码,如果你真的需要它,就去新的项目仓库 [cppjieba-server](https://github.com/yanyiwu/cppjieba-server) 找它们。

## v4.3.3

+ Yet Another Incompatibility Problem Repair: Upgrade [limonp] to version v0.5.3, fix incompatibility problem in Windows

## v4.3.2

+ Upgrade [limonp] to version v0.5.2, fix incompatibility problem in Windows

## v4.3.1

+ 重载 KeywordExtractor 的构造函数,可以传入 Jieba 进行字典和模型的构造。 

## v4.3.0

源码目录布局调整:

1. src/ -> include/cppjieba/
2. src/limonp/ -> deps/limonp/
3. server/husky -> deps/husky/
4. test/unittest/gtest -> deps/gtest

依赖库升级:

1. [limonp] to version v0.5.1
2. [husky] to version v0.2.0

## v4.2.1

1. Upgrade [limonp] to version v0.4.1, [husky] to version v0.2.0

## v4.2.0

1. 修复[issue50]提到的多词典分隔符在Windows环境下存在的问题,从':'修改成'|'或';'。

## v4.1.2

1. 新增 Jieba::Locate 函数接口,作为计算分词结果的词语位置信息,在某些场景下有用,比如搜索结果高亮之类的。

## v4.1.1

1. 在 class Jieba 中新增词性标注的接口函数 Jieba::Tag

## v4.1.0

1. QuerySegment切词时加一层判断,当长词满足IsAllAscii(比如英文单词)时,不进行细粒度分词。
2. QuerySegment新增SetMaxWordLen和GetMaxWordLen接口,用来设置二次分词条件被触发的词长阈值。
3. Jieba新增SetQuerySegmentThreshold设置CutForSearch函数的词长阈值。

## v4.0.0

1. 支持多个userdict载入,多词典路径用英文冒号(:)作为分隔符,就当是向环境变量PATH致敬,哈哈。
2. userdict是不带权重的,之前对于新的userword默认设置词频权重为最大值,现已支持可配置,默认使用中位值。
3. 【兼容性预警】修改一些代码风格,比如命名空间小写化,从CppJieba变成cppjieba。
4. 【兼容性预警】弃用Application.hpp, 取而代之使用Jieba.hpp ,接口也进行了大幅修改,函数风格更统一,和python版本的Jieba分词更一致。

## v3.2.1

1. 修复 Jieba.hpp 头文件保护写错导致的 bug。

## v3.2.0

1. 使用工程上比较 tricky 的 Trie树优化办法。废弃了之前的 `Aho-Corasick-Automation` 实现,可读性更好,性能更高。
2. 新增层次分词器: LevelSegment 。
3. 增加MPSegment的细粒度分词功能。
4. 增加 class Jieba ,提供可读性更好的接口。
5. 放弃了统一接口ISegment,因为统一的接口限制了分词方式的灵活性,限制了一些功能的增加。
6. 增加默认开启新词发现功能的可选参数hmm,让MixSegment和QuerySegment都支持开关新词发现功能。

## v3.1.0

1. 新增可动态增加词典的API: insertUserWord
2. cut函数增加默认参数,默认使用Mix切词算法。关于切词算法详见README.md

## v3.0.1

1. 提升兼容性,修复在某些特定环境下的编译错误问题。 

## v3.0.0

1. 使得 QuerySegment 支持自定义词典(可选参数)。
2. 使得 KeywordExtractor 支持自定义词典(可选参数)。
3. 修改 Code Style ,参照 google code style 。 
4. 增加更详细的错误日志,在初始化过程中合理使用LogFatal。
5. 增加 Application 这个类,整合了所有CppJieba的功能进去,以后用户只需要使用这个类即可。
6. 修改 cjserver 服务,可以通过http参数使用不同切词算法进行切词。
7. 修改 make install 的安装目录,统一安装到同一个目录 /usr/local/cppjieba 。

## v2.4.4

1. 修改两条更细粒度的特殊过滤规则,将连续的数字(包括浮点数)和连续的字母单独切分出来(而不会混在一起)。
2. 修改最大概率法时动态规划过程需要使用的 DAG 数据结构(同时也修改 Trie 的 DAG 查询函数),提高分词速度 8% 。
3. 使用了 `Aho-Corasick-Automation` 算法提速 Trie 查找的过程等优化,提升性能。
4. 增加词性标注的两条特殊规则。

## v2.4.3

1. 更新 [husky] 服务代码,新 [husky] 为基于线程池的服务器简易框架。并且修复当 HTTP POST 请求时 body 过长数据可能丢失的问题。
2. 修改 PosTagger 的参数结构,删除暂时无用的参数。并添加使用自定义字典的参数,也就是支持 **自定义词性**。
3. 更好的支持 `mac osx` (原谅作者如此屌丝,这么晚才买 `mac` )。
4. 支持 `Docker` ,具体请见 `Dockerfile` 。

## v2.4.2

1. 适当使用 `vector`, 的基础上,使用`limonp/LocalVector.hpp`作为`Unicode`的类型等优化,约提高性能 `30%`。
2. 使 `cjserver` 支持用户自定义词典,通过在 `conf/server.conf` 里面配置 `user_dict_path` 来实现。
3. 修复 `MPSegment` 切词时,当句子中含有特殊字符时,切词结果不完整的问题。
4. 修改 `FullSegment` 减少内存使用。 
5. 修改 `-std=c++0x` 或者 `-std=c++11` 时编译失败的问题。

## v2.4.1

1. 完善一些特殊字符和字母串的切词效果。
2. 提高关键词抽取的速度。
3. 提供用户自定义词典的接口。
4. 将server相关的代码独立出来,单独放在`server/`目录下。
5. 修复用户自定义词典中单字会被MixSegment的新词发现功能给忽略的问题。也就是说,现在的词典是用户词典优先级最高,其次是自带的词典,再其次是新词发现出来的词。

## v2.4.0

1. 适配更低级版本的`g++`和`cmake`,已在`g++ 4.1.2`和`cmake 2.6`上测试通过。
2. 修改一些测试用例的文件,减少测试时编译的时间。
3. 修复`make install`相关的问题。
4. 增加HTTP服务的POST请求接口。
5. 拆分`Trie.hpp`成`DictTrie.hpp`和`Trie.hpp`,将trie树这个数据结构抽象出来,并且修复Trie这个类潜在的bug并完善单元测试。
6. 重写cjserver的启动和停止,新启动和停止方法详见README.md。

## v2.3.4

1. 修改了设计上的问题,删除了`TrieManager`这个类,以避免造成一些可能的隐患。
2. 增加`stop_words.utf8`词典,并修改`KeywordExtractor`的初始化函数用以使用此词典。
3. 优化了`Trie`树相关部分代码结构。

## v2.3.3

1. 修复因为使用unordered_map导致的在不同机器上结果不一致的问题。
2. 将部分数据结果从unordered_map改为map,提升了差不多1/6的切词速度。(因为unordered_map虽然查找速度快,但是在范围迭代的效率较低。)

## v2.3.2

1. 修复单元测试的问题,有些case在x84和x64中结果不一致。
2. merge进词性标注的简单版本。

## v2.3.1

1. 修复安装时的服务启动问题(不过安装切词服务只是linux下的一个附加功能,不影响核心代码。)

## v2.3.0 

1. 增加`KeywordExtractor.hpp`来进行关键词抽取。
2. 使用`gtest`来做单元测试。

## v2.2.0

1. 性能优化,提升切词速度约6倍。
2. 其他暂时也想不起来了。

## v2.1.1 (v2.1.1之前的统统一起写在 v2.1.1里面了)

1. 完成__最大概率分词算法__和__HMM分词算法__,并且将他们结合起来成效果最好的`MixSegment`。
2. 进行大量的代码重构,将主要的功能性代码都写成了hpp文件。
3. 使用`cmake`工具来管理项目。
4. 使用 [limonp]作为工具函数库,比如日志,字符串操作等常用函数。
5. 使用 [husky] 搭简易分词服务的服务器框架。

[limonp]:http://github.com/yanyiwu/limonp.git
[husky]:http://github.com/yanyiwu/husky.git
[issue50]:https://github.com/yanyiwu/cppjieba/issues/50
[qinwf]:https://github.com/yanyiwu/cppjieba/pull/53#issuecomment-176264929
[jieba]:https://github.com/fxsjy/jieba
[@questionfish]:https://github.com/questionfish


================================================
FILE: deps/simhash/submodules/cppjieba/LICENSE
================================================
The MIT License (MIT)

Copyright (c) 2013

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


================================================
FILE: deps/simhash/submodules/cppjieba/README.md
================================================
# CppJieba

[![CMake](https://github.com/yanyiwu/cppjieba/actions/workflows/cmake.yml/badge.svg)](https://github.com/yanyiwu/cppjieba/actions/workflows/cmake.yml)
[![Author](https://img.shields.io/badge/author-@yanyiwu-blue.svg?style=flat)](http://yanyiwu.com/) 
[![Platform](https://img.shields.io/badge/platform-Linux,macOS,Windows-green.svg?style=flat)](https://github.com/yanyiwu/cppjieba)
[![Performance](https://img.shields.io/badge/performance-excellent-brightgreen.svg?style=flat)](http://yanyiwu.com/work/2015/06/14/jieba-series-performance-test.html) 
[![Tag](https://img.shields.io/github/v/tag/yanyiwu/cppjieba.svg)](https://github.com/yanyiwu/cppjieba/releases)

## 简介

CppJieba是"结巴(Jieba)"中文分词的C++版本

## 特性

+ 源代码都写进头文件`include/cppjieba/*.hpp`里,`include`即可使用。
+ 支持`utf8`编码。
+ 项目自带较为完善的单元测试,核心功能中文分词(utf8)的稳定性接受过线上环境检验。
+ 支持载自定义用户词典,多路径时支持分隔符'|'或者';'分隔。
+ 支持 `Linux` , `Mac OSX`, `Windows` 操作系统。

## 用法

### 依赖软件

* `g++ (version >= 4.1 is recommended) or clang++`;
* `cmake (version >= 2.6 is recommended)`;

### 下载和编译

```sh
git clone https://github.com/yanyiwu/cppjieba.git
cd cppjieba
git submodule init
git submodule update
mkdir build
cd build
cmake ..
make
```

有兴趣的可以跑跑测试(可选):

```
make test
```

## Demo

```
./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三种方法的效果。  

可以看出效果最好的是Mix,也就是融合MP和HMM的切词算法。即可以准确切出词典已有的词,又可以切出像"杭研"这样的未登录词。

Full方法切出所有字典里的词语。

Query方法先使用Mix方法切词,对于切出来的较长的词再使用Full方法。

### 自定义用户词典

自定义词典示例请看`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"]
```

## 其它词典资料分享

+ [dict.367W.utf8] iLife(562193561 at qq.com)

## 应用

+ [GoJieba] go语言版本的结巴中文分词。
+ [NodeJieba] Node.js 版本的结巴中文分词。
+ [simhash] 中文文档的的相似度计算
+ [exjieba] Erlang 版本的结巴中文分词。
+ [jiebaR] R语言版本的结巴中文分词。
+ [cjieba] C语言版本的结巴分词。
+ [jieba_rb] Ruby 版本的结巴分词。
+ [iosjieba] iOS 版本的结巴分词。
+ [SqlJieba] MySQL 全文索引的结巴中文分词插件。
+ [pg_jieba] PostgreSQL 数据库的分词插件。
+ [simple] SQLite3 FTS5 数据库的分词插件。
+ [gitbook-plugin-search-pro] 支持中文搜索的 gitbook 插件。
+ [ngx_http_cppjieba_module] Nginx 分词插件。
+ [cppjiebapy] 由 [jannson] 开发的供 python 模块调用的项目 [cppjiebapy], 相关讨论 [cppjiebapy_discussion] .
+ [cppjieba-py] 由 [bung87] 基于 pybind11 封装的 python 模块,使用体验上接近于原jieba。
+ [KeywordServer] 50行搭建一个中文关键词抽取服务。
+ [cppjieba-server] CppJieba HTTP 服务器。
+ [phpjieba] php版本的结巴分词扩展。
+ [perl5-jieba] Perl版本的结巴分词扩展。
+ [jieba-dlang] D 语言的结巴分词 Deimos Bindings。

## 线上演示

[Web-Demo](http://cppjieba-webdemo.herokuapp.com/)
(建议使用chrome打开)

## 性能评测

[Jieba中文分词系列性能评测]

## Sponsorship

[![sponsorship](http://images.gitads.io/cppjieba)](https://tracking.gitads.io/?campaign=gitads&repo=cppjieba&redirect=gitads.io)

## Contributors

### Code Contributors

This project exists thanks to all the people who contribute.
<a href="https://github.com/yanyiwu/cppjieba/graphs/contributors"><img src="https://opencollective.com/cppjieba/contributors.svg?width=890&button=false" /></a>

[GoJieba]:https://github.com/yanyiwu/gojieba
[CppJieba]:https://github.com/yanyiwu/cppjieba
[jannson]:https://github.com/jannson
[cppjiebapy]:https://github.com/jannson/cppjiebapy
[bung87]:https://github.com/bung87
[cppjieba-py]:https://github.com/bung87/cppjieba-py
[cppjiebapy_discussion]:https://github.com/yanyiwu/cppjieba/issues/1
[NodeJieba]:https://github.com/yanyiwu/nodejieba
[jiebaR]:https://github.com/qinwf/jiebaR
[simhash]:https://github.com/yanyiwu/simhash
[代码详解]: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]:https://github.com/falood/exjieba
[KeywordServer]:https://github.com/yanyiwu/keyword_server
[ngx_http_cppjieba_module]:https://github.com/yanyiwu/ngx_http_cppjieba_module
[dict.367W.utf8]:https://github.com/qinwf/BigDict
[cjieba]:http://github.com/yanyiwu/cjieba
[jieba_rb]:https://github.com/altkatz/jieba_rb
[iosjieba]:https://github.com/yanyiwu/iosjieba
[SqlJieba]:https://github.com/yanyiwu/sqljieba
[Jieba中文分词系列性能评测]:http://yanyiwu.com/work/2015/06/14/jieba-series-performance-test.html
[pg_jieba]:https://github.com/jaiminpan/pg_jieba
[gitbook-plugin-search-pro]:https://plugins.gitbook.com/plugin/search-pro
[cppjieba-server]:https://github.com/yanyiwu/cppjieba-server
[phpjieba]:https://github.com/jonnywang/phpjieba
[perl5-jieba]:https://metacpan.org/pod/distribution/Lingua-ZH-Jieba/lib/Lingua/ZH/Jieba.pod
[jieba-dlang]:https://github.com/shove70/jieba
[simple]:https://github.com/wangfenjin/simple




================================================
FILE: deps/simhash/submodules/cppjieba/deps/limonp/.github/workflows/cmake.yml
================================================
name: CMake

on:
  push:
  pull_request:

#env:
  # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
  # BUILD_TYPE: Debug

jobs:
  build:
    # The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
    # You can convert this to a matrix build if you need cross-platform coverage.
    # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [
          ubuntu-20.04, 
          ubuntu-22.04, 
          macos-12,
          macos-13,
          macos-14,
          windows-2019,
          windows-2022,
        ]  
        cpp_version: [11, 14, 17, 20]
        build_type: [Release, Debug]

    steps:
    - uses: actions/checkout@v2

    - name: Configure CMake
      run: cmake -B ${{github.workspace}}/build -DBUILD_TESTING=ON -DCMAKE_CXX_STANDARD=${{matrix.cpp_version}} -DCMAKE_BUILD_TYPE=${{matrix.build_type}}

    - name: Build
      run: cmake --build ${{github.workspace}}/build --config ${{matrix.build_type}}

    - name: Test
      working-directory: ${{github.workspace}}/build
      run: ctest -C ${{matrix.build_type}} --output-on-failure --verbose



================================================
FILE: deps/simhash/submodules/cppjieba/deps/limonp/.gitignore
================================================
*.o
*.ut
libcm.a
tags
*.d
build
t.cpp
a.out
*.swp


================================================
FILE: deps/simhash/submodules/cppjieba/deps/limonp/.gitmodules
================================================


================================================
FILE: deps/simhash/submodules/cppjieba/deps/limonp/CMakeLists.txt
================================================
cmake_minimum_required(VERSION 3.14)

PROJECT(limonp
        LANGUAGES CXX)

################
# cmake config #
################

if(NOT DEFINED CMAKE_CXX_STANDARD)
    set(CMAKE_CXX_STANDARD 11)
endif()
message(STATUS "CMAKE_CXX_STANDARD is ${CMAKE_CXX_STANDARD}")

set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)


##############
# dependency #
##############
include(GNUInstallDirs)

##########
# target #
##########

add_library(${PROJECT_NAME} INTERFACE)
add_library(${PROJECT_NAME}::${PROJECT_NAME} ALIAS ${PROJECT_NAME})

target_include_directories(${PROJECT_NAME}
                           INTERFACE
                               $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
                               $<INSTALL_INTERFACE:${CMAKE_INSTALL_FULL_INCLUDEDIR}>)

########
# test #
########

ENABLE_TESTING()

ADD_SUBDIRECTORY(test)
ADD_TEST(NAME ./test/demo COMMAND ./test/demo)
ADD_TEST(NAME ./test/test.run COMMAND ./test/test.run)

#if(NOT MSVC)
#	ADD_TEST(NAME ./test/thread_pool_demo COMMAND ./test/thread_pool_demo)
#endif()

###########
# install #
###########

include(GNUInstallDirs)

install(TARGETS ${PROJECT_NAME}
        EXPORT ${PROJECT_NAME})

install(EXPORT ${PROJECT_NAME}
        DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/cmake/
        NAMESPACE ${PROJECT_NAME}::
        FILE ${PROJECT_NAME}-config.cmake)

install(DIRECTORY include/
        DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})


================================================
FILE: deps/simhash/submodules/cppjieba/deps/limonp/ChangeLog.md
================================================
# CHANGELOG

## v0.9.0

+ [c++20] compatibility
+ [c++17] compatibility

## v0.8.1

+ [CI] fix windows gtest thread link error
+ [submodule] rm test/googletest
+ [CMake] FetchContent googletest
+ [CMake] required 3.5 -> 3.14

## v0.8.0

+ [StringUtil] Fix windows assert typo
+ [CMake] find_package(Threads REQUIRED); target_link_libraries(... Threads::Threads)
+ [CMAKE][CI] windows: 2019,2022
+ [CMAKE][CI] matrix.build_type[Release, Debug]
+ [unittest] disable #TMd5.cpp
+ [unittest] disable #TFileLock.cpp
+ [unittest] disable #TBoundedQueue.cpp 
+ [unittest] disable #TMutexLock.cpp 
+ [unittest] disable #TBlockingQueue.cpp 
+ [unittest] disable #TThread.cpp 
+ [unittest] disable #TThreadPool.cpp

## v0.7.2

+ [CI] ubuntu version from 20 to 22, macos version from 12 to 14
+ [test/unittes] uint->size_t
+ [googletest] v1.6.0->v1.10.0
+ [CMake] version required 3.0 -> 3.5

## v0.7.1

+ [CMake] fix CMAKE_CXX_STANDARD passed from github/actions and [c++11, c++14] only

## v0.7.0

+ [CI] Added os.macos and cpp_version=[c++98, c++03, c++11, c++14, c++17, c++20]
+ [git submodule] Added googletest-release-v1.6.0

## v0.6.7

+ Merged [pr35](https://github.com/yanyiwu/limonp/pull/35)
+ Merged [pr33](https://github.com/yanyiwu/limonp/pull/33)
+ Merged [pr32](https://github.com/yanyiwu/limonp/pull/32)

## v0.6.6

+ Merged [pr-31 To be compatible with cpp17 and later, use lambda instead of std::not1 & std::bind2nd #31](https://github.com/yanyiwu/limonp/pull/31)

## v0.6.5

+ Merged [pr-25 Update cmake.yml](https://github.com/yanyiwu/limonp/pull/25)
+ Merged [pr-26 fix license for end of line sequence and remove useless signature](https://github.com/yanyiwu/limonp/pull/26)
+ Merged [pr-27 Update cmake.yml](https://github.com/yanyiwu/limonp/pull/27)
+ Merged [pr-28 add a target to be ready to support installation](https://github.com/yanyiwu/limonp/pull/28)
+ Merged [pr-29 Installable by cmake](https://github.com/yanyiwu/limonp/pull/29)
+ Merged [pr-30 Replace localtime with localtime_s on Windows and localtime_r on Linux](https://github.com/yanyiwu/limonp/pull/30)

## v0.6.4

+ merge [fixup gcc8 warnings](https://github.com/yanyiwu/gojieba/pull/70)

## v0.6.3

+ remove compiler conplained macro

## v0.6.2

+ merge [pr-18](https://github.com/yanyiwu/limonp/pull/18/files)

## v0.6.1

add Specialized template for vector<string>

when it is `vector<string>`, print like this: ["hello", "world"]; (special case)
when it is `vector<int>`, print like this: [1, 10, 1000]; (common cases)

## v0.6.0

+ remove Trim out of Split.

## v0.5.6

+ fix hidden trouble.

## v0.5.5

+ macro name LOG and CHECK in Logging.hpp is so easy to confict with other lib, so I have to rename them to XLOG and XCHECK for avoiding those macro name conflicts.

## v0.5.4

+ add ForcePublic.hpp
+ Add Utf8ToUnicode32 and Unicode32ToUtf8 in StringUtil.hpp

## v0.5.3

+ Fix incompatibility problem about 'time.h' in Windows.

## v0.5.2

+ Fix incompatibility problem about `enum {INFO ...}` name conflicts in Windows .
+ So from this version begin: the compile flags: `-DLOGGING_LEVEL=WARNING` must be changed to `-DLOGGING_LEVEL=LL_WARNING`

## v0.5.1

+ add `ThreadPool::Stop()` to wait util all the threads finished. 
If Stop() has not been called, it will be called when the ThreadPool destructing.

## v0.5.0

+ Reorganized directories: include/ -> include/limonp/ ... and so on.
+ Add `NewClosure` in Closure.hpp, 0~3 arguments have been supported.
+ Update ThreadPool, use `NewClosure` instead of `CreateTask`

## v0.4.1

+ `CHECK(exp) << "log message"` supported;

## v0.4.0

+ add test/demo.cc as example.
+ move `print` macro to StdExtension.hpp
+ BigChange: rewrite `log` module, use `LOG(INFO) << "xxx" ` instead `LogInfo` .
+ remove HandyMacro.hpp, add CHECK in Logging.hpp instead.

## v0.3.0

+ remove 'MysqlClient.hpp', 'InitOnOff.hpp', 'CastFloat.hpp'
+ add 'Closure.hpp'
+ uniform code style

## v0.2.0

+ `namespace limonp`, not `Limonp` .

## v0.1.0

+ Basic functions


================================================
FILE: deps/simhash/submodules/cppjieba/deps/limonp/LICENSE
================================================
The MIT License (MIT)

Copyright (c) 2013

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


================================================
FILE: deps/simhash/submodules/cppjieba/deps/limonp/README.md
================================================
# limonp 

[![CMake](https://github.com/yanyiwu/limonp/actions/workflows/cmake.yml/badge.svg)](https://github.com/yanyiwu/limonp/actions/workflows/cmake.yml)
[![Author](https://img.shields.io/badge/author-@yanyiwu-blue.svg?style=flat)](http://yanyiwu.com/) 
[![Platform](https://img.shields.io/badge/platform-Linux,macOS,Windows-green.svg?style=flat)](https://github.com/yanyiwu/limonp)
[![Tag](https://img.shields.io/github/v/tag/yanyiwu/limonp.svg)](https://github.com/yanyiwu/limonp/releases)
[![License](https://img.shields.io/badge/license-MIT-yellow.svg?style=flat)](http://yanyiwu.mit-license.org)

## Introduction

`C++` headers(hpp) with Python style. 

## Feature

+ linking is a annoying thing, so I write these source code in headers file(`*.hpp`), you can use them only with `#include "xx.hpp"`, without linking *.a or *.so .

**`no linking , no hurts`** 

## Example

See Details in `test/demo.cpp`

## Cases

1. [CppJieba]

## Reference

1.  `md5.hpp` is copied from network, you can find original author in source code(in comments).
2.  `MutexLock.hpp`, `BlockingQueue.hpp`, `Condition.hpp` reference from [muduo].

## Contact

+ i@yanyiwu.com

[CppJieba]:https://github.com/yanyiwu/cppjieba.git
[muduo]:https://github.com/chenshuo/muduo.git



================================================
FILE: deps/simhash/submodules/cppjieba/deps/limonp/include/limonp/ArgvContext.hpp
================================================
/************************************
 * file enc : ascii
 * author   : wuyanyi09@gmail.com
 ************************************/

#ifndef LIMONP_ARGV_FUNCTS_H
#define LIMONP_ARGV_FUNCTS_H

#include <set>
#include <sstream>
#include "StringUtil.hpp"

namespace limonp {

using namespace std;

class ArgvContext {
 public :
  ArgvContext(int argc, const char* const * argv) {
    for(int i = 0; i < argc; i++) {
      if(StartsWith(argv[i], "-")) {
        if(i + 1 < argc && !StartsWith(argv[i + 1], "-")) {
          mpss_[argv[i]] = argv[i+1];
          i++;
        } else {
          sset_.insert(argv[i]);
        }
      } else {
        args_.push_back(argv[i]);
      }
    }
  }
  ~ArgvContext() {
  }

  friend ostream& operator << (ostream& os, const ArgvContext& args);
  string operator [](size_t i) const {
    if(i < args_.size()) {
      return args_[i];
    }
    return "";
  }
  string operator [](const string& key) const {
    map<string, string>::const_iterator it = mpss_.find(key);
    if(it != mpss_.end()) {
      return it->second;
    }
    return "";
  }

  bool HasKey(const string& key) const {
    if(mpss_.find(key) != mpss_.end() || sset_.find(key) != sset_.end()) {
      return true;
    }
    return false;
  }

 private:
  vector<string> args_;
  map<string, string> mpss_;
  set<string> sset_;
}; // class ArgvContext

inline ostream& operator << (ostream& os, const ArgvContext& args) {
  return os<<args.args_<<args.mpss_<<args.sset_;
}

} // namespace limonp

#endif


================================================
FILE: deps/simhash/submodules/cppjieba/deps/limonp/include/limonp/BlockingQueue.hpp
================================================
#ifndef LIMONP_BLOCKINGQUEUE_HPP
#define LIMONP_BLOCKINGQUEUE_HPP

#include <queue>
#include "Condition.hpp"

namespace limonp {
template<class T>
class BlockingQueue: NonCopyable {
 public:
  BlockingQueue()
    : mutex_(), notEmpty_(mutex_), queue_() {
  }

  void Push(const T& x) {
    MutexLockGuard lock(mutex_);
    queue_.push(x);
    notEmpty_.Notify(); // Wait morphing saves us
  }

  T Pop() {
    MutexLockGuard lock(mutex_);
    // always use a while-loop, due to spurious wakeup
    while (queue_.empty()) {
      notEmpty_.Wait();
    }
    assert(!queue_.empty());
    T front(queue_.front());
    queue_.pop();
    return front;
  }

  size_t Size() const {
    MutexLockGuard lock(mutex_);
    return queue_.size();
  }
  bool Empty() const {
    return Size() == 0;
  }

 private:
  mutable MutexLock mutex_;
  Condition         notEmpty_;
  std::queue<T>     queue_;
}; // class BlockingQueue

} // namespace limonp

#endif // LIMONP_BLOCKINGQUEUE_HPP


================================================
FILE: deps/simhash/submodules/cppjieba/deps/limonp/include/limonp/BoundedBlockingQueue.hpp
================================================
#ifndef LIMONP_BOUNDED_BLOCKING_QUEUE_HPP
#define LIMONP_BOUNDED_BLOCKING_QUEUE_HPP

#include "BoundedQueue.hpp"

namespace limonp {

template<typename T>
class BoundedBlockingQueue : NonCopyable {
 public:
  explicit BoundedBlockingQueue(size_t maxSize)
    : mutex_(),
      notEmpty_(mutex_),
      notFull_(mutex_),
      queue_(maxSize) {
  }

  void Push(const T& x) {
    MutexLockGuard lock(mutex_);
    while (queue_.Full()) {
      notFull_.Wait();
    }
    assert(!queue_.Full());
    queue_.Push(x);
    notEmpty_.Notify();
  }

  T Pop() {
    MutexLockGuard lock(mutex_);
    while (queue_.Empty()) {
      notEmpty_.Wait();
    }
    assert(!queue_.Empty());
    T res = queue_.Pop();
    notFull_.Notify();
    return res;
  }

  bool Empty() const {
    MutexLockGuard lock(mutex_);
    return queue_.Empty();
  }

  bool Full() const {
    MutexLockGuard lock(mutex_);
    return queue_.Full();
  }

  size_t size() const {
    MutexLockGuard lock(mutex_);
    return queue_.size();
  }

  size_t capacity() const {
    return queue_.capacity();
  }

 private:
  mutable MutexLock          mutex_;
  Condition                  notEmpty_;
  Condition                  notFull_;
  BoundedQueue<T>  queue_;
}; // class BoundedBlockingQueue

} // namespace limonp

#endif // LIMONP_BOUNDED_BLOCKING_QUEUE_HPP


================================================
FILE: deps/simhash/submodules/cppjieba/deps/limonp/include/limonp/BoundedQueue.hpp
================================================
#ifndef LIMONP_BOUNDED_QUEUE_HPP
#define LIMONP_BOUNDED_QUEUE_HPP

#include <vector>
#include <fstream>
#include <cassert>

namespace limonp {
using namespace std;
template<class T>
class BoundedQueue {
 public:
  explicit BoundedQueue(size_t capacity): capacity_(capacity), circular_buffer_(capacity) {
    head_ = 0;
    tail_ = 0;
    size_ = 0;
    assert(capacity_);
  }
  ~BoundedQueue() {
  }

  void Clear() {
    head_ = 0;
    tail_ = 0;
    size_ = 0;
  }
  bool Empty() const {
    return !size_;
  }
  bool Full() const {
    return capacity_ == size_;
  }
  size_t Size() const {
    return size_;
  }
  size_t Capacity() const {
    return capacity_;
  }

  void Push(const T& t) {
    assert(!Full());
    circular_buffer_[tail_] = t;
    tail_ = (tail_ + 1) % capacity_;
    size_ ++;
  }

  T Pop() {
    assert(!Empty());
    size_t oldPos = head_;
    head_ = (head_ + 1) % capacity_;
    size_ --;
    return circular_buffer_[oldPos];
  }

 private:
  size_t head_;
  size_t tail_;
  size_t size_;
  const size_t capacity_;
  vector<T> circular_buffer_;

}; // class BoundedQueue
} // namespace limonp

#endif


================================================
FILE: deps/simhash/submodules/cppjieba/deps/limonp/include/limonp/Closure.hpp
================================================
#ifndef LIMONP_CLOSURE_HPP
#define LIMONP_CLOSURE_HPP

namespace limonp {

class ClosureInterface {
 public:
  virtual ~ClosureInterface() {
  }
  virtual void Run() = 0;
};

template <class Funct>
class Closure0: public ClosureInterface {
 public:
  Closure0(Funct fun) {
    fun_ = fun;
  }
  virtual ~Closure0() {
  }
  virtual void Run() {
    (*fun_)();
  }
 private:
  Funct fun_;
}; 

template <class Funct, class Arg1>
class Closure1: public ClosureInterface {
 public:
  Closure1(Funct fun, Arg1 arg1) {
    fun_ = fun;
    arg1_ = arg1;
  }
  virtual ~Closure1() {
  }
  virtual void Run() {
    (*fun_)(arg1_);
  }
 private:
  Funct fun_;
  Arg1 arg1_;
}; 

template <class Funct, class Arg1, class Arg2>
class Closure2: public ClosureInterface {
 public:
  Closure2(Funct fun, Arg1 arg1, Arg2 arg2) {
    fun_ = fun;
    arg1_ = arg1;
    arg2_ = arg2;
  }
  virtual ~Closure2() {
  }
  virtual void Run() {
    (*fun_)(arg1_, arg2_);
  }
 private:
  Funct fun_;
  Arg1 arg1_;
  Arg2 arg2_;
}; 

template <class Funct, class Arg1, class Arg2, class Arg3>
class Closure3: public ClosureInterface {
 public:
  Closure3(Funct fun, Arg1 arg1, Arg2 arg2, Arg3 arg3) {
    fun_ = fun;
    arg1_ = arg1;
    arg2_ = arg2;
    arg3_ = arg3;
  }
  virtual ~Closure3() {
  }
  virtual void Run() {
    (*fun_)(arg1_, arg2_, arg3_);
  }
 private:
  Funct fun_;
  Arg1 arg1_;
  Arg2 arg2_;
  Arg3 arg3_;
}; 

template <class Obj, class Funct> 
class ObjClosure0: public ClosureInterface {
 public:
  ObjClosure0(Obj* p, Funct fun) {
   p_ = p;
   fun_ = fun;
  }
  virtual ~ObjClosure0() {
  }
  virtual void Run() {
    (p_->*fun_)();
  }
 private:
  Obj* p_;
  Funct fun_;
}; 

template <class Obj, class Funct, class Arg1> 
class ObjClosure1: public ClosureInterface {
 public:
  ObjClosure1(Obj* p, Funct fun, Arg1 arg1) {
   p_ = p;
   fun_ = fun;
   arg1_ = arg1;
  }
  virtual ~ObjClosure1() {
  }
  virtual void Run() {
    (p_->*fun_)(arg1_);
  }
 private:
  Obj* p_;
  Funct fun_;
  Arg1 arg1_;
}; 

template <class Obj, class Funct, class Arg1, class Arg2> 
class ObjClosure2: public ClosureInterface {
 public:
  ObjClosure2(Obj* p, Funct fun, Arg1 arg1, Arg2 arg2) {
   p_ = p;
   fun_ = fun;
   arg1_ = arg1;
   arg2_ = arg2;
  }
  virtual ~ObjClosure2() {
  }
  virtual void Run() {
    (p_->*fun_)(arg1_, arg2_);
  }
 private:
  Obj* p_;
  Funct fun_;
  Arg1 arg1_;
  Arg2 arg2_;
}; 
template <class Obj, class Funct, class Arg1, class Arg2, class Arg3> 
class ObjClosure3: public ClosureInterface {
 public:
  ObjClosure3(Obj* p, Funct fun, Arg1 arg1, Arg2 arg2, Arg3 arg3) {
   p_ = p;
   fun_ = fun;
   arg1_ = arg1;
   arg2_ = arg2;
   arg3_ = arg3;
  }
  virtual ~ObjClosure3() {
  }
  virtual void Run() {
    (p_->*fun_)(arg1_, arg2_, arg3_);
  }
 private:
  Obj* p_;
  Funct fun_;
  Arg1 arg1_;
  Arg2 arg2_;
  Arg3 arg3_;
}; 

template<class R>
ClosureInterface* NewClosure(R (*fun)()) {
  return new Closure0<R (*)()>(fun);
}

template<class R, class Arg1>
ClosureInterface* NewClosure(R (*fun)(Arg1), Arg1 arg1) {
  return new Closure1<R (*)(Arg1), Arg1>(fun, arg1);
}

template<class R, class Arg1, class Arg2>
ClosureInterface* NewClosure(R (*fun)(Arg1, Arg2), Arg1 arg1, Arg2 arg2) {
  return new Closure2<R (*)(Arg1, Arg2), Arg1, Arg2>(fun, arg1, arg2);
}

template<class R, class Arg1, class Arg2, class Arg3>
ClosureInterface* NewClosure(R (*fun)(Arg1, Arg2, Arg3), Arg1 arg1, Arg2 arg2, Arg3 arg3) {
  return new Closure3<R (*)(Arg1, Arg2, Arg3), Arg1, Arg2, Arg3>(fun, arg1, arg2, arg3);
}

template<class R, class Obj>
ClosureInterface* NewClosure(Obj* obj, R (Obj::* fun)()) {
  return new ObjClosure0<Obj, R (Obj::* )()>(obj, fun);
}

template<class R, class Obj, class Arg1>
ClosureInterface* NewClosure(Obj* obj, R (Obj::* fun)(Arg1), Arg1 arg1) {
  return new ObjClosure1<Obj, R (Obj::* )(Arg1), Arg1>(obj, fun, arg1);
}

template<class R, class Obj, class Arg1, class Arg2>
ClosureInterface* NewClosure(Obj* obj, R (Obj::* fun)(Arg1, Arg2), Arg1 arg1, Arg2 arg2) {
  return new ObjClosure2<Obj, R (Obj::*)(Arg1, Arg2), Arg1, Arg2>(obj, fun, arg1, arg2);
}

template<class R, class Obj, class Arg1, class Arg2, class Arg3>
ClosureInterface* NewClosure(Obj* obj, R (Obj::* fun)(Arg1, Arg2, Arg3), Arg1 arg1, Arg2 arg2, Arg3 arg3) {
  return new ObjClosure3<Obj, R (Obj::*)(Arg1, Arg2, Arg3), Arg1, Arg2, Arg3>(obj, fun, arg1, arg2, arg3);
}

} // namespace limonp

#endif // LIMONP_CLOSURE_HPP


================================================
FILE: deps/simhash/submodules/cppjieba/deps/limonp/include/limonp/Colors.hpp
================================================
#ifndef LIMONP_COLOR_PRINT_HPP
#define LIMONP_COLOR_PRINT_HPP

#include <string>
#include <stdarg.h>

namespace limonp {

using std::string;

enum Color {
  BLACK = 30,
  RED,
  GREEN,
  YELLOW,
  BLUE,
  PURPLE
}; // enum Color

static void ColorPrintln(enum Color color, const char * fmt, ...) {
  va_list ap;
  printf("\033[0;%dm", color);
  va_start(ap, fmt);
  vprintf(fmt, ap);
  va_end(ap);
  printf("\033[0m\n"); // if not \n , in some situation , the next lines will be set the same color unexpectedly
}

} // namespace limonp

#endif // LIMONP_COLOR_PRINT_HPP


================================================
FILE: deps/simhash/submodules/cppjieba/deps/limonp/include/limonp/Condition.hpp
================================================
#ifndef LIMONP_CONDITION_HPP
#define LIMONP_CONDITION_HPP

#include "MutexLock.hpp"

namespace limonp {

class Condition : NonCopyable {
 public:
  explicit Condition(MutexLock& mutex)
    : mutex_(mutex) {
    XCHECK(!pthread_cond_init(&pcond_, NULL));
  }

  ~Condition() {
    XCHECK(!pthread_cond_destroy(&pcond_));
  }

  void Wait() {
    XCHECK(!pthread_cond_wait(&pcond_, mutex_.GetPthreadMutex()));
  }

  void Notify() {
    XCHECK(!pthread_cond_signal(&pcond_));
  }

  void NotifyAll() {
    XCHECK(!pthread_cond_broadcast(&pcond_));
  }

 private:
  MutexLock& mutex_;
  pthread_cond_t pcond_;
}; // class Condition

} // namespace limonp

#endif // LIMONP_CONDITION_HPP


================================================
FILE: deps/simhash/submodules/cppjieba/deps/limonp/include/limonp/Config.hpp
================================================
/************************************
 * file enc : utf8
 * author   : wuyanyi09@gmail.com
 ************************************/
#ifndef LIMONP_CONFIG_H
#define LIMONP_CONFIG_H

#include <map>
#include <fstream>
#include <iostream>
#include <assert.h>
#include "StringUtil.hpp"

namespace limonp {

using namespace std;

class Config {
 public:
  explicit Config(const string& filePath) {
    LoadFile(filePath);
  }

  operator bool () {
    return !map_.empty();
  }

  string Get(const string& key, const string& defaultvalue) const {
    map<string, string>::const_iterator it = map_.find(key);
    if(map_.end() != it) {
      return it->second;
    }
    return defaultvalue;
  }
  int Get(const string& key, int defaultvalue) const {
    string str = Get(key, "");
    if("" == str) {
      return defaultvalue;
    }
    return atoi(str.c_str());
  }
  const char* operator [] (const char* key) const {
    if(NULL == key) {
      return NULL;
    }
    map<string, string>::const_iterator it = map_.find(key);
    if(map_.end() != it) {
      return it->second.c_str();
    }
    return NULL;
  }

  string GetConfigInfo() const {
    string res;
    res << *this;
    return res;
  }

 private:
  void LoadFile(const string& filePath) {
    ifstream ifs(filePath.c_str());
    assert(ifs);
    string line;
    vector<string> vecBuf;
    size_t lineno = 0;
    while(getline(ifs, line)) {
      lineno ++;
      Trim(line);
      if(line.empty() || StartsWith(line, "#")) {
        continue;
      }
      vecBuf.clear();
      Split(line, vecBuf, "=");
      if(2 != vecBuf.size()) {
        fprintf(stderr, "line[%s] illegal.\n", line.c_str());
        assert(false);
        continue;
      }
      string& key = vecBuf[0];
      string& value = vecBuf[1];
      Trim(key);
      Trim(value);
      if(!map_.insert(make_pair(key, value)).second) {
        fprintf(stderr, "key[%s] already exits.\n", key.c_str());
        assert(false);
        continue;
      }
    }
    ifs.close();
  }

  friend ostream& operator << (ostream& os, const Config& config);

  map<string, string> map_;
}; // class Config

inline ostream& operator << (ostream& os, const Config& config) {
  return os << config.map_;
}

} // namespace limonp

#endif // LIMONP_CONFIG_H


================================================
FILE: deps/simhash/submodules/cppjieba/deps/limonp/include/limonp/FileLock.hpp
================================================
#ifndef LIMONP_FILELOCK_HPP
#define LIMONP_FILELOCK_HPP

#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
#include <errno.h>
#include <string>
#include <string.h>
#include <assert.h>

namespace limonp {

using std::string;

class FileLock {
 public:
  FileLock() : fd_(-1), ok_(true) {
  }
  ~FileLock() {
    if(fd_ > 0) {
      Close();
    }
  }
  void Open(const string& fname) {
    assert(fd_ == -1);
    fd_ = open(fname.c_str(), O_RDWR | O_CREAT, 0644);
    if(fd_ < 0) {
      ok_ = false;
      err_ = strerror(errno);
    }
  }
  void Close() {
    ::close(fd_);
  }
  void Lock() {
    if(LockOrUnlock(fd_, true) < 0) {
      ok_ = false;
      err_ = strerror(errno);
    }
  }
  void UnLock() {
    if(LockOrUnlock(fd_, false) < 0) {
      ok_ = false;
      err_ = strerror(errno);
    }
  }
  bool Ok() const {
    return ok_;
  }
  string Error() const {
    return err_;
  }
 private:
  static int LockOrUnlock(int fd, bool lock) {
    errno = 0;
    struct flock f;
    memset(&f, 0, sizeof(f));
    f.l_type = (lock ? F_WRLCK : F_UNLCK);
    f.l_whence = SEEK_SET;
    f.l_start = 0;
    f.l_len = 0;        // Lock/unlock entire file
    return fcntl(fd, F_SETLK, &f);
  }

  int fd_;
  bool ok_;
  string err_;
}; // class FileLock

}// namespace limonp

#endif // LIMONP_FILELOCK_HPP


================================================
FILE: deps/simhash/submodules/cppjieba/deps/limonp/include/limonp/ForcePublic.hpp
================================================
#ifndef LIMONP_FORCE_PUBLIC_H
#define LIMONP_FORCE_PUBLIC_H

#define private public
#define protected public

#endif // LIMONP_FORCE_PUBLIC_H


================================================
FILE: deps/simhash/submodules/cppjieba/deps/limonp/include/limonp/LocalVector.hpp
================================================
#ifndef LIMONP_LOCAL_VECTOR_HPP
#define LIMONP_LOCAL_VECTOR_HPP

#include <iostream>
#include <stdlib.h>
#include <assert.h>
#include <string.h>

namespace limonp {
using namespace std;
/*
 * LocalVector<T> : T must be primitive type (char , int, size_t), if T is struct or class, LocalVector<T> may be dangerous..
 * LocalVector<T> is simple and not well-tested.
 */
const size_t LOCAL_VECTOR_BUFFER_SIZE = 16;
template <class T>
class LocalVector {
 public:
  typedef const T* const_iterator ;
  typedef T value_type;
  typedef size_t size_type;
 private:
  T buffer_[LOCAL_VECTOR_BUFFER_SIZE];
  T * ptr_;
  size_t size_;
  size_t capacity_;
 public:
  LocalVector() {
    init_();
  };
  LocalVector(const LocalVector<T>& vec) {
    init_();
    *this = vec;
  }
  LocalVector(const_iterator  begin, const_iterator end) { // TODO: make it faster
    init_();
    while(begin != end) {
      push_back(*begin++);
    }
  }
  LocalVector(size_t size, const T& t) { // TODO: make it faster
    init_();
    while(size--) {
      push_back(t);
    }
  }
  ~LocalVector() {
    if(ptr_ != buffer_) {
      free(ptr_);
    }
  };
 public:
  LocalVector<T>& operator = (const LocalVector<T>& vec) {
    clear();
    size_ = vec.size();
    capacity_ = vec.capacity();
    if(vec.buffer_ == vec.ptr_) {
      memcpy(static_cast<void*>(buffer_), vec.buffer_, sizeof(T) * size_);
      ptr_ = buffer_;
    } else {
      ptr_ = (T*) malloc(vec.capacity() * sizeof(T));
      assert(ptr_);
      memcpy(static_cast<void*>(ptr_), vec.ptr_, vec.size() * sizeof(T));
    }
    return *this;
  }
 private:
  void init_() {
    ptr_ = buffer_;
    size_ = 0;
    capacity_ = LOCAL_VECTOR_BUFFER_SIZE;
  }
 public:
  T& operator [] (size_t i) {
    return ptr_[i];
  }
  const T& operator [] (size_t i) const {
    return ptr_[i];
  }
  void push_back(const T& t) {
    if(size_ == capacity_) {
      assert(capacity_);
      reserve(capacity_ * 2);
    }
    ptr_[size_ ++ ] = t;
  }
  void reserve(size_t size) {
    if(size <= capacity_) {
      return;
    }
    T * next =  (T*)malloc(sizeof(T) * size);
    assert(next);
    T * old = ptr_;
    ptr_ = next;
    memcpy(static_cast<void*>(ptr_), old, sizeof(T) * capacity_);
    capacity_ = size;
    if(old != buffer_) {
      free(old);
    }
  }
  bool empty() const {
    return 0 == size();
  }
  size_t size() const {
    return size_;
  }
  size_t capacity() const {
    return capacity_;
  }
  const_iterator begin() const {
    return ptr_;
  }
  const_iterator end() const {
    return ptr_ + size_;
  }
  void clear() {
    if(ptr_ != buffer_) {
      free(ptr_);
    }
    init_();
  }
};

template <class T>
ostream & operator << (ostream& os, const LocalVector<T>& vec) {
  if(vec.empty()) {
    return os << "[]";
  }
  os<<"[\""<<vec[0];
  for(size_t i = 1; i < vec.size(); i++) {
    os<<"\", \""<<vec[i];
  }
  os<<"\"]";
  return os;
}

}

#endif


================================================
FILE: deps/simhash/submodules/cppjieba/deps/limonp/include/limonp/Logging.hpp
================================================
#ifndef LIMONP_LOGGING_HPP
#define LIMONP_LOGGING_HPP

#include <sstream>
#include <iostream>
#include <cassert>
#include <cstdlib>
#include <ctime>

#ifdef XLOG
#error "XLOG has been defined already"
#endif // XLOG
#ifdef XCHECK
#error "XCHECK has been defined already"
#endif // XCHECK

#define XLOG(level) limonp::Logger(limonp::LL_##level, __FILE__, __LINE__).Stream() 
#define XCHECK(exp) if(!(exp)) XLOG(FATAL) << "exp: ["#exp << "] false. "

namespace limonp {

enum {
  LL_DEBUG = 0, 
  LL_INFO = 1, 
  LL_WARNING = 2, 
  LL_ERROR = 3, 
  LL_FATAL = 4,
}; // enum

static const char * LOG_LEVEL_ARRAY[] = {"DEBUG","INFO","WARN","ERROR","FATAL"};
static const char * LOG_TIME_FORMAT = "%Y-%m-%d %H:%M:%S";

class Logger {
 public:
  Logger(size_t level, const char* filename, int lineno)
   : level_(level) {
#ifdef LOGGING_LEVEL
     if (level_ < LOGGING_LEVEL) {
       return;
     }
#endif
    assert(level_ <= sizeof(LOG_LEVEL_ARRAY)/sizeof(*LOG_LEVEL_ARRAY));
    
    char buf[32];
    
    time_t timeNow;
    time(&timeNow);

    struct tm tmNow;

    #if defined(_WIN32) || defined(_WIN64)
    errno_t e = localtime_s(&tmNow, &timeNow);
    assert(e == 0);
    #else
    struct tm * tm_tmp = localtime_r(&timeNow, &tmNow);
    assert(tm_tmp != nullptr);
    #endif

    strftime(buf, sizeof(buf), LOG_TIME_FORMAT, &tmNow);

    stream_ << buf 
      << " " << filename 
      << ":" << lineno 
      << " " << LOG_LEVEL_ARRAY[level_] 
      << " ";
  }
  ~Logger() {
#ifdef LOGGING_LEVEL
     if (level_ < LOGGING_LEVEL) {
       return;
     }
#endif
    std::cerr << stream_.str() << std::endl;
    if (level_ == LL_FATAL) {
      abort();
    }
  }

  std::ostream& Stream() {
    return stream_;
  }

 private:
  std::ostringstream stream_;
  size_t level_;
}; // class Logger

} // namespace limonp

#endif // LIMONP_LOGGING_HPP


================================================
FILE: deps/simhash/submodules/cppjieba/deps/limonp/include/limonp/Md5.hpp
================================================
#ifndef __MD5_H__
#define __MD5_H__

// Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
// rights reserved.

// License to copy and use this software is granted provided that it
// is identified as the "RSA Data Security, Inc. MD5 Message-Digest
// Algorithm" in all material mentioning or referencing this software
// or this function.
//
// License is also granted to make and use derivative works provided
// that such works are identified as "derived from the RSA Data
// Security, Inc. MD5 Message-Digest Algorithm" in all material
// mentioning or referencing the derived work.
//
// RSA Data Security, Inc. makes no representations concerning either
// the merchantability of this software or the suitability of this
// software for any particular purpose. It is provided "as is"
// without express or implied warranty of any kind.
//
// These notices must be retained in any copies of any part of this
// documentation and/or software.



// The original md5 implementation avoids external libraries.
// This version has dependency on stdio.h for file input and
// string.h for memcpy.
#include <cstdio>
#include <cstring>
#include <iostream>

namespace limonp {

//#pragma region MD5 defines
// Constants for MD5Transform routine.
#define S11 7
#define S12 12
#define S13 17
#define S14 22
#define S21 5
#define S22 9
#define S23 14
#define S24 20
#define S31 4
#define S32 11
#define S33 16
#define S34 23
#define S41 6
#define S42 10
#define S43 15
#define S44 21


// F, G, H and I are basic MD5 functions.
#define F(x, y, z) (((x) & (y)) | ((~x) & (z)))
#define G(x, y, z) (((x) & (z)) | ((y) & (~z)))
#define H(x, y, z) ((x) ^ (y) ^ (z))
#define I(x, y, z) ((y) ^ ((x) | (~z)))

// ROTATE_LEFT rotates x left n bits.
#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n))))

// FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4.
// Rotation is separate from addition to prevent recomputation.
#define FF(a, b, c, d, x, s, ac) { \
  (a) += F ((b), (c), (d)) + (x) + (UINT4)(ac); \
  (a) = ROTATE_LEFT ((a), (s)); \
  (a) += (b); \
  }
#define GG(a, b, c, d, x, s, ac) { \
  (a) += G ((b), (c), (d)) + (x) + (UINT4)(ac); \
  (a) = ROTATE_LEFT ((a), (s)); \
  (a) += (b); \
  }
#define HH(a, b, c, d, x, s, ac) { \
  (a) += H ((b), (c), (d)) + (x) + (UINT4)(ac); \
  (a) = ROTATE_LEFT ((a), (s)); \
  (a) += (b); \
  }
#define II(a, b, c, d, x, s, ac) { \
  (a) += I ((b), (c), (d)) + (x) + (UINT4)(ac); \
  (a) = ROTATE_LEFT ((a), (s)); \
  (a) += (b); \
  }
//#pragma endregion


typedef unsigned char BYTE ;

// POINTER defines a generic pointer type
typedef unsigned char *POINTER;

// UINT2 defines a two byte word
typedef unsigned short int UINT2;

// UINT4 defines a four byte word
typedef unsigned int UINT4;

static unsigned char PADDING[64] = {
  0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
// convenient object that wraps
// the C-functions for use in C++ only
class MD5 {
 private:
  struct __context_t {
    UINT4 state[4];                                   /* state (ABCD) */
    UINT4 count[2];        /* number of bits, modulo 2^64 (lsb first) */
    unsigned char buffer[64];                         /* input buffer */
  } context ;

  //#pragma region static helper functions
  // The core of the MD5 algorithm is here.
  // MD5 basic transformation. Transforms state based on block.
  static void MD5Transform( UINT4 state[4], unsigned char block[64] ) {
    UINT4 a = state[0], b = state[1], c = state[2], d = state[3], x[16];

    Decode (x, block, 64);

    /* Round 1 */
    FF (a, b, c, d, x[ 0], S11, 0xd76aa478); /* 1 */
    FF (d, a, b, c, x[ 1], S12, 0xe8c7b756); /* 2 */
    FF (c, d, a, b, x[ 2], S13, 0x242070db); /* 3 */
    FF (b, c, d, a, x[ 3], S14, 0xc1bdceee); /* 4 */
    FF (a, b, c, d, x[ 4], S11, 0xf57c0faf); /* 5 */
    FF (d, a, b, c, x[ 5], S12, 0x4787c62a); /* 6 */
    FF (c, d, a, b, x[ 6], S13, 0xa8304613); /* 7 */
    FF (b, c, d, a, x[ 7], S14, 0xfd469501); /* 8 */
    FF (a, b, c, d, x[ 8], S11, 0x698098d8); /* 9 */
    FF (d, a, b, c, x[ 9], S12, 0x8b44f7af); /* 10 */
    FF (c, d, a, b, x[10], S13, 0xffff5bb1); /* 11 */
    FF (b, c, d, a, x[11], S14, 0x895cd7be); /* 12 */
    FF (a, b, c, d, x[12], S11, 0x6b901122); /* 13 */
    FF (d, a, b, c, x[13], S12, 0xfd987193); /* 14 */
    FF (c, d, a, b, x[14], S13, 0xa679438e); /* 15 */
    FF (b, c, d, a, x[15], S14, 0x49b40821); /* 16 */

    /* Round 2 */
    GG (a, b, c, d, x[ 1], S21, 0xf61e2562); /* 17 */
    GG (d, a, b, c, x[ 6], S22, 0xc040b340); /* 18 */
    GG (c, d, a, b, x[11], S23, 0x265e5a51); /* 19 */
    GG (b, c, d, a, x[ 0], S24, 0xe9b6c7aa); /* 20 */
    GG (a, b, c, d, x[ 5], S21, 0xd62f105d); /* 21 */
    GG (d, a, b, c, x[10], S22,  0x2441453); /* 22 */
    GG (c, d, a, b, x[15], S23, 0xd8a1e681); /* 23 */
    GG (b, c, d, a, x[ 4], S24, 0xe7d3fbc8); /* 24 */
    GG (a, b, c, d, x[ 9], S21, 0x21e1cde6); /* 25 */
    GG (d, a, b, c, x[14], S22, 0xc33707d6); /* 26 */
    GG (c, d, a, b, x[ 3], S23, 0xf4d50d87); /* 27 */
    GG (b, c, d, a, x[ 8], S24, 0x455a14ed); /* 28 */
    GG (a, b, c, d, x[13], S21, 0xa9e3e905); /* 29 */
    GG (d, a, b, c, x[ 2], S22, 0xfcefa3f8); /* 30 */
    GG (c, d, a, b, x[ 7], S23, 0x676f02d9); /* 31 */
    GG (b, c, d, a, x[12], S24, 0x8d2a4c8a); /* 32 */

    /* Round 3 */
    HH (a, b, c, d, x[ 5], S31, 0xfffa3942); /* 33 */
    HH (d, a, b, c, x[ 8], S32, 0x8771f681); /* 34 */
    HH (c, d, a, b, x[11], S33, 0x6d9d6122); /* 35 */
    HH (b, c, d, a, x[14], S34, 0xfde5380c); /* 36 */
    HH (a, b, c, d, x[ 1], S31, 0xa4beea44); /* 37 */
    HH (d, a, b, c, x[ 4], S32, 0x4bdecfa9); /* 38 */
    HH (c, d, a, b, x[ 7], S33, 0xf6bb4b60); /* 39 */
    HH (b, c, d, a, x[10], S34, 0xbebfbc70); /* 40 */
    HH (a, b, c, d, x[13], S31, 0x289b7ec6); /* 41 */
    HH (d, a, b, c, x[ 0], S32, 0xeaa127fa); /* 42 */
    HH (c, d, a, b, x[ 3], S33, 0xd4ef3085); /* 43 */
    HH (b, c, d, a, x[ 6], S34,  0x4881d05); /* 44 */
    HH (a, b, c, d, x[ 9], S31, 0xd9d4d039); /* 45 */
    HH (d, a, b, c, x[12], S32, 0xe6db99e5); /* 46 */
    HH (c, d, a, b, x[15], S33, 0x1fa27cf8); /* 47 */
    HH (b, c, d, a, x[ 2], S34, 0xc4ac5665); /* 48 */

    /* Round 4 */
    II (a, b, c, d, x[ 0], S41, 0xf4292244); /* 49 */
    II (d, a, b, c, x[ 7], S42, 0x432aff97); /* 50 */
    II (c, d, a, b, x[14], S43, 0xab9423a7); /* 51 */
    II (b, c, d, a, x[ 5], S44, 0xfc93a039); /* 52 */
    II (a, b, c, d, x[12], S41, 0x655b59c3); /* 53 */
    II (d, a, b, c, x[ 3], S42, 0x8f0ccc92); /* 54 */
    II (c, d, a, b, x[10], S43, 0xffeff47d); /* 55 */
    II (b, c, d, a, x[ 1], S44, 0x85845dd1); /* 56 */
    II (a, b, c, d, x[ 8], S41, 0x6fa87e4f); /* 57 */
    II (d, a, b, c, x[15], S42, 0xfe2ce6e0); /* 58 */
    II (c, d, a, b, x[ 6], S43, 0xa3014314); /* 59 */
    II (b, c, d, a, x[13], S44, 0x4e0811a1); /* 60 */
    II (a, b, c, d, x[ 4], S41, 0xf7537e82); /* 61 */
    II (d, a, b, c, x[11], S42, 0xbd3af235); /* 62 */
    II (c, d, a, b, x[ 2], S43, 0x2ad7d2bb); /* 63 */
    II (b, c, d, a, x[ 9], S44, 0xeb86d391); /* 64 */

    state[0] += a;
    state[1] += b;
    state[2] += c;
    state[3] += d;

    // Zeroize sensitive information.
    memset((POINTER)x, 0, sizeof (x));
  }

  // Encodes input (UINT4) into output (unsigned char). Assumes len is
  // a multiple of 4.
  static void Encode( unsigned char *output, UINT4 *input, unsigned int len ) {
    unsigned int i, j;

    for (i = 0, j = 0; j < len; i++, j += 4) {
      output[j] = (unsigned char)(input[i] & 0xff);
      output[j+1] = (unsigned char)((input[i] >> 8) & 0xff);
      output[j+2] = (unsigned char)((input[i] >> 16) & 0xff);
      output[j+3] = (unsigned char)((input[i] >> 24) & 0xff);
    }
  }

  // Decodes input (unsigned char) into output (UINT4). Assumes len is
  // a multiple of 4.
  static void Decode( UINT4 *output, unsigned char *input, unsigned int len ) {
    unsigned int i, j;

    for (i = 0, j = 0; j < len; i++, j += 4)
      output[i] = ((UINT4)input[j]) | (((UINT4)input[j+1]) << 8) |
                  (((UINT4)input[j+2]) << 16) | (((UINT4)input[j+3]) << 24);
  }
  //#pragma endregion


 public:
  // MAIN FUNCTIONS
  MD5() {
    Init() ;
  }

  // MD5 initialization. Begins an MD5 operation, writing a new context.
  void Init() {
    context.count[0] = context.count[1] = 0;

    // Load magic initialization constants.
    context.state[0] = 0x67452301;
    context.state[1] = 0xefcdab89;
    context.state[2] = 0x98badcfe;
    context.state[3] = 0x10325476;
  }

  // MD5 block update operation. Continues an MD5 message-digest
  // operation, processing another message block, and updating the
  // context.
  void Update(
    unsigned char *input,   // input block
    unsigned int inputLen ) { // length of input block
    unsigned int i, index, partLen;

    // Compute number of bytes mod 64
    index = (unsigned int)((context.count[0] >> 3) & 0x3F);

    // Update number of bits
    if ((context.count[0] += ((UINT4)inputLen << 3))
        < ((UINT4)inputLen << 3))
      context.count[1]++;
    context.count[1] += ((UINT4)inputLen >> 29);

    partLen = 64 - index;

    // Transform as many times as possible.
    if (inputLen >= partLen) {
      memcpy((POINTER)&context.buffer[index], (POINTER)input, partLen);
      MD5Transform (context.state, context.buffer);

      for (i = partLen; i + 63 < inputLen; i += 64)
        MD5Transform (context.state, &input[i]);

      index = 0;
    } else
      i = 0;

    /* Buffer remaining input */
    memcpy((POINTER)&context.buffer[index], (POINTER)&input[i], inputLen-i);
  }

  // MD5 finalization. Ends an MD5 message-digest operation, writing the
  // the message digest and zeroizing the context.
  // Writes to digestRaw
  void Final() {
    unsigned char bits[8];
    unsigned int index, padLen;

    // Save number of bits
    Encode( bits, context.count, 8 );

    // Pad out to 56 mod 64.
    index = (unsigned int)((context.count[0] >> 3) & 0x3f);
    padLen = (index < 56) ? (56 - index) : (120 - index);
    Update( PADDING, padLen );

    // Append length (before padding)
    Update( bits, 8 );

    // Store state in digest
    Encode( digestRaw, context.state, 16);

    // Zeroize sensitive information.
    memset((POINTER)&context, 0, sizeof (context));

    writeToString() ;
  }

  /// Buffer must be 32+1 (nul) = 33 chars long at least
  void writeToString() {
    int pos ;

    for( pos = 0 ; pos < 16 ; pos++ )
      sprintf( digestChars+(pos*2), "%02x", digestRaw[pos] ) ;
  }


 public:
  // an MD5 digest is a 16-byte number (32 hex digits)
  BYTE digestRaw[ 16 ] ;

  // This version of the digest is actually
  // a "printf'd" version of the digest.
  char digestChars[ 33 ] ;

  /// Load a file from disk and digest it
  // Digests a file and returns the result.
  const char* digestFile( const char *filename ) {
    if (NULL == filename || strcmp(filename, "") == 0)
      return NULL;

    Init() ;

    FILE *file;

    unsigned char buffer[1024] ;

    if((file = fopen (filename, "rb")) == NULL) {
      return NULL;
    }
    int len;
    while( (len = fread( buffer, 1, 1024, file )) )
      Update( buffer, len ) ;
    Final();

    fclose( file );

    return digestChars ;
  }

  /// Digests a byte-array already in memory
  const char* digestMemory( BYTE *memchunk, int len ) {
    if (NULL == memchunk)
      return NULL;

    Init() ;
    Update( memchunk, len ) ;
    Final() ;

    return digestChars ;
  }

  // Digests a string and prints the result.
  const char* digestString(const char *string ) {
    if (string == NULL)
      return NULL;

    Init() ;
    Update( (unsigned char*)string, strlen(string) ) ;
    Final() ;

    return digestChars ;
  }
};

inline bool md5String(const char* str, std::string& res) {
  if (NULL == str) {
    res = "";
    return false;
  }

  MD5 md5;
  const char *pRes = md5.digestString(str);
  if (NULL == pRes) {
    res = "";
    return false;
  }

  res = pRes;
  return true;
}

inline bool md5File(const char* filepath, std::string& res) {
  if (NULL == filepath || strcmp(filepath, "") == 0) {
    res = "";
    return false;
  }

  MD5 md5;
  const char *pRes = md5.digestFile(filepath);

  if (NULL == pRes) {
    res = "";
    return false;
  }

  res = pRes;
  return true;
}
}
#endif


================================================
FILE: deps/simhash/submodules/cppjieba/deps/limonp/include/limonp/MutexLock.hpp
================================================
#ifndef LIMONP_MUTEX_LOCK_HPP
#define LIMONP_MUTEX_LOCK_HPP

#include <pthread.h>
#include "NonCopyable.hpp"
#include "Logging.hpp"

namespace limonp {

class MutexLock: NonCopyable {
 public:
  MutexLock() {
    XCHECK(!pthread_mutex_init(&mutex_, NULL));
  }
  ~MutexLock() {
    XCHECK(!pthread_mutex_destroy(&mutex_));
  }
  pthread_mutex_t* GetPthreadMutex() {
    return &mutex_;
  }

 private:
  void Lock() {
    XCHECK(!pthread_mutex_lock(&mutex_));
  }
  void Unlock() {
    XCHECK(!pthread_mutex_unlock(&mutex_));
  }
  friend class MutexLockGuard;

  pthread_mutex_t mutex_;
}; // class MutexLock

class MutexLockGuard: NonCopyable {
 public:
  explicit MutexLockGuard(MutexLock & mutex)
    : mutex_(mutex) {
    mutex_.Lock();
  }
  ~MutexLockGuard() {
    mutex_.Unlock();
  }
 private:
  MutexLock & mutex_;
}; // class MutexLockGuard

#define MutexLockGuard(x) XCHECK(false);

} // namespace limonp

#endif // LIMONP_MUTEX_LOCK_HPP


================================================
FILE: deps/simhash/submodules/cppjieba/deps/limonp/include/limonp/NonCopyable.hpp
================================================
/************************************
 ************************************/
#ifndef LIMONP_NONCOPYABLE_H
#define LIMONP_NONCOPYABLE_H

namespace limonp {

class NonCopyable {
 protected:
  NonCopyable() {
  }
  ~NonCopyable() {
  }
 private:
  NonCopyable(const NonCopyable& );
  const NonCopyable& operator=(const NonCopyable& );
}; // class NonCopyable

} // namespace limonp

#endif // LIMONP_NONCOPYABLE_H


================================================
FILE: deps/simhash/submodules/cppjieba/deps/limonp/include/limonp/StdExtension.hpp
================================================
#ifndef LIMONP_STD_EXTEMSION_HPP
#define LIMONP_STD_EXTEMSION_HPP

#include <map>

#ifdef __APPLE__
#include <unordered_map>
#include <unordered_set>
#elif(__cplusplus >= 201103L)
#include <unordered_map>
#include <unordered_set>
#elif defined _MSC_VER
#include <unordered_map>
#include <unordered_set>
#else
#include <tr1/unordered_map>
#include <tr1/unordered_set>
namespace std {
using std::tr1::unordered_map;
using std::tr1::unordered_set;
}

#endif

#include <set>
#include <string>
#include <vector>
#include <deque>
#include <fstream>
#include <sstream>

namespace std {

template<typename T>
ostream& operator << (ostream& os, const vector<T>& v) {
  if(v.empty()) {
    return os << "[]";
  }
  os<<"["<<v[0];
  for(size_t i = 1; i < v.size(); i++) {
    os<<", "<<v[i];
  }
  os<<"]";
  return os;
}

template<>
inline ostream& operator << (ostream& os, const vector<string>& v) {
  if(v.empty()) {
    return os << "[]";
  }
  os<<"[\""<<v[0];
  for(size_t i = 1; i < v.size(); i++) {
    os<<"\", \""<<v[i];
  }
  os<<"\"]";
  return os;
}

template<typename T>
ostream& operator << (ostream& os, const deque<T>& dq) {
  if(dq.empty()) {
    return os << "[]";
  }
  os<<"[\""<<dq[0];
  for(size_t i = 1; i < dq.size(); i++) {
    os<<"\", \""<<dq[i];
  }
  os<<"\"]";
  return os;
}


template<class T1, class T2>
ostream& operator << (ostream& os, const pair<T1, T2>& pr) {
  os << pr.first << ":" << pr.second ;
  return os;
}


template<class T>
string& operator << (string& str, const T& obj) {
  stringstream ss;
  ss << obj; // call ostream& operator << (ostream& os,
  return str = ss.str();
}

template<class T1, class T2>
ostream& operator << (ostream& os, const map<T1, T2>& mp) {
  if(mp.empty()) {
    os<<"{}";
    return os;
  }
  os<<'{';
  typename map<T1, T2>::const_iterator it = mp.begin();
  os<<*it;
  it++;
  while(it != mp.end()) {
    os<<", "<<*it;
    it++;
  }
  os<<'}';
  return os;
}
template<class T1, class T2>
ostream& operator << (ostream& os, const std::unordered_map<T1, T2>& mp) {
  if(mp.empty()) {
    return os << "{}";
  }
  os<<'{';
  typename std::unordered_map<T1, T2>::const_iterator it = mp.begin();
  os<<*it;
  it++;
  while(it != mp.end()) {
    os<<", "<<*it++;
  }
  return os<<'}';
}

template<class T>
ostream& operator << (ostream& os, const set<T>& st) {
  if(st.empty()) {
    os << "{}";
    return os;
  }
  os<<'{';
  typename set<T>::const_iterator it = st.begin();
  os<<*it;
  it++;
  while(it != st.end()) {
    os<<", "<<*it;
    it++;
  }
  os<<'}';
  return os;
}

template<class KeyType, class ContainType>
bool IsIn(const ContainType& contain, const KeyType& key) {
  return contain.end() != contain.find(key);
}

template<class T>
basic_string<T> & operator << (basic_string<T> & s, ifstream & ifs) {
  return s.assign((istreambuf_iterator<T>(ifs)), istreambuf_iterator<T>());
}

template<class T>
ofstream & operator << (ofstream & ofs, const basic_string<T>& s) {
  ostreambuf_iterator<T> itr (ofs);
  copy(s.begin(), s.end(), itr);
  return ofs;
}

} // namespace std

#endif


================================================
FILE: deps/simhash/submodules/cppjieba/deps/limonp/include/limonp/StringUtil.hpp
================================================
/************************************
 * file enc : ascii
 * author   : wuyanyi09@gmail.com
 ************************************/
#ifndef LIMONP_STR_FUNCTS_H
#define LIMONP_STR_FUNCTS_H
#include <fstream>
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cctype>
#include <map>
#include <cassert>
#include <ctime>
#include <stdint.h>
#include <stdio.h>
#include <stdarg.h>
#include <memory.h>
#include <functional>
#include <locale>
#include <sstream>
#include <sys/types.h>
#include <iterator>
#include <algorithm>
#include "StdExtension.hpp"

namespace limonp {
using namespace std;
inline string StringFormat(const char* fmt, ...) {
  int size = 256;
  std::string str;
  va_list ap;
  while (1) {
    str.resize(size);
    va_start(ap, fmt);
    int n = vsnprintf((char *)str.c_str(), size, fmt, ap);
    va_end(ap);
    if (n > -1 && n < size) {
      str.resize(n);
      return str;
    }
    if (n > -1)
      size = n + 1;
    else
      size *= 2;
  }
  return str;
}

template<class T>
void Join(T begin, T end, string& res, const string& connector) {
  if(begin == end) {
    return;
  }
  stringstream ss;
  ss<<*begin;
  begin++;
  while(begin != end) {
    ss << connector << *begin;
    begin ++;
  }
  res = ss.str();
}

template<class T>
string Join(T begin, T end, const string& connector) {
  string res;
  Join(begin ,end, res, connector);
  return res;
}

inline string& Upper(string& str) {
  transform(str.begin(), str.end(), str.begin(), (int (*)(int))toupper);
  return str;
}

inline string& Lower(string& str) {
  transform(str.begin(), str.end(), str.begin(), (int (*)(int))tolower);
  return str;
}

inline bool IsSpace(unsigned c) {
  // when passing large int as the argument of isspace, it core dump, so here need a type cast.
  return c > 0xff ? false : std::isspace(c & 0xff) != 0;
}

inline std::string& LTrim(std::string &s) {
    s.erase(s.begin(), std::find_if(s.begin(), s.end(), [](unsigned char ch) {
        return !std::isspace(ch);
    }));
    return s;
}

inline std::string& RTrim(std::string &s) {
  s.erase(std::find_if(s.rbegin(), s.rend(), [](unsigned char ch) {
      return !std::isspace(ch);
  }).base(), s.end());
  return s;
}

inline std::string& Trim(std::string &s) {
  return LTrim(RTrim(s));
}

inline std::string& LTrim(std::string& s, char x) {
    s.erase(s.begin(), std::find_if(s.begin(), s.end(),
      [x](unsigned char c) { return !std::isspace(c) && c != x; }));
    return s;
}

inline std::string& RTrim(std::string& s, char x) {
    s.erase(std::find_if(s.rbegin(), s.rend(),
        [x](unsigned char c) { return !std::isspace(c) && c != x; }).base(), s.end());
    return s;
}

inline std::string& Trim(std::string &s, char x) {
  return LTrim(RTrim(s, x), x);
}

inline void Split(const string& src, vector<string>& res, const string& pattern, size_t maxsplit = string::npos) {
  res.clear();
  size_t Start = 0;
  size_t end = 0;
  string sub;
  while(Start < src.size()) {
    end = src.find_first_of(pattern, Start);
    if(string::npos == end || res.size() >= maxsplit) {
      sub = src.substr(Start);
      res.push_back(sub);
      return;
    }
    sub = src.substr(Start, end - Start);
    res.push_back(sub);
    Start = end + 1;
  }
  return;
}

inline vector<string> Split(const string& src, const string& pattern, size_t maxsplit = string::npos) {
  vector<string> res;
  Split(src, res, pattern, maxsplit);
  return res;
}

inline bool StartsWith(const string& str, const string& prefix) {
  if(prefix.length() > str.length()) {
    return false;
  }
  return 0 == str.compare(0, prefix.length(), prefix);
}

inline bool EndsWith(const string& str, const string& suffix) {
  if(suffix.length() > str.length()) {
    return false;
  }
  return 0 == str.compare(str.length() -  suffix.length(), suffix.length(), suffix);
}

inline bool IsInStr(const string& str, char ch) {
  return str.find(ch) != string::npos;
}

inline uint16_t TwocharToUint16(char high, char low) {
  return (((uint16_t(high) & 0x00ff ) << 8) | (uint16_t(low) & 0x00ff));
}

template <class Uint16Container>
bool Utf8ToUnicode(const char * const str, size_t len, Uint16Container& vec) {
  if(!str) {
    return false;
  }
  char ch1, ch2;
  uint16_t tmp;
  vec.clear();
  for(size_t i = 0; i < len;) {
    if(!(str[i] & 0x80)) { // 0xxxxxxx
      vec.push_back(str[i]);
      i++;
    } else if ((uint8_t)str[i] <= 0xdf && i + 1 < len) { // 110xxxxxx
      ch1 = (str[i] >> 2) & 0x07;
      ch2 = (str[i+1] & 0x3f) | ((str[i] & 0x03) << 6 );
      tmp = (((uint16_t(ch1) & 0x00ff ) << 8) | (uint16_t(ch2) & 0x00ff));
      vec.push_back(tmp);
      i += 2;
    } else if((uint8_t)str[i] <= 0xef && i + 2 < len) {
      ch1 = ((uint8_t)str[i] << 4) | ((str[i+1] >> 2) & 0x0f );
      ch2 = (((uint8_t)str[i+1]<<6) & 0xc0) | (str[i+2] & 0x3f);
      tmp = (((uint16_t(ch1) & 0x00ff ) << 8) | (uint16_t(ch2) & 0x00ff));
      vec.push_back(tmp);
      i += 3;
    } else {
      return false;
    }
  }
  return true;
}

template <class Uint16Container>
bool Utf8ToUnicode(const string& str, Uint16Container& vec) {
  return Utf8ToUnicode(str.c_str(), str.size(), vec);
}

template <class Uint32Container>
bool Utf8ToUnicode32(const string& str, Uint32Container& vec) {
  uint32_t tmp;
  vec.clear();
  for(size_t i = 0; i < str.size();) {
    if(!(str[i] & 0x80)) { // 0xxxxxxx
      // 7bit, total 7bit
      tmp = (uint8_t)(str[i]) & 0x7f;
      i++;
    } else if ((uint8_t)str[i] <= 0xdf && i + 1 < str.size()) { // 110xxxxxx
      // 5bit, total 5bit
      tmp = (uint8_t)(str[i]) & 0x1f;

      // 6bit, total 11bit
      tmp <<= 6;
      tmp |= (uint8_t)(str[i+1]) & 0x3f;
      i += 2;
    } else if((uint8_t)str[i] <= 0xef && i + 2 < str.size()) { // 1110xxxxxx
      // 4bit, total 4bit
      tmp = (uint8_t)(str[i]) & 0x0f;

      // 6bit, total 10bit
      tmp <<= 6;
      tmp |= (uint8_t)(str[i+1]) & 0x3f;

      // 6bit, total 16bit
      tmp <<= 6;
      tmp |= (uint8_t)(str[i+2]) & 0x3f;

      i += 3;
    } else if((uint8_t)str[i] <= 0xf7 && i + 3 < str.size()) { // 11110xxxx
      // 3bit, total 3bit
      tmp = (uint8_t)(str[i]) & 0x07;

      // 6bit, total 9bit
      tmp <<= 6;
      tmp |= (uint8_t)(str[i+1]) & 0x3f;

      // 6bit, total 15bit
      tmp <<= 6;
      tmp |= (uint8_t)(str[i+2]) & 0x3f;

      // 6bit, total 21bit
      tmp <<= 6;
      tmp |= (uint8_t)(str[i+3]) & 0x3f;

      i += 4;
    } else {
      return false;
    }
    vec.push_back(tmp);
  }
  return true;
}

template <class Uint32ContainerConIter>
void Unicode32ToUtf8(Uint32ContainerConIter begin, Uint32ContainerConIter end, string& res) {
  res.clear();
  uint32_t ui;
  while(begin != end) {
    ui = *begin;
    if(ui <= 0x7f) {
      res += char(ui);
    } else if(ui <= 0x7ff) {
      res += char(((ui >> 6) & 0x1f) | 0xc0);
      res += char((ui & 0x3f) | 0x80);
    } else if(ui <= 0xffff) {
      res += char(((ui >> 12) & 0x0f) | 0xe0);
      res += char(((ui >> 6) & 0x3f) | 0x80);
      res += char((ui & 0x3f) | 0x80);
    } else {
      res += char(((ui >> 18) & 0x03) | 0xf0);
      res += char(((ui >> 12) & 0x3f) | 0x80);
      res += char(((ui >> 6) & 0x3f) | 0x80);
      res += char((ui & 0x3f) | 0x80);
    }
    begin ++;
  }
}

template <class Uint16ContainerConIter>
void UnicodeToUtf8(Uint16ContainerConIter begin, Uint16ContainerConIter end, string& res) {
  res.clear();
  uint16_t ui;
  while(begin != end) {
    ui = *begin;
    if(ui <= 0x7f) {
      res += char(ui);
    } else if(ui <= 0x7ff) {
      res += char(((ui>>6) & 0x1f) | 0xc0);
      res += char((ui & 0x3f) | 0x80);
    } else {
      res += char(((ui >> 12) & 0x0f )| 0xe0);
      res += char(((ui>>6) & 0x3f )| 0x80 );
      res += char((ui & 0x3f) | 0x80);
    }
    begin ++;
  }
}


template <class Uint16Container>
bool GBKTrans(const char* const str, size_t len, Uint16Container& vec) {
  vec.clear();
  if(!str) {
    return true;
  }
  size_t i = 0;
  while(i < len) {
    if(0 == (str[i] & 0x80)) {
      vec.push_back(uint16_t(str[i]));
      i++;
    } else {
      if(i + 1 < len) { //&& (str[i+1] & 0x80))
        uint16_t tmp = (((uint16_t(str[i]) & 0x00ff ) << 8) | (uint16_t(str[i+1]) & 0x00ff));
        vec.push_back(tmp);
        i += 2;
      } else {
        return false;
      }
    }
  }
  return true;
}

template <class Uint16Container>
bool GBKTrans(const string& str, Uint16Container& vec) {
  return GBKTrans(str.c_str(), str.size(), vec);
}

template <class Uint16ContainerConIter>
void GBKTrans(Uint16ContainerConIter begin, Uint16ContainerConIter end, string& res) {
  res.clear();
  //pair<char, char> pa;
  char first, second;
  while(begin != end) {
    //pa = uint16ToChar2(*begin);
    first = ((*begin)>>8) & 0x00ff;
    second = (*begin) & 0x00ff;
    if(first & 0x80) {
      res += first;
      res += second;
    } else {
      res += second;
    }
    begin++;
  }
}

/*
 * format example: "%Y-%m-%d %H:%M:%S"
 */
inline void GetTime(const string& format, string&  timeStr) {
  time_t timeNow;
  time(&timeNow);

  struct tm tmNow;

  #if defined(_WIN32) || defined(_WIN64)
  errno_t e = localtime_s(&tmNow, &timeNow);
  assert(e == 0);
  #else
  struct tm * tm_tmp = localtime_r(&timeNow, &tmNow);
  assert(tm_tmp != nullptr);
  #endif

  timeStr.resize(64);
  
  size_t len = strftime((char*)timeStr.c_str(), timeStr.size(), format.c_str(), &tmNow);
  
  timeStr.resize(len);
}

inline string PathJoin(const string& path1, const string& path2) {
  if(EndsWith(path1, "/")) {
    return path1 + path2;
  }
  return path1 + "/" + path2;
}

}
#endif


================================================
FILE: deps/simhash/submodules/cppjieba/deps/limonp/include/limonp/Thread.hpp
================================================
#ifndef LIMONP_THREAD_HPP
#define LIMONP_THREAD_HPP

#include "Logging.hpp"
#include "NonCopyable.hpp"

namespace limonp {

class IThread: NonCopyable {
 public:
  IThread(): isStarted(false), isJoined(false) {
  }
  virtual ~IThread() {
    if(isStarted && !isJoined) {
      XCHECK(!pthread_detach(thread_));
    }
  };

  virtual void Run() = 0;
  void Start() {
    XCHECK(!isStarted);
    XCHECK(!pthread_create(&thread_, NULL, Worker, this));
    isStarted = true;
  }
  void Join() {
    XCHECK(!isJoined);
    XCHECK(!pthread_join(thread_, NULL));
    isJoined = true;
  }
 private:
  static void * Worker(void * data) {
    IThread * ptr = (IThread* ) data;
    ptr->Run();
    return NULL;
  }

  pthread_t thread_;
  bool isStarted;
  bool isJoined;
}; // class IThread

} // namespace limonp

#endif // LIMONP_THREAD_HPP


================================================
FILE: deps/simhash/submodules/cppjieba/deps/limonp/include/limonp/ThreadPool.hpp
================================================
#ifndef LIMONP_THREAD_POOL_HPP
#define LIMONP_THREAD_POOL_HPP

#include "Thread.hpp"
#include "BlockingQueue.hpp"
#include "BoundedBlockingQueue.hpp"
#include "Closure.hpp"

namespace limonp {

using namespace std;

//class ThreadPool;
class ThreadPool: NonCopyable {
 public:
  class Worker: public IThread {
   public:
    Worker(ThreadPool* pool): ptThreadPool_(pool) {
      assert(ptThreadPool_);
    }
    virtual ~Worker() {
    }

    virtual void Run() {
      while (true) {
        ClosureInterface* closure = ptThreadPool_->queue_.Pop();
        if (closure == NULL) {
          break;
        }
        try {
          closure->Run();
        } catch(std::exception& e) {
          XLOG(ERROR) << e.what();
        } catch(...) {
          XLOG(ERROR) << " unknown exception.";
        }
        delete closure;
      }
    }
   private:
    ThreadPool * ptThreadPool_;
  }; // class Worker

  ThreadPool(size_t thread_num)
    : threads_(thread_num), 
      queue_(thread_num) {
    assert(thread_num);
    for(size_t i = 0; i < threads_.size(); i ++) {
      threads_[i] = new Worker(this);
    }
  }
  ~ThreadPool() {
    Stop();
  }

  void Start() {
    for(size_t i = 0; i < threads_.size(); i++) {
      threads_[i]->Start();
    }
  }
  void Stop() {
    for(size_t i = 0; i < threads_.size(); i ++) {
      queue_.Push(NULL);
    }
    for(size_t i = 0; i < threads_.size(); i ++) {
      threads_[i]->Join();
      delete threads_[i];
    }
    threads_.clear();
  }

  void Add(ClosureInterface* task) {
    assert(task);
    queue_.Push(task);
  }

 private:
  friend class Worker;

  vector<IThread*> threads_;
  BoundedBlockingQueue<ClosureInterface*> queue_;
}; // class ThreadPool

} // namespace limonp

#endif // LIMONP_THREAD_POOL_HPP


================================================
FILE: deps/simhash/submodules/cppjieba/deps/limonp/test/CMakeLists.txt
================================================
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/test)
SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/test/lib)

INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/include)

ADD_EXECUTABLE(demo demo.cpp)

#if(NOT MSVC)
#	ADD_EXECUTABLE(thread_pool_demo thread_pool_demo.cpp)
#	TARGET_LINK_LIBRARIES(thread_pool_demo pthread)
#endif()

ADD_SUBDIRECTORY(unittest)


================================================
FILE: deps/simhash/submodules/cppjieba/deps/limonp/test/demo.cpp
================================================
#include "limonp/StringUtil.hpp"
#include "limonp/Logging.hpp"

using namespace std;

#define print(x) std::cout << x << std::endl

int main(int argc, char** argv) {
  string strname = "hello, world";
  print(strname); //hello, world
  map<string, int> mp;
  mp["hello"] = 1;
  mp["world"] = 2;
  print(mp); // {"hello":1, "world":2}

  string res;
  res << mp;
  print(res); // {"hello":1, "world":2}

  string str;
  str = limonp::StringFormat("%s, %s", "hello", "world");
  print(str); //hello, world

  const char * a[] = {"hello", "world"};
  str = limonp::Join(a, a + sizeof(a)/sizeof(*a), ",");
  print(str); //hello,world

  str = "hello, world";
  vector<string> buf;
  limonp::Split(str, buf, ",");
  print(buf); //["hello", " world"]

  int arr[] = {1,10,100,1000};
  vector<int> vec_i(arr, arr + sizeof(arr)/sizeof(arr[0]));
  print(vec_i); //[1, 10, 100, 1000]

  XLOG(INFO) << "hello, world"; //2014-04-05 20:52:37 demo.cpp:35 INFO hello, world
  //In the same way, `LOG(DEBUG),LOG(WARNING),LOG(ERROR),LOG(FATAL)`.
  return EXIT_SUCCESS;
}


================================================
FILE: deps/simhash/submodules/cppjieba/deps/limonp/test/testdata/1.conf
================================================

key1 = val1
##this is comment

key2=val2


================================================
FILE: deps/simhash/submodules/cppjieba/deps/limonp/test/testdata/StdExtension.data
================================================
key1 = val1
##this is comment
key2=val2


================================================
FILE: deps/simhash/submodules/cppjieba/deps/limonp/test/testdata/dict.gbk
================================================
AT&T 3 nz
B 3 n
c# 3 nz
C# 3 nz
c++ 3 nz
C++ 3 nz
T 4 n
һ 217830 m
һһ 1670 m
һһ 11 m
һһ 3 m
һһ 8 m
һһо 34 i
һһ 9 m
һһӦ 43 l
һһ 2 m
һһ 4 l
һ 18 d
һʶ 3 i
һ 3 m
һ 24 m
һ 22 m
һ߰˲ 3 l
һ 442 m
һһǧ 4 m
һһǧٶʮ 2 m
һһǧ˰ٰʮ 2 m
һһǧ 2 m
һһǧʮ 4 m
һǧ 5 m
һǧ 2 m
һǧ 2 m
һǧ໧ 2 m
һ 4 m
һ 4 m
һǧ 8 m
һǧһʮ 2 m
һǧٽ 4 m
һǧ 2 m
һǧ 2 m
һ 124 m
һ 4 m
һǧ 3 m
һ 62 m
һǧ 2 m
һǧ 2 m
һ 10 m
һǧ 7 m
һǧ 2 m
һǧ 4 m


================================================
FILE: deps/simhash/submodules/cppjieba/deps/limonp/test/testdata/dict.utf8
================================================
AT&T 3 nz
B超 3 n
c# 3 nz
C# 3 nz
c++ 3 nz
C++ 3 nz
T恤 4 n
一 217830 m
一一 1670 m
一一二 11 m
一一例 3 m
一一分 8 m
一一列举 34 i
一一对 9 m
一一对应 43 l
一一记 2 m
一一道来 4 l
一丁 18 d
一丁不识 3 i
一丁点 3 m
一丁点儿 24 m
一七 22 m
一七八不 3 l
一万 442 m
一万一千 4 m
一万一千五百二十颗 2 m
一万一千八百八十斤 2 m
一万一千多间 2 m
一万一千零九十五册 4 m
一万七千 5 m
一万七千余 2 m
一万七千多 2 m
一万七千多户 2 m
一万万 4 m
一万万两 4 m
一万三千 8 m
一万三千五百一十七 2 m
一万三千五百斤 4 m
一万三千余种 2 m
一万三千块 2 m
一万两 124 m
一万两万 4 m
一万两千 3 m
一万个 62 m
一万九千 2 m
一万九千余 2 m
一万二 10 m
一万二千 7 m
一万二千两 2 m
一万二千五百 4 m


================================================
FILE: deps/simhash/submodules/cppjieba/deps/limonp/test/testdata/io_testfile
================================================
line1
line2


================================================
FILE: deps/simhash/submodules/cppjieba/deps/limonp/test/testdata/jieba.dict.0.1.utf8
================================================
龙鸣狮吼 3 nr
龙齐诺 2 nr
龙齿 3 n
龚 176 nr
龚世萍 2 nr
龚书铎 2 nr
龚二人 2 nr
龚云甫 3 nr
龚伟强 5 nr
龚先生 4 nr
龚光杰 44 nr
龚古尔 24 nr
龚子敬 2 nr
龚孝升 12 nr
龚学平 2 nr
龚完敬 5 nr
龚定庵 3 nr
龚定敬 2 nr
龚宝铨 5 nr
龚家村 3 nr
龚建国 29 nr
龚德俊 6 nr
龚心瀚 3 nr
龚志国 2 nr
龚意田 3 nr
龚慈恩 3 nr
龚施茜 3 nr
龚晓犁 2 nr
龚普洛 3 nr
龚智超 7 nr
龚松林 10 nr
龚永明 3 nr
龚永泉 5 nr
龚泽艺 256 nr
龚睿 8 nrfg
龚祖同 2 nr
龚秋婷 3 nr
龚老爷 2 nr
龚育之 19 nr
龚自珍 28 nr
龚蓓苾 3 nr
龚虹嘉 3 nr
龚诗嘉 3 nr
龛 223 ng
龜 2 zg
龟 903 ns
龟儿子 123 n
龟兆 3 nz
龟兹 215 ns
龟兹王 3 nrt
龟冷搘床 3 v
龟冷支床 3 n
龟卜 3 n
龟厌不告 3 l
龟壳 33 n
龟壳花 3 n
龟头 34 n
龟头炎 3 n
龟山 23 ns
龟山乡 3 ns
龟山岛 3 ns
龟年鹤寿 3 ns
龟年鹤算 3 l
龟文 3 nz
龟文写迹 3 n
龟文鸟迹 3 n
龟板 10 n
龟毛免角 3 n
龟毛兔角 3 n
龟溪 3 ns
龟玉 3 nz
龟王 3 nz
龟甲 92 ns
龟甲胶 3 nz
龟筮 3 n
龟纹 3 n
龟缩 29 v
龟肉 3 n
龟背 21 n
龟背竹 3 n
龟苓膏 3 n
龟苗 3 n
龟裂 34 v
龟足 5 v
龟鉴 2 n
龟镜 3 nz
龟鳖 3 n
龟鹤遐寿 3 l
龟龄鹤算 3 n
龟龙片甲 3 nz
龟龙麟凤 3 ns
龠 5 g
龢 732 zg


================================================
FILE: deps/simhash/submodules/cppjieba/deps/limonp/test/testdata/jieba.dict.0.utf8
================================================
龙鸣狮吼 3 nr
龙齐诺 2 nr
龙齿 3 n
龚 176 nr
龚世萍 2 nr
龚书铎 2 nr
龚二人 2 nr
龚云甫 3 nr
龚伟强 5 nr
龚先生 4 nr
龚光杰 44 nr
龚古尔 24 nr
龚子敬 2 nr
龚孝升 12 nr
龚学平 2 nr
龚完敬 5 nr
龚定庵 3 nr
龚定敬 2 nr
龚宝铨 5 nr
龚家村 3 nr
龚建国 29 nr
龚德俊 6 nr
龚心瀚 3 nr
龚志国 2 nr
龚意田 3 nr
龚慈恩 3 nr
龚施茜 3 nr
龚晓犁 2 nr
龚普洛 3 nr
龚智超 7 nr
龚松林 10 nr
龚永明 3 nr
龚永泉 5 nr
龚泽艺 256 nr
龚睿 8 nrfg
龚祖同 2 nr
龚秋婷 3 nr
龚老爷 2 nr
龚育之 19 nr
龚自珍 28 nr
龚蓓苾 3 nr
龚虹嘉 3 nr
龚诗嘉 3 nr
龛 223 ng
龜 2 zg
龟 903 ns
龟儿子 123 n
龟兆 3 nz
龟兹 215 ns
龟兹王 3 nrt
龟冷搘床 3 v
龟冷支床 3 n
龟卜 3 n
龟厌不告 3 l
龟壳 33 n
龟壳花 3 n
龟头 34 n
龟头炎 3 n
龟山 23 ns
龟山乡 3 ns
龟山岛 3 ns
龟年鹤寿 3 ns
龟年鹤算 3 l
龟文 3 nz
龟文写迹 3 n
龟文鸟迹 3 n
龟板 10 n
龟毛免角 3 n
龟毛兔角 3 n
龟溪 3 ns
龟玉 3 nz
龟王 3 nz
龟甲 92 ns
龟甲胶 3 nz
龟筮 3 n
龟纹 3 n
龟缩 29 v
龟肉 3 n
龟背 21 n
龟背竹 3 n
龟苓膏 3 n
龟苗 3 n
龟裂 34 v
龟足 5 v
龟鉴 2 n
龟镜 3 nz
龟鳖 3 n
龟鹤遐寿 3 l
龟龄鹤算 3 n
龟龙片甲 3 nz
龟龙麟凤 3 ns
龠 5 g
龢 732 zg


================================================
FILE: deps/simhash/submodules/cppjieba/deps/limonp/test/testdata/jieba.dict.1.utf8
================================================
AT&T 3 nz
B超 3 n
c# 3 nz
C# 3 nz
c++ 3 nz
C++ 3 nz
T恤 4 n
一 217830 m
一一 1670 m
一一二 11 m
一一例 3 m
一一分 8 m
一一列举 34 i
一一对 9 m
一一对应 43 l
一一记 2 m
一一道来 4 l
一丁 18 d
一丁不识 3 i
一丁点 3 m
一丁点儿 24 m
一七 22 m
一七八不 3 l
一万 442 m
一万一千 4 m
一万一千五百二十颗 2 m
一万一千八百八十斤 2 m
一万一千多间 2 m
一万一千零九十五册 4 m
一万七千 5 m
一万七千余 2 m
一万七千多 2 m
一万七千多户 2 m
一万万 4 m
一万万两 4 m
一万三千 8 m
一万三千五百一十七 2 m
一万三千五百斤 4 m
一万三千余种 2 m
一万三千块 2 m
一万两 124 m
一万两万 4 m
一万两千 3 m
一万个 62 m
一万九千 2 m
一万九千余 2 m
一万二 10 m
一万二千 7 m
一万二千两 2 m
一万二千五百 4 m
一万二千五百一十二 2 m
一万二千五百余 2 m
一万二千五百余吨 2 m
一万二千亩 2 m
一万二千余 2 m
一万二千六百八十二箱 2 m
一万二千名 3 m
一万二千里 3 m
一万五 6 m
一万五千 45 m
一万五千一百四十四卷 2 m
一万五千两 4 m
一万五千个 2 m
一万五千二百余 2 m
一万五千余 9 m
一万五千元 3 m
一万五千名 4 m


================================================
FILE: deps/simhash/submodules/cppjieba/deps/limonp/test/testdata/jieba.dict.2.utf8
================================================
一万七千 5 m
一万七千余 2 m
一万七千多 2 m
一万七千多户 2 m
一万万 4 m
一万万两 4 m
一万三千 8 m
一万三千五百一十七 2 m
一万三千五百斤 4 m
一万三千余种 2 m
一万三千块 2 m
一万两 124 m
一万两万 4 m
一万两千 3 m
一万个 62 m
一万九千 2 m
一万九千余 2 m
一万二 10 m
一万二千 7 m
一万二千两 2 m
一万二千五百 4 m
一万二千五百一十二 2 m
一万二千五百余 2 m
一万二千五百余吨 2 m
一万二千亩 2 m
一万二千余 2 m
一万二千六百八十二箱 2 m
一万二千名 3 m
一万二千里 3 m
一万五 6 m
一万五千 45 m
一万五千一百四十四卷 2 m
一万五千两 4 m
一万五千个 2 m
一万五千二百余 2 m
一万五千余 9 m
一万五千元 3 m
一万五千名 4 m
一万五千多 2 m
一万五千家 2 m
一万亿 3 m
一万亿美元 5 m
一万余 41 m
一万余吨 2 m
一万余顷 2 m
一万倍 14 m
一万元 61 m
一万八 5 m
一万八千 7 m
一万八千余 8 m
一万八千多元 2 m
一万公里 2 m
一万六千 5 m
一万六千三百户 2 m
一万六千余户 2 m
一万六千多 3 m
一万册 2 m
一万刀 7 m
一万匹 4 m
一万卷 2 m
一万双 6 m
一万发 2 m
一万句 11 m
一万只 9 m


================================================
FILE: deps/simhash/submodules/cppjieba/deps/limonp/test/thread_pool_demo.cpp
================================================
#include "limonp/ThreadPool.hpp"
#include "limonp/StdExtension.hpp"

using namespace std;

const size_t THREAD_NUM = 4;

void Increase(int* x) {
  (*x) ++;
}

void DemoNormalFunction() {
  vector<int> numbers(4, 0);
  cout << numbers << endl;
  {
    limonp::ThreadPool thread_pool(THREAD_NUM);
    thread_pool.Start();
    for (size_t i = 0; i < numbers.size(); i++) {
      thread_pool.Add(limonp::NewClosure(&Increase, &numbers[i]));
    }
  }
  cout << numbers << endl;
}

class Numbers {
 public:
  Numbers(size_t num): numbers_(num, 0) {
  }
  void Increase(size_t index) {
    assert(index < numbers_.size());
    numbers_[index]++;
  }

  vector<int> numbers_;
};

void DemoClassFunction() {
  Numbers numbers(4);
  cout << numbers.numbers_ << endl;
  limonp::ThreadPool thread_pool(THREAD_NUM);
  thread_pool.Start();
  for (size_t i = 0; i < numbers.numbers_.size(); i++) {
    thread_pool.Add(limonp::NewClosure(&numbers, &Numbers::Increase, i));
  }
  thread_pool.Stop();
  cout << numbers.numbers_ << endl;
}

int main() {
  DemoNormalFunction();
  DemoClassFunction();
  return 0;
}


================================================
FILE: deps/simhash/submodules/cppjieba/deps/limonp/test/unittest/CMakeLists.txt
================================================

if (MSVC)
	set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreadedDebugDLL")
	set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
endif()

include(FetchContent)

FetchContent_Declare(
  googletest
  GIT_REPOSITORY https://github.com/google/googletest.git
  GIT_TAG release-1.11.0
)
FetchContent_MakeAvailable(googletest)

ADD_EXECUTABLE(test.run 
	gtest_main.cpp 
	TLogging.cpp  
	TArgvContext.cpp  
	TConfig.cpp
	TStringUtil.cpp 
	TStdExtension.cpp 
	TLocalVector.cpp 
	TClosure.cpp 
	TColorPrint.cpp
	#TMd5.cpp
	#TFileLock.cpp
	#TBoundedQueue.cpp 
	#TMutexLock.cpp 
	#TBlockingQueue.cpp 
	#TThread.cpp 
	#TThreadPool.cpp 
)
TARGET_LINK_LIBRARIES(test.run gtest)

#include(GoogleTest)
#gtest_discover_tests(test.run)


================================================
FILE: deps/simhash/submodules/cppjieba/deps/limonp/test/unittest/TArgvContext.cpp
================================================
#include "limonp/ArgvContext.hpp"
#include "gtest/gtest.h"

using namespace limonp;

TEST(ArgvContextTest, Test1) {
  const char * argv[] = {"./exe1", "--hehe", "11", "key2", "-k", "val"};
  string s;
  ArgvContext arg(sizeof(argv)/sizeof(argv[0]), argv);
  s<<arg;
  ASSERT_EQ(s, "[\"./exe1\", \"key2\"]{--hehe:11, -k:val}{}");
  ASSERT_EQ("key2", arg[1]);
  ASSERT_EQ("11", arg["--hehe"]);
  ASSERT_FALSE(arg.HasKey("-help"));
}



================================================
FILE: deps/simhash/submodules/cppjieba/deps/limonp/test/unittest/TBlockingQueue.cpp
================================================
#include "gtest/gtest.h"
#include "limonp/BlockingQueue.hpp"
#include "limonp/BoundedBlockingQueue.hpp"

using namespace limonp;
using namespace std;

class CBlockingQueueTest1 {
 private:
  vector<pthread_t> pthreads_;
 public:
  static void* workerLocked(void * arg) {
    BlockingQueue<size_t> * res = (BlockingQueue<size_t> *)arg;
    size_t t = res->Pop();
    res->Push(t);
    return NULL;
  }
 public:
  CBlockingQueueTest1(const size_t threadSum, void* arg): pthreads_(threadSum) {
    for(size_t i = 0; i < pthreads_.size(); i++) {
      XCHECK(!pthread_create(&pthreads_[i], NULL, workerLocked, arg));
    }
  }
  ~CBlockingQueueTest1() {
  }
 public:
  void Wait() {
    for(size_t i = 0; i < pthreads_.size(); i++) {
      XCHECK(!pthread_join(pthreads_[i], NULL));
    }
  }

};

class CBlockingQueueTest2 {
 public:
  static void * thread_Pop(void * arg) {
    BlockingQueue<size_t> * res = (BlockingQueue<size_t> *)arg;
    for(size_t i = 0; i < 10; i++) {
      res->Pop();
    }
    return NULL;
  }
  static void * thread_push(void * arg) {
    BlockingQueue<size_t> * res = (BlockingQueue<size_t> *)arg;
    for(size_t i = 0; i < 10; i++) {
      usleep(10);
      res->Push(i);
    }
    return NULL;
  }
};
class CBoundedBlockingQueueTest3 {
 public:
  static void * thread_Pop(void * arg) {
    BoundedBlockingQueue<size_t> * res = (BoundedBlockingQueue<size_t> *)arg;
    for(size_t i = 0; i < 10; i++) {
      res->Pop();
    }
    return NULL;
  }
  static void * thread_push(void * arg) {
    BoundedBlockingQueue<size_t> * res = (BoundedBlockingQueue<size_t> *)arg;
    for(size_t i = 0; i < 10; i++) {
      usleep(10);
      res->Push(i);
    }
    return NULL;
  }
};

TEST(BlockingQueue, Test1) {
  size_t threadnum = 3;
  BlockingQueue<size_t> res;
  CBlockingQueueTest1 obj(threadnum, &res);
  //sleep(1);
  res.Push(1);
  obj.Wait();
  ASSERT_EQ(1u, res.Size());
  ASSERT_EQ(1u, res.Pop());

}

TEST(BlockingQueue, Test2) {
  BlockingQueue<size_t> queue;
  pthread_t pth_push;
  pthread_t pth_pop;
  pthread_create(&pth_push, NULL, CBlockingQueueTest2::thread_push, &queue);
  pthread_create(&pth_pop, NULL, CBlockingQueueTest2::thread_Pop, &queue);
  pthread_join(pth_push, NULL);
  pthread_join(pth_pop, NULL);
  ASSERT_TRUE(queue.Empty());
}

TEST(BlockingQueue, Test3) {
  BoundedBlockingQueue<size_t> queue(3);
  pthread_t pth_push;
  pthread_t pth_pop;
  pthread_create(&pth_push, NULL, CBoundedBlockingQueueTest3::thread_push, &queue);
  pthread_create(&pth_pop, NULL, CBoundedBlockingQueueTest3::thread_Pop, &queue);
  pthread_join(pth_push, NULL);
  pthread_join(pth_pop, NULL);
  ASSERT_TRUE(queue.Empty());
}



================================================
FILE: deps/simhash/submodules/cppjieba/deps/limonp/test/unittest/TBoundedQueue.cpp
================================================
#include "limonp/BoundedQueue.hpp"
#include "gtest/gtest.h"

using namespace limonp;

TEST(BoundedQueue, Test1) {
  const size_t size = 3;
  BoundedQueue<size_t> que(size);
  ASSERT_EQ(que.Capacity(), size);
  for(size_t i = 0; i < que.Capacity(); i++) {
    que.Push(i);
    ASSERT_EQ(que.Size(), i + 1);
  }
  ASSERT_TRUE(que.Full());
  for(size_t i = 0; que.Size(); i++) {
    ASSERT_EQ(que.Pop(), i);
  }
  ASSERT_TRUE(que.Empty());

  //second time
  for(size_t i = 0; i < que.Capacity(); i++) {
    que.Push(i);
    ASSERT_EQ(que.Size(), i + 1);
  }
  ASSERT_TRUE(que.Full());
  for(size_t i = 0; que.Size(); i++) {
    ASSERT_EQ(que.Pop(), i);
  }
  ASSERT_TRUE(que.Empty());
}



================================================
FILE: deps/simhash/submodules/cppjieba/deps/limonp/test/unittest/TCastFloat.cpp
================================================
#include "limonp/CastFloat.hpp"
#include "gtest/gtest.h"
#include <cmath>

using namespace std;
using namespace limonp;
using namespace CastFloat;

TEST(CastFunctTest, Test1) {
  ASSERT_LT(abs(shortBitsToFloat(127) - 3.43025e-05), 0.0001);
  ASSERT_LT(abs(-122880 - shortBitsToFloat(-128)), 0.0001);
  ASSERT_EQ(shortBitsToFloat(0), 0);
  //for(short i = -128 ; i <= 127; i++)
  //{
  //    float f = shortBitsToFloat(i);
  //    cout<<i<<" "<<f<<endl;
  //}
}



================================================
FILE: deps/simhash/submodules/cppjieba/deps/limonp/test/unittest/TClosure.cpp
================================================
#include "gtest/gtest.h"
#include "limonp/Closure.hpp"

using namespace limonp;

void Foo0() {
}

void Foo1(int x) {
}

void Foo2(int x, float y) {
}

void Foo3(int x, float y, double z) {
}

class Obj {
 public:
  void Foo0() {
  }
  void Foo1(int x) {
  }
  void Foo2(int x, float y) {
  }
  void Foo3(int x, float y, double z) {
  }
}; 

TEST(Closure, Test0) {
  ClosureInterface* c;

  c = NewClosure(&Foo0);
  ASSERT_TRUE(c != NULL);
  c->Run();
  delete c;
  c = NULL;

  c = NewClosure(&Foo1, 1);
  ASSERT_TRUE(c != NULL);
  c->Run();
  delete c;
  c = NULL;

  c = NewClosure(&Foo2, 1, float(2));
  ASSERT_TRUE(c != NULL);
  c->Run();
  delete c;
  c = NULL;

  c = NewClosure(&Foo3, 1, float(2), double(3));
  ASSERT_TRUE(c != NULL);
  c->Run();
  delete c;
  c = NULL;
}

TEST(Closure, Test1) {
  ClosureInterface* c;

  Obj obj;
  c = NewClosure(&obj, &Obj::Foo0);
  ASSERT_TRUE(c != NULL);
  c->Run();
  delete c;
  c = NULL;

  c = NewClosure(&obj, &Obj::Foo1, 1);
  ASSERT_TRUE(c != NULL);
  c->Run();
  delete c;
  c = NULL;

  c = NewClosure(&obj, &Obj::Foo2, 1, float(2));
  ASSERT_TRUE(c != NULL);
  c->Run();
  delete c;
  c = NULL;

  c = NewClosure(&obj, &Obj::Foo3, 1, float(2), double(3));
  ASSERT_TRUE(c != NULL);
  c->Run();
  delete c;
  c = NULL;
}


================================================
FILE: deps/simhash/submodules/cppjieba/deps/limonp/test/unittest/TColorPrint.cpp
================================================
#include "gtest/gtest.h"
#include "limonp/Colors.hpp"
#include "limonp/Logging.hpp"

using namespace limonp;

TEST(ColorPrint, Test1) {
  ColorPrintln(RED, "hello %s", "world");
  ColorPrintln(RED, "hello %s", "world");
  XLOG(INFO) << "hello world";
  ColorPrintln(RED, "hello %s", "world");
  ColorPrintln(GREEN, "hello %s", "world");
  XLOG(INFO) << "hello world";
  ColorPrintln(BLACK, "hello %s", "world");
  ColorPrintln(YELLOW, "hello %s", "world");
  ColorPrintln(BLUE, "hello %s", "world");
  ColorPrintln(PURPLE, "hello %s", "world");
  ColorPrintln(PURPLE, "hello %s", "world", " and colors");
}



================================================
FILE: deps/simhash/submodules/cppjieba/deps/limonp/test/unittest/TConfig.cpp
================================================
#include "limonp/Config.hpp"
#include "gtest/gtest.h"

using namespace limonp;
TEST(COnfigTest, Test1) {
  Config conf("../test/testdata/1.conf");
  string res;
  ASSERT_EQ("{key1:val1, key2:val2}", res << conf);
  res = conf.Get("key1", "");
  ASSERT_EQ("val1", res);
  res = conf.Get("key2", "");
  ASSERT_EQ("val2", res);
  const char * str = conf["key3"];
  ASSERT_FALSE(str);
  ASSERT_TRUE(0 == strcmp(conf["key2"], "val2"));
}



================================================
FILE: deps/simhash/submodules/cppjieba/deps/limonp/test/unittest/TFileLock.cpp
================================================
#include "limonp/FileLock.hpp"
#include "gtest/gtest.h"

using namespace limonp;

static const char* test_file = "/tmp/limonp_test_filelock";

TEST(FileLockTest, Test1) {
  FileLock fileLock1;
  fileLock1.Open(test_file);
  ASSERT_TRUE(fileLock1.Ok());
  fileLock1.Lock();
  ASSERT_TRUE(fileLock1.Ok());
  fileLock1.UnLock();
  ASSERT_TRUE(fileLock1.Ok());
}


================================================
FILE: deps/simhash/submodules/cppjieba/deps/limonp/test/unittest/TLocalVector.cpp
================================================
#include "limonp/LocalVector.hpp"
#include "limonp/StdExtension.hpp"
#include <fstream>
#include "gtest/gtest.h"

using namespace limonp;

TEST(LocalVector, test1) {
  LocalVector<size_t> vec;
  ASSERT_EQ(vec.size(), 0u);
  ASSERT_EQ(vec.capacity(), LOCAL_VECTOR_BUFFER_SIZE);
  ASSERT_TRUE(vec.empty());
  size_t size = 129;
  for(size_t i = 0; i < size; i++) {
    vec.push_back(i);
  }
  ASSERT_EQ(vec.size(), size);
  ASSERT_EQ(vec.capacity(), 256u);
  ASSERT_FALSE(vec.empty());
  LocalVector<size_t> vec2(vec);
  ASSERT_EQ(vec2.capacity(), vec.capacity());
  ASSERT_EQ(vec2.size(), vec.size());
}

TEST(LocalVector, test2) {
  LocalVector<size_t> vec;
  ASSERT_EQ(vec.size(), 0u);
  ASSERT_EQ(vec.capacity(), LOCAL_VECTOR_BUFFER_SIZE);
  ASSERT_TRUE(vec.empty());
  size_t size = 1;
  for(size_t i = 0; i < size; i++) {
    vec.push_back(i);
  }
  ASSERT_EQ(vec.size(), size);
  ASSERT_EQ(vec.capacity(), LOCAL_VECTOR_BUFFER_SIZE);
  ASSERT_FALSE(vec.empty());
  LocalVector<size_t> vec2;
  vec2 = vec;
  ASSERT_EQ(vec2.capacity(), vec.capacity());
  ASSERT_EQ(vec2.size(), vec.size());
}


================================================
FILE: deps/simhash/submodules/cppjieba/deps/limonp/test/unittest/TLogging.cpp
================================================
#define LOGGING_LEVEL LL_WARNING
#include "limonp/Logging.hpp"
#include "gtest/gtest.h"

TEST(Logging, Test1) {
  XLOG(DEBUG) << "xxx" << " yyy";
  XLOG(INFO) << "hello";
  XLOG(WARNING) << "hello";
  XLOG(ERROR) << "hello";
  //XCHECK(false) << "hello, " << "world";
  //XLOG(FATAL) << "hello";
}


================================================
FILE: deps/simhash/submodules/cppjieba/deps/limonp/test/unittest/TMd5.cpp
================================================
#include "limonp/Md5.hpp"
#include "gtest/gtest.h"
#include <string>
using namespace std;
using namespace limonp;

const char* const DICT_FILE[] = {
  "../test/testdata/jieba.dict.0.utf8",
  "../test/testdata/jieba.dict.0.1.utf8",
  "../test/testdata/jieba.dict.1.utf8",
  "../test/testdata/jieba.dict.2.utf8"
};

const char* const DICT_FILE_MD5[] = {
  "5aef74a56b363d994095c407c4809d84",
  "5aef74a56b363d994095c407c4809d84",
  "55f1116c05c8051ab53171f0b7455197",
  "b123553a2418c4bda51abc64d705d5d4"
};

const char* const TEST_STR[] = {
  "0000"
};

const char* const TEST_STR_MD5[] = {
  "4a7d1ed414474e4033ac29ccb8653d9b"
};

TEST(Md5Test, Test1) {
  ASSERT_EQ(sizeof(DICT_FILE)/sizeof(DICT_FILE[0]), sizeof(DICT_FILE_MD5)/sizeof(DICT_FILE_MD5[0]));
  string tmp;
  for (size_t i = 0; i < sizeof(DICT_FILE)/sizeof(DICT_FILE[0]); i++) {
    md5File(DICT_FILE[i], tmp);
    ASSERT_EQ(tmp, string(DICT_FILE_MD5[i]));
  }

  ASSERT_EQ(sizeof(TEST_STR)/sizeof(TEST_STR[0]), sizeof(TEST_STR_MD5)/sizeof(TEST_STR_MD5[0]));
  for (size_t i = 0; i < sizeof(TEST_STR)/sizeof(TEST_STR[0]); i++) {
    md5String(TEST_STR[i], tmp);
    ASSERT_EQ(tmp, string(TEST_STR_MD5[i]));
  }
}



================================================
FILE: deps/simhash/submodules/cppjieba/deps/limonp/test/unittest/TMutexLock.cpp
================================================
#include "gtest/gtest.h"
#include "limonp/StdExtension.hpp"
#include "limonp/MutexLock.hpp"
#include <vector>

using namespace limonp;
using namespace std;

static const size_t THREAD_SUM = 3;
static const size_t FOR_SIZE = 3;

static vector<size_t> res;

struct PthreadInfo {
  size_t id;
  pthread_t pthread_id;
  MutexLock* ptMutexLock;
};


class ThreadsLocked {
 private:
  MutexLock mutex_;
  vector<PthreadInfo> pthreadInfos_;
 public:
  ThreadsLocked(size_t threadSum): pthreadInfos_(threadSum) {
  }
  ~ThreadsLocked() {}
 public:
  static void* workerLocked(void * arg) {
    PthreadInfo * ptInfo = (PthreadInfo *) arg;
    MutexLockGuard lock(*ptInfo->ptMutexLock);
    for(size_t i = 0; i < FOR_SIZE; i ++) {
      //cout << ptInfo->id << ':' << i << endl;
      res.push_back(i);
      usleep(100 * i);
    }
    return NULL;
  }
 public:
  void Start() {
    for(size_t i = 0; i < pthreadInfos_.size(); i++) {
      pthreadInfos_[i].id = i;
      pthreadInfos_[i].ptMutexLock = &mutex_;
      assert(!pthread_create(&pthreadInfos_[i].pthread_id, NULL, workerLocked, &pthreadInfos_[i]));
    }
    for(size_t i = 0; i < pthreadInfos_.size(); i++) {
      assert(!pthread_join(pthreadInfos_[i].pthread_id, NULL));
    }
  }
};

TEST(MutexLock, Test1) {
  string str;
  //ThreadsNoLocked noLock(THREAD_SUM);
  //res.clear();
  //noLock.Start();
  //ASSERT_EQ(str << res, "[\"0\", \"0\", \"0\", \"1\", \"1\", \"1\", \"2\", \"2\", \"2\"]");
  ThreadsLocked locked(THREAD_SUM);
  res.clear();
  locked.Start();
  ASSERT_EQ(str << res,  "[0, 1, 2, 0, 1, 2, 0, 1, 2]");
}




================================================
FILE: deps/simhash/submodules/cppjieba/deps/limonp/test/unittest/TStdExtension.cpp
================================================
#include "limonp/StdExtension.hpp"
#include "limonp/StringUtil.hpp"
#include "gtest/gtest.h"
#include <iostream>
#include <deque>

using namespace limonp;
TEST(StdOutbound, Test1) {
  ifstream ifs("../test/testdata/StdExtension.data");
  string s;
  s << ifs;
  ASSERT_EQ("key1 = val1\n##this is comment\nkey2=val2\n", s);

  const char * outFileName = "stdoutbuond.test.tmp";
  ofstream ofs(outFileName);
  s = outFileName;
  ofs << s;
  ASSERT_TRUE(!!ofs);
  ofs.close();

  ifstream ifs2(outFileName);
  s << ifs2;
  ASSERT_EQ(outFileName, s);
}

TEST(StdOutbound, Funct_IsIn) {
  map<int, int> mp;
  for(size_t i = 1; i < 5; i ++) {
    mp[i] = i+1;
  }

  ASSERT_TRUE(IsIn(mp, 1));
  ASSERT_FALSE(IsIn(mp, 0));
}

TEST(StdOutbound, Test2) {
  map<int, int> mp1;
  mp1[1] = 2;
  mp1[2] = 3;
  string s;
  ASSERT_EQ(s << mp1, "{1:2, 2:3}");
  unordered_map<int,int> mp2;
  mp2[1] = 2;
  mp2[2] = 3;
  s << mp2;
  ASSERT_TRUE( s == "{1:2, 2:3}" || s == "{2:3, 1:2}");
}

TEST(StdOutbound, Test3) {
  {
    vector<string> v;
    v.push_back("1");
    v.push_back("2");
    string s;
    ASSERT_EQ(s << v, "[\"1\", \"2\"]");
  }
  {
    deque<string> v;
    v.push_back("1");
    v.push_back("2");
    string s;
    ASSERT_EQ(s << v, "[\"1\", \"2\"]");
  }
}

struct TestWord {
  string word;
  size_t offset;
}; // struct TestWord

ostream& operator << (ostream& os, const TestWord& w) {
  return os << "{\"word\": \"" << w.word << "\", \"offset\": " << w.offset << "}";
}

TEST(StdOutbound, TestWord) {
  {
    vector<string> v;
    v.push_back("1");
    v.push_back("2");
    string s;
    ASSERT_EQ(s << v, "[\"1\", \"2\"]");
  }
  {
    vector<TestWord> v;
    TestWord w;
    w.word = "hello";
    w.offset = 0;
    v.push_back(w);
    w.word = "world";
    w.offset = 5;
    v.push_back(w);
    string s;
    ASSERT_EQ(s << v, "[{\"word\": \"hello\", \"offset\": 0}, {\"word\": \"world\", \"offset\": 5}]");
  }
}


================================================
FILE: deps/simhash/submodules/cppjieba/deps/limonp/test/unittest/TStringUtil.cpp
================================================
#include "limonp/StringUtil.hpp"
#include "gtest/gtest.h"
using namespace limonp;

TEST(StringUtilTest, Test1) {
  vector<string> vec;
  string s;
  Split("\t1\t3\t4\t", vec, "\t");
  ASSERT_EQ(s << vec, "[\"\", \"1\", \"3\", \"4\"]");
  s = " \t\n ni hao ad \r\n";
  ASSERT_EQ("ni hao ad", Trim(s));
  ASSERT_EQ("select * from table1  limit 1;" ,StringFormat("select %s from %s  %s;", "*","table1","limit 1"));
  s = StringFormat("select %s from %s  %s;", "*","table1","limit 1");
  ASSERT_EQ("select * from table1  limit 1;" ,s);
  vec.clear();
  vec.push_back("1");
  vec.push_back("2");
  vec.push_back("3");
  s.clear();
  Join(vec.begin(), vec.end(), s,",");
  ASSERT_EQ("1,2,3",s);
  s = Join(vec.begin(), vec.end(), "..");
  ASSERT_EQ("1..2..3", s);
  const char* arr[] = {"2","3","5"};
  ASSERT_EQ("2,3,5", Join(arr, arr + sizeof(arr)/sizeof(arr[0]), ","));
  map<string , int> mp;
  mp["key1"] =2;
  ASSERT_EQ("{key1:2}", s <<  mp);
  std::unordered_map<int,int> hmp;
  hmp[1]=2;
  ASSERT_EQ("{1:2}", s <<  hmp);
}

TEST(StringUtilTest, Test2) {
  string s, gbks;
  ifstream ifs("../test/testdata/dict.gbk");
  ASSERT_TRUE(!!ifs);

  vector<uint16_t> uni;
  while(getline(ifs, s)) {
    GBKTrans(s, uni);
    GBKTrans(uni.begin(), uni.end(), gbks);
    ASSERT_EQ(s, gbks);
  }
}

TEST(StringUtilTest, Test3) {
  string s, utf8;
  ifstream ifs("../test/testdata/dict.utf8");
  ASSERT_TRUE(!!ifs);

  vector<uint16_t> uni;
  while(getline(ifs, s)) {
    ASSERT_TRUE(Utf8ToUnicode(s, uni));
    UnicodeToUtf8(uni.begin(), uni.end(), utf8);
    ASSERT_EQ(s, utf8);
  }
}

TEST(StringUtilTest, Test4) {
  //ASSERT_TRUE(StartsWith("--help",NULL));
  ASSERT_TRUE(StartsWith("--help","--"));
  ASSERT_TRUE(StartsWith("--help","-"));
  ASSERT_FALSE(StartsWith("--help","he"));
  ASSERT_TRUE(StartsWith("help","help"));
  ASSERT_FALSE(StartsWith("","help"));
  ASSERT_TRUE(StartsWith("hel",""));
  ASSERT_TRUE(EndsWith("hel",""));
  ASSERT_TRUE(EndsWith("hel","el"));
}

TEST(StringUtilTest, Test5) {
  const char* str = "1,2,3,4";
  vector<string> vec;
  string res;
  Split(str, vec, ",");
  ASSERT_EQ("[\"1\", \"2\", \"3\", \"4\"]", res << vec);
  Split("1,2,3,4,", vec, ",");
  ASSERT_EQ("[\"1\", \"2\", \"3\", \"4\"]", res << vec);
  Split(str, vec, ",", 3);
  ASSERT_EQ("[\"1\", \"2\", \"3\", \"4\"]", res << vec);

  Split("1", vec, ",");
  ASSERT_EQ("[\"1\"]", res << vec);

  Split(str, vec, ",", 1);
  ASSERT_EQ("[\"1\", \"2,3,4\"]", res << vec);

  Split("", vec, ",");
  ASSERT_EQ("[]", res << vec);
  
  Split("1, 2", vec, ",");
  ASSERT_EQ("[\"1\", \" 2\"]", res << vec);

  Split("1==2", vec, "==");
  ASSERT_EQ("[\"1\", \"\", \"2\"]", res << vec);

  Split("1,", vec, ",");
  ASSERT_EQ("[\"1\"]", res << vec);

  Split(",1,", vec, ",");
  ASSERT_EQ("[\"\", \"1\"]", res << vec);

  Split("1, ", vec, ",");
  ASSERT_EQ("[\"1\", \" \"]", res << vec);

  res << Split("1|2,3", "|,");
  ASSERT_EQ("[\"1\", \"2\", \"3\"]", res);
}

TEST(StringUtilTest, Trim) {
  string s;
  s = "xxxyyyxx";
  ASSERT_EQ(RTrim(s, 'x'), "xxxyyy");
  ASSERT_EQ(LTrim(s, 'x'), "yyy");
  s = "xxxyyyxx";
  ASSERT_EQ(Trim(s, 'x'), "yyy");

  s = " x y ";
  ASSERT_EQ(Trim(s), "x y");

  // check if it core dump when using isalpha
  wchar_t w = 1000024;
  ASSERT_FALSE(IsSpace(w));
  w = 0x20;
  ASSERT_TRUE(IsSpace(w));
}

TEST(StringUtilTest, GetTime) {
  string s;
  GetTime("%Y-%m-%d %H:%M:%S", s);
  //print(s);
}

TEST(StringUtilTest, PathJoin) {
  const char * path1 = "/home/foo/dir";
  const char * path2 = "file";
  const char * path3 = "/home/foo/dir/";
  const char * path4 = "file";
  const char * answer = "/home/foo/dir/file";

  ASSERT_EQ(answer, PathJoin(path1, path2));
  ASSERT_EQ(answer, PathJoin(path3, path4));
}

TEST(StringUtilTest, JapaneseUnicode) {
  // Japanese
  const char* s = "がんば";
  vector<uint16_t> unicode;
  ASSERT_TRUE(Utf8ToUnicode(s, unicode));
  ASSERT_EQ(3u, unicode.size());
}

TEST(StringUtilTest, RareChinese) {
  //U+10000 – U+10FFFF
  const char* s = "𪚥";
  vector<uint16_t> unicode;
  ASSERT_FALSE(Utf8ToUnicode(s, unicode));
  ASSERT_EQ(0u, unicode.size());
}

TEST(StringUtilTest, RareChineseUnicode32) {
  //U+10000 – U+10FFFF
  const char* s = "𪚥";
  vector<uint32_t> unicode;
  ASSERT_TRUE(Utf8ToUnicode32(s, unicode));
  ASSERT_EQ(1u, unicode.size());

  string s2;
  Unicode32ToUtf8(unicode.begin(), unicode.end(), s2);
  ASSERT_EQ(s2, s);
}

TEST(StringUtilTest, Unicode32) {
  const char* s = "1+1=2你好世界,。";
  vector<uint32_t> unicode;
  ASSERT_TRUE(Utf8ToUnicode32(s, unicode));
  ASSERT_EQ(unicode.size(), 11u);

  string s2;
  Unicode32ToUtf8(unicode.begin(), unicode.end(), s2);
  ASSERT_EQ(s2, s);
}


================================================
FILE: deps/simhash/submodules/cppjieba/deps/limonp/test/unittest/TThread.cpp
================================================
#include "gtest/gtest.h"
#include "limonp/Thread.hpp"
using namespace limonp;

TEST(IThread, Test1) {
  class ThreadHandle: public IThread {
   public:
    ThreadHandle():num(1) {}
    virtual ~ThreadHandle() {}
   private:
   public:
    virtual void Run() {
      ASSERT_EQ(num, 1u);
      num = 2;
    }
   public:
    size_t num;
  };
  {
    ThreadHandle thr;
    thr.Start();
    thr.Join();
    ASSERT_EQ(thr.num, 2u);
  }
  {
    IThread* ptr = new ThreadHandle();
    ptr->Start();
    ptr->Join();
    delete ptr;
  }
}




================================================
FILE: deps/simhash/submodules/cppjieba/deps/limonp/test/unittest/TThreadPool.cpp
================================================
#include "gtest/gtest.h"
#include "limonp/ThreadPool.hpp"
#include <exception>
using namespace limonp;

//static void addOne(void * data)
//{
//    size_t * i = (size_t *) data;
//    (*i) ++;
//}

void Incr(size_t* x) {
  (*x)++;
}

class Exception: public exception {
 public:
  Exception(const string& error)
    : error_(error) {
  }
  virtual ~Exception() throw() {
  }
  virtual const char* what() const throw() {
    return "hello Exception";
  }
 private:
  string error_;
};

void IncrWithThrow(int* x) {
  throw Exception("hello exception!!!");
}

TEST(ThreadPool, Test1) {
  const size_t threadNum = 2;
  vector<size_t> numbers(threadNum);
  {
    ThreadPool threadPool(threadNum);
    threadPool.Start();
    for(size_t i = 0; i < numbers.size(); i ++) {
      numbers[i] = i;
      threadPool.Add(NewClosure(&Incr, &numbers[i]));
    }
  }
  for(size_t i = 0; i < numbers.size(); i++) {
    ASSERT_EQ(i + 1, numbers[i]);
  }
}

TEST(ThreadPool, Exception) {
  const size_t threadNum = 2;
  ThreadPool threadPool(threadNum);
  threadPool.Start();
  
  int x;
  threadPool.Add(NewClosure(&IncrWithThrow, &x));
}


================================================
FILE: deps/simhash/submodules/cppjieba/deps/limonp/test/unittest/gtest_main.cpp
================================================
// Copyright 2006, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
//     * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//     * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
//     * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#include <iostream>

#include "gtest/gtest.h"

GTEST_API_ int main(int argc, char **argv) {
  std::cout << "Running main() from gtest_main.cc\n";

  testing::InitGoogleTest(&argc, argv);
  return RUN_ALL_TESTS();
}


================================================
FILE: deps/simhash/submodules/cppjieba/dict/README.md
================================================
# CppJieba字典

文件后缀名代表的是词典的编码方式。
比如filename.utf8 是 utf8编码,filename.gbk 是 gbk编码方式。


## 分词

### jieba.dict.utf8/gbk

作为最大概率法(MPSegment: Max Probability)分词所使用的词典。

### hmm_model.utf8/gbk

作为隐式马尔科夫模型(HMMSegment: Hidden Markov Model)分词所使用的词典。

__对于MixSegment(混合MPSegment和HMMSegment两者)则同时使用以上两个词典__


## 关键词抽取

### idf.utf8

IDF(Inverse Document Frequency)
在KeywordExtractor中,使用的是经典的TF-IDF算法,所以需要这么一个词典提供IDF信息。

### stop_words.utf8

停用词词典




================================================
FILE: deps/simhash/submodules/cppjieba/dict/hmm_model.utf8
================================================
#
#0:B
#1:E
#2:M
#3:S
#
#B:-0.26268660809250016
#E:-3.14e+100
#M:-3.14e+100
#S:-1.4652633398537678
#prob_start
-0.26268660809250016 -3.14e+100 -3.14e+100 -1.4652633398537678
#prob_trans 4x4 matrix
-3.14e+100 -0.510825623765990 -0.916290731874155 -3.14e+100
-0.5897149736854513 -3.14e+100 -3.14e+100 -0.8085250474669937
-3.14e+100 -0.33344856811948514 -1.2603623820268226 -3.14e+100
-0.7211965654669841 -3.14e+100 -3.14e+100 -0.6658631448798212
#B
#E:-0.510825623765990,M:-0.916290731874155
#E
#B:-0.5897149736854513,S:-0.8085250474669937
#M
#E:-0.33344856811948514,M:-1.2603623820268226
#S
#B:-0.7211965654669841,S:-0.6658631448798212
#prob_emit 4 lines
#B
耀:-10.460283,蘄:-11.015514,涉:-8.766406,谈:-8.039065,伊:-7.682602,預:-7.177710,亟:-11.905136,洞:-8.668696,咣:-13.327149,猢:-12.749514,礦:-7.891761,鶩:-17.334482,缪:-11.306203,河:-6.929795,临:-7.845071,犷:-15.388572,吸:-7.936418,娼:-12.444133,线:-8.816289,談:-8.039065,反:-6.369305,牌:-9.229778,雏:-11.365774,姑:-7.825668,織:-9.845070,遠:-7.694504,卢:-8.491877,知:-6.289929,除:-7.912099,緩:-8.461434,彪:-12.965034,觱:-15.137257,歲:-10.002113,闹:-9.824051,鯽:-13.100375,廿:-11.896403,覆:-9.290497,辊:-16.235870,鮒:-17.334482,应:-6.510851,檜:-13.645602,踟:-13.191347,崩:-10.196409,芬:-10.286095,冶:-9.681936,鍍:-12.192818,湟:-12.580892,瑣:-11.547585,鏢:-10.756621,囤:-12.607094,峨:-10.570597,括:-12.130475,虯:-12.001763,滴:-10.379843,须:-9.320808,孽:-12.780605,鹿:-8.821498,沉:-7.721882,贈:-10.636214,上:-5.739553,犍:-13.402656,后:-6.515864,碑:-10.476968,餐:-9.618467,蒙:-7.885361,枯:-9.770762,伴:-9.290177,玷:-12.589550,逶:-13.114974,离:-7.739355,羿:-14.243439,鰾:-16.235870,釋:-9.387511,鷓:-10.440826,罔:-14.444110,譜:-11.482279,盥:-13.309130,裱:-13.550292,号:-8.512012,灶:-11.059720,姻:-11.887745,忿:-11.977896,节:-7.859089,躊:-10.895132,厌:-10.228696,钎:-14.626432,紓:-17.334482,骒:-15.948188,茗:-17.334482,輟:-11.209799,倡:-9.862550,熠:-11.493840,锣:-11.140077,鬧:-9.824051,稽:-11.678490,拂:-10.697224,豉:-16.641335,克:-8.162674,坏:-9.616686,胖:-8.753188,賞:-9.753272,几:-6.133791,埤:-17.334482,巨:-7.780907,腫:-9.483599,赳:-17.334482,齿:-11.261437,舀:-17.334482,萄:-17.334482,澉:-13.933285,挖:-9.847869,嚣:-11.223015,閥:-12.940033,符:-8.404914,披:-9.290497,褲:-10.201186,锺:-17.334482,鼾:-12.011472,所:-6.051574,摄:-8.913139,凍:-10.350692,灌:-9.307005,佞:-12.598283,兢:-12.572308,学:-5.575267,翩:-12.061482,臭:-10.153651,诱:-9.506444,践:-11.647507,嫻:-11.127906,膂:-12.474670,标:-7.386930,予:-9.537191,越:-7.708132,馒:-10.633751,岔:-11.308616,耗:-9.769207,訛:-12.770134,匡:-11.732363,弩:-12.661653,纨:-13.207348,誰:-9.898454,貴:-8.043668,隸:-10.217276,颼:-12.823622,懂:-9.469294,毆:-12.108735,轉:-6.763421,配:-7.797936,魑:-14.561893,秒:-11.594689,菖:-13.967186,橛:-15.031897,江:-6.488198,连:-7.195093,癣:-15.388572,惬:-11.637388,遷:-9.248687,相:-5.809104,驻:-8.549095,好:-6.811144,鱿:-11.499671,撅:-15.725044,嘎:-12.350875,窑:-10.779125,或:-7.305993,垣:-14.444110,钥:-10.703799,麩:-14.156428,簪:-12.530461,斯:-8.052379,澳:-8.801809,蠲:-14.002277,綿:-10.029294,鸾:-14.626432,仉:-14.849575,煌:-17.334482,筐:-13.808121,曙:-11.144167,乞:-10.536541,狡:-10.690692,婦:-8.370298,绩:-11.601141,胭:-11.431849,普:-7.341199,諱:-12.498200,俳:-13.868746,雹:-14.002277,寻:-8.102869,飽:-10.003422,繾:-14.444110,會:-6.520360,誆:-14.156428,侈:-14.695425,册:-10.662449,階:-7.563384,缓:-8.461434,講:-8.162155,榜:-10.217276,负:-7.206492,疤:-12.181190,羨:-10.794896,樱:-10.468591,记:-6.676587,趴:-10.990601,庾:-12.414501,蹉:-14.076385,泊:-10.176746,遍:-9.477001,問:-6.210238,盎:-11.630699,当:-5.910792,叠:-11.325669,督:-9.493775,郢:-11.732363,嗤:-13.160095,荫:-12.791187,酷:-10.672627,矸:-13.779134,榉:-15.725044,弒:-13.620910,箕:-15.725044,挚:-12.291057,傣:-10.772038,座:-9.241631,撫:-9.622038,梳:-10.563692,锶:-16.235870,餾:-13.144827,胃:-9.949251,案:-8.722160,癌:-10.436777,飓:-12.026214,聘:-10.009333,鉤:-12.378655,秩:-9.329449,孪:-12.812693,潲:-16.235870,诵:-11.689035,當:-5.910792,釹:-15.542722,峻:-12.915641,怃:-14.695425,變:-6.595025,岐:-12.868574,蘗:-17.334482,谛:-13.573282,溜:-11.323215,訟:-12.482452,連:-7.195093,天:-5.568303,札:-12.563797,蚬:-15.948188,洱:-12.880135,邸:-13.175599,缽:-13.057816,麼:-14.038645,蕁:-13.750963,淆:-15.255040,呋:-13.223608,燎:-12.671043,習:-8.274267,汛:-11.229689,機:-5.865843,灣:-12.709509,勤:-9.540071,鷦:-16.641335,葫:-10.425727,鯪:-14.390043,曬:-11.243172,良:-8.033022,泰:-8.723981,陷:-9.062422,兹:-12.891831,综:-7.950693,驿:-11.001202,茄:-11.299000,搖:-8.454314,戚:-9.900815,钡:-13.837974,瘢:-12.522298,銥:-15.255040,綻:-12.061482,鈺:-15.948188,弼:-17.334482,臃:-12.680522,过:-6.192693,結:-6.296758,答:-8.059572,噢:-17.334482,蛭:-13.364190,執:-7.253099,瑶:-10.610649,牺:-9.525753,黽:-16.235870,寿:-9.460504,蚂:-10.952666,誊:-12.186987,麒:-12.378655,蜗:-12.163998,贛:-10.968011,丝:-8.859361,澜:-12.092735,吡:-12.297529,鄣:-17.334482,別:-7.416894,昭:-10.471724,亲:-7.228952,樵:-13.071802,讴:-12.615983,總:-6.056646,墾:-11.654309,佇:-12.436642,降:-7.883158,协:-7.355980,绒:-11.234163,驕:-10.162825,蓖:-12.952455,離:-7.739355,古:-6.752377,姨:-10.574067,柬:-10.821252,药:-7.726641,幽:-9.293713,翼:-11.415588,极:-7.454570,耄:-14.390043,殉:-10.799241,計:-6.762063,些:-11.456746,愚:-10.103195,劣:-10.639920,產:-6.146110,暫:-8.916225,礪:-17.334482,丰:-7.604158,檳:-12.051278,贲:-13.345498,券:-10.555697,鄺:-12.066624,尼:-8.674055,資:-6.152230,橈:-14.695425,雋:-13.402656,郏:-14.156428,髓:-13.808121,艘:-16.641335,淝:-14.444110,燥:-12.429207,彦:-14.561893,篩:-10.932565,奪:-8.665598,据:-8.571992,签:-8.230725,辆:-15.137257,瘋:-9.606947,和:-7.225648,瀏:-9.853490,庐:-10.389431,折:-8.595746,蠟:-10.165132,鈣:-11.678490,窨:-16.235870,漱:-12.615983,宾:-9.848429,證:-7.601605,镍:-13.779134,偏:-8.501019,齑:-13.868746,緒:-13.129789,饕:-13.402656,湛:-11.404893,臚:-15.948188,诞:-9.562572,因:-6.104676,闢:-10.909613,虫:-11.011917,擬:-10.103919,聯:-6.652450,詳:-9.036689,鑷:-13.364190,卹:-13.900495,狸:-12.643134,顿:-9.292747,蜀:-11.183879,悅:-12.011472,檉:-13.779134,锌:-14.198988,刎:-17.334482,芙:-10.170535,供:-8.184954,貝:-8.747763,樞:-9.687651,琢:-10.515558,嶧:-16.641335,枫:-12.240732,估:-8.807140,殳:-14.936587,阶:-7.563384,禿:-11.363220,騾:-10.528759,杀:-8.061824,韋:-7.830651,响:-8.940135,界:-9.351042,量:-9.767653,罐:-10.193237,壕:-12.147096,拙:-12.228536,盡:-7.579378,靠:-9.561308,呢:-12.011472,扮:-10.237761,汲:-11.275359,嗷:-12.801882,忻:-12.076987,姿:-9.716722,蒂:-11.973190,看:-6.291352,徐:-7.274162,蔗:-11.485157,掘:-11.747233,輛:-15.137257,瞠:-12.265578,倥:-14.289959,搭:-9.606066,薬:-15.255040,辰:-12.880135,嚶:-15.948188,爹:-9.198842,簽:-8.230725,媾:-12.589550,擂:-11.123882,狎:-13.837974,鹑:-15.725044,敗:-9.589479,潛:-8.148742,胚:-10.263758,埠:-15.388572,铢:-16.641335,凤:-8.621886,寨:-11.096157,旬:-13.442662,乱:-9.142465,濰:-12.147096,長:-15.255040,饿:-10.504688,斉:-15.255040,箍:-14.390043,崎:-11.647507,逐:-7.724359,阔:-10.071152,趙:-13.750963,漚:-14.769533,岣:-17.334482,焦:-8.432435,閩:-10.869894,溯:-13.207348,贮:-10.396197,茲:-12.891831,餶:-17.334482,尸:-9.076578,炻:-16.235870,桀:-13.003749,湄:-12.098040,苇:-10.947603,摈:-12.598283,黏:-11.407556,凑:-10.413810,癔:-13.808121,淙:-11.594689,佚:-13.114974,孢:-10.799241,鹤:-10.676471,坪:-13.291431,语:-7.718077,浮:-8.845277,鷹:-11.196755,僻:-12.046215,囿:-15.725044,戇:-15.542722,鰣:-11.550657,弥:-9.693398,纤:-9.056054,朵:-12.834672,紹:-10.551157,鲸:-12.530461,銼:-14.338750,襁:-12.801882,毂:-14.338750,轅:-12.181190,蕉:-13.779134,柊:-15.255040,魍:-14.561893,呓:-13.933285,牧:-9.182860,哨:-10.796342,衫:-14.338750,惰:-12.228536,葳:-15.388572,更:-7.052044,驷:-13.240137,狼:-9.964251,梁:-8.038514,溅:-14.243439,窍:-11.853843,導:-7.301415,划:-8.427005,栖:-10.292196,渚:-17.334482,芝:-10.403010,搞:-9.516454,麥:-8.974645,瀦:-13.383238,钩:-12.378655,榫:-14.038645,瘪:-14.243439,瞿:-10.530977,跃:-9.431255,仅:-8.629814,菇:-15.542722,效:-7.786384,僑:-10.375083,赘:-12.563797,婢:-12.634002,绥:-11.291849,噪:-10.751073,諭:-11.490937,俯:-9.946773,胱:-15.031897,击:-8.704853,侄:-10.251933,指:-6.480186,肆:-10.335972,蚊:-11.158615,完:-6.476926,謗:-17.334482,脛:-13.527819,堡:-11.420979,帥:-10.821252,群:-7.151660,吩:-9.260456,昵:-13.696896,爽:-10.406924,惆:-12.259308,葉:-7.762768,奋:-8.935622,驍:-11.514399,遑:-14.115606,狒:-13.868746,陕:-8.692067,束:-9.969302,忤:-13.402656,郦:-12.490295,嗨:-15.255040,雪:-8.759775,软:-8.270556,柴:-9.122185,魷:-11.499671,屹:-12.234615,剽:-12.271887,言:-8.509804,涅:-12.965034,谄:-12.163998,枉:-12.152698,禍:-10.308055,頌:-11.249982,鈐:-15.388572,儒:-9.733579,膝:-10.738701,傧:-15.031897,脲:-14.849575,常:-6.792831,值:-8.883642,髋:-13.620910,姍:-13.933285,鳏:-14.561893,发:-5.005842,篡:-11.186014,奢:-10.184565,卦:-15.948188,矩:-11.131946,陨:-11.183879,啪:-13.256944,潮:-9.219858,菱:-9.621591,勻:-11.559930,睾:-11.866422,莆:-12.868574,程:-7.298126,薊:-11.042913,醒:-10.302741,咔:-12.186987,伙:-9.515247,溘:-15.948188,舛:-15.948188,窠:-13.750963,鸣:-10.350692,粤:-11.550657,圩:-13.030417,椭:-10.509022,侮:-11.171167,蒴:-12.192818,家:-6.753418,麸:-14.156428,嶺:-10.389431,乃:-9.237664,蝉:-12.098040,屏:-9.679565,翎:-13.030417,噓:-13.057816,燒:-8.703603,诖:-17.334482,付:-8.846100,扛:-14.769533,摟:-12.466947,駢:-12.490295,峤:-17.334482,詫:-10.418758,闪:-8.709511,擴:-7.540084,顷:-10.533199,役:-11.913947,绸:-11.216385,鉻:-12.284626,兽:-10.840728,鑿:-12.297529,檁:-14.936587,謀:-9.388926,沅:-12.304044,暉:-17.334482,蜈:-10.937552,碍:-11.479410,餌:-12.451680,錐:-11.496751,倒:-8.550167,锔:-16.235870,肝:-9.673426,骡:-10.528759,鲥:-11.550657,殫:-13.256944,琪:-14.769533,踮:-16.641335,枳:-14.444110,玻:-9.249611,儼:-11.689035,獐:-13.057816,韓:-7.830577,惝:-16.235870,塢:-15.948188,湮:-12.317202,英:-6.757514,究:-9.043938,都:-8.532411,百:-6.543453,笋:-12.880135,丙:-10.895132,尥:-15.388572,鄧:-7.966198,嘩:-11.046623,覬:-12.222494,亮:-9.615352,縹:-12.181190,佃:-11.100071,拆:-9.276155,擊:-8.704853,額:-9.175107,鉑:-13.808121,論:-7.865013,俘:-10.091684,蛞:-14.501269,飢:-10.015942,照:-7.954736,鋦:-16.235870,譫:-13.291431,饷:-13.160095,幹:-6.948013,偽:-9.783295,长:-6.002791,疑:-8.936298,鐐:-13.274039,園:-9.009418,鈔:-11.588279,缢:-14.626432,沫:-13.967186,猪:-9.939374,纷:-8.616473,汀:-13.175599,橄:-11.074900,蛇:-10.780549,忍:-8.757700,郓:-12.546990,虜:-15.255040,形:-6.317920,啦:-15.137257,遨:-12.915641,迭:-12.130475,廷:-10.267162,勿:-13.085987,莊:-8.306503,馎:-17.334482,舟:-10.877712,躬:-10.221340,芴:-17.334482,屋:-8.383301,跖:-15.542722,诚:-9.446523,豫:-10.416776,滬:-11.671521,擰:-13.967186,聳:-11.131946,拴:-15.137257,她:-8.585542,盼:-10.479073,沁:-11.391683,謄:-12.186987,悉:-11.011917,脈:-9.946154,锐:-10.614262,侗:-10.577550,氖:-15.137257,蚝:-15.725044,琦:-15.948188,爪:-10.968011,伬:-15.255040,殯:-10.857510,夸:-9.495350,逾:-11.581909,慈:-8.794745,罌:-11.987374,哑:-10.384625,動:-6.792119,曝:-11.131946,童:-8.708973,烩:-13.779134,剪:-9.938760,空:-6.918500,灾:-9.139700,紋:-10.395228,芊:-17.334482,後:-15.542722,果:-8.079933,綠:-8.252884,娥:-14.769533,霧:-11.020934,倩:-13.422459,熨:-13.100375,渭:-11.076814,薰:-15.725044,莴:-13.442662,傾:-8.502916,豁:-10.480127,滂:-14.076385,鑑:-9.211221,盒:-10.896730,敛:-12.643134,损:-8.334739,胞:-12.990676,寤:-16.235870,赫:-9.332457,鋪:-9.610035,譯:-9.906743,腳:-8.316029,援:-9.451790,齷:-13.030417,塹:-13.808121,秸:-12.421827,掉:-10.741437,興:-7.540865,瞑:-12.759771,阐:-9.326449,途:-8.994503,挞:-15.388572,索:-8.829969,馥:-13.442662,咧:-12.739362,鎩:-13.696896,溫:-7.574288,梯:-10.342385,餺:-17.334482,吼:-11.201084,錾:-16.235870,俁:-15.255040,桄:-16.641335,蓇:-14.076385,扈:-11.689035,巍:-10.959457,籌:-9.246534,毙:-11.453949,翡:-11.569291,坦:-8.514817,珩:-15.137257,仫:-13.291431,敲:-10.087401,闽:-10.869894,獾:-16.641335,岌:-13.071802,鮎:-11.488043,閒:-9.118664,谗:-13.207348,纠:-9.001452,夥:-9.515247,責:-8.150178,朱:-7.158946,蚰:-13.129789,肴:-14.115606,笹:-14.501269,骸:-12.444133,钼:-13.837974,草:-7.984380,懊:-11.117876,痒:-12.240732,汗:-10.083137,廠:-9.112197,壤:-12.857145,韦:-7.830651,艳:-10.627620,惴:-12.061482,鱷:-12.071792,避:-8.408895,梅:-8.516592,抉:-10.995888,皑:-13.670920,炕:-11.563041,鄔:-10.911235,宣:-7.197386,喧:-10.235280,瘦:-10.126622,掳:-11.927310,嬸:-11.011917,瞻:-10.779125,鈾:-12.163998,仁:-9.476614,诃:-16.641335,囑:-10.302741,僕:-10.181430,乖:-10.475917,識:-9.714758,屢:-10.475917,狩:-10.805063,賭:-9.916902,蛱:-14.936587,巷:-10.895132,凿:-12.297529,貂:-12.344049,钒:-16.235870,贗:-13.114974,殘:-8.457937,斜:-9.972471,鬣:-13.223608,利:-6.731194,怵:-15.725044,庶:-11.109923,閼:-14.198988,蹁:-15.137257,惊:-7.888437,奏:-9.717214,卓:-9.519275,違:-8.627330,慟:-13.837974,苞:-12.624952,忠:-9.067033,叨:-13.085987,淬:-12.546990,襯:-10.555697,命:-7.588058,痼:-13.596812,酿:-10.246073,退:-8.122144,瞅:-12.834672,弊:-10.930908,舌:-10.186136,蠐:-14.849575,踔:-16.641335,焖:-15.542722,废:-8.501165,炫:-11.348030,漪:-15.031897,键:-11.205432,堰:-11.015514,粳:-11.601141,鬲:-14.038645,贾:-8.141898,铃:-10.599890,蛏:-15.388572,桐:-10.758012,賓:-9.848429,兖:-12.108735,痙:-11.572431,坚:-7.405814,篝:-12.228536,查:-8.275779,豨:-17.334482,駱:-9.632830,筲:-16.641335,慶:-8.860614,诽:-12.337270,仿:-8.868161,傀:-10.999428,球:-8.318090,鎂:-13.309130,馆:-10.526547,昏:-9.572737,讒:-13.207348,五:-6.609564,窜:-12.739362,鸟:-9.441283,悠:-9.135293,單:-6.775315,礱:-15.255040,改:-6.297079,蒸:-9.385743,欽:-10.041464,呃:-14.243439,珂:-16.641335,秆:-14.561893,毒:-8.564819,触:-9.390699,迪:-9.876873,独:-7.214473,维:-7.476986,艷:-10.627620,蹿:-15.255040,霄:-14.243439,堆:-9.909720,粉:-8.991166,茌:-15.948188,褐:-10.738701,輔:-9.231895,钙:-11.678490,簞:-15.137257,股:-7.196397,戢:-17.334482,販:-10.148338,鐮:-12.152698,掷:-13.256944,耶:-9.320146,榻:-14.936587,闃:-15.255040,捌:-15.948188,仕:-11.133973,潔:-10.659921,属:-8.212863,惡:-8.388107,腠:-14.289959,蝤:-15.948188,凫:-15.388572,巳:-16.235870,恶:-8.388107,智:-8.645186,汾:-11.747233,冀:-10.228696,垄:-9.766619,领:-6.296018,餛:-12.661653,箜:-13.808121,蔣:-8.032474,涨:-9.672955,爭:-7.793903,鎬:-15.031897,媲:-11.905136,樽:-15.725044,讼:-12.482452,遁:-12.857145,啃:-14.849575,狂:-9.271419,际:-12.624952,鱉:-14.936587,绊:-12.284626,擎:-12.158332,祛:-11.821053,罟:-15.137257,鳞:-11.096157,散:-8.551239,歧:-10.792010,称:-7.178447,荷:-8.793572,轿:-10.195615,而:-6.684496,訐:-15.137257,涕:-12.891831,猖:-11.211989,甚:-7.088966,辩:-9.512839,洪:-7.541256,纳:-8.439263,尴:-10.069052,茶:-8.516740,蔺:-12.186987,沿:-7.810499,輾:-11.270697,叁:-15.388572,嗅:-11.368335,苋:-13.527819,卖:-8.855614,握:-10.046238,日:-6.194404,廳:-10.447950,捶:-12.466947,蟹:-12.868574,咄:-11.996944,搏:-10.504688,逗:-10.988846,抠:-14.002277,撤:-8.281849,邬:-10.911235,垮:-12.147096,骰:-11.325669,椽:-13.670920,篆:-11.710464,緊:-7.577872,乓:-17.334482,鏖:-12.615983,桧:-13.645602,详:-9.036689,仨:-14.695425,跪:-9.509237,六:-7.626219,孱:-13.085987,鹳:-14.849575,職:-6.508801,書:-7.368818,犁:-11.263744,锄:-11.845544,尊:-8.521192,悍:-12.051278,檑:-17.334482,冗:-12.297529,隙:-13.967186,宛:-9.909124,琚:-13.463281,额:-9.175107,縞:-13.723564,芡:-14.243439,玫:-10.705119,疯:-9.606947,阮:-9.502468,嬰:-9.788036,憷:-17.334482,舶:-14.769533,涿:-11.813021,勁:-9.760951,韃:-11.470851,廉:-9.985251,慌:-9.911511,藏:-8.797486,歐:-7.389756,浔:-14.198988,剖:-10.730538,荠:-13.900495,蕤:-15.255040,滩:-11.553738,轨:-9.337492,叫:-8.165901,郭:-7.177593,癮:-14.156428,扶:-9.349338,蛹:-17.334482,摺:-15.137257,湾:-12.709509,邂:-12.407228,善:-8.747576,骆:-9.632830,很:-6.989101,攏:-15.031897,漓:-12.490295,袒:-12.234615,鴟:-11.703270,掠:-9.944300,蜣:-14.198988,斤:-12.392839,醬:-11.420979,稱:-7.178447,鶴:-10.676471,栽:-9.870545,烂:-11.229689,奇:-8.061730,糊:-10.002113,体:-6.580694,棒:-11.109923,筛:-10.932565,姜:-8.982635,點:-7.538580,諦:-13.573282,俨:-11.689035,質:-7.913557,镯:-12.546990,練:-9.313554,鈄:-14.390043,崆:-11.862211,須:-9.320808,涑:-14.390043,谐:-11.231923,岛:-8.963240,产:-6.146110,犯:-8.477679,碳:-10.093116,娴:-11.127906,治:-7.610480,蓋:-9.568065,晌:-12.152698,苏:-7.107246,汐:-15.031897,燙:-12.036165,博:-7.841975,鹜:-17.334482,表:-6.269204,韭:-12.216488,煮:-11.982624,壳:-12.087458,署:-11.423685,追:-7.944574,咀:-11.514399,戏:-8.690480,栓:-12.026214,纜:-12.119546,护:-8.713289,梨:-11.440079,眭:-15.948188,冮:-17.334482,镁:-13.309130,偃:-12.181190,濒:-10.767809,闖:-8.636135,恣:-12.198683,湧:-9.376255,鑫:-14.038645,顳:-13.779134,孵:-10.924307,詿:-17.334482,销:-8.311315,錄:-8.528058,将:-7.598881,碉:-12.056367,邙:-13.808121,麝:-12.228536,芥:-12.026214,侧:-9.364778,氦:-13.967186,疫:-10.783402,横:-8.377100,环:-7.203620,逮:-10.078185,鸲:-16.641335,嬴:-14.156428,枷:-12.451680,似:-7.702475,殿:-9.534319,品:-7.654826,獄:-10.805063,祈:-10.441840,杌:-17.334482,菏:-11.468014,呖:-14.936587,烙:-11.725010,绝:-7.607016,齜:-13.723564,塞:-9.284736,拥:-7.976239,荤:-12.868574,嗫:-12.181190,可:-5.401045,喀:-10.066259,厄:-10.891942,妈:-8.904155,骊:-13.550292,候:-8.739587,鴛:-10.616677,帝:-7.864936,榨:-10.498223,元:-7.540028,盂:-15.137257,竊:-10.935887,評:-7.764720,絛:-12.990676,飞:-7.199843,慣:-9.922322,賦:-9.142742,矬:-14.936587,山:-6.411263,婵:-14.626432,懸:-8.843427,濼:-17.334482,阀:-12.940033,逄:-14.076385,萌:-10.561402,踐:-11.647507,榕:-12.643134,蠔:-15.725044,焚:-10.238589,墟:-16.641335,攢:-12.098040,让:-9.962993,听:-7.218629,炯:-12.198683,錮:-15.388572,場:-8.147615,撷:-14.695425,謾:-12.739362,鋃:-14.338750,鳇:-11.080653,蛋:-8.925765,俑:-15.725044,桔:-12.216488,珙:-13.030417,党:-7.670585,緝:-11.415588,囫:-12.770134,闭:-8.538143,絲:-8.859361,任:-6.381152,簇:-10.725133,馊:-13.484334,怏:-12.823622,莎:-11.142119,樓:-8.613858,匙:-14.849575,鸛:-14.849575,甭:-12.759771,厮:-10.654883,缱:-14.444110,挹:-14.695425,芸:-12.357748,洽:-11.728680,貼:-9.494563,剃:-11.529347,揎:-16.235870,淒:-10.037391,勘:-10.222970,扣:-10.090254,迦:-10.968011,影:-6.990098,绰:-11.268374,驳:-11.179624,磴:-15.388572,葷:-12.868574,泼:-11.173275,需:-6.915510,鄄:-14.338750,帆:-11.076814,瀚:-13.933285,稞:-17.334482,肥:-9.165146,渦:-10.636214,株:-11.499671,唬:-13.527819,鰲:-13.160095,头:-7.386882,斷:-8.600405,榿:-15.388572,訾:-13.442662,囁:-12.181190,着:-8.298733,僅:-8.629814,嫉:-11.098112,蟋:-11.918382,敌:-7.655451,诓:-14.156428,楔:-12.087458,狙:-11.640750,鍘:-13.442662,做:-7.492817,鵜:-13.900495,蝠:-13.144827,书:-7.368818,铭:-10.729184,凯:-9.532273,籲:-14.076385,晶:-9.179982,苹:-9.969935,恺:-15.137257,賽:-8.786760,守:-8.759397,朋:-8.196067,颊:-14.390043,意:-6.523987,则:-13.383238,尝:-9.896687,綜:-7.950693,憤:-9.156404,货:-7.899479,閬:-13.550292,縱:-8.532110,馴:-10.555697,千:-7.132669,嵇:-12.310601,细:-7.606003,磊:-13.868746,拎:-14.338750,蹑:-12.371637,雖:-7.189932,变:-6.595025,捣:-10.595145,酯:-14.695425,翰:-10.282626,塵:-10.206788,轻:-7.493455,淼:-15.137257,西:-6.085379,禁:-8.373372,羅:-15.255040,儆:-15.948188,憑:-9.434587,耐:-9.340187,枕:-10.442856,缚:-12.915641,欢:-7.994518,薩:-9.004100,未:-7.582632,纯:-8.587130,嘴:-8.658748,褶:-11.048484,悻:-12.265578,础:-17.334482,鳃:-14.115606,必:-6.720867,鋇:-13.837974,嗉:-15.137257,恐:-8.442008,蓓:-14.198988,奖:-8.793963,緙:-13.750963,鱘:-11.044766,啞:-10.384625,早:-7.372820,士:-8.520449,絮:-12.350875,獲:-7.341839,韵:-10.763599,潺:-12.812693,菽:-15.948188,庄:-8.306503,栋:-13.044022,搓:-13.402656,莒:-13.309130,粘:-9.577003,逛:-11.650902,匝:-13.900495,队:-7.802275,谣:-10.792010,伥:-16.641335,邰:-11.523341,厲:-8.654320,隴:-11.245437,貸:-9.005065,挽:-9.860277,則:-13.383238,乏:-11.245437,插:-9.291782,蝕:-13.723564,穗:-12.634002,癟:-14.243439,闞:-12.977773,询:-9.595123,令:-7.853809,执:-7.253099,顫:-9.998196,蟪:-16.641335,共:-7.039324,直:-6.580908,泸:-11.550657,拼:-9.369979,倆:-11.936319,锈:-12.589550,脐:-13.207348,宗:-7.844769,砖:-9.867682,军:-6.200156,躥:-15.255040,怦:-11.113892,羯:-14.936587,疳:-14.501269,殷:-8.853123,蠶:-10.478020,踺:-15.725044,壁:-9.572311,祀:-17.334482,罄:-15.388572,歌:-8.533314,藓:-15.948188,糙:-13.696896,襠:-15.725044,滥:-10.722441,蕨:-12.317202,姫:-15.255040,髭:-13.837974,籮:-13.016994,嗳:-14.338750,牲:-10.219712,桶:-15.255040,骂:-10.714409,径:-9.470062,椋:-14.444110,隊:-7.802275,漏:-10.143806,芒:-11.664601,初:-7.505449,责:-8.150178,严:-6.980651,澤:-10.932565,茧:-12.965034,劲:-9.760951,氹:-15.031897,趸:-14.338750,人:-4.673338,莼:-11.728680,鹅:-11.538424,升:-8.023030,益:-10.191655,住:-8.490290,拒:-9.022101,處:-7.075911,浣:-14.076385,諢:-13.750963,捧:-11.725010,護:-8.713289,腻:-12.891831,匆:-9.651999,阈:-13.071802,伎:-12.310601,舐:-15.542722,龙:-7.892474,力:-7.452627,級:-9.763523,计:-6.762063,攪:-10.664984,到:-7.466673,鄲:-15.031897,吴:-6.896228,丸:-11.936319,抻:-16.641335,贺:-9.046702,撿:-13.100375,蜾:-15.542722,黃:-14.390043,巅:-12.234615,郇:-14.769533,請:-8.293034,桌:-8.692773,摔:-10.347915,遜:-11.315889,坞:-15.948188,毡:-12.087458,詠:-12.364669,駭:-10.769217,置:-9.430147,煲:-14.561893,闵:-10.556835,迹:-10.663716,松:-8.308786,樋:-13.057816,氏:-10.414798,辎:-12.114126,易:-8.841786,頗:-10.869894,沤:-14.769533,暨:-12.739362,微:-7.550848,冲:-7.733181,电:-6.253971,钴:-15.725044,魁:-10.949288,幃:-15.542722,假:-8.132779,痊:-11.706861,懒:-10.514466,鯖:-16.235870,牛:-8.090223,瑟:-12.041177,藪:-15.255040,危:-7.767797,狰:-12.016362,陳:-13.309130,衷:-11.470851,滸:-15.137257,突:-6.972589,堂:-9.838385,分:-5.653833,吊:-9.701112,与:-8.355569,抑:-9.398179,撕:-10.231160,邝:-12.066624,喟:-14.561893,誡:-14.849575,侣:-16.235870,蚩:-13.223608,箫:-12.459285,搪:-12.006606,瞳:-11.681993,進:-5.501010,訶:-16.641335,伸:-8.236639,嫁:-10.885593,組:-6.351225,采:-6.948970,诋:-12.990676,跏:-16.641335,捐:-9.941834,给:-8.680488,泥:-9.083079,赤:-8.851052,蝨:-12.364669,寫:-8.358978,巯:-14.444110,铵:-14.156428,決:-6.419430,能:-6.662299,晾:-12.834672,颂:-11.249982,嶄:-10.947603,钊:-16.641335,錛:-16.641335,涤:-12.589550,砭:-14.626432,馬:-15.255040,爱:-7.491913,傲:-10.866783,琵:-10.935887,兇:-9.249611,瓊:-10.691995,衍:-10.441840,滎:-12.530461,髖:-13.620910,忘:-9.144682,凜:-11.270697,雞:-9.212704,慧:-9.497717,苦:-8.462415,靳:-11.376057,呵:-10.952666,痴:-10.538776,荻:-13.505841,懼:-11.042913,綁:-11.538424,异:-8.281966,唆:-11.813021,踌:-10.895132,斑:-9.934472,舔:-15.542722,店:-9.502468,香:-7.617625,功:-7.444384,漢:-6.966569,讥:-10.907993,膩:-12.891831,挪:-9.990409,窯:-10.779125,炳:-13.670920,露:-8.825926,溷:-16.235870,撻:-15.388572,抿:-17.334482,脾:-9.747171,寅:-14.115606,雇:-9.640545,凉:-9.698695,扔:-11.179624,願:-8.444071,孚:-15.031897,淡:-8.691185,鏵:-15.542722,价:-7.024197,閆:-10.209199,傈:-12.652351,二:-6.454889,夙:-12.690091,碘:-11.870650,您:-11.721354,缭:-11.996944,妮:-12.891831,由:-6.817567,钰:-15.948188,朽:-12.671043,魅:-10.423731,酉:-13.779134,珊:-10.175190,柒:-15.948188,壘:-12.903665,牟:-10.572909,档:-9.722145,迢:-13.750963,彭:-8.487697,驯:-10.555697,卵:-10.248580,狴:-15.137257,曼:-9.218363,市:-6.408004,吆:-10.809452,炉:-10.167444,刊:-9.560046,撑:-11.192445,投:-6.707463,得:-6.807224,颙:-17.334482,稚:-11.862211,原:-6.105180,財:-7.170247,誥:-13.114974,肩:-9.028998,截:-8.558469,防:-7.319766,谶:-12.580892,診:-9.543786,僉:-14.115606,跋:-11.418280,仍:-8.109844,诏:-9.308966,磙:-15.948188,婚:-8.625347,靜:-8.684858,泡:-10.213229,赠:-10.636214,櫥:-12.330536,惩:-9.662655,巫:-10.207591,确:-7.386499,铱:-15.255040,凳:-11.470851,癲:-11.931805,汶:-11.541468,裹:-12.344049,麂:-14.076385,冈:-10.976640,洋:-8.942172,锛:-16.641335,殤:-17.334482,憨:-12.330536,墮:-10.929253,爵:-10.942565,根:-6.727550,驅:-9.024067,均:-9.460123,罗:-7.313345,鳖:-14.936587,姘:-13.383238,畛:-14.936587,蓦:-10.495005,魯:-8.433933,呱:-12.563797,痰:-13.422459,創:-6.920419,蕻:-17.334482,羁:-10.681619,崂:-12.868574,禅:-10.323268,圆:-8.446553,玉:-7.823519,谌:-11.343017,岗:-9.402120,编:-6.846101,猞:-13.402656,朦:-10.783402,嘰:-11.725010,锲:-13.144827,叉:-11.896403,版:-8.742181,軋:-11.949987,苓:-17.334482,篙:-17.334482,奚:-11.320767,卞:-11.074900,濡:-13.868746,蹠:-15.542722,揩:-13.723564,艨:-14.561893,壯:-8.663538,勳:-10.256140,畲:-11.566161,釵:-15.948188,劈:-11.037373,栏:-10.095267,窘:-11.739771,璜:-16.641335,速:-8.163402,訣:-11.813021,萧:-8.985234,抨:-11.196755,宮:-7.597758,隰:-15.255040,邴:-14.115606,侶:-16.235870,蒼:-9.303422,饅:-10.633751,之:-5.681482,腕:-11.681993,嫘:-11.758533,摧:-10.101026,鹫:-13.327149,自:-5.034486,顯:-7.198614,兵:-7.720678,烴:-13.309130,櫸:-15.725044,擼:-16.235870,嘆:-10.000153,暑:-11.223015,嶗:-12.868574,垛:-11.261437,砚:-13.030417,钝:-13.550292,躡:-12.371637,氢:-10.299213,怪:-9.265140,地:-5.157400,玳:-12.965034,鐲:-12.546990,舾:-15.255040,廁:-10.524339,壅:-13.550292,勉:-9.825695,材:-8.178492,站:-9.121642,塚:-14.936587,镜:-9.720663,满:-7.342160,襤:-13.383238,择:-10.458217,荨:-13.750963,快:-7.859856,右:-8.159354,郵:-8.917330,找:-8.175014,往:-7.753682,笃:-12.392839,妄:-10.199591,隆:-8.889859,邊:-7.992149,椏:-17.334482,吝:-11.996944,澠:-13.527819,推:-6.808109,咲:-15.255040,醴:-11.547585,樹:-8.120847,许:-6.795874,搽:-15.388572,鹁:-13.550292,盆:-9.256414,擒:-10.783402,睛:-16.235870,嗜:-11.703270,俠:-10.935887,正:-6.152940,賢:-9.944918,胪:-15.948188,緬:-10.233630,饯:-12.459285,噱:-13.422459,偵:-9.133096,燴:-13.779134,起:-6.272793,腿:-11.340520,挂:-9.611804,誇:-9.495350,邋:-13.100375,厍:-14.695425,随:-6.823051,抗:-7.345184,萘:-13.160095,造:-7.444738,渴:-10.158227,閹:-11.404893,稼:-13.160095,珍:-8.525216,科:-6.514724,翕:-15.137257,幔:-15.725044,苗:-9.161471,軟:-8.270556,凡:-9.168550,铣:-12.927763,巩:-9.541720,惫:-13.505841,罪:-8.994026,衰:-9.179982,泳:-12.175427,蹴:-15.137257,其:-5.887344,磻:-15.948188,驼:-11.280043,绿:-8.252884,沈:-7.721882,個:-7.167362,餑:-13.057816,攙:-11.476549,無:-6.038966,鎢:-12.759771,殲:-9.904368,鈷:-15.725044,頻:-8.562491,鸿:-11.071084,綾:-12.780605,胀:-13.808121,賈:-8.141898,俊:-11.033696,鋌:-12.482452,嗎:-12.759771,寒:-8.800825,黔:-11.769962,蕙:-15.725044,擘:-15.542722,也:-7.999449,盤:-8.973709,婧:-15.137257,糨:-14.115606,捭:-15.388572,诲:-14.338750,畹:-13.779134,醋:-12.169696,渊:-10.737336,劍:-9.074765,鞏:-9.541720,底:-8.810115,榛:-13.016994,疣:-15.388572,鴨:-10.235280,芭:-10.698535,椰:-10.834695,甸:-14.695425,妻:-8.787924,笼:-9.854618,泉:-10.186136,蹊:-11.678490,狍:-13.345498,绕:-9.903182,晚:-7.880568,迟:-9.220456,汞:-12.699753,牢:-9.454056,鯧:-14.156428,繪:-9.456327,柯:-9.190674,淳:-11.243172,轴:-10.523238,偶:-9.151085,移:-8.347160,老:-6.115270,蘅:-15.948188,构:-7.944741,消:-6.850064,儋:-14.115606,鈍:-13.550292,頑:-9.461646,鸕:-13.670920,羔:-12.284626,肖:-8.845277,貞:-10.898332,冠:-8.887282,脫:-8.493612,撮:-12.823622,吹:-9.670135,皺:-10.233630,精:-6.701033,臀:-11.291849,蟄:-13.207348,歇:-10.524339,今:-6.635855,哎:-10.880857,駐:-8.549095,佟:-11.006545,燠:-14.849575,編:-6.846101,扭:-9.680513,蓮:-9.090673,导:-7.301415,侉:-15.725044,再:-7.444941,蘘:-16.641335,沟:-9.158090,伞:-10.783402,碧:-10.163593,鸨:-13.402656,亳:-13.030417,趵:-13.808121,水:-6.093234,傷:-8.068991,瘸:-13.100375,砼:-17.334482,岿:-13.900495,旅:-7.040338,濉:-14.769533,么:-17.334482,赊:-13.207348,偌:-11.637388,饒:-10.488602,潞:-13.191347,難:-7.135419,嗥:-14.390043,擯:-12.598283,詰:-13.670920,烷:-11.858018,陸:-7.507336,茁:-12.880135,技:-6.602050,載:-9.343228,溈:-15.542722,吏:-10.011311,鴕:-12.823622,莖:-13.144827,辞:-9.363051,加:-6.314935,甥:-14.849575,缩:-9.060890,晃:-10.796342,蓄:-10.138545,城:-6.222318,姒:-16.641335,鳔:-16.235870,蝙:-11.566161,襝:-14.289959,狠:-9.842279,瓤:-14.626432,睹:-14.561893,闺:-10.825713,螃:-12.114126,怂:-12.098040,争:-7.793903,傍:-10.672627,閏:-12.834672,砒:-12.624952,蜘:-11.418280,涟:-12.498200,丞:-10.149095,錠:-13.750963,锤:-12.006606,冷:-7.896289,眸:-12.514200,礼:-8.125843,聂:-9.976926,擅:-9.729587,詆:-12.990676,兌:-9.851800,子:-7.765838,顒:-17.334482,糕:-12.001763,诛:-11.529347,跟:-8.736446,哥:-8.512897,議:-7.697372,赴:-11.183879,饼:-11.703270,幾:-6.133791,掀:-9.756848,踉:-11.216385,澈:-16.235870,逍:-11.074900,唏:-12.812693,弓:-10.155936,昙:-13.003749,栝:-14.849575,邢:-9.599923,琥:-12.016362,茫:-10.106819,暮:-11.175387,状:-7.747831,嘹:-12.530461,鴿:-10.945921,纾:-17.334482,权:-7.017693,迈:-9.717706,里:-7.861008,畏:-10.393292,柘:-14.243439,衝:-7.733181,珠:-9.151085,痤:-13.620910,奧:-8.137024,鹩:-17.334482,恭:-9.494169,蛮:-10.773451,橱:-12.330536,铺:-9.610035,黾:-16.235870,肃:-9.867111,權:-7.017693,颓:-11.273025,宕:-16.235870,暗:-8.067950,耘:-17.334482,沛:-12.709509,级:-9.763523,崦:-17.334482,嬪:-11.074900,氰:-12.709509,嚷:-11.996944,旁:-8.459335,矍:-13.573282,齒:-11.261437,敖:-11.581909,保:-6.224784,楞:-13.573282,嗡:-11.289477,睢:-13.645602,句:-10.324170,黧:-13.527819,給:-8.680488,虬:-12.001763,拯:-11.076814,選:-6.601766,系:-7.137094,鹼:-10.583380,竿:-13.900495,茅:-9.411496,抄:-10.504688,万:-6.309643,霍:-8.939230,猥:-12.791187,墨:-8.812301,憮:-14.695425,鰻:-12.615983,玺:-13.868746,禾:-11.973190,恃:-13.837974,苄:-16.641335,雌:-10.129589,體:-6.580694,惘:-13.327149,瓠:-15.542722,鍥:-13.144827,磨:-9.577003,杭:-8.514817,昂:-10.245239,氆:-13.144827,開:-5.708442,樊:-9.477001,鎏:-13.505841,岑:-10.318769,馓:-14.769533,林:-7.227768,涛:-13.463281,輜:-12.114126,羧:-12.253078,館:-10.526547,本:-6.139327,邹:-9.331453,宿:-9.512839,擁:-7.976239,担:-7.672111,豆:-9.440910,棉:-8.508188,過:-6.192693,嵐:-14.002277,孔:-8.405842,跛:-12.466947,仝:-12.952455,诟:-13.114974,員:-8.974176,釣:-10.522137,癢:-12.240732,壩:-11.315889,走:-7.251427,槳:-13.463281,譴:-10.226238,酸:-9.417674,塾:-14.289959,舅:-10.548894,瞌:-12.246886,箔:-14.002277,怙:-14.936587,渝:-13.900495,袞:-15.255040,妨:-10.831692,蔫:-13.723564,茯:-11.284748,鴻:-11.071084,帽:-10.261212,碾:-11.028207,潇:-10.276584,览:-15.388572,畋:-15.137257,韌:-11.162781,軲:-14.076385,银:-7.308113,凸:-10.563692,繽:-12.801882,飾:-11.136003,漆:-9.915101,隋:-9.577003,邏:-9.533091,猎:-9.649238,徑:-9.470062,谜:-11.747233,梟:-12.940033,唢:-12.163998,弦:-11.575580,太:-6.586114,搬:-9.927771,辱:-11.887745,爸:-9.528193,轆:-13.596812,秕:-16.235870,塔:-9.141082,杖:-16.641335,慚:-10.809452,埡:-13.779134,畢:-7.623306,鳧:-15.388572,審:-7.274247,葬:-11.024564,惯:-9.922322,瓷:-10.252773,鉸:-13.240137,鱼:-7.704576,脅:-11.654309,悄:-9.267960,倏:-11.035533,娓:-13.030417,膚:-11.370903,関:-15.137257,掮:-14.695425,液:-9.183437,匹:-10.532087,崽:-13.291431,蛀:-13.191347,汇:-8.397001,拘:-10.293070,赝:-13.114974,靡:-13.868746,酥:-12.087458,烤:-10.329600,仰:-9.658008,極:-7.454570,韶:-12.041177,勸:-9.502071,搂:-12.466947,鞋:-10.258673,斗:-7.969791,带:-7.505933,堪:-10.263758,攬:-12.589550,椴:-13.837974,喷:-9.327115,銹:-12.589550,情:-6.438409,绑:-11.538424,鱒:-14.769533,磕:-10.149853,奔:-9.077615,晖:-17.334482,进:-5.501010,囡:-16.641335,僥:-10.846798,嫩:-11.223015,轰:-9.126807,噶:-11.853843,翻:-8.301476,者:-14.626432,國:-5.037422,肚:-9.443151,語:-7.718077,瘡:-12.643134,钢:-8.370810,冤:-9.955474,麦:-8.974645,脯:-15.388572,謳:-12.615983,刹:-10.759406,鼻:-9.026036,為:-6.339373,尽:-7.579378,餿:-13.484334,浇:-10.992360,仆:-10.181430,诈:-11.082578,闌:-12.699753,峒:-17.334482,艙:-10.813861,佛:-8.470301,陡:-10.136298,遥:-9.589912,零:-8.569804,特:-6.110493,司:-7.614437,籽:-13.191347,愆:-16.235870,钓:-10.522137,谘:-17.334482,会:-6.520360,舜:-12.240732,犧:-9.525753,圪:-11.412903,训:-8.115380,簸:-12.880135,傻:-9.950492,槁:-15.031897,胛:-16.235870,蛟:-12.749514,敞:-10.763599,煦:-17.334482,嗩:-12.163998,詬:-13.114974,滯:-10.837707,聰:-9.337492,奶:-8.913579,鱸:-12.903665,啾:-16.641335,撈:-12.210518,帏:-15.542722,吓:-10.240247,視:-8.177542,缥:-12.181190,甩:-11.041063,咨:-8.888140,踯:-14.338750,涮:-14.156428,騷:-10.278307,逻:-9.533091,阿:-6.985796,疾:-8.715816,扇:-10.463391,髌:-14.695425,赙:-16.641335,拜:-9.130083,剧:-8.274499,菲:-9.933251,杵:-15.542722,絹:-12.903665,闾:-13.057816,樂:-8.187614,馋:-13.240137,昊:-13.808121,傑:-9.475455,間:-8.856445,嚕:-15.542722,业:-7.835435,茜:-13.967186,倦:-12.011472,侯:-8.912259,肱:-14.769533,朴:-9.748693,冻:-10.350692,滅:-9.395680,聆:-12.234615,孌:-13.868746,児:-13.645602,诗:-8.188360,穢:-13.207348,哩:-15.948188,譬:-10.473818,濯:-15.725044,腰:-9.437557,蝴:-10.917750,篷:-13.967186,幺:-17.334482,矿:-7.891761,澄:-10.944241,騍:-15.948188,式:-11.402237,袖:-10.224602,氙:-14.076385,蒞:-12.198683,邦:-11.591479,褫:-13.620910,險:-9.504056,輯:-12.344049,沮:-11.035533,尹:-9.097797,纺:-8.509951,刽:-12.589550,觀:-7.215560,迄:-10.444891,勒:-10.435767,淘:-10.042826,卧:-9.782245,痨:-13.114974,牽:-9.097797,链:-10.069052,肇:-11.541468,妍:-16.235870,缎:-12.198683,梗:-11.845544,抛:-9.844511,纣:-13.044022,夢:-9.267647,莱:-9.817505,戰:-6.136706,咿:-13.240137,毁:-9.702565,淅:-12.915641,荆:-7.199050,种:-7.531588,塌:-11.959204,酒:-8.134091,痕:-10.464428,苛:-11.162781,浚:-13.620910,蓟:-11.042913,杞:-11.675000,寡:-8.682758,祢:-14.289959,工:-5.286169,郧:-9.417674,番:-11.033696,衬:-10.555697,泯:-13.256944,艰:-8.873859,曳:-13.345498,磷:-9.798118,狻:-13.837974,遼:-8.820895,謁:-14.198988,檀:-11.335545,七:-7.817392,贅:-12.563797,蜉:-13.933285,暈:-10.944241,碌:-13.175599,小:-5.795450,讖:-12.580892,亘:-13.274039,螞:-10.952666,鎦:-12.407228,眩:-11.883443,谯:-13.868746,憲:-8.022849,頷:-12.952455,弹:-8.442420,綺:-11.845544,賄:-10.653627,惜:-11.992148,章:-8.695779,幣:-11.781522,革:-7.310681,業:-7.835435,迮:-17.334482,敵:-7.655451,罹:-12.977773,鷺:-13.645602,煽:-11.109923,较:-8.012690,戆:-15.542722,劑:-10.840728,咕:-10.595145,掛:-9.611804,斟:-11.033696,袭:-9.836720,花:-7.371641,缸:-13.402656,去:-7.940571,泅:-13.596812,曉:-9.602990,遒:-13.114974,仙:-8.448626,嫡:-11.578740,峥:-13.160095,牦:-11.805053,毫:-7.802928,瑪:-9.950492,柳:-8.901105,蕴:-9.869972,婶:-11.011917,痿:-15.137257,谅:-11.661159,嬋:-14.626432,鈑:-16.641335,圓:-8.446553,渙:-12.385722,思:-7.128633,宠:-10.437788,謫:-13.837974,贯:-9.033208,悲:-8.740143,诀:-11.813021,跄:-15.948188,蟈:-14.289959,筋:-10.462354,闔:-14.561893,蹙:-13.527819,內:-6.391637,险:-9.504056,忸:-12.563797,災:-9.139700,凼:-15.031897,雾:-11.020934,漂:-9.316515,攆:-13.933285,鲋:-17.334482,骏:-11.858018,礎:-17.334482,喑:-14.115606,邓:-7.966198,厕:-10.524339,碣:-13.967186,匪:-11.234163,辭:-9.363051,測:-8.180183,戴:-8.875766,康:-8.124042,砸:-11.896403,咻:-15.137257,势:-8.428224,轂:-14.338750,毅:-10.745555,應:-6.510851,荊:-7.199050,幌:-12.291057,呐:-10.633751,青:-7.051736,剔:-12.204583,苟:-10.971454,巡:-8.653471,罢:-8.706642,寥:-11.429120,畦:-15.137257,蹬:-13.967186,想:-7.116987,绷:-11.728680,孺:-13.364190,檄:-12.371637,脉:-9.946154,尋:-8.102869,續:-10.513374,锑:-15.137257,朝:-7.516008,紡:-8.509951,储:-8.506867,榮:-8.537538,耳:-8.590313,鸷:-16.235870,夹:-9.612690,鈿:-17.334482,熾:-11.845544,賀:-9.046702,桃:-8.689951,諄:-12.770134,棘:-11.325669,糠:-13.442662,酩:-14.115606,潭:-12.538691,蟲:-11.011917,覃:-11.020934,戊:-11.407556,澗:-14.936587,斛:-16.641335,蜜:-10.241077,瞧:-9.317504,否:-8.475403,刪:-10.945921,漬:-15.031897,德:-7.454519,喻:-10.247744,隽:-13.402656,眼:-6.754256,县:-7.559623,況:-10.515558,蹂:-11.284748,绍:-10.551157,彌:-9.693398,顎:-14.936587,協:-7.355980,菟:-13.808121,峡:-10.392325,韧:-11.162781,淫:-10.935887,转:-6.763421,毯:-12.634002,婺:-12.357748,谁:-9.898454,羌:-11.247707,鈕:-11.597910,昝:-14.289959,簡:-7.256201,嶠:-17.334482,室:-9.888480,钦:-10.041464,冨:-15.255040,贫:-8.418110,中:-4.596743,鼷:-17.334482,锻:-9.738090,窺:-11.166965,评:-7.764720,筏:-12.624952,佗:-15.137257,衙:-9.024805,柜:-10.848321,締:-9.846748,篤:-12.392839,適:-7.142363,蛲:-13.967186,鳶:-13.868746,白:-6.681940,郾:-13.327149,麋:-9.657081,銓:-14.695425,冕:-14.936587,記:-6.676587,萜:-14.390043,悟:-11.769962,鸠:-14.289959,崢:-13.160095,頤:-11.150333,璧:-16.641335,享:-8.531058,優:-7.083865,氬:-15.255040,岷:-12.175427,琼:-10.691995,濁:-11.954585,揉:-12.729312,腊:-10.325073,燕:-8.674575,蛛:-11.801092,楚:-8.620407,捞:-12.210518,絢:-11.146218,姥:-11.627372,铧:-15.542722,睦:-11.829150,叩:-10.137795,豬:-9.939374,拳:-9.559626,驸:-10.796342,鑼:-11.140077,茉:-12.046215,炔:-14.561893,辖:-9.850113,攝:-8.913139,莞:-13.309130,庠:-15.388572,猩:-12.114126,动:-6.792119,醪:-14.849575,舳:-15.137257,羶:-14.338750,阻:-8.544213,軀:-10.368458,摇:-8.454314,鳌:-13.160095,譙:-13.868746,齡:-14.936587,饥:-10.015942,東:-6.004002,慵:-13.327149,筹:-9.246534,哼:-11.412903,薇:-17.334482,昆:-8.842812,龋:-13.071802,馏:-13.144827,税:-9.228873,世:-6.142051,鼠:-10.956056,錨:-12.690091,倪:-9.928379,蚱:-14.769533,笸:-14.198988,钽:-14.849575,滁:-12.749514,拉:-7.815334,聊:-10.186923,糍:-10.667525,嵌:-11.311034,监:-7.448141,坐:-7.786670,兔:-10.855972,跗:-13.837974,湖:-6.170759,臟:-10.610649,濫:-10.722441,蝰:-15.542722,揳:-17.334482,并:-7.383968,澀:-14.243439,蠅:-13.240137,舉:-7.056676,授:-8.478818,弋:-13.129789,夏:-7.719477,阑:-12.699753,熔:-9.814790,標:-7.386930,鲢:-14.390043,砥:-13.837974,厨:-10.057234,邪:-10.443873,撲:-9.820227,纶:-14.626432,確:-7.386499,歃:-13.723564,规:-6.346008,哒:-15.542722,翠:-10.076774,季:-8.133485,秤:-12.759771,啧:-12.087458,諮:-17.334482,穹:-12.169696,寸:-11.520351,骇:-10.769217,肋:-11.721354,貓:-11.136003,欒:-12.056367,鐘:-8.285837,撣:-14.002277,谨:-10.133311,伪:-9.783295,爬:-10.541016,馱:-12.823622,砰:-14.076385,岳:-8.495495,讽:-10.557975,亿:-7.221058,屈:-8.901323,齊:-8.237870,蕎:-12.163998,濕:-9.064981,乔:-8.741254,飛:-7.199843,睚:-14.695425,寝:-10.772038,黟:-13.750963,絞:-10.935887,换:-8.956091,諧:-11.231923,楦:-15.388572,烫:-12.036165,鉬:-13.837974,盯:-11.125892,啮:-12.699753,拷:-11.355596,棻:-15.137257,詼:-12.181190,滿:-7.342160,炀:-12.624952,吃:-8.318090,的:-8.392936,娇:-10.252773,鴉:-10.048290,輕:-7.493455,莢:-13.550292,洩:-10.062778,疮:-12.643134,失:-7.278745,張:-6.137885,舷:-12.990676,憶:-12.253078,蠻:-10.773451,参:-6.577729,雄:-8.833012,姆:-12.634002,恋:-9.971837,苌:-17.334482,晏:-10.914487,惠:-9.610477,注:-7.381633,问:-6.210238,声:-7.248798,罵:-10.714409,閃:-8.709511,縊:-14.626432,井:-9.415489,倖:-15.137257,羟:-11.069181,质:-7.913557,个:-7.167362,缴:-10.373186,攸:-11.556830,便:-7.802493,兀:-10.419751,盅:-15.725044,顆:-10.831692,鹊:-13.240137,拍:-8.716358,滕:-10.416776,佔:-8.003961,鏗:-12.357748,駛:-10.503608,诧:-10.418758,桦:-12.216488,矯:-10.792010,饰:-11.136003,送:-8.333875,阅:-8.610925,瞄:-10.351619,鰉:-11.080653,舍:-9.380461,掌:-7.932943,蠑:-13.527819,喘:-10.615469,宜:-7.947754,怡:-10.966295,春:-8.104829,氩:-15.255040,報:-6.661673,悶:-10.784831,褻:-12.222494,輿:-9.718198,沾:-11.150333,釀:-10.246073,筇:-15.542722,態:-8.674228,廊:-11.675000,菌:-11.343017,杏:-10.857510,觐:-12.661653,浓:-8.610437,返:-9.254554,南:-6.150783,痘:-14.769533,淨:-9.690999,召:-7.701033,铮:-12.246886,胶:-9.743125,摹:-12.317202,蛺:-14.936587,颇:-10.869894,笆:-15.725044,芋:-13.207348,紊:-10.773451,椒:-13.696896,化:-7.299703,頜:-12.977773,粟:-10.825713,萤:-10.994123,梧:-11.620749,劫:-10.751073,咯:-11.426399,覽:-15.388572,格:-8.228281,病:-7.714087,蝎:-11.887745,郗:-12.357748,畚:-16.235870,鳟:-14.769533,慢:-8.573715,武:-5.718684,俩:-11.936319,浪:-9.164862,瓯:-13.645602,驰:-10.008674,绳:-10.025270,櫻:-10.468591,犀:-11.289477,锅:-9.657545,堇:-15.388572,纈:-14.849575,脍:-12.834672,檐:-15.137257,专:-6.373951,沔:-10.364691,鎖:-10.685497,墜:-10.952666,挡:-10.498223,讦:-15.137257,漩:-12.119546,亨:-10.448972,鸳:-10.616677,耷:-12.538691,癃:-14.501269,硇:-15.031897,密:-7.790387,手:-6.384588,背:-7.851598,静:-8.684858,盘:-8.973709,荡:-10.813861,轩:-10.314291,滨:-10.657398,筱:-12.522298,峴:-14.444110,藺:-12.186987,薏:-13.967186,明:-6.172732,输:-8.373629,枣:-10.303624,榧:-14.849575,徳:-15.255040,區:-7.538914,遂:-11.465185,啄:-12.530461,绉:-15.137257,彈:-8.442420,虎:-9.508438,法:-6.155771,釗:-16.641335,鯛:-14.849575,瑚:-17.334482,繞:-9.903182,恢:-8.369531,汪:-8.615491,酬:-11.529347,懷:-8.085113,蝸:-12.163998,乾:-9.348998,备:-8.593026,羈:-10.681619,耍:-11.572431,谕:-11.490937,銖:-16.641335,瘙:-12.444133,砝:-12.538691,戡:-14.936587,肢:-10.969731,誦:-11.689035,温:-7.574288,侨:-10.375083,錫:-10.146069,貪:-9.372415,倭:-11.080653,锯:-11.508482,皮:-8.086653,娱:-9.775444,碲:-15.948188,撺:-12.823622,贿:-10.653627,捋:-15.031897,臌:-16.235870,敏:-9.400327,兗:-12.108735,揠:-15.137257,蹩:-13.463281,灭:-9.395680,寰:-12.903665,飲:-8.775571,巴:-7.439732,邃:-17.334482,厅:-10.447950,紆:-17.334482,蒋:-8.032474,笊:-14.289959,窟:-11.345520,患:-8.754126,溧:-13.223608,咫:-12.990676,鞭:-10.096704,簰:-14.936587,墳:-10.525443,辽:-8.820895,呀:-15.255040,秉:-10.871452,腎:-9.784347,淑:-12.051278,毕:-7.623306,神:-6.891669,浦:-10.619099,歪:-10.950975,驴:-11.404893,泻:-12.421827,蹼:-14.501269,锁:-10.685497,璀:-12.522298,犄:-13.003749,餉:-13.160095,暌:-14.849575,沐:-11.499671,檔:-9.722145,焙:-12.770134,傘:-10.783402,缝:-10.399111,府:-10.427727,螢:-10.994123,挥:-9.238274,鐫:-12.759771,讪:-13.442662,圭:-11.936319,羲:-16.641335,掺:-11.505536,伽:-11.383839,铀:-12.163998,灃:-14.626432,埂:-16.235870,桓:-10.987093,噗:-11.927310,烘:-11.001202,络:-11.383839,擠:-10.228696,荥:-12.530461,統:-6.637414,峰:-10.610649,筵:-11.177503,醃:-11.870650,龇:-13.723564,怎:-6.761986,覓:-11.678490,吖:-17.334482,刚:-7.858322,澧:-12.680522,鲱:-13.505841,細:-7.606003,陂:-14.769533,奈:-10.661184,驊:-14.849575,蹒:-12.506168,廝:-10.654883,臣:-9.972471,痫:-16.641335,干:-6.948013,腸:-9.695321,添:-9.395680,玄:-8.671804,訕:-13.442662,縝:-12.451680,徜:-13.291431,颞:-13.779134,栩:-12.344049,說:-6.319877,嘭:-17.334482,錯:-8.290196,炮:-8.490434,就:-7.111414,餳:-16.641335,纲:-9.636453,蜷:-12.130475,贻:-11.959204,丽:-9.720663,囂:-11.223015,捏:-11.927310,楓:-12.240732,块:-11.090315,遙:-9.589912,孟:-8.730928,葡:-9.196209,无:-6.038966,槨:-17.334482,巰:-14.444110,恹:-14.626432,内:-6.391637,鲇:-11.488043,缆:-12.119546,安:-6.462225,挎:-12.652351,誓:-10.526547,洒:-11.345520,圖:-7.326724,碟:-12.163998,沧:-10.391359,伦:-8.967647,閭:-13.057816,琬:-15.137257,媳:-9.723134,破:-7.815040,莹:-13.573282,镂:-12.141525,築:-10.090254,濑:-12.216488,乐:-8.187614,叙:-9.406076,黛:-10.379843,川:-9.907933,食:-7.600834,苣:-17.334482,敢:-10.138545,潦:-12.459285,烯:-12.385722,鹰:-11.196755,顴:-12.671043,擷:-14.695425,霁:-15.948188,刃:-13.383238,將:-7.598881,窈:-13.364190,源:-9.247764,梔:-13.309130,猙:-12.016362,辦:-7.209052,親:-7.228952,逯:-13.191347,弱:-9.837275,網:-7.187107,架:-9.214191,雀:-12.284626,郄:-14.936587,忆:-12.253078,晋:-8.995459,姊:-9.861981,裔:-17.334482,呗:-15.137257,鵝:-11.538424,糜:-11.201084,曠:-10.427727,腥:-11.588279,鷲:-13.327149,蟶:-15.388572,课:-8.425247,傅:-8.944441,鶇:-15.542722,膏:-11.556830,戎:-10.526547,云:-7.874006,讓:-9.962993,疗:-9.725611,嘖:-12.087458,錘:-12.006606,倚:-11.104000,掣:-12.634002,涧:-14.936587,並:-7.383968,垫:-11.637388,钭:-14.390043,甬:-11.301396,冯:-8.139763,缰:-11.591479,害:-8.692420,芹:-12.304044,貽:-11.959204,洼:-10.868337,兄:-8.045515,操:-8.213629,滑:-9.224656,佐:-10.572909,棕:-10.369402,癖:-13.596812,務:-9.751743,駟:-13.240137,矫:-10.792010,篳:-14.501269,饴:-11.728680,旷:-10.427727,荸:-14.002277,阁:-10.342385,熄:-11.055960,崇:-8.362526,萍:-12.634002,蠕:-11.105971,榔:-14.243439,厘:-9.052758,急:-8.091287,吭:-11.236408,鄯:-12.915641,粲:-14.501269,堵:-10.113377,蔷:-12.021276,輻:-9.270160,檾:-15.255040,哂:-14.390043,运:-6.562382,柠:-11.473696,詩:-8.188360,嗬:-16.235870,批:-7.447225,胺:-13.345498,汽:-7.854114,諾:-9.592514,待:-9.214786,喉:-10.227056,袋:-11.223015,窗:-8.880868,外:-6.260046,沣:-14.626432,萨:-9.004100,鮭:-13.309130,咳:-10.140796,瘴:-13.057816,永:-7.784175,莽:-11.661159,私:-8.194457,魂:-10.896730,翅:-10.907993,酆:-13.868746,痉:-11.572431,呈:-9.690520,母:-7.978570,赎:-11.325669,荒:-8.854575,祖:-7.990310,罚:-10.279169,賣:-8.855614,止:-9.769207,苧:-12.506168,马:-6.499894,绯:-12.317202,惻:-11.987374,替:-9.419864,切:-8.608001,锉:-14.338750,脑:-8.495640,蜕:-11.931805,首:-6.757208,紙:-9.157528,岘:-14.444110,龚:-9.557108,猝:-11.668055,订:-9.646943,交:-6.487692,鐳:-15.255040,玲:-11.231923,耻:-10.995888,蘿:-11.328129,籃:-9.755314,寂:-9.880341,黄:-6.061795,片:-8.719618,准:-7.334639,蛔:-12.661653,棠:-14.198988,滤:-11.604382,围:-8.180289,瀆:-12.729312,見:-7.475730,瘊:-15.725044,戒:-9.416946,算:-8.345412,瞟:-14.198988,吞:-9.699178,涣:-12.385722,控:-7.712959,妫:-13.808121,第:-5.698216,邱:-9.457085,焰:-12.823622,喳:-14.198988,芽:-12.228536,磁:-8.877888,绅:-11.640750,遆:-17.334482,豎:-10.440826,惑:-14.390043,硖:-16.235870,繚:-11.996944,勝:-7.795557,瑞:-9.049221,橢:-10.509022,以:-5.494658,秫:-13.967186,酰:-11.841420,割:-9.857443,靴:-12.130475,荼:-13.402656,柿:-11.858018,頁:-11.610897,禀:-9.793860,伏:-9.380812,憐:-10.719756,颖:-13.291431,钞:-11.588279,校:-7.720946,渥:-12.643134,鼯:-14.626432,粮:-8.365067,嘵:-17.334482,梶:-13.309130,溺:-11.949987,蜿:-10.598702,嫂:-10.236933,囊:-11.041063,字:-8.314455,緘:-12.087458,坟:-10.525443,衡:-9.768171,濤:-13.463281,旨:-10.189286,寬:-8.668524,汹:-10.994123,宁:-8.456403,碗:-11.338030,犛:-11.805053,谤:-17.334482,馭:-16.641335,砬:-15.031897,爰:-16.641335,琴:-10.179867,边:-7.992149,游:-7.255781,膽:-8.976050,婀:-12.680522,镊:-13.364190,槍:-9.084384,轎:-10.195615,策:-8.980043,忙:-9.824599,凝:-8.963703,糯:-10.006045,窀:-17.334482,布:-7.536188,霉:-11.214184,皈:-11.785406,缙:-12.158332,次:-8.287602,津:-9.771801,薪:-9.746158,夭:-12.186987,匱:-11.883443,阳:-8.207741,髀:-15.725044,繃:-11.728680,鳄:-12.071792,橋:-8.737554,俎:-15.031897,晓:-9.602990,塗:-9.596866,齙:-15.948188,绘:-9.456327,剛:-7.858322,酝:-11.188153,祭:-8.907213,壬:-11.4
Download .txt
gitextract_mj0hkj7m/

├── .github/
│   └── workflows/
│       ├── go.yml
│       └── stale-issues.yml
├── .gitignore
├── CHANGELOG.md
├── README.md
├── config.go
├── deps/
│   ├── simhash/
│   │   ├── .github/
│   │   │   └── workflows/
│   │   │       └── cmake.yml
│   │   ├── .gitignore
│   │   ├── .gitmodules
│   │   ├── .travis.yml
│   │   ├── CMakeLists.txt
│   │   ├── ChangeLog.md
│   │   ├── README.md
│   │   ├── benchmark/
│   │   │   ├── CMakeLists.txt
│   │   │   ├── benchmarking.cpp
│   │   │   └── lib/
│   │   │       ├── Simhasher_benchmark.h
│   │   │       ├── utils.h
│   │   │       └── vals.h
│   │   ├── example/
│   │   │   ├── CMakeLists.txt
│   │   │   └── demo.cpp
│   │   ├── include/
│   │   │   └── simhash/
│   │   │       ├── Simhasher.hpp
│   │   │       └── jenkins.h
│   │   ├── submodules/
│   │   │   └── cppjieba/
│   │   │       ├── .github/
│   │   │       │   └── workflows/
│   │   │       │       └── cmake.yml
│   │   │       ├── .gitignore
│   │   │       ├── .gitmodules
│   │   │       ├── CMakeLists.txt
│   │   │       ├── ChangeLog.md
│   │   │       ├── LICENSE
│   │   │       ├── README.md
│   │   │       ├── deps/
│   │   │       │   └── limonp/
│   │   │       │       ├── .github/
│   │   │       │       │   └── workflows/
│   │   │       │       │       └── cmake.yml
│   │   │       │       ├── .gitignore
│   │   │       │       ├── .gitmodules
│   │   │       │       ├── CMakeLists.txt
│   │   │       │       ├── ChangeLog.md
│   │   │       │       ├── LICENSE
│   │   │       │       ├── README.md
│   │   │       │       ├── include/
│   │   │       │       │   └── limonp/
│   │   │       │       │       ├── ArgvContext.hpp
│   │   │       │       │       ├── BlockingQueue.hpp
│   │   │       │       │       ├── BoundedBlockingQueue.hpp
│   │   │       │       │       ├── BoundedQueue.hpp
│   │   │       │       │       ├── Closure.hpp
│   │   │       │       │       ├── Colors.hpp
│   │   │       │       │       ├── Condition.hpp
│   │   │       │       │       ├── Config.hpp
│   │   │       │       │       ├── FileLock.hpp
│   │   │       │       │       ├── ForcePublic.hpp
│   │   │       │       │       ├── LocalVector.hpp
│   │   │       │       │       ├── Logging.hpp
│   │   │       │       │       ├── Md5.hpp
│   │   │       │       │       ├── MutexLock.hpp
│   │   │       │       │       ├── NonCopyable.hpp
│   │   │       │       │       ├── StdExtension.hpp
│   │   │       │       │       ├── StringUtil.hpp
│   │   │       │       │       ├── Thread.hpp
│   │   │       │       │       └── ThreadPool.hpp
│   │   │       │       └── test/
│   │   │       │           ├── CMakeLists.txt
│   │   │       │           ├── demo.cpp
│   │   │       │           ├── testdata/
│   │   │       │           │   ├── 1.conf
│   │   │       │           │   ├── StdExtension.data
│   │   │       │           │   ├── dict.gbk
│   │   │       │           │   ├── dict.utf8
│   │   │       │           │   ├── io_testfile
│   │   │       │           │   ├── jieba.dict.0.1.utf8
│   │   │       │           │   ├── jieba.dict.0.utf8
│   │   │       │           │   ├── jieba.dict.1.utf8
│   │   │       │           │   └── jieba.dict.2.utf8
│   │   │       │           ├── thread_pool_demo.cpp
│   │   │       │           └── unittest/
│   │   │       │               ├── CMakeLists.txt
│   │   │       │               ├── TArgvContext.cpp
│   │   │       │               ├── TBlockingQueue.cpp
│   │   │       │               ├── TBoundedQueue.cpp
│   │   │       │               ├── TCastFloat.cpp
│   │   │       │               ├── TClosure.cpp
│   │   │       │               ├── TColorPrint.cpp
│   │   │       │               ├── TConfig.cpp
│   │   │       │               ├── TFileLock.cpp
│   │   │       │               ├── TLocalVector.cpp
│   │   │       │               ├── TLogging.cpp
│   │   │       │               ├── TMd5.cpp
│   │   │       │               ├── TMutexLock.cpp
│   │   │       │               ├── TStdExtension.cpp
│   │   │       │               ├── TStringUtil.cpp
│   │   │       │               ├── TThread.cpp
│   │   │       │               ├── TThreadPool.cpp
│   │   │       │               └── gtest_main.cpp
│   │   │       ├── dict/
│   │   │       │   ├── README.md
│   │   │       │   ├── hmm_model.utf8
│   │   │       │   ├── idf.utf8
│   │   │       │   ├── jieba.dict.utf8
│   │   │       │   ├── pos_dict/
│   │   │       │   │   ├── char_state_tab.utf8
│   │   │       │   │   ├── prob_emit.utf8
│   │   │       │   │   ├── prob_start.utf8
│   │   │       │   │   └── prob_trans.utf8
│   │   │       │   ├── stop_words.utf8
│   │   │       │   └── user.dict.utf8
│   │   │       ├── include/
│   │   │       │   └── cppjieba/
│   │   │       │       ├── DictTrie.hpp
│   │   │       │       ├── FullSegment.hpp
│   │   │       │       ├── HMMModel.hpp
│   │   │       │       ├── HMMSegment.hpp
│   │   │       │       ├── Jieba.hpp
│   │   │       │       ├── KeywordExtractor.hpp
│   │   │       │       ├── MPSegment.hpp
│   │   │       │       ├── MixSegment.hpp
│   │   │       │       ├── PosTagger.hpp
│   │   │       │       ├── PreFilter.hpp
│   │   │       │       ├── QuerySegment.hpp
│   │   │       │       ├── SegmentBase.hpp
│   │   │       │       ├── SegmentTagged.hpp
│   │   │       │       ├── TextRankExtractor.hpp
│   │   │       │       ├── Trie.hpp
│   │   │       │       └── Unicode.hpp
│   │   │       └── test/
│   │   │           ├── CMakeLists.txt
│   │   │           ├── demo.cpp
│   │   │           ├── load_test.cpp
│   │   │           ├── testdata/
│   │   │           │   ├── curl.res
│   │   │           │   ├── extra_dict/
│   │   │           │   │   └── jieba.dict.small.utf8
│   │   │           │   ├── gbk_dict/
│   │   │           │   │   ├── hmm_model.gbk
│   │   │           │   │   └── jieba.dict.gbk
│   │   │           │   ├── jieba.dict.0.1.utf8
│   │   │           │   ├── jieba.dict.0.utf8
│   │   │           │   ├── jieba.dict.1.utf8
│   │   │           │   ├── jieba.dict.2.utf8
│   │   │           │   ├── load_test.urls
│   │   │           │   ├── review.100
│   │   │           │   ├── review.100.res
│   │   │           │   ├── server.conf
│   │   │           │   ├── testlines.gbk
│   │   │           │   ├── testlines.utf8
│   │   │           │   ├── userdict.2.utf8
│   │   │           │   ├── userdict.english
│   │   │           │   ├── userdict.utf8
│   │   │           │   └── weicheng.utf8
│   │   │           └── unittest/
│   │   │               ├── CMakeLists.txt
│   │   │               ├── gtest_main.cpp
│   │   │               ├── jieba_test.cpp
│   │   │               ├── keyword_extractor_test.cpp
│   │   │               ├── pos_tagger_test.cpp
│   │   │               ├── pre_filter_test.cpp
│   │   │               ├── segments_test.cpp
│   │   │               ├── textrank_test.cpp
│   │   │               ├── trie_test.cpp
│   │   │               └── unicode_test.cpp
│   │   └── test/
│   │       ├── CMakeLists.txt
│   │       ├── load_test.cpp
│   │       ├── testdata/
│   │       │   ├── news_content
│   │       │   ├── news_content.2
│   │       │   ├── news_content.3
│   │       │   └── news_content.4
│   │       └── unittest/
│   │           ├── CMakeLists.txt
│   │           ├── TJenkins.cpp
│   │           ├── TSimhash.cpp
│   │           └── gtest_main.cpp
│   └── update.sh
├── go.mod
├── simhash.cc
├── simhash.go
├── simhash.h
└── simhash_test.go
Download .txt
SYMBOL INDEX (526 symbols across 78 files)

FILE: config.go
  function init (line 17) | func init() {
  constant TOTAL_DICT_PATH_NUMBER (line 26) | TOTAL_DICT_PATH_NUMBER = 5
  function getDictPaths (line 28) | func getDictPaths(args ...string) [TOTAL_DICT_PATH_NUMBER]string {
  function getCurrentFilePath (line 42) | func getCurrentFilePath() string {

FILE: deps/simhash/benchmark/lib/Simhasher_benchmark.h
  function namespace (line 15) | namespace simhash_benchmark {
  function BENCHMARK_Simhasher_extract_text50_top10 (line 32) | static void BENCHMARK_Simhasher_extract_text50_top10(

FILE: deps/simhash/benchmark/lib/utils.h
  function namespace (line 13) | namespace simhash_benchmark {

FILE: deps/simhash/benchmark/lib/vals.h
  function namespace (line 16) | namespace simhash_benchmark {

FILE: deps/simhash/example/demo.cpp
  function main (line 10) | int main(int argc, char** argv)

FILE: deps/simhash/include/simhash/Simhasher.hpp
  type simhash (line 7) | namespace simhash
    class Simhasher (line 10) | class Simhasher
      method Simhasher (line 17) | Simhasher(const string& dictPath, const string& modelPath, const str...
      method extract (line 21) | bool extract(const string& text, vector<pair<string,double> > & res,...
      method make (line 26) | bool make(const string& text, size_t topN, vector<pair<uint64_t, dou...
      method make (line 44) | bool make(const string& text, size_t topN, uint64_t& v64) const
      method make_from_predefined_keywords (line 77) | static uint64_t make_from_predefined_keywords(const std::vector< std...
      method isEqual (line 109) | static bool isEqual(uint64_t lhs, uint64_t rhs, unsigned short n = 3)
      method toBinaryString (line 153) | static void toBinaryString(uint64_t req, string& res)
      method binaryStringToUint64 (line 163) | static uint64_t binaryStringToUint64(const string& bin)

FILE: deps/simhash/include/simhash/jenkins.h
  function namespace (line 96) | namespace simhash {

FILE: deps/simhash/submodules/cppjieba/deps/limonp/include/limonp/ArgvContext.hpp
  type limonp (line 13) | namespace limonp {
    class ArgvContext (line 17) | class ArgvContext {
      method ArgvContext (line 19) | ArgvContext(int argc, const char* const * argv) {
      method string (line 37) | string operator [](size_t i) const {
      method string (line 43) | string operator [](const string& key) const {
      method HasKey (line 51) | bool HasKey(const string& key) const {
    function ostream (line 64) | inline ostream& operator << (ostream& os, const ArgvContext& args) {

FILE: deps/simhash/submodules/cppjieba/deps/limonp/include/limonp/BlockingQueue.hpp
  type limonp (line 7) | namespace limonp {
    class BlockingQueue (line 9) | class BlockingQueue: NonCopyable {
      method BlockingQueue (line 11) | BlockingQueue()
      method Push (line 15) | void Push(const T& x) {
      method T (line 21) | T Pop() {
      method Size (line 33) | size_t Size() const {
      method Empty (line 37) | bool Empty() const {

FILE: deps/simhash/submodules/cppjieba/deps/limonp/include/limonp/BoundedBlockingQueue.hpp
  type limonp (line 6) | namespace limonp {
    class BoundedBlockingQueue (line 9) | class BoundedBlockingQueue : NonCopyable {
      method BoundedBlockingQueue (line 11) | explicit BoundedBlockingQueue(size_t maxSize)
      method Push (line 18) | void Push(const T& x) {
      method T (line 28) | T Pop() {
      method Empty (line 39) | bool Empty() const {
      method Full (line 44) | bool Full() const {
      method size (line 49) | size_t size() const {
      method capacity (line 54) | size_t capacity() const {

FILE: deps/simhash/submodules/cppjieba/deps/limonp/include/limonp/BoundedQueue.hpp
  type limonp (line 8) | namespace limonp {
    class BoundedQueue (line 11) | class BoundedQueue {
      method BoundedQueue (line 13) | explicit BoundedQueue(size_t capacity): capacity_(capacity), circula...
      method Clear (line 22) | void Clear() {
      method Empty (line 27) | bool Empty() const {
      method Full (line 30) | bool Full() const {
      method Size (line 33) | size_t Size() const {
      method Capacity (line 36) | size_t Capacity() const {
      method Push (line 40) | void Push(const T& t) {
      method T (line 47) | T Pop() {

FILE: deps/simhash/submodules/cppjieba/deps/limonp/include/limonp/Closure.hpp
  type limonp (line 4) | namespace limonp {
    class ClosureInterface (line 6) | class ClosureInterface {
    class Closure0 (line 14) | class Closure0: public ClosureInterface {
      method Closure0 (line 16) | Closure0(Funct fun) {
      method Run (line 21) | virtual void Run() {
    class Closure1 (line 29) | class Closure1: public ClosureInterface {
      method Closure1 (line 31) | Closure1(Funct fun, Arg1 arg1) {
      method Run (line 37) | virtual void Run() {
    class Closure2 (line 46) | class Closure2: public ClosureInterface {
      method Closure2 (line 48) | Closure2(Funct fun, Arg1 arg1, Arg2 arg2) {
      method Run (line 55) | virtual void Run() {
    class Closure3 (line 65) | class Closure3: public ClosureInterface {
      method Closure3 (line 67) | Closure3(Funct fun, Arg1 arg1, Arg2 arg2, Arg3 arg3) {
      method Run (line 75) | virtual void Run() {
    class ObjClosure0 (line 86) | class ObjClosure0: public ClosureInterface {
      method ObjClosure0 (line 88) | ObjClosure0(Obj* p, Funct fun) {
      method Run (line 94) | virtual void Run() {
    class ObjClosure1 (line 103) | class ObjClosure1: public ClosureInterface {
      method ObjClosure1 (line 105) | ObjClosure1(Obj* p, Funct fun, Arg1 arg1) {
      method Run (line 112) | virtual void Run() {
    class ObjClosure2 (line 122) | class ObjClosure2: public ClosureInterface {
      method ObjClosure2 (line 124) | ObjClosure2(Obj* p, Funct fun, Arg1 arg1, Arg2 arg2) {
      method Run (line 132) | virtual void Run() {
    class ObjClosure3 (line 142) | class ObjClosure3: public ClosureInterface {
      method ObjClosure3 (line 144) | ObjClosure3(Obj* p, Funct fun, Arg1 arg1, Arg2 arg2, Arg3 arg3) {
      method Run (line 153) | virtual void Run() {
    function ClosureInterface (line 165) | ClosureInterface* NewClosure(R (*fun)()) {
    function ClosureInterface (line 170) | ClosureInterface* NewClosure(R (*fun)(Arg1), Arg1 arg1) {
    function ClosureInterface (line 175) | ClosureInterface* NewClosure(R (*fun)(Arg1, Arg2), Arg1 arg1, Arg2 arg...
    function ClosureInterface (line 180) | ClosureInterface* NewClosure(R (*fun)(Arg1, Arg2, Arg3), Arg1 arg1, Ar...
    function ClosureInterface (line 185) | ClosureInterface* NewClosure(Obj* obj, R (Obj::* fun)()) {
    function ClosureInterface (line 190) | ClosureInterface* NewClosure(Obj* obj, R (Obj::* fun)(Arg1), Arg1 arg1) {
    function ClosureInterface (line 195) | ClosureInterface* NewClosure(Obj* obj, R (Obj::* fun)(Arg1, Arg2), Arg...
    function ClosureInterface (line 200) | ClosureInterface* NewClosure(Obj* obj, R (Obj::* fun)(Arg1, Arg2, Arg3...

FILE: deps/simhash/submodules/cppjieba/deps/limonp/include/limonp/Colors.hpp
  type limonp (line 7) | namespace limonp {
    type Color (line 11) | enum Color {
    function ColorPrintln (line 20) | static void ColorPrintln(enum Color color, const char * fmt, ...) {

FILE: deps/simhash/submodules/cppjieba/deps/limonp/include/limonp/Condition.hpp
  type limonp (line 6) | namespace limonp {
    class Condition (line 8) | class Condition : NonCopyable {
      method Condition (line 10) | explicit Condition(MutexLock& mutex)
      method Wait (line 19) | void Wait() {
      method Notify (line 23) | void Notify() {
      method NotifyAll (line 27) | void NotifyAll() {

FILE: deps/simhash/submodules/cppjieba/deps/limonp/include/limonp/Config.hpp
  type limonp (line 14) | namespace limonp {
    class Config (line 18) | class Config {
      method Config (line 20) | explicit Config(const string& filePath) {
      method string (line 28) | string Get(const string& key, const string& defaultvalue) const {
      method Get (line 35) | int Get(const string& key, int defaultvalue) const {
      method string (line 53) | string GetConfigInfo() const {
      method LoadFile (line 60) | void LoadFile(const string& filePath) {
    function ostream (line 97) | inline ostream& operator << (ostream& os, const Config& config) {

FILE: deps/simhash/submodules/cppjieba/deps/limonp/include/limonp/FileLock.hpp
  type limonp (line 13) | namespace limonp {
    class FileLock (line 17) | class FileLock {
      method FileLock (line 19) | FileLock() : fd_(-1), ok_(true) {
      method Open (line 26) | void Open(const string& fname) {
      method Close (line 34) | void Close() {
      method Lock (line 37) | void Lock() {
      method UnLock (line 43) | void UnLock() {
      method Ok (line 49) | bool Ok() const {
      method string (line 52) | string Error() const {
      method LockOrUnlock (line 56) | static int LockOrUnlock(int fd, bool lock) {

FILE: deps/simhash/submodules/cppjieba/deps/limonp/include/limonp/LocalVector.hpp
  type limonp (line 9) | namespace limonp {
    class LocalVector (line 17) | class LocalVector {
      method LocalVector (line 28) | LocalVector() {
      method LocalVector (line 31) | LocalVector(const LocalVector<T>& vec) {
      method LocalVector (line 35) | LocalVector(const_iterator  begin, const_iterator end) { // TODO: ma...
      method LocalVector (line 41) | LocalVector(size_t size, const T& t) { // TODO: make it faster
      method init_ (line 68) | void init_() {
      method T (line 74) | T& operator [] (size_t i) {
      method T (line 77) | const T& operator [] (size_t i) const {
      method push_back (line 80) | void push_back(const T& t) {
      method reserve (line 87) | void reserve(size_t size) {
      method empty (line 101) | bool empty() const {
      method size (line 104) | size_t size() const {
      method capacity (line 107) | size_t capacity() const {
      method const_iterator (line 110) | const_iterator begin() const {
      method const_iterator (line 113) | const_iterator end() const {
      method clear (line 116) | void clear() {
    function ostream (line 125) | ostream & operator << (ostream& os, const LocalVector<T>& vec) {

FILE: deps/simhash/submodules/cppjieba/deps/limonp/include/limonp/Logging.hpp
  type limonp (line 20) | namespace limonp {
    class Logger (line 33) | class Logger {
      method Logger (line 35) | Logger(size_t level, const char* filename, int lineno)

FILE: deps/simhash/submodules/cppjieba/deps/limonp/include/limonp/Md5.hpp
  type limonp (line 34) | namespace limonp {
    class MD5 (line 108) | class MD5 {
      type __context_t (line 110) | struct __context_t {
      method MD5Transform (line 119) | static void MD5Transform( UINT4 state[4], unsigned char block[64] ) {
      method Encode (line 207) | static void Encode( unsigned char *output, UINT4 *input, unsigned in...
      method Decode (line 220) | static void Decode( UINT4 *output, unsigned char *input, unsigned in...
      method MD5 (line 232) | MD5() {
      method Init (line 237) | void Init() {
      method Update (line 250) | void Update(
      method Final (line 285) | void Final() {
      method writeToString (line 310) | void writeToString() {
    function md5String (line 376) | inline bool md5String(const char* str, std::string& res) {
    function md5File (line 393) | inline bool md5File(const char* filepath, std::string& res) {

FILE: deps/simhash/submodules/cppjieba/deps/limonp/include/limonp/MutexLock.hpp
  type limonp (line 8) | namespace limonp {
    class MutexLock (line 10) | class MutexLock: NonCopyable {
      method MutexLock (line 12) | MutexLock() {
      method pthread_mutex_t (line 18) | pthread_mutex_t* GetPthreadMutex() {
      method Lock (line 23) | void Lock() {
      method Unlock (line 26) | void Unlock() {
    class MutexLockGuard (line 34) | class MutexLockGuard: NonCopyable {
      method MutexLockGuard (line 36) | explicit MutexLockGuard(MutexLock & mutex)

FILE: deps/simhash/submodules/cppjieba/deps/limonp/include/limonp/NonCopyable.hpp
  type limonp (line 6) | namespace limonp {
    class NonCopyable (line 8) | class NonCopyable {
      method NonCopyable (line 10) | NonCopyable() {

FILE: deps/simhash/submodules/cppjieba/deps/limonp/include/limonp/StdExtension.hpp
  type std (line 18) | namespace std {
    function ostream (line 35) | ostream& operator << (ostream& os, const vector<T>& v) {
    function ostream (line 48) | inline ostream& operator << (ostream& os, const vector<string>& v) {
    function ostream (line 61) | ostream& operator << (ostream& os, const deque<T>& dq) {
    function ostream (line 75) | ostream& operator << (ostream& os, const pair<T1, T2>& pr) {
    function string (line 82) | string& operator << (string& str, const T& obj) {
    function ostream (line 89) | ostream& operator << (ostream& os, const map<T1, T2>& mp) {
    function ostream (line 106) | ostream& operator << (ostream& os, const std::unordered_map<T1, T2>& m...
    function ostream (line 121) | ostream& operator << (ostream& os, const set<T>& st) {
    function IsIn (line 139) | bool IsIn(const ContainType& contain, const KeyType& key) {
    function ofstream (line 149) | ofstream & operator << (ofstream & ofs, const basic_string<T>& s) {
  type std (line 32) | namespace std {
    function ostream (line 35) | ostream& operator << (ostream& os, const vector<T>& v) {
    function ostream (line 48) | inline ostream& operator << (ostream& os, const vector<string>& v) {
    function ostream (line 61) | ostream& operator << (ostream& os, const deque<T>& dq) {
    function ostream (line 75) | ostream& operator << (ostream& os, const pair<T1, T2>& pr) {
    function string (line 82) | string& operator << (string& str, const T& obj) {
    function ostream (line 89) | ostream& operator << (ostream& os, const map<T1, T2>& mp) {
    function ostream (line 106) | ostream& operator << (ostream& os, const std::unordered_map<T1, T2>& m...
    function ostream (line 121) | ostream& operator << (ostream& os, const set<T>& st) {
    function IsIn (line 139) | bool IsIn(const ContainType& contain, const KeyType& key) {
    function ofstream (line 149) | ofstream & operator << (ofstream & ofs, const basic_string<T>& s) {

FILE: deps/simhash/submodules/cppjieba/deps/limonp/include/limonp/StringUtil.hpp
  type limonp (line 28) | namespace limonp {
    function string (line 30) | inline string StringFormat(const char* fmt, ...) {
    function Join (line 52) | void Join(T begin, T end, string& res, const string& connector) {
    function string (line 67) | string Join(T begin, T end, const string& connector) {
    function string (line 73) | inline string& Upper(string& str) {
    function string (line 78) | inline string& Lower(string& str) {
    function IsSpace (line 83) | inline bool IsSpace(unsigned c) {
    function Split (line 122) | inline void Split(const string& src, vector<string>& res, const string...
    function Split (line 141) | inline vector<string> Split(const string& src, const string& pattern, ...
    function StartsWith (line 147) | inline bool StartsWith(const string& str, const string& prefix) {
    function EndsWith (line 154) | inline bool EndsWith(const string& str, const string& suffix) {
    function IsInStr (line 161) | inline bool IsInStr(const string& str, char ch) {
    function TwocharToUint16 (line 165) | inline uint16_t TwocharToUint16(char high, char low) {
    function Utf8ToUnicode (line 170) | bool Utf8ToUnicode(const char * const str, size_t len, Uint16Container...
    function Utf8ToUnicode (line 201) | bool Utf8ToUnicode(const string& str, Uint16Container& vec) {
    function Utf8ToUnicode32 (line 206) | bool Utf8ToUnicode32(const string& str, Uint32Container& vec) {
    function Unicode32ToUtf8 (line 261) | void Unicode32ToUtf8(Uint32ContainerConIter begin, Uint32ContainerConI...
    function UnicodeToUtf8 (line 286) | void UnicodeToUtf8(Uint16ContainerConIter begin, Uint16ContainerConIte...
    function GBKTrans (line 307) | bool GBKTrans(const char* const str, size_t len, Uint16Container& vec) {
    function GBKTrans (line 331) | bool GBKTrans(const string& str, Uint16Container& vec) {
    function GBKTrans (line 336) | void GBKTrans(Uint16ContainerConIter begin, Uint16ContainerConIter end...
    function GetTime (line 357) | inline void GetTime(const string& format, string&  timeStr) {
    function string (line 378) | inline string PathJoin(const string& path1, const string& path2) {

FILE: deps/simhash/submodules/cppjieba/deps/limonp/include/limonp/Thread.hpp
  type limonp (line 7) | namespace limonp {
    class IThread (line 9) | class IThread: NonCopyable {
      method IThread (line 11) | IThread(): isStarted(false), isJoined(false) {
      method Start (line 20) | void Start() {
      method Join (line 25) | void Join() {

FILE: deps/simhash/submodules/cppjieba/deps/limonp/include/limonp/ThreadPool.hpp
  type limonp (line 9) | namespace limonp {
    class ThreadPool (line 14) | class ThreadPool: NonCopyable {
      class Worker (line 16) | class Worker: public IThread {
        method Worker (line 18) | Worker(ThreadPool* pool): ptThreadPool_(pool) {
        method Run (line 24) | virtual void Run() {
      method ThreadPool (line 44) | ThreadPool(size_t thread_num)
      method Start (line 56) | void Start() {
      method Stop (line 61) | void Stop() {
      method Add (line 72) | void Add(ClosureInterface* task) {

FILE: deps/simhash/submodules/cppjieba/deps/limonp/test/demo.cpp
  function main (line 8) | int main(int argc, char** argv) {

FILE: deps/simhash/submodules/cppjieba/deps/limonp/test/thread_pool_demo.cpp
  function Increase (line 8) | void Increase(int* x) {
  function DemoNormalFunction (line 12) | void DemoNormalFunction() {
  class Numbers (line 25) | class Numbers {
    method Numbers (line 27) | Numbers(size_t num): numbers_(num, 0) {
    method Increase (line 29) | void Increase(size_t index) {
  function DemoClassFunction (line 37) | void DemoClassFunction() {
  function main (line 49) | int main() {

FILE: deps/simhash/submodules/cppjieba/deps/limonp/test/unittest/TArgvContext.cpp
  function TEST (line 6) | TEST(ArgvContextTest, Test1) {

FILE: deps/simhash/submodules/cppjieba/deps/limonp/test/unittest/TBlockingQueue.cpp
  class CBlockingQueueTest1 (line 8) | class CBlockingQueueTest1 {
    method CBlockingQueueTest1 (line 19) | CBlockingQueueTest1(const size_t threadSum, void* arg): pthreads_(thre...
    method Wait (line 27) | void Wait() {
  class CBlockingQueueTest2 (line 35) | class CBlockingQueueTest2 {
  class CBoundedBlockingQueueTest3 (line 53) | class CBoundedBlockingQueueTest3 {
  function TEST (line 72) | TEST(BlockingQueue, Test1) {
  function TEST (line 84) | TEST(BlockingQueue, Test2) {
  function TEST (line 95) | TEST(BlockingQueue, Test3) {

FILE: deps/simhash/submodules/cppjieba/deps/limonp/test/unittest/TBoundedQueue.cpp
  function TEST (line 6) | TEST(BoundedQueue, Test1) {

FILE: deps/simhash/submodules/cppjieba/deps/limonp/test/unittest/TCastFloat.cpp
  function TEST (line 9) | TEST(CastFunctTest, Test1) {

FILE: deps/simhash/submodules/cppjieba/deps/limonp/test/unittest/TClosure.cpp
  function Foo0 (line 6) | void Foo0() {
  function Foo1 (line 9) | void Foo1(int x) {
  function Foo2 (line 12) | void Foo2(int x, float y) {
  function Foo3 (line 15) | void Foo3(int x, float y, double z) {
  class Obj (line 18) | class Obj {
    method Foo0 (line 20) | void Foo0() {
    method Foo1 (line 22) | void Foo1(int x) {
    method Foo2 (line 24) | void Foo2(int x, float y) {
    method Foo3 (line 26) | void Foo3(int x, float y, double z) {
  function TEST (line 30) | TEST(Closure, Test0) {
  function TEST (line 58) | TEST(Closure, Test1) {

FILE: deps/simhash/submodules/cppjieba/deps/limonp/test/unittest/TColorPrint.cpp
  function TEST (line 7) | TEST(ColorPrint, Test1) {

FILE: deps/simhash/submodules/cppjieba/deps/limonp/test/unittest/TConfig.cpp
  function TEST (line 5) | TEST(COnfigTest, Test1) {

FILE: deps/simhash/submodules/cppjieba/deps/limonp/test/unittest/TFileLock.cpp
  function TEST (line 8) | TEST(FileLockTest, Test1) {

FILE: deps/simhash/submodules/cppjieba/deps/limonp/test/unittest/TLocalVector.cpp
  function TEST (line 8) | TEST(LocalVector, test1) {
  function TEST (line 25) | TEST(LocalVector, test2) {

FILE: deps/simhash/submodules/cppjieba/deps/limonp/test/unittest/TLogging.cpp
  function TEST (line 5) | TEST(Logging, Test1) {

FILE: deps/simhash/submodules/cppjieba/deps/limonp/test/unittest/TMd5.cpp
  function TEST (line 29) | TEST(Md5Test, Test1) {

FILE: deps/simhash/submodules/cppjieba/deps/limonp/test/unittest/TMutexLock.cpp
  type PthreadInfo (line 14) | struct PthreadInfo {
  class ThreadsLocked (line 21) | class ThreadsLocked {
    method ThreadsLocked (line 26) | ThreadsLocked(size_t threadSum): pthreadInfos_(threadSum) {
    method Start (line 41) | void Start() {
  function TEST (line 53) | TEST(MutexLock, Test1) {

FILE: deps/simhash/submodules/cppjieba/deps/limonp/test/unittest/TStdExtension.cpp
  function TEST (line 8) | TEST(StdOutbound, Test1) {
  function TEST (line 26) | TEST(StdOutbound, Funct_IsIn) {
  function TEST (line 36) | TEST(StdOutbound, Test2) {
  function TEST (line 49) | TEST(StdOutbound, Test3) {
  type TestWord (line 66) | struct TestWord {
  function ostream (line 71) | ostream& operator << (ostream& os, const TestWord& w) {
  function TEST (line 75) | TEST(StdOutbound, TestWord) {

FILE: deps/simhash/submodules/cppjieba/deps/limonp/test/unittest/TStringUtil.cpp
  function TEST (line 5) | TEST(StringUtilTest, Test1) {
  function TEST (line 34) | TEST(StringUtilTest, Test2) {
  function TEST (line 47) | TEST(StringUtilTest, Test3) {
  function TEST (line 60) | TEST(StringUtilTest, Test4) {
  function TEST (line 72) | TEST(StringUtilTest, Test5) {
  function TEST (line 111) | TEST(StringUtilTest, Trim) {
  function TEST (line 129) | TEST(StringUtilTest, GetTime) {
  function TEST (line 135) | TEST(StringUtilTest, PathJoin) {
  function TEST (line 146) | TEST(StringUtilTest, JapaneseUnicode) {
  function TEST (line 154) | TEST(StringUtilTest, RareChinese) {
  function TEST (line 162) | TEST(StringUtilTest, RareChineseUnicode32) {
  function TEST (line 174) | TEST(StringUtilTest, Unicode32) {

FILE: deps/simhash/submodules/cppjieba/deps/limonp/test/unittest/TThread.cpp
  function TEST (line 5) | TEST(IThread, Test1) {

FILE: deps/simhash/submodules/cppjieba/deps/limonp/test/unittest/TThreadPool.cpp
  function Incr (line 12) | void Incr(size_t* x) {
  class Exception (line 16) | class Exception: public exception {
    method Exception (line 18) | Exception(const string& error)
  function IncrWithThrow (line 30) | void IncrWithThrow(int* x) {
  function TEST (line 34) | TEST(ThreadPool, Test1) {
  function TEST (line 50) | TEST(ThreadPool, Exception) {

FILE: deps/simhash/submodules/cppjieba/deps/limonp/test/unittest/gtest_main.cpp
  function GTEST_API_ (line 34) | GTEST_API_ int main(int argc, char **argv) {

FILE: deps/simhash/submodules/cppjieba/include/cppjieba/DictTrie.hpp
  type cppjieba (line 18) | namespace cppjieba {
    class DictTrie (line 27) | class DictTrie {
      type UserWordWeightOption (line 29) | enum UserWordWeightOption {
      method DictTrie (line 35) | DictTrie(const string& dict_path, const string& user_dict_paths = ""...
      method InsertUserWord (line 43) | bool InsertUserWord(const string& word, const string& tag = UNKNOWN_...
      method InsertUserWord (line 53) | bool InsertUserWord(const string& word,int freq, const string& tag =...
      method DeleteUserWord (line 64) | bool DeleteUserWord(const string& word, const string& tag = UNKNOWN_...
      method DictUnit (line 73) | const DictUnit* Find(RuneStrArray::const_iterator begin, RuneStrArra...
      method Find (line 77) | void Find(RuneStrArray::const_iterator begin,
      method Find (line 84) | bool Find(const string& word)
      method IsUserDictSingleChineseWord (line 103) | bool IsUserDictSingleChineseWord(const Rune& word) const {
      method GetMinWeight (line 107) | double GetMinWeight() const {
      method InserUserDictNode (line 111) | void InserUserDictNode(const string& line) {
      method LoadUserDict (line 137) | void LoadUserDict(const vector<string>& buf) {
      method LoadUserDict (line 143) | void LoadUserDict(const set<string>& buf) {
      method LoadUserDict (line 150) | void LoadUserDict(const string& filePaths) {
      method Init (line 169) | void Init(const string& dict_path, const string& user_dict_paths, Us...
      method CreateTrie (line 182) | void CreateTrie(const vector<DictUnit>& dictUnits) {
      method MakeNodeInfo (line 197) | bool MakeNodeInfo(DictUnit& node_info,
      method LoadDict (line 210) | void LoadDict(const string& filePath) {
      method WeightCompare (line 228) | static bool WeightCompare(const DictUnit& lhs, const DictUnit& rhs) {
      method SetStaticWordWeights (line 232) | void SetStaticWordWeights(UserWordWeightOption option) {
      method CalcFreqSum (line 252) | double CalcFreqSum(const vector<DictUnit>& node_infos) const {
      method CalculateWeight (line 260) | void CalculateWeight(vector<DictUnit>& node_infos, double sum) const {
      method Shrink (line 269) | void Shrink(vector<DictUnit>& units) const {

FILE: deps/simhash/submodules/cppjieba/include/cppjieba/FullSegment.hpp
  type cppjieba (line 12) | namespace cppjieba {
    class FullSegment (line 13) | class FullSegment: public SegmentBase {
      method FullSegment (line 15) | FullSegment(const string& dictPath) {
      method FullSegment (line 19) | FullSegment(const DictTrie* dictTrie)
      method Cut (line 28) | void Cut(const string& sentence,
      method Cut (line 34) | void Cut(const string& sentence,
      method Cut (line 48) | void Cut(RuneStrArray::const_iterator begin,

FILE: deps/simhash/submodules/cppjieba/include/cppjieba/HMMModel.hpp
  type cppjieba (line 7) | namespace cppjieba {
    type HMMModel (line 12) | struct HMMModel {
      method HMMModel (line 19) | HMMModel(const string& modelPath) {
      method LoadModel (line 34) | void LoadModel(const string& filePath) {
      method GetEmitProb (line 74) | double GetEmitProb(const EmitProbMap* ptMp, Rune key,
      method GetLine (line 82) | bool GetLine(ifstream& ifile, string& line) {
      method LoadEmitProb (line 95) | bool LoadEmitProb(const string& line, EmitProbMap& mp) {

FILE: deps/simhash/submodules/cppjieba/include/cppjieba/HMMSegment.hpp
  type cppjieba (line 11) | namespace cppjieba {
    class HMMSegment (line 12) | class HMMSegment: public SegmentBase {
      method HMMSegment (line 14) | HMMSegment(const string& filePath)
      method HMMSegment (line 17) | HMMSegment(const HMMModel* model)
      method Cut (line 26) | void Cut(const string& sentence,
      method Cut (line 32) | void Cut(const string& sentence,
      method Cut (line 46) | void Cut(RuneStrArray::const_iterator begin, RuneStrArray::const_ite...
      method SequentialLetterRule (line 79) | RuneStrArray::const_iterator SequentialLetterRule(RuneStrArray::cons...
      method NumbersRule (line 97) | RuneStrArray::const_iterator NumbersRule(RuneStrArray::const_iterato...
      method InternalCut (line 114) | void InternalCut(RuneStrArray::const_iterator begin, RuneStrArray::c...
      method Viterbi (line 130) | void Viterbi(RuneStrArray::const_iterator begin,

FILE: deps/simhash/submodules/cppjieba/include/cppjieba/Jieba.hpp
  type cppjieba (line 7) | namespace cppjieba {
    class Jieba (line 9) | class Jieba {
      method Jieba (line 11) | Jieba(const string& dict_path,
      type LocWord (line 28) | struct LocWord {
      method Cut (line 34) | void Cut(const string& sentence, vector<string>& words, bool hmm = t...
      method Cut (line 37) | void Cut(const string& sentence, vector<Word>& words, bool hmm = tru...
      method CutAll (line 40) | void CutAll(const string& sentence, vector<string>& words) const {
      method CutAll (line 43) | void CutAll(const string& sentence, vector<Word>& words) const {
      method CutForSearch (line 46) | void CutForSearch(const string& sentence, vector<string>& words, boo...
      method CutForSearch (line 49) | void CutForSearch(const string& sentence, vector<Word>& words, bool ...
      method CutHMM (line 52) | void CutHMM(const string& sentence, vector<string>& words) const {
      method CutHMM (line 55) | void CutHMM(const string& sentence, vector<Word>& words) const {
      method CutSmall (line 58) | void CutSmall(const string& sentence, vector<string>& words, size_t ...
      method CutSmall (line 61) | void CutSmall(const string& sentence, vector<Word>& words, size_t ma...
      method Tag (line 65) | void Tag(const string& sentence, vector<pair<string, string> >& word...
      method string (line 68) | string LookupTag(const string &str) const {
      method InsertUserWord (line 71) | bool InsertUserWord(const string& word, const string& tag = UNKNOWN_...
      method InsertUserWord (line 75) | bool InsertUserWord(const string& word,int freq, const string& tag =...
      method DeleteUserWord (line 79) | bool DeleteUserWord(const string& word, const string& tag = UNKNOWN_...
      method Find (line 83) | bool Find(const string& word)
      method ResetSeparators (line 88) | void ResetSeparators(const string& s) {
      method DictTrie (line 97) | const DictTrie* GetDictTrie() const {
      method HMMModel (line 101) | const HMMModel* GetHMMModel() const {
      method LoadUserDict (line 105) | void LoadUserDict(const vector<string>& buf)  {
      method LoadUserDict (line 109) | void LoadUserDict(const set<string>& buf)  {
      method LoadUserDict (line 113) | void LoadUserDict(const string& path)  {

FILE: deps/simhash/submodules/cppjieba/include/cppjieba/KeywordExtractor.hpp
  type cppjieba (line 8) | namespace cppjieba {
    class KeywordExtractor (line 14) | class KeywordExtractor {
      type Word (line 16) | struct Word {
      method KeywordExtractor (line 22) | KeywordExtractor(const string& dictPath,
      method KeywordExtractor (line 31) | KeywordExtractor(const DictTrie* dictTrie,
      method Extract (line 42) | void Extract(const string& sentence, vector<string>& keywords, size_...
      method Extract (line 50) | void Extract(const string& sentence, vector<pair<string, double> >& ...
      method Extract (line 58) | void Extract(const string& sentence, vector<Word>& keywords, size_t ...
      method LoadIdfDict (line 95) | void LoadIdfDict(const string& idfPath) {
      method LoadStopWordDict (line 124) | void LoadStopWordDict(const string& filePath) {
      method Compare (line 134) | static bool Compare(const Word& lhs, const Word& rhs) {
    function ostream (line 145) | inline ostream& operator << (ostream& os, const KeywordExtractor::Word...

FILE: deps/simhash/submodules/cppjieba/include/cppjieba/MPSegment.hpp
  type cppjieba (line 12) | namespace cppjieba {
    class MPSegment (line 14) | class MPSegment: public SegmentTagged {
      method MPSegment (line 16) | MPSegment(const string& dictPath, const string& userDictPath = "")
      method MPSegment (line 19) | MPSegment(const DictTrie* dictTrie)
      method Cut (line 29) | void Cut(const string& sentence, vector<string>& words) const {
      method Cut (line 33) | void Cut(const string& sentence,
      method Cut (line 40) | void Cut(const string& sentence,
      method Cut (line 55) | void Cut(RuneStrArray::const_iterator begin,
      method DictTrie (line 68) | const DictTrie* GetDictTrie() const {
      method Tag (line 72) | bool Tag(const string& src, vector<pair<string, string> >& res) const {
      method IsUserDictSingleChineseWord (line 76) | bool IsUserDictSingleChineseWord(const Rune& value) const {
      method CalcDP (line 80) | void CalcDP(vector<Dag>& dags) const {
      method CutByDag (line 109) | void CutByDag(RuneStrArray::const_iterator begin,

FILE: deps/simhash/submodules/cppjieba/include/cppjieba/MixSegment.hpp
  type cppjieba (line 10) | namespace cppjieba {
    class MixSegment (line 11) | class MixSegment: public SegmentTagged {
      method MixSegment (line 13) | MixSegment(const string& mpSegDict, const string& hmmSegDict,
      method MixSegment (line 18) | MixSegment(const DictTrie* dictTrie, const HMMModel* model)
      method Cut (line 24) | void Cut(const string& sentence, vector<string>& words) const {
      method Cut (line 27) | void Cut(const string& sentence, vector<string>& words, bool hmm) co...
      method Cut (line 32) | void Cut(const string& sentence, vector<Word>& words, bool hmm = tru...
      method Cut (line 46) | void Cut(RuneStrArray::const_iterator begin, RuneStrArray::const_ite...
      method DictTrie (line 88) | const DictTrie* GetDictTrie() const {
      method Tag (line 92) | bool Tag(const string& src, vector<pair<string, string> >& res) const {
      method string (line 96) | string LookupTag(const string &str) const {

FILE: deps/simhash/submodules/cppjieba/include/cppjieba/PosTagger.hpp
  type cppjieba (line 8) | namespace cppjieba {
    class PosTagger (line 15) | class PosTagger {
      method PosTagger (line 17) | PosTagger() {
      method Tag (line 22) | bool Tag(const string& src, vector<pair<string, string> >& res, cons...
      method string (line 32) | string LookupTag(const string &str, const SegmentTagged& segment) co...

FILE: deps/simhash/submodules/cppjieba/include/cppjieba/PreFilter.hpp
  type cppjieba (line 7) | namespace cppjieba {
    class PreFilter (line 9) | class PreFilter {
      type Range (line 12) | struct Range {
      method PreFilter (line 17) | PreFilter(const unordered_set<Rune>& symbols,
      method HasNext (line 27) | bool HasNext() const {
      method Range (line 30) | Range Next() {

FILE: deps/simhash/submodules/cppjieba/include/cppjieba/QuerySegment.hpp
  type cppjieba (line 14) | namespace cppjieba {
    class QuerySegment (line 15) | class QuerySegment: public SegmentBase {
      method QuerySegment (line 17) | QuerySegment(const string& dict, const string& model, const string& ...
      method QuerySegment (line 21) | QuerySegment(const DictTrie* dictTrie, const HMMModel* model)
      method Cut (line 27) | void Cut(const string& sentence, vector<string>& words) const {
      method Cut (line 30) | void Cut(const string& sentence, vector<string>& words, bool hmm) co...
      method Cut (line 35) | void Cut(const string& sentence, vector<Word>& words, bool hmm = tru...
      method Cut (line 48) | void Cut(RuneStrArray::const_iterator begin, RuneStrArray::const_ite...
      method IsAllAscii (line 75) | bool IsAllAscii(const Unicode& s) const {

FILE: deps/simhash/submodules/cppjieba/include/cppjieba/SegmentBase.hpp
  type cppjieba (line 9) | namespace cppjieba {
    class SegmentBase (line 15) | class SegmentBase {
      method SegmentBase (line 17) | SegmentBase() {
      method ResetSeparators (line 25) | bool ResetSeparators(const string& s) {

FILE: deps/simhash/submodules/cppjieba/include/cppjieba/SegmentTagged.hpp
  type cppjieba (line 6) | namespace cppjieba {
    class SegmentTagged (line 8) | class SegmentTagged : public SegmentBase{
      method SegmentTagged (line 10) | SegmentTagged() {

FILE: deps/simhash/submodules/cppjieba/include/cppjieba/TextRankExtractor.hpp
  type cppjieba (line 7) | namespace cppjieba {
    class TextRankExtractor (line 11) | class TextRankExtractor {
      type _Word (line 13) | struct _Word {string word;vector<size_t> offsets;double weight;}
      class WordGraph (line 17) | class WordGraph{
        method WordGraph (line 32) | WordGraph(): d(0.85) {}
        method WordGraph (line 33) | WordGraph(double in_d): d(in_d) {}
        method addEdge (line 35) | void addEdge(Node start,Node end,double weight){
        method rank (line 44) | void rank(WordMap &ws,size_t rankTime=10){
      method TextRankExtractor (line 89) | TextRankExtractor(const string& dictPath,
      method TextRankExtractor (line 96) | TextRankExtractor(const DictTrie* dictTrie,
      method TextRankExtractor (line 102) | TextRankExtractor(const Jieba& jieba, const string& stopWordPath) : ...
      method Extract (line 108) | void Extract(const string& sentence, vector<string>& keywords, size_...
      method Extract (line 116) | void Extract(const string& sentence, vector<pair<string, double> >& ...
      method Extract (line 124) | void Extract(const string& sentence, vector<Word>& keywords, size_t ...
      method LoadStopWordDict (line 165) | void LoadStopWordDict(const string& filePath) {
      method Compare (line 175) | static bool Compare(const Word &x,const Word &y){
    function ostream (line 183) | inline ostream& operator << (ostream& os, const TextRankExtractor::Wor...

FILE: deps/simhash/submodules/cppjieba/include/cppjieba/Trie.hpp
  type cppjieba (line 9) | namespace cppjieba {
    type DictUnit (line 15) | struct DictUnit {
    type Dag (line 28) | struct Dag {
      method Dag (line 35) | Dag():runestr(), pInfo(NULL), weight(0.0), nextPos(0) {
    class TrieNode (line 41) | class TrieNode {
      method TrieNode (line 43) | TrieNode(): next(NULL), ptValue(NULL) {
    class Trie (line 51) | class Trie {
      method Trie (line 53) | Trie(const vector<Unicode>& keys, const vector<const DictUnit*>& val...
      method DictUnit (line 61) | const DictUnit* Find(RuneStrArray::const_iterator begin, RuneStrArra...
      method Find (line 81) | void Find(RuneStrArray::const_iterator begin,
      method InsertNode (line 120) | void InsertNode(const Unicode& key, const DictUnit* ptValue) {
      method DeleteNode (line 144) | void DeleteNode(const Unicode& key, const DictUnit* ptValue) {
      method CreateTrie (line 172) | void CreateTrie(const vector<Unicode>& keys, const vector<const Dict...
      method DeleteNode (line 183) | void DeleteNode(TrieNode* node) {

FILE: deps/simhash/submodules/cppjieba/include/cppjieba/Unicode.hpp
  type cppjieba (line 11) | namespace cppjieba {
    type Word (line 18) | struct Word {
      method Word (line 23) | Word(const string& w, uint32_t o)
      method Word (line 26) | Word(const string& w, uint32_t o, uint32_t unicode_offset, uint32_t ...
    type RuneStr (line 35) | struct RuneStr {
      method RuneStr (line 41) | RuneStr(): rune(0), offset(0), len(0), unicode_offset(0), unicode_le...
      method RuneStr (line 43) | RuneStr(Rune r, uint32_t o, uint32_t l)
      method RuneStr (line 46) | RuneStr(Rune r, uint32_t o, uint32_t l, uint32_t unicode_offset, uin...
    type RuneStr (line 56) | struct RuneStr
      method RuneStr (line 41) | RuneStr(): rune(0), offset(0), len(0), unicode_offset(0), unicode_le...
      method RuneStr (line 43) | RuneStr(Rune r, uint32_t o, uint32_t l)
      method RuneStr (line 46) | RuneStr(Rune r, uint32_t o, uint32_t l, uint32_t unicode_offset, uin...
    type WordRange (line 59) | struct WordRange {
      method WordRange (line 62) | WordRange(RuneStrArray::const_iterator l, RuneStrArray::const_iterat...
      method Length (line 65) | size_t Length() const {
      method IsAllAscii (line 68) | bool IsAllAscii() const {
    type RuneStrLite (line 78) | struct RuneStrLite {
      method RuneStrLite (line 81) | RuneStrLite(): rune(0), len(0) {
      method RuneStrLite (line 83) | RuneStrLite(uint32_t r, uint32_t l): rune(r), len(l) {
    function RuneStrLite (line 87) | inline RuneStrLite DecodeRuneInString(const char* str, size_t len) {
      method RuneStrLite (line 81) | RuneStrLite(): rune(0), len(0) {
      method RuneStrLite (line 83) | RuneStrLite(uint32_t r, uint32_t l): rune(r), len(l) {
    function DecodeRunesInString (line 142) | inline bool DecodeRunesInString(const char* s, size_t len, RuneStrArra...
    function DecodeRunesInString (line 159) | inline bool DecodeRunesInString(const string& s, RuneStrArray& runes) {
    function DecodeRunesInString (line 163) | inline bool DecodeRunesInString(const char* s, size_t len, Unicode& un...
    function IsSingleWord (line 176) | inline bool IsSingleWord(const string& str) {
    function DecodeRunesInString (line 181) | inline bool DecodeRunesInString(const string& s, Unicode& unicode) {
    function Unicode (line 185) | inline Unicode DecodeRunesInString(const string& s) {
    function Word (line 193) | inline Word GetWordFromRunes(const string& s, RuneStrArray::const_iter...
      method Word (line 23) | Word(const string& w, uint32_t o)
      method Word (line 26) | Word(const string& w, uint32_t o, uint32_t unicode_offset, uint32_t ...
    function string (line 200) | inline string GetStringFromRunes(const string& s, RuneStrArray::const_...
    function GetWordsFromWordRanges (line 206) | inline void GetWordsFromWordRanges(const string& s, const vector<WordR...
    function GetWordsFromWordRanges (line 212) | inline vector<Word> GetWordsFromWordRanges(const string& s, const vect...
    function GetStringsFromWords (line 218) | inline void GetStringsFromWords(const vector<Word>& words, vector<stri...

FILE: deps/simhash/submodules/cppjieba/test/demo.cpp
  function main (line 11) | int main(int argc, char** argv) {

FILE: deps/simhash/submodules/cppjieba/test/load_test.cpp
  function Cut (line 12) | void Cut(size_t times = 50) {
  function Extract (line 31) | void Extract(size_t times = 400) {
  function main (line 50) | int main(int argc, char ** argv) {

FILE: deps/simhash/submodules/cppjieba/test/unittest/gtest_main.cpp
  function GTEST_API_ (line 34) | GTEST_API_ int main(int argc, char **argv) {

FILE: deps/simhash/submodules/cppjieba/test/unittest/jieba_test.cpp
  function TEST (line 6) | TEST(JiebaTest, Test1) {
  function TEST (line 43) | TEST(JiebaTest, WordTest) {
  function TEST (line 85) | TEST(JiebaTest, InsertUserWord) {

FILE: deps/simhash/submodules/cppjieba/test/unittest/keyword_extractor_test.cpp
  function TEST (line 6) | TEST(KeywordExtractorTest, Test1) {
  function TEST (line 57) | TEST(KeywordExtractorTest, Test2) {

FILE: deps/simhash/submodules/cppjieba/test/unittest/pos_tagger_test.cpp
  function TEST (line 15) | TEST(PosTaggerTest, Test) {
  function TEST (line 25) | TEST(PosTagger, TestUserDict) {

FILE: deps/simhash/submodules/cppjieba/test/unittest/pre_filter_test.cpp
  function TEST (line 7) | TEST(PreFilterTest, Test1) {

FILE: deps/simhash/submodules/cppjieba/test/unittest/segments_test.cpp
  function TEST (line 11) | TEST(MixSegmentTest, Test1) {
  function TEST (line 51) | TEST(MixSegmentTest, NoUserDict) {
  function TEST (line 60) | TEST(MixSegmentTest, UserDict) {
  function TEST (line 86) | TEST(MixSegmentTest, TestUserDict) {
  function TEST (line 125) | TEST(MixSegmentTest, TestMultiUserDict) {
  function TEST (line 136) | TEST(MPSegmentTest, Test1) {
  function TEST (line 165) | TEST(HMMSegmentTest, Test1) {
  function TEST (line 184) | TEST(FullSegment, Test1) {
  function TEST (line 199) | TEST(QuerySegment, Test1) {
  function TEST (line 220) | TEST(QuerySegment, Test2) {
  function TEST (line 248) | TEST(MPSegmentTest, Unicode32) {

FILE: deps/simhash/submodules/cppjieba/test/unittest/textrank_test.cpp
  function TEST (line 6) | TEST(TextRankExtractorTest, Test1) {
  function TEST (line 60) | TEST(TextRankExtractorTest, Test2) {

FILE: deps/simhash/submodules/cppjieba/test/unittest/trie_test.cpp
  function TEST (line 9) | TEST(TrieTest, Empty) {
  function TEST (line 15) | TEST(TrieTest, Construct) {
  function TEST (line 23) | TEST(DictTrieTest, NewAndDelete) {
  function TEST (line 29) | TEST(DictTrieTest, Test1) {
  function TEST (line 71) | TEST(DictTrieTest, UserDict) {
  function TEST (line 95) | TEST(DictTrieTest, UserDictWithMaxWeight) {
  function TEST (line 105) | TEST(DictTrieTest, Dag) {

FILE: deps/simhash/submodules/cppjieba/test/unittest/unicode_test.cpp
  function TEST (line 8) | TEST(UnicodeTest, Test1) {
  function TEST (line 18) | TEST(UnicodeTest, Illegal) {
  function TEST (line 28) | TEST(UnicodeTest, Rand) {

FILE: deps/simhash/test/load_test.cpp
  function LoadTest (line 8) | void LoadTest(size_t times = 2000)
  function main (line 28) | int main(int argc, char ** argv)

FILE: deps/simhash/test/unittest/TJenkins.cpp
  function TEST (line 10) | TEST(JenkinsTest, Test1)

FILE: deps/simhash/test/unittest/TSimhash.cpp
  function loadFile2Str (line 6) | static bool loadFile2Str(const string& filePath, string& s)
  function TEST (line 17) | TEST(SimhasherTest, Test1)
  function TEST (line 77) | TEST(SimhasherTest, Test2)

FILE: deps/simhash/test/unittest/gtest_main.cpp
  function GTEST_API_ (line 34) | GTEST_API_ int main(int argc, char **argv) {

FILE: simhash.cc
  function Simhasher (line 7) | Simhasher NewSimhasher(const char* dict_path,
  function FreeSimhasher (line 15) | void FreeSimhasher(Simhasher x) {
  function MakeSimhash (line 19) | uint64_t MakeSimhash(Simhasher x, const char* sentence, int top_n) {

FILE: simhash.go
  type Simhasher (line 10) | type Simhasher struct
    method Free (line 23) | func (x Simhasher) Free() {
    method MakeSimhash (line 27) | func (x Simhasher) MakeSimhash(s string, top_n int) uint64 {
  function New (line 14) | func New(paths ...string) Simhasher {

FILE: simhash_test.go
  function TestSimhash (line 7) | func TestSimhash(t *testing.T) {
Copy disabled (too large) Download .json
Condensed preview — 158 files, each showing path, character count, and a content snippet. Download the .json file for the full structured content (20,503K chars).
[
  {
    "path": ".github/workflows/go.yml",
    "chars": 480,
    "preview": "name: Go\n\non:\n  push:\n  pull_request:\n\njobs:\n  build:\n    strategy:\n      matrix:\n        os: [ubuntu-latest, macos-late"
  },
  {
    "path": ".github/workflows/stale-issues.yml",
    "chars": 861,
    "preview": "name: Close Stale Issues\n\non:\n  schedule:\n    # Run on the 2nd of every month at 13:00 UTC\n    - cron: '0 13 2 * *'\n\njob"
  },
  {
    "path": ".gitignore",
    "chars": 29,
    "preview": "tags\n*swp\n*.out\n*.o\n*.d\n*.ut\n"
  },
  {
    "path": "CHANGELOG.md",
    "chars": 507,
    "preview": "# GoSimhash ChangeLog\n\n## v1.2.0\n\n+ README:demo: using gosimhash-demo repo instead of example/demo.go\n+ api::New() args "
  },
  {
    "path": "README.md",
    "chars": 819,
    "preview": "# GoSimhash: Simhash Lib Powered by Golang\n\n[![Test](https://github.com/yanyiwu/gosimhash/actions/workflows/go.yml/badge"
  },
  {
    "path": "config.go",
    "chars": 983,
    "preview": "package gosimhash\n\nimport (\n\t\"path\"\n\t\"runtime\"\n)\n\nvar (\n\tDICT_DIR        string\n\tDICT_PATH       string\n\tHMM_PATH       "
  },
  {
    "path": "deps/simhash/.github/workflows/cmake.yml",
    "chars": 1230,
    "preview": "name: CMake\n\non:\n  push:\n  pull_request:\n\njobs:\n  build:\n    # The CMake configure and build commands are platform agnos"
  },
  {
    "path": "deps/simhash/.gitignore",
    "chars": 73,
    "preview": "tags\n*swp\n*.out\n*.o\n*.d\n*.ut\nlog\n*.log\n*.pyc\n*.pyo\n*.a\nt.cpp\nbuild\n*.un~\n"
  },
  {
    "path": "deps/simhash/.gitmodules",
    "chars": 109,
    "preview": "[submodule \"submodules/cppjieba\"]\n\tpath = submodules/cppjieba\n\turl = https://github.com/yanyiwu/cppjieba.git\n"
  },
  {
    "path": "deps/simhash/.travis.yml",
    "chars": 275,
    "preview": "language: cpp\nbefore_install:\n  - sudo apt-get install cmake\nscript: \n  - mkdir build\n  - cd build\n  - cmake ..\n  - make"
  },
  {
    "path": "deps/simhash/CMakeLists.txt",
    "chars": 602,
    "preview": "cmake_minimum_required(VERSION 3.14)\n\nPROJECT(simhash)\n\n#OPTION(BENCHMARK \"Build benchmarking library\" ON)\n\nINCLUDE_DIRE"
  },
  {
    "path": "deps/simhash/ChangeLog.md",
    "chars": 1320,
    "preview": "# ChangeLog\n\n## v1.2.2\n\n+ [googletest] removed submodule and add cmake-fetchcontent\n+ [submodule] cppjieba v5.3.0 -> v5."
  },
  {
    "path": "deps/simhash/README.md",
    "chars": 4654,
    "preview": "# 专门针对中文文档的simhash算法库\n\n[![Test](https://github.com/yanyiwu/simhash/actions/workflows/cmake.yml/badge.svg)](https://githu"
  },
  {
    "path": "deps/simhash/benchmark/CMakeLists.txt",
    "chars": 686,
    "preview": "# file: CMakeLists.txt\n# date: 2022-01-18\n\n\nif(${CMAKE_VERSION} VERSION_GREATER \"3.16.0\" \n        AND BENCHMARK)\n    mes"
  },
  {
    "path": "deps/simhash/benchmark/benchmarking.cpp",
    "chars": 1461,
    "preview": "/// file: benchmarking.cpp\n/// date: 2022-01-17\n\n\n#include <benchmark/benchmark.h>\n#include \"./lib/Simhasher_benchmark.h"
  },
  {
    "path": "deps/simhash/benchmark/lib/Simhasher_benchmark.h",
    "chars": 4663,
    "preview": "/// file: Simhasher_benchmark.h\n/// date: 2022-01-17\n\n\n#ifndef __SIMHASHED_HENCHMARK_H__\n\n#include <benchmark/benchmark."
  },
  {
    "path": "deps/simhash/benchmark/lib/utils.h",
    "chars": 565,
    "preview": "/// file: utils.h\n/// date: 2022-01-18\n\n\n#ifndef __UTILS_H__\n#define __UTILS_H__\n\n#include <vector>\n#include <utility>\n#"
  },
  {
    "path": "deps/simhash/benchmark/lib/vals.h",
    "chars": 2027,
    "preview": "/// file: vals.h\n/// date: 2022-01-18\n\n\n#ifndef __VALS_H__\n#define __VALS_H__\n\n#include <benchmark/benchmark.h>\n#include"
  },
  {
    "path": "deps/simhash/example/CMakeLists.txt",
    "chars": 81,
    "preview": "SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR})\n\nADD_EXECUTABLE(demo demo.cpp)\n"
  },
  {
    "path": "deps/simhash/example/demo.cpp",
    "chars": 1240,
    "preview": "#include <iostream>\n#include <fstream>\n\n//this define can avoid some logs which you don't need to care about.\n#define LO"
  },
  {
    "path": "deps/simhash/include/simhash/Simhasher.hpp",
    "chars": 6488,
    "preview": "#ifndef SIMHASH_SIMHASHER_HPP\n#define SIMHASH_SIMHASHER_HPP\n\n#include \"cppjieba/KeywordExtractor.hpp\"\n#include \"jenkins."
  },
  {
    "path": "deps/simhash/include/simhash/jenkins.h",
    "chars": 10653,
    "preview": "#ifndef SIMHASH_HASHES_JENKINS_H\n#define SIMHASH_HASHES_JENKINS_H\n\n/* This code was taken from http://www.burtleburtle.n"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/.github/workflows/cmake.yml",
    "chars": 1968,
    "preview": "name: CMake\n\non:\n  push:\n  pull_request:\n\nenv:\n  # Customize the CMake build type here (Release, Debug, RelWithDebInfo, "
  },
  {
    "path": "deps/simhash/submodules/cppjieba/.gitignore",
    "chars": 98,
    "preview": "tags\n*.demo\n*swp\n*.out\n*.o\n*.d\n*.ut\nlog\nmain\nlib*.a\n*_demo\nsegdict*\nprior.gbk\ntmp\nt.*\n*.pid\nbuild\n"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/.gitmodules",
    "chars": 91,
    "preview": "[submodule \"deps/limonp\"]\n\tpath = deps/limonp\n\turl = https://github.com/yanyiwu/limonp.git\n"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/CMakeLists.txt",
    "chars": 679,
    "preview": "CMAKE_MINIMUM_REQUIRED (VERSION 3.5)\nPROJECT(CPPJIEBA)\n\nINCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/deps/limonp/include\n  "
  },
  {
    "path": "deps/simhash/submodules/cppjieba/ChangeLog.md",
    "chars": 7279,
    "preview": "# CHANGELOG\n\n## v5.3.1\n\n+ [cmake] fetch googletest\n+ [submodules] rm test/googletest\n\n## v5.3.0\n\n+ [c++17,c++20] compati"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/LICENSE",
    "chars": 1066,
    "preview": "The MIT License (MIT)\n\nCopyright (c) 2013\n\nPermission is hereby granted, free of charge, to any person obtaining a copy "
  },
  {
    "path": "deps/simhash/submodules/cppjieba/README.md",
    "chars": 7466,
    "preview": "# CppJieba\n\n[![CMake](https://github.com/yanyiwu/cppjieba/actions/workflows/cmake.yml/badge.svg)](https://github.com/yan"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/deps/limonp/.github/workflows/cmake.yml",
    "chars": 1291,
    "preview": "name: CMake\n\non:\n  push:\n  pull_request:\n\n#env:\n  # Customize the CMake build type here (Release, Debug, RelWithDebInfo,"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/deps/limonp/.gitignore",
    "chars": 50,
    "preview": "*.o\n*.ut\nlibcm.a\ntags\n*.d\nbuild\nt.cpp\na.out\n*.swp\n"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/deps/limonp/.gitmodules",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "deps/simhash/submodules/cppjieba/deps/limonp/CMakeLists.txt",
    "chars": 1444,
    "preview": "cmake_minimum_required(VERSION 3.14)\n\nPROJECT(limonp\n        LANGUAGES CXX)\n\n################\n# cmake config #\n#########"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/deps/limonp/ChangeLog.md",
    "chars": 3982,
    "preview": "# CHANGELOG\n\n## v0.9.0\n\n+ [c++20] compatibility\n+ [c++17] compatibility\n\n## v0.8.1\n\n+ [CI] fix windows gtest thread link"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/deps/limonp/LICENSE",
    "chars": 1066,
    "preview": "The MIT License (MIT)\n\nCopyright (c) 2013\n\nPermission is hereby granted, free of charge, to any person obtaining a copy "
  },
  {
    "path": "deps/simhash/submodules/cppjieba/deps/limonp/README.md",
    "chars": 1259,
    "preview": "# limonp \n\n[![CMake](https://github.com/yanyiwu/limonp/actions/workflows/cmake.yml/badge.svg)](https://github.com/yanyiw"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/deps/limonp/include/limonp/ArgvContext.hpp",
    "chars": 1510,
    "preview": "/************************************\n * file enc : ascii\n * author   : wuyanyi09@gmail.com\n ***************************"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/deps/limonp/include/limonp/BlockingQueue.hpp",
    "chars": 973,
    "preview": "#ifndef LIMONP_BLOCKINGQUEUE_HPP\n#define LIMONP_BLOCKINGQUEUE_HPP\n\n#include <queue>\n#include \"Condition.hpp\"\n\nnamespace "
  },
  {
    "path": "deps/simhash/submodules/cppjieba/deps/limonp/include/limonp/BoundedBlockingQueue.hpp",
    "chars": 1324,
    "preview": "#ifndef LIMONP_BOUNDED_BLOCKING_QUEUE_HPP\n#define LIMONP_BOUNDED_BLOCKING_QUEUE_HPP\n\n#include \"BoundedQueue.hpp\"\n\nnamesp"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/deps/limonp/include/limonp/BoundedQueue.hpp",
    "chars": 1131,
    "preview": "#ifndef LIMONP_BOUNDED_QUEUE_HPP\n#define LIMONP_BOUNDED_QUEUE_HPP\n\n#include <vector>\n#include <fstream>\n#include <casser"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/deps/limonp/include/limonp/Closure.hpp",
    "chars": 4434,
    "preview": "#ifndef LIMONP_CLOSURE_HPP\n#define LIMONP_CLOSURE_HPP\n\nnamespace limonp {\n\nclass ClosureInterface {\n public:\n  virtual ~"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/deps/limonp/include/limonp/Colors.hpp",
    "chars": 570,
    "preview": "#ifndef LIMONP_COLOR_PRINT_HPP\n#define LIMONP_COLOR_PRINT_HPP\n\n#include <string>\n#include <stdarg.h>\n\nnamespace limonp {"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/deps/limonp/include/limonp/Condition.hpp",
    "chars": 684,
    "preview": "#ifndef LIMONP_CONDITION_HPP\n#define LIMONP_CONDITION_HPP\n\n#include \"MutexLock.hpp\"\n\nnamespace limonp {\n\nclass Condition"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/deps/limonp/include/limonp/Config.hpp",
    "chars": 2267,
    "preview": "/************************************\n * file enc : utf8\n * author   : wuyanyi09@gmail.com\n ****************************"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/deps/limonp/include/limonp/FileLock.hpp",
    "chars": 1336,
    "preview": "#ifndef LIMONP_FILELOCK_HPP\n#define LIMONP_FILELOCK_HPP\n\n#include <unistd.h>\n#include <stdlib.h>\n#include <stdio.h>\n#inc"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/deps/limonp/include/limonp/ForcePublic.hpp",
    "chars": 142,
    "preview": "#ifndef LIMONP_FORCE_PUBLIC_H\n#define LIMONP_FORCE_PUBLIC_H\n\n#define private public\n#define protected public\n\n#endif // "
  },
  {
    "path": "deps/simhash/submodules/cppjieba/deps/limonp/include/limonp/LocalVector.hpp",
    "chars": 2908,
    "preview": "#ifndef LIMONP_LOCAL_VECTOR_HPP\n#define LIMONP_LOCAL_VECTOR_HPP\n\n#include <iostream>\n#include <stdlib.h>\n#include <asser"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/deps/limonp/include/limonp/Logging.hpp",
    "chars": 1851,
    "preview": "#ifndef LIMONP_LOGGING_HPP\n#define LIMONP_LOGGING_HPP\n\n#include <sstream>\n#include <iostream>\n#include <cassert>\n#includ"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/deps/limonp/include/limonp/Md5.hpp",
    "chars": 12836,
    "preview": "#ifndef __MD5_H__\r\n#define __MD5_H__\r\n\r\n// Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All\r\n// rights re"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/deps/limonp/include/limonp/MutexLock.hpp",
    "chars": 949,
    "preview": "#ifndef LIMONP_MUTEX_LOCK_HPP\n#define LIMONP_MUTEX_LOCK_HPP\n\n#include <pthread.h>\n#include \"NonCopyable.hpp\"\n#include \"L"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/deps/limonp/include/limonp/NonCopyable.hpp",
    "chars": 411,
    "preview": "/************************************\n ************************************/\n#ifndef LIMONP_NONCOPYABLE_H\n#define LIMONP"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/deps/limonp/include/limonp/StdExtension.hpp",
    "chars": 3062,
    "preview": "#ifndef LIMONP_STD_EXTEMSION_HPP\n#define LIMONP_STD_EXTEMSION_HPP\n\n#include <map>\n\n#ifdef __APPLE__\n#include <unordered_"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/deps/limonp/include/limonp/StringUtil.hpp",
    "chars": 9596,
    "preview": "/************************************\n * file enc : ascii\n * author   : wuyanyi09@gmail.com\n ***************************"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/deps/limonp/include/limonp/Thread.hpp",
    "chars": 833,
    "preview": "#ifndef LIMONP_THREAD_HPP\n#define LIMONP_THREAD_HPP\n\n#include \"Logging.hpp\"\n#include \"NonCopyable.hpp\"\n\nnamespace limonp"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/deps/limonp/include/limonp/ThreadPool.hpp",
    "chars": 1767,
    "preview": "#ifndef LIMONP_THREAD_POOL_HPP\n#define LIMONP_THREAD_POOL_HPP\n\n#include \"Thread.hpp\"\n#include \"BlockingQueue.hpp\"\n#inclu"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/deps/limonp/test/CMakeLists.txt",
    "chars": 352,
    "preview": "SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/test)\nSET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/test/lib)\n\nINCLUDE_"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/deps/limonp/test/demo.cpp",
    "chars": 1054,
    "preview": "#include \"limonp/StringUtil.hpp\"\n#include \"limonp/Logging.hpp\"\n\nusing namespace std;\n\n#define print(x) std::cout << x <<"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/deps/limonp/test/testdata/1.conf",
    "chars": 42,
    "preview": "\nkey1 = val1\n##this is comment\n\nkey2=val2\n"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/deps/limonp/test/testdata/StdExtension.data",
    "chars": 40,
    "preview": "key1 = val1\n##this is comment\nkey2=val2\n"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/deps/limonp/test/testdata/dict.gbk",
    "chars": 383,
    "preview": "AT&T 3 nz\nB 3 n\nc# 3 nz\nC# 3 nz\nc++ 3 nz\nC++ 3 nz\nT 4 n\nһ 217830 m\nһһ 1670 m\nһһ 11 m\nһһ 3 m\nһһ 8 m\nһһо 34 i\nһһ 9 m\nһһӦ 4"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/deps/limonp/test/testdata/dict.utf8",
    "chars": 480,
    "preview": "AT&T 3 nz\nB超 3 n\nc# 3 nz\nC# 3 nz\nc++ 3 nz\nC++ 3 nz\nT恤 4 n\n一 217830 m\n一一 1670 m\n一一二 11 m\n一一例 3 m\n一一分 8 m\n一一列举 34 i\n一一对 9 "
  },
  {
    "path": "deps/simhash/submodules/cppjieba/deps/limonp/test/testdata/io_testfile",
    "chars": 12,
    "preview": "line1\nline2\n"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/deps/limonp/test/testdata/jieba.dict.0.1.utf8",
    "chars": 815,
    "preview": "龙鸣狮吼 3 nr\n龙齐诺 2 nr\n龙齿 3 n\n龚 176 nr\n龚世萍 2 nr\n龚书铎 2 nr\n龚二人 2 nr\n龚云甫 3 nr\n龚伟强 5 nr\n龚先生 4 nr\n龚光杰 44 nr\n龚古尔 24 nr\n龚子敬 2 nr\n龚孝"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/deps/limonp/test/testdata/jieba.dict.0.utf8",
    "chars": 815,
    "preview": "龙鸣狮吼 3 nr\n龙齐诺 2 nr\n龙齿 3 n\n龚 176 nr\n龚世萍 2 nr\n龚书铎 2 nr\n龚二人 2 nr\n龚云甫 3 nr\n龚伟强 5 nr\n龚先生 4 nr\n龚光杰 44 nr\n龚古尔 24 nr\n龚子敬 2 nr\n龚孝"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/deps/limonp/test/testdata/jieba.dict.1.utf8",
    "chars": 669,
    "preview": "AT&T 3 nz\nB超 3 n\nc# 3 nz\nC# 3 nz\nc++ 3 nz\nC++ 3 nz\nT恤 4 n\n一 217830 m\n一一 1670 m\n一一二 11 m\n一一例 3 m\n一一分 8 m\n一一列举 34 i\n一一对 9 "
  },
  {
    "path": "deps/simhash/submodules/cppjieba/deps/limonp/test/testdata/jieba.dict.2.utf8",
    "chars": 634,
    "preview": "一万七千 5 m\n一万七千余 2 m\n一万七千多 2 m\n一万七千多户 2 m\n一万万 4 m\n一万万两 4 m\n一万三千 8 m\n一万三千五百一十七 2 m\n一万三千五百斤 4 m\n一万三千余种 2 m\n一万三千块 2 m\n一万两 124"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/deps/limonp/test/thread_pool_demo.cpp",
    "chars": 1097,
    "preview": "#include \"limonp/ThreadPool.hpp\"\n#include \"limonp/StdExtension.hpp\"\n\nusing namespace std;\n\nconst size_t THREAD_NUM = 4;\n"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/deps/limonp/test/unittest/CMakeLists.txt",
    "chars": 708,
    "preview": "\nif (MSVC)\n\tset(CMAKE_MSVC_RUNTIME_LIBRARY \"MultiThreadedDebugDLL\")\n\tset(gtest_force_shared_crt ON CACHE BOOL \"\" FORCE)\n"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/deps/limonp/test/unittest/TArgvContext.cpp",
    "chars": 432,
    "preview": "#include \"limonp/ArgvContext.hpp\"\n#include \"gtest/gtest.h\"\n\nusing namespace limonp;\n\nTEST(ArgvContextTest, Test1) {\n  co"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/deps/limonp/test/unittest/TBlockingQueue.cpp",
    "chars": 2656,
    "preview": "#include \"gtest/gtest.h\"\n#include \"limonp/BlockingQueue.hpp\"\n#include \"limonp/BoundedBlockingQueue.hpp\"\n\nusing namespace"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/deps/limonp/test/unittest/TBoundedQueue.cpp",
    "chars": 686,
    "preview": "#include \"limonp/BoundedQueue.hpp\"\n#include \"gtest/gtest.h\"\n\nusing namespace limonp;\n\nTEST(BoundedQueue, Test1) {\n  cons"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/deps/limonp/test/unittest/TCastFloat.cpp",
    "chars": 462,
    "preview": "#include \"limonp/CastFloat.hpp\"\n#include \"gtest/gtest.h\"\n#include <cmath>\n\nusing namespace std;\nusing namespace limonp;\n"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/deps/limonp/test/unittest/TClosure.cpp",
    "chars": 1277,
    "preview": "#include \"gtest/gtest.h\"\n#include \"limonp/Closure.hpp\"\n\nusing namespace limonp;\n\nvoid Foo0() {\n}\n\nvoid Foo1(int x) {\n}\n\n"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/deps/limonp/test/unittest/TColorPrint.cpp",
    "chars": 608,
    "preview": "#include \"gtest/gtest.h\"\n#include \"limonp/Colors.hpp\"\n#include \"limonp/Logging.hpp\"\n\nusing namespace limonp;\n\nTEST(Color"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/deps/limonp/test/unittest/TConfig.cpp",
    "chars": 434,
    "preview": "#include \"limonp/Config.hpp\"\n#include \"gtest/gtest.h\"\n\nusing namespace limonp;\nTEST(COnfigTest, Test1) {\n  Config conf(\""
  },
  {
    "path": "deps/simhash/submodules/cppjieba/deps/limonp/test/unittest/TFileLock.cpp",
    "chars": 359,
    "preview": "#include \"limonp/FileLock.hpp\"\n#include \"gtest/gtest.h\"\n\nusing namespace limonp;\n\nstatic const char* test_file = \"/tmp/l"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/deps/limonp/test/unittest/TLocalVector.cpp",
    "chars": 1095,
    "preview": "#include \"limonp/LocalVector.hpp\"\n#include \"limonp/StdExtension.hpp\"\n#include <fstream>\n#include \"gtest/gtest.h\"\n\nusing "
  },
  {
    "path": "deps/simhash/submodules/cppjieba/deps/limonp/test/unittest/TLogging.cpp",
    "chars": 298,
    "preview": "#define LOGGING_LEVEL LL_WARNING\n#include \"limonp/Logging.hpp\"\n#include \"gtest/gtest.h\"\n\nTEST(Logging, Test1) {\n  XLOG(D"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/deps/limonp/test/unittest/TMd5.cpp",
    "chars": 1176,
    "preview": "#include \"limonp/Md5.hpp\"\n#include \"gtest/gtest.h\"\n#include <string>\nusing namespace std;\nusing namespace limonp;\n\nconst"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/deps/limonp/test/unittest/TMutexLock.cpp",
    "chars": 1580,
    "preview": "#include \"gtest/gtest.h\"\n#include \"limonp/StdExtension.hpp\"\n#include \"limonp/MutexLock.hpp\"\n#include <vector>\n\nusing nam"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/deps/limonp/test/unittest/TStdExtension.cpp",
    "chars": 1921,
    "preview": "#include \"limonp/StdExtension.hpp\"\n#include \"limonp/StringUtil.hpp\"\n#include \"gtest/gtest.h\"\n#include <iostream>\n#includ"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/deps/limonp/test/unittest/TStringUtil.cpp",
    "chars": 4650,
    "preview": "#include \"limonp/StringUtil.hpp\"\n#include \"gtest/gtest.h\"\nusing namespace limonp;\n\nTEST(StringUtilTest, Test1) {\n  vecto"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/deps/limonp/test/unittest/TThread.cpp",
    "chars": 532,
    "preview": "#include \"gtest/gtest.h\"\n#include \"limonp/Thread.hpp\"\nusing namespace limonp;\n\nTEST(IThread, Test1) {\n  class ThreadHand"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/deps/limonp/test/unittest/TThreadPool.cpp",
    "chars": 1123,
    "preview": "#include \"gtest/gtest.h\"\n#include \"limonp/ThreadPool.hpp\"\n#include <exception>\nusing namespace limonp;\n\n//static void ad"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/deps/limonp/test/unittest/gtest_main.cpp",
    "chars": 1772,
    "preview": "// Copyright 2006, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "deps/simhash/submodules/cppjieba/dict/README.md",
    "chars": 435,
    "preview": "# CppJieba字典\n\n文件后缀名代表的是词典的编码方式。\n比如filename.utf8 是 utf8编码,filename.gbk 是 gbk编码方式。\n\n\n## 分词\n\n### jieba.dict.utf8/gbk\n\n作为最大概"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/dict/hmm_model.utf8",
    "chars": 449291,
    "preview": "#\n#0:B\n#1:E\n#2:M\n#3:S\n#\n#B:-0.26268660809250016\n#E:-3.14e+100\n#M:-3.14e+100\n#S:-1.4652633398537678\n#prob_start\n-0.262686"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/dict/idf.utf8",
    "chars": 4555353,
    "preview": "劳动防护 13.900677652\n生化学 13.900677652\n奥萨贝尔 13.900677652\n考察队员 13.900677652\n岗上 11.5027823792\n倒车档 12.2912397395\n编译 9.218546424"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/dict/jieba.dict.utf8",
    "chars": 3039066,
    "preview": "AT&T 3 nz\nB超 3 n\nc# 3 nz\nC# 3 nz\nc++ 3 nz\nC++ 3 nz\nT恤 4 n\n一 217830 m\n一一 1670 m\n一一二 11 m\n一一例 3 m\n一一分 8 m\n一一列举 34 i\n一一对 9 "
  },
  {
    "path": "deps/simhash/submodules/cppjieba/dict/pos_dict/char_state_tab.utf8",
    "chars": 313757,
    "preview": "#某个字的候选状态集合\n#格式\n#字:状态1;状态2;状态3;\n#状态集合是{B,E,M,S}和词性集合的笛卡尔乘积,所以用二元组表示\n\n耀:E,v;M,nr;E,nr;B,a;S,v;E,a;M,nt;B,i;B,n;B,ns;B,nz;"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/dict/pos_dict/prob_emit.utf8",
    "chars": 1509074,
    "preview": "#发射概率\n#格式\n#状态:字符1,概率1;字符2,概率2;\nB,ad:突,-2.70366861046;肃,-10.2782270947;适,-5.57547658034;肅,-10.2782270947;匆,-7.7132777372;"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/dict/pos_dict/prob_start.utf8",
    "chars": 4321,
    "preview": "#初始状态的概率\n#格式\n#状态:概率\nB,a:-4.7623052146\nB,ad:-6.68006603678\nB,ag:-3.14e+100\nB,an:-8.69708322302\nB,b:-5.01837436211\nB,bg:-3"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/dict/pos_dict/prob_trans.utf8",
    "chars": 124111,
    "preview": "#状态转移概率\n#格式\n#状态1:状态2:概率\n#状态1 转移到 状态2 的概率\nB,ad:E,ad:-0.000747901397848\nB,ad:M,ad:-7.19861333713\nB,a:E,a:-0.00506484530696"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/dict/stop_words.utf8",
    "chars": 6144,
    "preview": "\"\n.\n。\n,\n、\n!\n?\n:\n;\n`\n﹑\n•\n"\n^\n…\n‘\n’\n“\n”\n〝\n〞\n~\n\\\n∕\n|\n¦\n‖\n— \n(\n)\n〈\n〉\n﹞\n﹝\n「\n」\n‹\n›\n〖\n〗\n】\n【\n»\n«\n』\n『\n〕\n〔\n》\n《\n}\n{\n]\n[\n﹐\n¸\n﹕\n︰\n﹔\n;"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/dict/user.dict.utf8",
    "chars": 25,
    "preview": "云计算\n韩玉鉴赏\n蓝翔 nz\n区块链 10 nz\n"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/include/cppjieba/DictTrie.hpp",
    "chars": 7810,
    "preview": "#ifndef CPPJIEBA_DICT_TRIE_HPP\n#define CPPJIEBA_DICT_TRIE_HPP\n\n#include <iostream>\n#include <fstream>\n#include <map>\n#in"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/include/cppjieba/FullSegment.hpp",
    "chars": 2528,
    "preview": "#ifndef CPPJIEBA_FULLSEGMENT_H\n#define CPPJIEBA_FULLSEGMENT_H\n\n#include <algorithm>\n#include <set>\n#include <cassert>\n#i"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/include/cppjieba/HMMModel.hpp",
    "chars": 3278,
    "preview": "#ifndef CPPJIEBA_HMMMODEL_H\n#define CPPJIEBA_HMMMODEL_H\n\n#include \"limonp/StringUtil.hpp\"\n#include \"Trie.hpp\"\n\nnamespace"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/include/cppjieba/HMMSegment.hpp",
    "chars": 5005,
    "preview": "#ifndef CPPJIBEA_HMMSEGMENT_H\n#define CPPJIBEA_HMMSEGMENT_H\n\n#include <iostream>\n#include <fstream>\n#include <memory.h>\n"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/include/cppjieba/Jieba.hpp",
    "chars": 3629,
    "preview": "#ifndef CPPJIEAB_JIEBA_H\n#define CPPJIEAB_JIEBA_H\n\n#include \"QuerySegment.hpp\"\n#include \"KeywordExtractor.hpp\"\n\nnamespac"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/include/cppjieba/KeywordExtractor.hpp",
    "chars": 4284,
    "preview": "#ifndef CPPJIEBA_KEYWORD_EXTRACTOR_H\n#define CPPJIEBA_KEYWORD_EXTRACTOR_H\n\n#include <cmath>\n#include <set>\n#include \"Mix"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/include/cppjieba/MPSegment.hpp",
    "chars": 3640,
    "preview": "#ifndef CPPJIEBA_MPSEGMENT_H\n#define CPPJIEBA_MPSEGMENT_H\n\n#include <algorithm>\n#include <set>\n#include <cassert>\n#inclu"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/include/cppjieba/MixSegment.hpp",
    "chars": 3009,
    "preview": "#ifndef CPPJIEBA_MIXSEGMENT_H\n#define CPPJIEBA_MIXSEGMENT_H\n\n#include <cassert>\n#include \"MPSegment.hpp\"\n#include \"HMMSe"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/include/cppjieba/PosTagger.hpp",
    "chars": 1872,
    "preview": "#ifndef CPPJIEBA_POS_TAGGING_H\n#define CPPJIEBA_POS_TAGGING_H\n\n#include \"limonp/StringUtil.hpp\"\n#include \"SegmentTagged."
  },
  {
    "path": "deps/simhash/submodules/cppjieba/include/cppjieba/PreFilter.hpp",
    "chars": 1199,
    "preview": "#ifndef CPPJIEBA_PRE_FILTER_H\n#define CPPJIEBA_PRE_FILTER_H\n\n#include \"Trie.hpp\"\n#include \"limonp/Logging.hpp\"\n\nnamespac"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/include/cppjieba/QuerySegment.hpp",
    "chars": 2629,
    "preview": "#ifndef CPPJIEBA_QUERYSEGMENT_H\n#define CPPJIEBA_QUERYSEGMENT_H\n\n#include <algorithm>\n#include <set>\n#include <cassert>\n"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/include/cppjieba/SegmentBase.hpp",
    "chars": 1008,
    "preview": "#ifndef CPPJIEBA_SEGMENTBASE_H\n#define CPPJIEBA_SEGMENTBASE_H\n\n#include \"limonp/Logging.hpp\"\n#include \"PreFilter.hpp\"\n#i"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/include/cppjieba/SegmentTagged.hpp",
    "chars": 413,
    "preview": "#ifndef CPPJIEBA_SEGMENTTAGGED_H\n#define CPPJIEBA_SEGMENTTAGGED_H\n\n#include \"SegmentBase.hpp\"\n\nnamespace cppjieba {\n\ncla"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/include/cppjieba/TextRankExtractor.hpp",
    "chars": 6312,
    "preview": "#ifndef CPPJIEBA_TEXTRANK_EXTRACTOR_H\r\n#define CPPJIEBA_TEXTRANK_EXTRACTOR_H\r\n\r\n#include <cmath>\r\n#include \"Jieba.hpp\"\r\n"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/include/cppjieba/Trie.hpp",
    "chars": 5270,
    "preview": "#ifndef CPPJIEBA_TRIE_HPP\n#define CPPJIEBA_TRIE_HPP\n\n#include <vector>\n#include <queue>\n#include \"limonp/StdExtension.hp"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/include/cppjieba/Unicode.hpp",
    "chars": 6201,
    "preview": "#ifndef CPPJIEBA_UNICODE_H\n#define CPPJIEBA_UNICODE_H\n\n#include <stdint.h>\n#include <stdlib.h>\n#include <string>\n#includ"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/test/CMakeLists.txt",
    "chars": 171,
    "preview": "SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR})\n\nADD_EXECUTABLE(demo demo.cpp)\nif(NOT MSVC)\n\tADD_EXECUTABLE(load_test "
  },
  {
    "path": "deps/simhash/submodules/cppjieba/test/demo.cpp",
    "chars": 2597,
    "preview": "#include \"cppjieba/Jieba.hpp\"\n\nusing namespace std;\n\nconst char* const DICT_PATH = \"../dict/jieba.dict.utf8\";\nconst char"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/test/load_test.cpp",
    "chars": 1532,
    "preview": "#include <iostream>\n#include <ctime>\n#include <fstream>\n#include \"cppjieba/MPSegment.hpp\"\n#include \"cppjieba/HMMSegment."
  },
  {
    "path": "deps/simhash/submodules/cppjieba/test/testdata/curl.res",
    "chars": 15,
    "preview": "[\"南京市\", \"长江大桥\"]"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/test/testdata/extra_dict/jieba.dict.small.utf8",
    "chars": 1012105,
    "preview": "的 3188252 uj\n了 883634 ul\n是 796991 v\n在 727915 p\n和 555815 c\n有 423765 v\n他 401339 r\n不 360331 d\n我 328841 r\n人 313209 n\n也 30785"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/test/testdata/gbk_dict/hmm_model.gbk",
    "chars": 424744,
    "preview": "#\n#0:B\n#1:E\n#2:M\n#3:S\n#\n#B:-0.26268660809250016\n#E:-3.14e+100\n#M:-3.14e+100\n#S:-1.4652633398537678\n#prob_start\n-0.262686"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/test/testdata/gbk_dict/jieba.dict.gbk",
    "chars": 2299171,
    "preview": "AT&T 3 nz\nB 3 n\nc# 3 nz\nC# 3 nz\nc++ 3 nz\nC++ 3 nz\nT 4 n\nһ 217830 m\nһһ 1670 m\nһһ 11 m\nһһ 3 m\nһһ 8 m\nһһо 34 i\nһһ 9 m\nһһӦ 4"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/test/testdata/jieba.dict.0.1.utf8",
    "chars": 815,
    "preview": "龙鸣狮吼 3 nr\n龙齐诺 2 nr\n龙齿 3 n\n龚 176 nr\n龚世萍 2 nr\n龚书铎 2 nr\n龚二人 2 nr\n龚云甫 3 nr\n龚伟强 5 nr\n龚先生 4 nr\n龚光杰 44 nr\n龚古尔 24 nr\n龚子敬 2 nr\n龚孝"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/test/testdata/jieba.dict.0.utf8",
    "chars": 815,
    "preview": "龙鸣狮吼 3 nr\n龙齐诺 2 nr\n龙齿 3 n\n龚 176 nr\n龚世萍 2 nr\n龚书铎 2 nr\n龚二人 2 nr\n龚云甫 3 nr\n龚伟强 5 nr\n龚先生 4 nr\n龚光杰 44 nr\n龚古尔 24 nr\n龚子敬 2 nr\n龚孝"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/test/testdata/jieba.dict.1.utf8",
    "chars": 669,
    "preview": "AT&T 3 nz\nB超 3 n\nc# 3 nz\nC# 3 nz\nc++ 3 nz\nC++ 3 nz\nT恤 4 n\n一 217830 m\n一一 1670 m\n一一二 11 m\n一一例 3 m\n一一分 8 m\n一一列举 34 i\n一一对 9 "
  },
  {
    "path": "deps/simhash/submodules/cppjieba/test/testdata/jieba.dict.2.utf8",
    "chars": 634,
    "preview": "一万七千 5 m\n一万七千余 2 m\n一万七千多 2 m\n一万七千多户 2 m\n一万万 4 m\n一万万两 4 m\n一万三千 8 m\n一万三千五百一十七 2 m\n一万三千五百斤 4 m\n一万三千余种 2 m\n一万三千块 2 m\n一万两 124"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/test/testdata/load_test.urls",
    "chars": 72,
    "preview": "http://127.0.0.1:11200/?key=南京市长江大桥\nhttp://127.0.0.1:11200/?key=长春市长春药店\n"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/test/testdata/review.100",
    "chars": 5226,
    "preview": "标&#12288;&#12288;签:保湿还不错比商场便宜补水效果好乳液很好用是正品心&#12288;&#12288;得:感觉还蛮好吸收的,不错啦\n标&#12288;&#12288;签:还可以心&#12288;&#12288;得:不错~~~"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/test/testdata/review.100.res",
    "chars": 28296,
    "preview": "标&#12288;&#12288;签:保湿还不错比商场便宜补水效果好乳液很好用是正品心&#12288;&#12288;得:感觉还蛮好吸收的,不错啦\n[\"标\", \"&\", \"#\", \"1\", \"2\", \"2\", \"8\", \"8\", \";\", "
  },
  {
    "path": "deps/simhash/submodules/cppjieba/test/testdata/server.conf",
    "chars": 279,
    "preview": "# config \n\n#socket listen port\nport=11200\n\nthread_number=4\nqueue_max_size=4096\n\n#dict path\ndict_path=../dict/jieba.dict."
  },
  {
    "path": "deps/simhash/submodules/cppjieba/test/testdata/testlines.gbk",
    "chars": 43,
    "preview": "廪ѧ\n׺д\n\nС˶ʿҵйѧԺձѧ\nԱʵѧѧ091111xx\n￴ʲô\nϾг\nһȺ\n´Ů\n"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/test/testdata/testlines.utf8",
    "chars": 101,
    "preview": "我来到北京清华大学\n他来到了网易杭研大厦\n小明硕士毕业于中国科学院计算所,后在日本京都大学深造\n我来到南京市长江大桥\n人事处女干事\n去医院做B超,编号123\n令狐冲是云计算行业的专家\nIBM,3.14\n"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/test/testdata/userdict.2.utf8",
    "chars": 8,
    "preview": "千树万树梨花开\n"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/test/testdata/userdict.english",
    "chars": 12,
    "preview": "in\ninternal\n"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/test/testdata/userdict.utf8",
    "chars": 45,
    "preview": "云计算\n韩玉鉴赏\nA\nB\niPhone6\n蓝翔 nz\n忽如一夜春风来\n区块链 10 nz\n"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/test/testdata/weicheng.utf8",
    "chars": 246630,
    "preview": "              钱钟书《围城》\n  \r\n序在这本书里,我想写现代中国某一部分社会、某一类人物。写这类人,我没忘记他们是人类,只是人类,具有无毛两足动物的基本根性。角色当然是虚构的,但是有考据癖的人也当然不肯错过索隐的杨会、放弃附"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/test/unittest/CMakeLists.txt",
    "chars": 734,
    "preview": "if (MSVC)\n\tset(CMAKE_MSVC_RUNTIME_LIBRARY \"MultiThreadedDebugDLL\")\n\tset(gtest_force_shared_crt ON CACHE BOOL \"\" FORCE)\ne"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/test/unittest/gtest_main.cpp",
    "chars": 1772,
    "preview": "// Copyright 2006, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "deps/simhash/submodules/cppjieba/test/unittest/jieba_test.cpp",
    "chars": 6899,
    "preview": "#include \"cppjieba/Jieba.hpp\"\n#include \"gtest/gtest.h\"\n\nusing namespace cppjieba;\n\nTEST(JiebaTest, Test1) {\n  cppjieba::"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/test/unittest/keyword_extractor_test.cpp",
    "chars": 3057,
    "preview": "#include \"cppjieba/KeywordExtractor.hpp\"\n#include \"gtest/gtest.h\"\n\nusing namespace cppjieba;\n\nTEST(KeywordExtractorTest,"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/test/unittest/pos_tagger_test.cpp",
    "chars": 1649,
    "preview": "#include \"cppjieba/MixSegment.hpp\"\n#include \"gtest/gtest.h\"\n\nusing namespace cppjieba;\n\nstatic const char * const QUERY_"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/test/unittest/pre_filter_test.cpp",
    "chars": 1154,
    "preview": "#include \"gtest/gtest.h\"\n#include \"cppjieba/PreFilter.hpp\"\n#include \"limonp/StringUtil.hpp\"\n\nusing namespace cppjieba;\n\n"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/test/unittest/segments_test.cpp",
    "chars": 7277,
    "preview": "#include \"cppjieba/SegmentBase.hpp\"\n#include \"cppjieba/MixSegment.hpp\"\n#include \"cppjieba/MPSegment.hpp\"\n#include \"cppji"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/test/unittest/textrank_test.cpp",
    "chars": 3559,
    "preview": "#include \"cppjieba/TextRankExtractor.hpp\"\n#include \"gtest/gtest.h\"\n\nusing namespace cppjieba;\n\nTEST(TextRankExtractorTes"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/test/unittest/trie_test.cpp",
    "chars": 5405,
    "preview": "#include \"cppjieba/DictTrie.hpp\"\n#include \"cppjieba/MPSegment.hpp\"\n#include \"gtest/gtest.h\"\n\nusing namespace cppjieba;\n\n"
  },
  {
    "path": "deps/simhash/submodules/cppjieba/test/unittest/unicode_test.cpp",
    "chars": 1147,
    "preview": "#include \"cppjieba/Unicode.hpp\"\n#include \"limonp/StdExtension.hpp\"\n#include \"gtest/gtest.h\"\n\nusing namespace cppjieba;\nu"
  },
  {
    "path": "deps/simhash/test/CMakeLists.txt",
    "chars": 123,
    "preview": "SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/test)\n\nADD_EXECUTABLE(load_test load_test.cpp)\nADD_SUBDIRECTORY(unittes"
  },
  {
    "path": "deps/simhash/test/load_test.cpp",
    "chars": 900,
    "preview": "#include <iostream>\n#include <ctime>\n#include <fstream>\n#include \"simhash/Simhasher.hpp\"\n\nusing namespace simhash;\n\nvoid"
  },
  {
    "path": "deps/simhash/test/testdata/news_content",
    "chars": 2884,
    "preview": "日军侵占南京后,国民政府虽西迁重庆,但政府机关大部和军事统帅部却在武汉,武汉实际上成为当时全国军事、政治、经济的中心。1937年12月13日,国民政府军事委员会拟定保卫武汉作战计划。在徐州失守后,即调整部署,先后调集约130个师和各型飞机2"
  },
  {
    "path": "deps/simhash/test/testdata/news_content.2",
    "chars": 2884,
    "preview": "日军侵占南京后,国民政府虽西迁重庆,但政府机关大部和军事统帅部却在武汉,武汉实际上成为当时全国军事、政治、经济的中心。1937年12月13日,国民政府军事委员会拟定保卫武汉作战计划。在徐州失守后,即调整部署,先后调集约130个师和各型飞机2"
  },
  {
    "path": "deps/simhash/test/testdata/news_content.3",
    "chars": 533,
    "preview": " 中新网金华11月13日电(见习记者 胡丰盛 实习生 李婷婷)13日,浙江省金华市金东公安分局发布通报称:11月7日17时许,该区多湖街道里秧田村的一对夫妻发生争吵,女方往自己身上浇汽油,并溅到了怀里的4岁儿子多多,之后,在客厅里燃烧的煤炉"
  },
  {
    "path": "deps/simhash/test/testdata/news_content.4",
    "chars": 534,
    "preview": " 中新网金华11月13日电(见习记者 胡丰盛 实习生 李婷婷)13日,浙江省金华市金东公安分局发布通报称:11月7日17时许,该区多湖街道里秧田村的一对夫妻发生争吵,女方往自己身上浇汽油,并溅到了怀里的4岁儿子多多,之后,在客厅里燃烧的煤炉"
  },
  {
    "path": "deps/simhash/test/unittest/CMakeLists.txt",
    "chars": 532,
    "preview": "SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/test)\nSET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/test/lib)\n\n\nif (MSV"
  },
  {
    "path": "deps/simhash/test/unittest/TJenkins.cpp",
    "chars": 532,
    "preview": "#include \"simhash/jenkins.h\"\n#include \"gtest/gtest.h\"\n#include <iostream>\n#include <fstream>\n#include <string>\n\nusing na"
  },
  {
    "path": "deps/simhash/test/unittest/TSimhash.cpp",
    "chars": 3020,
    "preview": "#include \"simhash/Simhasher.hpp\"\n#include \"gtest/gtest.h\"\n\nusing namespace simhash;\n\nstatic bool loadFile2Str(const stri"
  },
  {
    "path": "deps/simhash/test/unittest/gtest_main.cpp",
    "chars": 1772,
    "preview": "// Copyright 2006, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or "
  },
  {
    "path": "deps/update.sh",
    "chars": 243,
    "preview": "#!/bin/bash\nset -x\nREPO_NAME=$1\nVERSION=$2\necho $REPO_NAME $VERSION\n\nrm -rf ./$REPO_NAME\ngit clone --recurse-submodules "
  },
  {
    "path": "go.mod",
    "chars": 45,
    "preview": "module github.com/yanyiwu/gosimhash\n\ngo 1.18\n"
  },
  {
    "path": "simhash.cc",
    "chars": 571,
    "preview": "extern \"C\" {\n#include \"simhash.h\"\n}\n\n#include \"simhash/Simhasher.hpp\"\n\nSimhasher NewSimhasher(const char* dict_path, \n  "
  },
  {
    "path": "simhash.go",
    "chars": 817,
    "preview": "package gosimhash\n\n/*\n#cgo CXXFLAGS: -I./deps/simhash/include -I./deps/simhash/submodules/cppjieba/include -I./deps/simh"
  },
  {
    "path": "simhash.h",
    "chars": 379,
    "preview": "#ifndef GOSIMHASH_SIMHASH_H\n#define GOSIMHASH_SIMHASH_H\n\n#include <stdint.h>\n\ntypedef void* Simhasher;\n\nSimhasher NewSim"
  },
  {
    "path": "simhash_test.go",
    "chars": 330,
    "preview": "package gosimhash\n\nimport (\n\t\"testing\"\n)\n\nfunc TestSimhash(t *testing.T) {\n\thasher := New()\n\tdefer hasher.Free()\n\n\tvar s"
  }
]

About this extraction

This page contains the full source code of the yanyiwu/gosimhash GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 158 files (13.6 MB), approximately 3.6M tokens, and a symbol index with 526 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!