ze-filter  (ze-filter-0.8.0-develop-180218)
ze-entropy.c File Reference
#include <ze-sys.h>
#include "ze-filter.h"

Go to the source code of this file.

Classes

struct  hash_rec_T
 
struct  DATA_T
 
struct  HTTP_T
 

Macros

#define ONLY_LOWER   1
 
#define SZH0   256
 
#define SZH1   4096
 
#define SZH2   16384
 
#define SZH3   16384
 
#define URL_DOMAIN_EXPRESSION   "http[s]?://[^ /<>\\(\\)\"\'?]*"
 
#define SZBUF   0x20000
 

Functions

void text2lowerascii (char *buf, size_t size)
 
double entropy_monogram (char *buf, size_t sz)
 
bool text_buffer_entropy (char *buf, size_t sz, double *e0, double *e1, double *e2)
 
double entropy_token_class (char *buf, size_t sz)
 
double entropy_punct_class (char *buf, size_t sz)
 
bool message_entropy (char *id, char *fname)
 
bool message_extract_http_urls (char *id, char *fname)
 

Macro Definition Documentation

◆ ONLY_LOWER

#define ONLY_LOWER   1

Definition at line 104 of file ze-entropy.c.

◆ SZBUF

#define SZBUF   0x20000

Definition at line 692 of file ze-entropy.c.

◆ SZH0

#define SZH0   256

Definition at line 199 of file ze-entropy.c.

◆ SZH1

#define SZH1   4096

Definition at line 200 of file ze-entropy.c.

◆ SZH2

#define SZH2   16384

Definition at line 201 of file ze-entropy.c.

◆ SZH3

#define SZH3   16384

Definition at line 202 of file ze-entropy.c.

◆ URL_DOMAIN_EXPRESSION

#define URL_DOMAIN_EXPRESSION   "http[s]?://[^ /<>\\(\\)\"\'?]*"

Definition at line 614 of file ze-entropy.c.

Function Documentation

◆ entropy_monogram()

double entropy_monogram ( char *  buf,
size_t  sz 
)

Definition at line 107 of file ze-entropy.c.

◆ entropy_punct_class()

double entropy_punct_class ( char *  buf,
size_t  sz 
)

Definition at line 389 of file ze-entropy.c.

◆ entropy_token_class()

double entropy_token_class ( char *  buf,
size_t  sz 
)

Definition at line 325 of file ze-entropy.c.

◆ message_entropy()

bool message_entropy ( char *  id,
char *  fname 
)

Definition at line 587 of file ze-entropy.c.

◆ message_extract_http_urls()

bool message_extract_http_urls ( char *  id,
char *  fname 
)

Definition at line 695 of file ze-entropy.c.

◆ text2lowerascii()

void text2lowerascii ( char *  buf,
size_t  size 
)

Definition at line 84 of file ze-entropy.c.

◆ text_buffer_entropy()

bool text_buffer_entropy ( char *  buf,
size_t  sz,
double *  e0,
double *  e1,
double *  e2 
)

Definition at line 210 of file ze-entropy.c.