<commit_before>process.mixin(require('html5/constants'));

PHASES = {
	initial: require('html5/parser/initial_phase'), 
	beforeHTML: require('html5/parser/before_html_phase'),
	beforeHead: require('html5/parser/before_head_phase'), 
	inHead: require('html5/parser/in_head_phase'),
	afterHead: require('html5/parser/after_head_phase'),
	inBody: require('html5/parser/in_body_phase'),
	inTable: require('html5/parser/in_table_phase'),
	inCaption: require('html5/parser/in_caption_phase'),
	inColumnGroup: require('html5/parser/in_column_group_phase'),
	inTableBody: require('html5/parser/in_table_body_phase'),
	inRow: require('html5/parser/in_row_phase'),
	inCell: require('html5/parser/in_cell_phase'),
	inSelect: require('html5/parser/in_select_phase'),
	inSelectInTable: require('html5/parser/in_select_in_table_phase'),
	afterBody: require('html5/parser/after_body_phase'),
	inFrameset: require('html5/parser/in_frameset_phase'),
	afterFrameset: require('html5/parser/after_frameset_phase'),
	afterAfterBody: require('html5/parser/after_after_body_phase'),
	afterAfterFrameset: require('html5/parser/after_after_frameset_phase'),
	inForeignContent: require('html5/parser/in_foreign_content_phase')
};

TAGMODES = {
	select: PHASES.inSelect,
	td: PHASES.inCell,
	th: PHASES.inCell,
	tr: PHASES.inRow,
	tbody: PHASES.inTableBody,
	thead: PHASES.inTableBody,
	tfoot: PHASES.inTableBody,
	caption: PHASES.inCaption,
	colgroup: PHASES.inColumnGroup,
	table: PHASES.inTable,
	head: PHASES.inBody,
	body: PHASES.inBody,
	frameset: PHASES.inFrameset
};

exports.HTML5Parser = HTML5Parser = function(options) {
	this.strict = false;
	this.errors = [];
	this.tokenizer = require('html5/tokenizer').HTMLTokenizer;
	this.tree = 'FIXME: TreeBuilder';
	
	for(o in options) {<commit_msg>- use .Phase object from each module<commit_after>process.mixin(require('html5/constants'));

PHASES = {
	initial: require('html5/parser/initial_phase').Phase, 
	beforeHTML: require('html5/parser/before_html_phase').Phase,
	beforeHead: require('html5/parser/before_head_phase'), 
	inHead: require('html5/parser/in_head_phase').Phase,
	afterHead: require('html5/parser/after_head_phase').Phase,
	inBody: require('html5/parser/in_body_phase').Phase,
	inTable: require('html5/parser/in_table_phase').Phase,
	inCaption: require('html5/parser/in_caption_phase').Phase,
	inColumnGroup: require('html5/parser/in_column_group_phase').Phase,
	inTableBody: require('html5/parser/in_table_body_phase').Phase,
	inRow: require('html5/parser/in_row_phase').Phase,
	inCell: require('html5/parser/in_cell_phase').Phase,
	inSelect: require('html5/parser/in_select_phase').Phase,
	inSelectInTable: require('html5/parser/in_select_in_table_phase').Phase,
	afterBody: require('html5/parser/after_body_phase').Phase,
	inFrameset: require('html5/parser/in_frameset_phase').PhasePhase,
	afterFrameset: require('html5/parser/after_frameset_phase').Phase,
	afterAfterBody: require('html5/parser/after_after_body_phase').Phase,
	afterAfterFrameset: require('html5/parser/after_after_frameset_phase').Phase,
	inForeignContent: require('html5/parser/in_foreign_content_phase').Phase
};

TAGMODES = {
	select: PHASES.inSelect,
	td: PHASES.inCell,
	th: PHASES.inCell,
	tr: PHASES.inRow,
	tbody: PHASES.inTableBody,
	thead: PHASES.inTableBody,
	tfoot: PHASES.inTableBody,
	caption: PHASES.inCaption,
	colgroup: PHASES.inColumnGroup,
	table: PHASES.inTable,
	head: PHASES.inBody,
	body: PHASES.inBody,
	frameset: PHASES.inFrameset
};

exports.HTML5Parser = HTML5Parser = function(options) {
	this.strict = false;
	this.errors = [];
	this.tokenizer = require('html5/tokenizer').HTMLTokenizer;
	this.tree = 'FIXME: TreeBuilder';
	
	for(o in options) {
{'fraction_non_alphanumeric': 0.1405742145178765, 'fraction_numerical': 0.013001083423618635, 'mean_word_length': 7.470183486238532, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '6908849', 'n_tokens_mistral': 1360, 'n_tokens_neox': 1340, 'n_words': 172}