<commit_before>/**
 * Base mw.TextSource object
 *
 * @param {Object} source Source object to extend
 * @param {Object} textProvider [Optional] The text provider interface ( to load source from api )
 */
( function( mw, $ ) { "use strict";

	mw.TextSource = function( source ) {
		return this.init( source );
	};
	mw.TextSource.prototype = {
		/**
		 * @constructor Inherits mediaSource from embedPlayer
		 * @param {source} Base source element
		 * @param {Object} Pointer to the textProvider
		 */
		init: function( source , textProvider) {

			//The load state:
			this.loaded: false,

			// Container for the captions
			// captions include "start", "end" and "content" fields
			this.captions: [],

			// The previous index of the timed text served
			// Avoids searching the entire array on time updates.
			this.prevIndex: 0,

			// The css style for captions ( some file formats specify display types )
			this.styleCss = {};

			//	Inherits mediaSource
			for( var i in source){
				this[ i ] =  source[ i ];
			}

			// Set default category to subtitle if unset:
			if( ! this.kind ) {
				this.kind = 'subtitle';
			}
			// Set the textProvider if provided
			if( textProvider ) {
				this.textProvider = textProvider;
			}
			return this;
		},

		/**
		 * Function to load and parse the source text
		 * @param {Function} callback Function called once text source is loaded
		 */
		load: function( callback ) {<commit_msg>Fixed syntax error: use = not : for var assignment outside of json prototype<commit_after>/**
 * Base mw.TextSource object
 *
 * @param {Object} source Source object to extend
 * @param {Object} textProvider [Optional] The text provider interface ( to load source from api )
 */
( function( mw, $ ) { "use strict";

	mw.TextSource = function( source ) {
		return this.init( source );
	};
	mw.TextSource.prototype = {
		/**
		 * @constructor Inherits mediaSource from embedPlayer
		 * @param {source} Base source element
		 * @param {Object} Pointer to the textProvider
		 */
		init: function( source , textProvider) {

			//The load state:
			this.loaded = false;

			// Container for the captions
			// captions include "start", "end" and "content" fields
			this.captions = [];

			// The previous index of the timed text served
			// Avoids searching the entire array on time updates.
			this.prevIndex = 0;

			// The css style for captions ( some file formats specify display types )
			this.styleCss = {};

			//	Inherits mediaSource
			for( var i in source){
				this[ i ] =  source[ i ];
			}

			// Set default category to subtitle if unset:
			if( ! this.kind ) {
				this.kind = 'subtitle';
			}
			// Set the textProvider if provided
			if( textProvider ) {
				this.textProvider = textProvider;
			}
			return this;
		},

		/**
		 * Function to load and parse the source text
		 * @param {Function} callback Function called once text source is loaded
		 */
		load: function( callback ) {
{'fraction_non_alphanumeric': 0.1087252897068848, 'fraction_numerical': 0.0006816632583503749, 'mean_word_length': 2.85676741130092, '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': '6192206', 'n_tokens_mistral': 995, 'n_tokens_neox': 832, 'n_words': 323}