<commit_before>//Welcome to the annotated source code of the interpreter for [𝔼𝕊𝕄𝕚𝕟 2](https://github.com/molarmanful/ESMin), a wonderful JavaScript ES6 golfing language created by [@molarmanful](https://github.com/molarmanful)!
//This will serve as documentation for those who want to learn the language.
// 
//---
// 
//Let's get started!
//---

//put the numbers.js library in the math object
math.import(numbers,{wrap:true,silent:true});

//- improved replace function
String.prototype.ireplace=function(x,y=''){return this.replace(x,y)};
//- recursive replace
String.prototype.rreplace=function(r,o='',t){t=this.replace(r,o);return t!=this?t.rreplace(r,o):t};
//- global replace
String.prototype.greplace=function(x,y='',f=''){return this.replace(RegExp(x,'g'+f),y)};
//- string reverse
String.prototype.reverse=function(){return[...this].reverse().join``};
//- matrix split
String.prototype.msplit=function(r='\n',c=''){return this.split(r).map(x=>x.split(c))};
//- matrix join
Array.prototype.mjoin=function(r='\n',c=''){return this.map(x=>x.join(r)).join(c)};
//- transliterate (dictionary replace)
String.prototype.treplace=function(x,y,z={}){[...x].map((a,b)=>z[a]=y[b]);return this.replace(/./g,x=>z[x]===[]._?x:z[x])};<commit_msg>improved transliteration<commit_after>//Welcome to the annotated source code of the interpreter for [𝔼𝕊𝕄𝕚𝕟 2](https://github.com/molarmanful/ESMin), a wonderful JavaScript ES6 golfing language created by [@molarmanful](https://github.com/molarmanful)!
//This will serve as documentation for those who want to learn the language.
// 
//---
// 
//Let's get started!
//---

//put the numbers.js library in the math object
math.import(numbers,{wrap:true,silent:true});

//- improved replace function
String.prototype.ireplace=function(x,y=''){return this.replace(x,y)};
//- recursive replace
String.prototype.rreplace=function(r,o='',t){t=this.replace(r,o);return t!=this?t.rreplace(r,o):t};
//- global replace
String.prototype.greplace=function(x,y='',f=''){return this.replace(RegExp(x,'g'+f),y)};
//- string reverse
String.prototype.reverse=function(){return[...this].reverse().join``};
//- matrix split
String.prototype.msplit=function(r='\n',c=''){return this.split(r).map(x=>x.split(c))};
//- matrix join
Array.prototype.mjoin=function(r='\n',c=''){return this.map(x=>x.join(r)).join(c)};
//- transliterate (dictionary replace)
String.prototype.treplace=function(x,y=x.reverse(),a=Math.max(x.length,y.length),b=Math.min(x.length,y.length),i=0,t=this){for(;i<a;i++)t=t.replace(RegExp(x[i],"g"),y[i%b]);return t};
{'fraction_non_alphanumeric': 0.21956947162426615, 'fraction_numerical': 0.0019569471624266144, 'mean_word_length': 5.926829268292683, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 9, 'https://': 4, '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': '1495504', 'n_tokens_mistral': 954, 'n_tokens_neox': 927, 'n_words': 150}