<commit_before>define([
	"./main",
	"./item/lookup",
	"./item/get_resolved",
	"./util/json/merge"
], function( Cldr, itemLookup, itemGetResolved, jsonMerge ) {

	var getSuper;

	Cldr._raw = {};

	// Load resolved or unresolved cldr data
	// @json [JSON]
	//
	// Overwrite Cldr.load().
	Cldr.load = function( json ) {
		if ( typeof json !== "object" ) {
			throw new Error( "invalid json" );
		}
		Cldr._raw = jsonMerge( Cldr._raw, json );
	};

	// Overload Cldr.prototype.get().
	getSuper = Cldr.prototype.get;
	Cldr.prototype.get = function( path ) {
		// Simplify locale using languageId (there are no other resource bundles)
		// 1: during init(), get is called, but languageId is not defined. Use "" as a workaround in this very specific scenario.
		var locale = this.attributes && this.attributes.languageId || "" /* 1 */;

		return getSuper.apply( this, arguments ) ||
			itemLookup( Cldr, locale, path, this.attributes );
	};

	return Cldr;

});
<commit_msg>Make comments more clear<commit_after>define([
	"./main",
	"./item/lookup",
	"./item/get_resolved",
	"./util/json/merge"
], function( Cldr, itemLookup, itemGetResolved, jsonMerge ) {

	var getSuper;

	Cldr._raw = {};

	// Load resolved or unresolved cldr data
	// @json [JSON]
	//
	// Overwrite Cldr.load().
	Cldr.load = function( json ) {
		if ( typeof json !== "object" ) {
			throw new Error( "invalid json" );
		}
		Cldr._raw = jsonMerge( Cldr._raw, json );
	};

	// Overload Cldr.prototype.get().
	getSuper = Cldr.prototype.get;
	Cldr.prototype.get = function( path ) {
		// 1: use languageId as locale on item lookup for simplification purposes, because no other extended subtag is used anyway on bundle parent lookup.
		// 2: during init(), this method is called, but languageId is yet not defined. Use "" as a workaround in this very specific scenario.
		return getSuper.apply( this, arguments ) ||
			itemLookup( Cldr, this.attributes && this.attributes.languageId /* 1 */ || "" /* 2 */, path, this.attributes );
	};

	return Cldr;

});

{'fraction_non_alphanumeric': 0.1516658378915962, 'fraction_numerical': 0.0029835902536051715, 'mean_word_length': 3.3175965665236054, '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': '2812946', 'n_tokens_mistral': 712, 'n_tokens_neox': 667, 'n_words': 200}