<commit_before>/*
 * This file is part of libdom.
 * Licensed under the MIT License,
 *                http://www.opensource.org/licenses/mit-license.php
 * Copyright 2007 <NAME> <<EMAIL>>
 */

#ifndef dom_hubbub_parser_h_
#define dom_hubbub_parser_h_

#include <stddef.h>
#include <inttypes.h>

#include <dom/dom.h>

#include "errors.h"

typedef struct dom_hubbub_parser dom_hubbub_parser;

/* The encoding source of the document */
typedef enum dom_hubbub_encoding_source { 
	DOM_HUBBUB_ENCODING_SOURCE_HEADER, 
	DOM_HUBBUB_ENCODING_SOURCE_DETECTED,
	DOM_HUBBUB_ENCODING_SOURCE_META 
} dom_hubbub_encoding_source;

/* The recommended way to use the parser is:
 * <commit_msg>Expose hubbub error definitions<commit_after>/*
 * This file is part of libdom.
 * Licensed under the MIT License,
 *                http://www.opensource.org/licenses/mit-license.php
 * Copyright 2007 <NAME> <<EMAIL>>
 */

#ifndef dom_hubbub_parser_h_
#define dom_hubbub_parser_h_

#include <stddef.h>
#include <inttypes.h>

#include <hubbub/errors.h>

#include <dom/dom.h>

#include "errors.h"

typedef struct dom_hubbub_parser dom_hubbub_parser;

/* The encoding source of the document */
typedef enum dom_hubbub_encoding_source { 
	DOM_HUBBUB_ENCODING_SOURCE_HEADER, 
	DOM_HUBBUB_ENCODING_SOURCE_DETECTED,
	DOM_HUBBUB_ENCODING_SOURCE_META 
} dom_hubbub_encoding_source;

/* The recommended way to use the parser is:
 * 
{'fraction_non_alphanumeric': 0.09071428571428572, 'fraction_numerical': 0.005714285714285714, 'mean_word_length': 4.718367346938775, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2192589', 'n_tokens_mistral': 545, 'n_tokens_neox': 508, 'n_words': 113}