commit | 96e566d20615c4fc9457cb62c503b3a6be16515c | [log] [tgz] |
---|---|---|
author | JinsukKim <jindor.code@gmail.com> | Thu Dec 02 04:07:34 2021 |
committer | GitHub <noreply@github.com> | Thu Dec 02 04:07:34 2021 |
tree | 974e1d2a6fc1f59cbbfc5a3d31abefc4f68c5a48 | |
parent | d613c435db51453481255f86c90ff905265fd948 [diff] | |
parent | ec1d3d36f9427052d333c927a676159df28a154d [diff] |
Merge pull request #19 from Koellewe/patch-1 Updated autogen.sh with new googletest references
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 .