commit | 9357fb59393af6c625bbd323415979117040374b | [log] [tgz] |
---|---|---|
author | JinsukKim <jindor.code@gmail.com> | Thu Jan 31 06:39:04 2019 |
committer | GitHub <noreply@github.com> | Thu Jan 31 06:39:04 2019 |
tree | a066f3698014123e265818e225354a4368a1760c | |
parent | a1831e11efe58989de561ea9a17eb121765f503a [diff] | |
parent | 3e65e9dc136bac03e60457fdb213f13cf169905f [diff] |
Merge pull request #12 from sonicdoe/clang Fix compiling on macOS
Compact Encoding Detection(CED for short) is a library written in C++ that scans given raw bytes and detect the most likely text encoding.
Basic usage:
#include "compact_enc_det/compact_enc_det.h" const char* text = "Input text"; bool is_reliable; int bytes_consumed; Encoding encoding = CompactEncDet::DetectEncoding( text, strlen(text), nullptr, nullptr, nullptr, UNKNOWN_ENCODING, UNKNOWN_LANGUAGE, CompactEncDet::WEB_CORPUS, false, &bytes_consumed, &is_reliable);
You need CMake to build the package. After unzipping the source code , run autogen.sh
to build everything automatically. The script also downloads Google Test framework needed to build the unittest.
$ cd compact_enc_det $ ./autogen.sh ... $ bin/ced_unittest
On Windows, run cmake .
to download the test framework, and generate project files for Visual Studio.
D:\packages\compact_enc_det> cmake .