commit | d613c435db51453481255f86c90ff905265fd948 | [log] [tgz] |
---|---|---|
author | JinsukKim <jindor.code@gmail.com> | Thu Dec 02 13:07:17 2021 +0900 |
committer | GitHub <noreply@github.com> | Thu Dec 02 13:07:17 2021 +0900 |
tree | eb5a36587ca7d362f7c44e83c0c393e219cd7d15 | |
parent | 37529e628fbac2e4c0d4d8520be9db789f316c9e [diff] | |
parent | e464810cd273c171d6253b6553d8b93274fadc04 [diff] |
Merge pull request #18 from OznOg/fix_includes set proper include directory for target ced
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 .