#ifdef __cplusplus
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include "compact_lang_det.h"
typedef CLD2::Language Language;
typedef CLD2::uint16 uint16;
typedef CLD2::int32 int32;
#else
typedef long long size_t;
typedef int int32;
typedef unsigned short uint16;
typedef char bool;
typedef int Language;
#endif
#ifdef __cplusplus
extern "C" {
#endif
typedef struct {
const char* content_language_hint; const char* tld_hint; int encoding_hint; Language language_hint; } CLDHints;
static const int kMaxResultChunkBytes = 65535;
typedef struct {
int offset; int32 bytes; uint16 lang1; uint16 pad; } ResultChunk;
typedef void ResultChunks;
ResultChunks *CLD2_ResultChunkVector_new();
const ResultChunk *CLD2_ResultChunkVector_data(const ResultChunks *chunks);
size_t CLD2_ResultChunkVector_size(const ResultChunks *chunks);
void CLD2_ResultChunkVector_delete(ResultChunks *chunks);
const char* CLD2_LanguageName(Language lang);
const char* CLD2_LanguageCode(Language lang);
const char* CLD2_LanguageDeclaredName(Language lang);
Language CLD2_GetLanguageFromName(const char* src);
Language CLD2_DetectLanguage(
const char* buffer,
int buffer_length,
bool is_plain_text,
bool* is_reliable);
Language CLD2_DetectLanguageSummary(
const char* buffer,
int buffer_length,
bool is_plain_text,
Language* language3,
int* percent3,
int* text_bytes,
bool* is_reliable);
Language CLD2_DetectLanguageSummary2(
const char* buffer,
int buffer_length,
bool is_plain_text,
const char* tld_hint, int encoding_hint, Language language_hint, Language* language3,
int* percent3,
int* text_bytes,
bool* is_reliable);
Language CLD2_ExtDetectLanguageSummary(
const char* buffer,
int buffer_length,
bool is_plain_text,
Language* language3,
int* percent3,
int* text_bytes,
bool* is_reliable);
Language CLD2_ExtDetectLanguageSummary2(
const char* buffer,
int buffer_length,
bool is_plain_text,
const char* tld_hint, int encoding_hint, Language language_hint, Language* language3,
int* percent3,
int* text_bytes,
bool* is_reliable);
Language CLD2_ExtDetectLanguageSummary3(
const char* buffer,
int buffer_length,
bool is_plain_text,
const char* tld_hint, int encoding_hint, Language language_hint, Language* language3,
int* percent3,
double* normalized_score3,
int* text_bytes,
bool* is_reliable);
Language CLD2_ExtDetectLanguageSummary4(
const char* buffer,
int buffer_length,
bool is_plain_text,
const CLDHints* cld_hints,
int flags,
Language* language3,
int* percent3,
double* normalized_score3,
ResultChunks *resultchunkvector,
int* text_bytes,
bool* is_reliable);
const char* CLD2_DetectLanguageVersion();
static const int kCLDFlagScoreAsQuads = 0x0100; static const int kCLDFlagHtml = 0x0200; static const int kCLDFlagCr = 0x0400; static const int kCLDFlagVerbose = 0x0800; static const int kCLDFlagQuiet = 0x1000; static const int kCLDFlagEcho = 0x2000;
#ifdef __cplusplus
};
#endif