<commit_before>exports.getMetaTable = function(){

	var parsedLines = require('fs').readFileSync('mt_source.csv').toString().split("\n")

	//TODO: trim all values
	var metaTable = {
		hebrewColumns: 			parsedLines.shift().split(",").slice(2,parsedLines[0].length),
		//TODO: make english words lower case and underscore instead of spaces + trim
		englishColumns: 		parsedLines.shift().split(",").slice(2,parsedLines[0].length),
		dataTypes: 				parsedLines.shift().split(",").slice(2,parsedLines[0].length),
		measures: 				parsedLines.shift().split(",").slice(2,parsedLines[0].length),
		instrumentTypes: 		parsedLines.map(function(l){return l.split(",")[0]}),
		instrumentSubTypes : 	parsedLines.map(function(l){return l.split(",")[1]}),
		dataMapping: 			parsedLines.map(function(l){ return l.split(",").slice(2,l.split(",").length) }),
		columnMappingForRow: 	function(rowId){
			var output = [];
			for (var i = 0; i < this.dataMapping[rowId].length ; i++ ){
				var rowValue = parseInt(this.dataMapping[rowId][i]);
				if (rowValue){
					output[rowValue -1] = this.hebrewColumns[i];
				}
			}
			return output;
		}
	}

	return metaTable;
}<commit_msg>Metatable: DB friendly english columns names.<commit_after>exports.getMetaTable = function(){

	var parsedLines = require('fs').readFileSync('mt_source.csv').toString().split("\n")

	//TODO: trim all values
	var metaTable = {
		hebrewColumns: 			parsedLines.shift().split(",").slice(2,parsedLines[0].length),
		englishColumns: 		parsedLines.shift().split(",").slice(2,parsedLines[0].length).map(function(c) { return c.replace(/\s/g, "_").toLowerCase(); }),
		dataTypes: 				parsedLines.shift().split(",").slice(2,parsedLines[0].length),
		measures: 				parsedLines.shift().split(",").slice(2,parsedLines[0].length),
		instrumentTypes: 		parsedLines.map(function(l){return l.split(",")[0]}),
		instrumentSubTypes : 	parsedLines.map(function(l){return l.split(",")[1]}),
		dataMapping: 			parsedLines.map(function(l){ return l.split(",").slice(2,l.split(",").length) }),
		columnMappingForRow: 	function(rowId){
			var output = [];
			for (var i = 0; i < this.dataMapping[rowId].length ; i++ ){
				var rowValue = parseInt(this.dataMapping[rowId][i]);
				if (rowValue){
					output[rowValue -1] = this.hebrewColumns[i];
				}
			}
			return output;
		}
	}

	return metaTable;
}

{'fraction_non_alphanumeric': 0.1934931506849315, 'fraction_numerical': 0.01113013698630137, 'mean_word_length': 4.813432835820896, 'pattern_counts': {'":': 0, '<': 5, '<?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': '1913123', 'n_tokens_mistral': 875, 'n_tokens_neox': 825, 'n_words': 124}