commit | 9f8e8f50dfa6be0243511b42ff443498458c029a | [log] [tgz] |
---|---|---|
author | Jinsuk Kim <jindor.code@gmail.com> | Fri Feb 09 21:58:40 2024 |
committer | GitHub <noreply@github.com> | Fri Feb 09 21:58:40 2024 |
tree | e86f0c69a7fd71ccf5de9aeb8fe4d4d0ca2c050e | |
parent | 8a7e1cfa05bb3567d06615e5f7b54c4827a052e9 [diff] | |
parent | 7a628c05cfc1d20a23ea4b55ca719712b0995243 [diff] |
Merge pull request #27 from cloudaper/change-shebang Change shebang to sh instead of bash
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 .