Usuario:Ignacio Rodríguez/NinoTools.js
(Redirigido desde «Usuario:Ninovolador/NinoTools.js»)
Nota: Después de publicar, quizás necesite actualizar la caché de su navegador para ver los cambios.
- Firefox/Safari: Mantenga presionada la tecla Shift mientras pulsa el botón Actualizar, o presiona Ctrl+F5 o Ctrl+R (⌘+R en Mac)
- Google Chrome: presione Ctrl+Shift+R (⌘+Shift+R en Mac)
- Internet Explorer/Edge: mantenga presionada Ctrl mientras pulsa Actualizar, o presione Ctrl+F5
- Opera: Presiona Ctrl+F5.
/*##############################################################################################
sector para poner letras equivocadamente sin hueviar
#################################################################################################*/
/*jshint esversion: 6
This page defines a TemplateScript librcari] foris usage.
/* global $, pathoschild */
/*
* TemplateScript adds configurable templates and scripts to the sidebar, and adds an example regex editor.
* @see https://meta.wikimedia.org/wiki/TemplateScripte
* @update-token [[File:Pathoschild/templatescript.js]]
*/
// <nowiki>re
$.ajax('//tools-static.wmflabs.org/meta/scripts/pathoschild.templatescript.js', { dataType:'script', cache:true }).then(function() {
/*********
** Define libraryet
*********/
pathoschild.TemplateScript.library.define({
key: 'wikisource.ninovolador',
name: 'NinoTools',
url: '//es.wikisource.org/wiki/Wikisource:TemplateScript',
description: 'Herramientas mías de mí',
categories: [
{
name: 'NinoTools',
scripts: [
{ key: 'OCRespecial', name: 'OCR especial', script: function(editor) { ocrespecial(editor); }, forNamespaces: 'page', accessKey:'5' },
{ key: 'anclajeDLSB', name: 'Anclaje DICC LSB', script: function(editor) { diccLSB1(editor); }, forNamespaces: 'page', accessKey:'9' },
{ key: 'enlaceDLSB', name: 'Enlace DICC LSB', script: function(editor) { diccLSB2(editor); }, forNamespaces: 'page', accessKey:'8' },
{ key: 'versiculator', name: 'Versiculator', script: function(editor) { bibliaversos(editor); }, forNamespaces: 'page', accessKey:'v' },
{ key: 'bibliator', name: 'Bibliator', script: function(editor) { bibliator(editor); }, forNamespaces: 'page', accessKey:'b' },
{ key: 'abbrevs', name: 'Abbreviator', scrript: function(editor) { abbr(editor); }, forNamespaces: 'page', accessKey:'a' },
// { key: 'laminator', name: 'Laminator', script: function(editor) { laminator(editor); }, forNamespaces: 'page', accessKey:'' },
{ key: 'dittoator', name: 'Dittoinador', script: function(editor) { dittoator(editor); }, forNamespaces: 'page', accessKey:'7' },
// { key: 'fabulator', name: 'Fabulainador', script: function(editor) { fabulator(editor); }, forNamespaces: 'page', accessKey:'6' },
{ key: 'lecturator', name: 'Lecturainador', script: function(editor) { lecturator(editor); }, forNamespaces: 'page', accessKey:'6' },
// { key: 'laminatormanual', name: 'LaminatorSingle', script: function(editor) { laminatormanual(editor); }, forNamespaces: 'page', accessKey:'ñ' },
{ key: 'makeref2', name: 'Makeref2', script: function(editor) { makeReference2(editor); }, forNamespaces: 'page', accessKey:'j' },
{ key: 'tagref', name: 'Ref a tag', script: function(editor) { tagref(editor); }, forNamespaces: 'page', accessKey:'k' },
// { key: 'teatralizator', name: 'Teatralizator', script: function(editor) { teatralizator(editor); }, forNamespaces: 'page', accessKey:'ñ' },
{ key: 'pareaditoator', name: 'Pareaditos', script: function(editor) { pareaditoator(editor); }, forNamespaces: 'page', accessKey:'ñ' },
]
}
]
});
var lecturator = function(editor) {
editor.replaceSelection(function(text) {
re0 = /\#\#/; /* ## separa dos bloques distintos*/
re1 = /\|\n/; /* | y salto de línea separa los elementos de la primera columna */
re2 = /\#/; /* # separa los elementos de la segunda columna*/
array0 = text.split(re0);
TEXT2="";
for (var j = 0; j < array0.length; j++){
array1 = array0[j].split(re1);
array2 = array0[j].split(re2);
for (var i = 0; (i==0||i<array1.length-1); i++) {
TEXT2=TEXT2+"\n"+array1[i]+(array2.length>1? "|"+array2[i+1]:"").trim();
}
}
return TEXT2.slice(1);
});
};
var fabulator = function(editor){
$('#wpHeaderTextbox').val(function(i, val) {
return '';
});
editor.replace(/F[ÁA]BULA (\w+)\s*\n+([A-ZÁÉÍÓÚ Ñ]+)\s*/g, '{{sust:Crop|1.5}}\n\n{{t3|FÁBULA $1|grande|serif}}\n\n{{línea|5em|e=2em}}\n\n{{c|$2|lh=2em}}\n\n{{bloque centro/c}}<poem>:');
};
var abbr = function(editor) {
editor.replaceSelection(function(text) {
return '{{a|'+text+'}}';
});
};
var arreglator = function(editor) {
editor.replaceSelection(function(text) {
text = text.replace(/({{pareado\|.*?)\n(.*?)}}\n+{{pareado\|(.*?)\n(.*?}})/, "$1$3\|\n$2$4");
return text;
});
};
var dittoator = function(editor) {
editor.replaceSelection(function(text) {
var t = text.split(" ");
var i;
for (i = 0; i < t.length; i++) {
t[i]= '{{ditto|'+t[i]+'}}';
}
return t.join(' ');
});
};
var makeReference2 = function(editor) {
var editbox = $('#wpTextbox1').get(0);
editbox.focus();
var refStart = editbox.selectionStart;
var refEnd = editbox.selectionEnd;
var firstref = editbox.value.indexOf('<ref group=n></ref>');
if (firstref != -1) {
editbox.value = editbox.value.slice(0,firstref+13)
+ editbox.value.slice(refStart, refEnd)
+ editbox.value.slice(firstref+13, refStart)
+ editbox.value.slice(refEnd);
}
addPageFooter(editor);
};
var pareaditoator = function(editor) {
editor.replaceSelection(function(text) {
text = text.replace(/(?<!\S *\n)^(['\w])/gm,"{{pareado|$1");
text = text.replace(/(\S *)$(\n\n|(?!\s+^))/gm,"$1}}$2");
text = text.replace(/ /gm,"|");
text = text.replace(/_/gm," ");
text = text.replace(/\|}}/gm,"}}");
return text;
});
};
var tagref = function(editor) {
editor.replaceSelection(function(text) {
// Para edición del diccionario de LSB solamente
var re = /<ref ?((?:name ?= ?"?\w+"?)?) ?((?:group ?= ?"?\w+"?)?) ?((?:follow ?= ?"?\w+"?)?) ?>([\s\S]+)<\/ref>/;
var ar = re.exec(text);
return '{{#tag:ref|'+ar[4]+(ar[1]&&'|'+ar[1])+(ar[2]&&'|'+ar[2])+(ar[3]&&'|'+ar[3])+'}}';
});
};
var diccLSB1 = function(editor) {
editor.replaceSelection(function(text) {
// Para edición del diccionario de LSB solamente
text = text[0].toUpperCase() + text.slice(1).toLowerCase();
return '{{ELSB|' + text + '}}';
});
};
var diccLSB2 = function(editor) {
editor.replaceSelection(function(text) {
// Para edición de las páginas de LSB
return '{{Dicc LSB|'+text[0]+'|' + text + '}}';
});
};
var bibliaversos = function(editor){
var cap = prompt("Capítulo:");
editor.replace(/^(\d+)/gm, '{{vers|'+cap+'|$1}}')
.replace(/^— *?(\d+)/gm, '— {{vers|'+cap+'|$1}}')
.replace(/^CAP[ÌIÍ]TULO (\w+)\.?\s*?\n([^\n]+)/gm, '{{c|CAPÍTULO $1.|grande}}\n{{sc|\'\'$2\'\'|menor}}');
};
var bibliator = function(editor) {
editor.replaceSelection(function(text) {
var re = /([\w\s\.]+?)\.?\s*?(\w+)\.\s*?v?\.\s*(\d+)/;
var ar = re.exec(text);
return '{{biblia|'+ar[1]+'|'+ar[2]+':'+ar[3]+'|\'\''+ar[1]+'. '+ar[2]+'. v\'\'.'+ar[3]+'}}';
});
};
var laminator = function(editor) {
editor.replace(/Lámina (\d+) \'*?([abcedfg])\)\'*?/g, "{{anclaje|lam$1$2}}{{hay imagen}}Lámina $1 ''$2)''")
.replace(/(\d{2,3}) y (\d{2,3})/g,'[[#lam$1|$1]] y [[#lam$2|$2]]')
.replace(/(\d{2,3}),/g,'[[#lam$1|$1]],')
.replace(/(\d{2,3}) \'*?([abcdefg])\'*?, \'*?([abcdefg])\'*? y \'*?([abcdefg])\'*?/g,"[[#lam$1$2|$1 ''$2'']], [[#lam$1$3|''$3'']] y [[#lam$1$4|''$4'']]")
.replace(/(\d{2,3}) \'*?([abcdefg])\'*? y \'*?([abcdefg])\'*?/g,"[[#lam$1$2|$1 ''$2'']] y [[#lam$1$3|''$3'']]")
.replace(/(\d{2,3}) ([abcdefg])/g,"[[#lam$1$2|$1 ''$2'']]")
.replace(/(\[\[(?:[Aa]rchivo|[Ff]ile):Grierson (\d+[abcdef]?))/g,'{{anclaje|lam$2}}$1');
};
var laminatormanual = function(editor){
editor.replaceSelection(function(text){
return '[[#lam'+text+'|'+text+']]';
});
};
var teatralizator = function(editor){
editor.replace(/^([A-ZÁÉÍÓÚÑ ]{4,}\.) (\([^\n]+\))/gm, function(match, p1, p2) {
return '{{c|{{may|'+p1[0]+p1.slice(1).toLowerCase()+"}} "+p2+"|lh=3em}}"})
.replace(/^([A-ZÁÉÍÓÚÑ ]{4,}\.?)/gm, function(match, p1) {
return '{{c|'+p1[0]+p1.slice(1).toLowerCase()+"|may|lh=3em}}"})
.replace(/(\([^\n)]+\))/g, "''$1''");
};
var ocrespecial = function(editor) {
editor.replace(/#FEM#/g,'♀')
.replace(/#MAS#/g,'♂')
.replace(/#1\/2#/g,'½')
.replace(/#3\/4#/g,'¾')
.replace(/#1\/4#/g,'¼')
.replace(/<</g,'«')
.replace(/>>/g,'»')
.replace(/#so/g,'§')
.replace(/#--/g,'—')
.replace(/#[nņ]/g,'ņ')
.replace(/#N/g,'Ņ');
if (mw.config.get('wgTitle').match(/Anales de la Sociedad/)) {
editor
.replace(/{{may\|([^}\]]+)}}/g, '{{may|[[Autor:$1|$1]]}}');
}
if (mw.config.get('wgTitle').match(/Diccionario eti/)) {
editor
// .replace(/\s*(?:\$|§)\s*(\d+)/g, "\n\n§ '''$1'''")
// .replace(/\s+(\[?\d\d\d\d\.) ([A-ZÑŅÁÉÍÓÚÜ\]\[]+[\.\]\?]+)\s+/g, "\n\n;$1 $2\n:")
/* .replace(/\s+(\d\d+)[\., ]+([A-ZÑŅÁÉÍÓÚÜ ]{3,})([ ,\.])/mg, "\n\n:$1. '''$2'''$3") */
.replace(/[«»]/g,'"')
.replace(/ȧ|å|ă|ả/g, 'á')
.replace(/ė|ẻ/g, 'é')
.replace(/ɔ/g, "o")
.replace(/ů|ŭ|ủ/g, "ú")
.replace(/ł/g, "l")
.replace(/ň|š/g, "ñ")
.replace(/Ň|Š/g, "Ñ")
.replace(/(?:ın|nı)/g,'m')
.replace(/^:((?!Véase)(?:[IV]+)*\.*[*]*\s*)([a-záéíóúüñ]+(?:, a\b)*)/gm, ":$1'''$2'''")
.replace(/^(:[A-Z]+:\s*)(\s*[IV]*\.*\s*)([a-záéíóúüñ]+(?:, a\b)*)/gm, "$1$2'''$3'''")
.replace(/:(\s*[IV]*\.*\s*)\*\s*/g,':$1{{*}} ')
.replace(/({{\*}}\s*)([a-záéíóúüñ]+(?:, a\b)*)/gm, "$1'''$2'''")
.replace(/'''p[áa]pa''' ([a-záéíóúüñ]+)/g, "'''pápa $1'''")
.replace(/'''hac[eé]r''' ([a-záéíóúüñ]+)/g, "'''hacér $1'''")
.replace(/ S[eo]lanum tuberosum/g, " ''Solanum tuberosum''")
.replace(/\(S[eo]lanum tuberosum/g, "(''Solanum tuberosum''")
.replace(/\s+VARIANTES\:*/g, '\n:VARIANTES:')
.replace(/\s+VARIANTE\:*/g, '\n:VARIANTE:')
.replace(/\s+DERIVAD[Oo]S\:*/g, '\n:DERIVADOS:')
.replace(/\s+DERIVAD[Oo]\:*/g, '\n:DERIVADO:')
.replace(/\s+ETIM[CO]L[CO]J.A\:*/g, '\n:ETIMOLOJÍA:')
.replace(/B. VICU[NÑS]A MACKENNA/g, '{{may|B. Vicuña Mackenna}}')
.replace(/VICU[NÑS]A MACKENNA/g, '{{may|Vicuña Mackenna}}')
.replace(/B. VICU[NÑS]A M[\.,]/g, '{{may|B. Vicuña M.}}')
.replace(/VICU[NÑS]A M[\.,]/g, '{{may|Vicuña M.}}')
.replace(/BARROS ARANA/g, '{{may|Barros Arana}}')
.replace(/BARROS GREZ/g, '{{may|Barros Grez}}')
.replace(/BLEST GANA/g, '{{may|Blest Gana}}')
.replace(/ALEJANDRO CAÑAS PINOCHET/g, '{{may|Alejandro Cañas Pinochet}}')
.replace(/CAÑAS PINOCHET/g, '{{may|Cañas Pinochet}}')
.replace(/CIEZA DE LEON/g, '{{may|Cieza de Leon}}')
.replace(/CORTES DE HOJEA/g, '{{may|Cortes de Hojea}}')
.replace(/FONCK[ \-]MENENDEZ/g, '{{may|Fonck-Menendez}}')
.replace(/MENENDEZ[ \-]FONCK/g, '{{may|Menendez-Fonck}}')
.replace(/JUAN I ULLOA/g, '{{may|Juan i Ulloa}}')
.replace(/VIDAL GORMAZ/g, '{{may|Vidal Gormaz}}')
.replace(/PEDRO DE VALDIVIA/g, '{{may|Pedro de Valdivia}}')
.replace(/PEDRO DE ANGELIS/g, '{{may|Pedro de Angelis}}')
.replace(/VELEZ DE ARAGON/g, '{{may|Velez de Aragon}}')
.replace(/T\. GU[EF]VARA/g, '{{may|T. Guevara}}')
.replace(/SANFUENTES/g, '{{may|Sanfuentes}}')
.replace(/ALBERT/g, '{{may|Albert}}')
.replace(/ALCED[OoC]/g, '{{may|Alcedo}}')
.replace(/AMUN[ÁA]TEGUI/g, '{{may|Amunátegui}}')
.replace(/ARO[NV]A/g, '{{may|Arona}}')
.replace(/BA[RK]BA\b/g, '{{may|Barba}}')
.replace(/BA[RK][EB]E[RK]E[VN]A/g, '{{may|Barberena}}')
.replace(/BASCU[NÑS]AN/g, '{{may|Bascuñan}}')
.replace(/B[AÁ]TRES/g, '{{may|Batres}}')
.replace(/BEAUREPAIRE/g, '{{may|Beaurepaire}}')
.replace(/BELLO/g, '{{may|Bello}}')
.replace(/BE[KR]TONIO/g, '{{may|Bertonio}}')
.replace(/CALCA[NÑS][OoC]/g, '{{may|Calcaño}}')
.replace(/CA[NÑ]AS/g, '{{may|Cañas}}')
.replace(/CARVALL[OoC]/g, '{{may|Carvallo}}')
.replace(/CAVADA/g, '{{may|Cavada}}')
.replace(/CEBALLOS/g, '{{may|Ceballos}}')
.replace(/CEVALLOS/g, '{{may|Cevallos}}')
.replace(/CHIAP+A/g, '{{may|Chiappa}}')
.replace(/C[ÓO]RDOBA/g, '{{may|Córdoba}}')
.replace(/C[ÓO]RDOVA/g, '{{may|Córdova}}')
.replace(/CUERVO/g, '{{may|Cuervo}}')
.replace(/ DIEZ/g, ' {{may|Diez}}')
.replace(/ECHEVERR[IÍ]A/g, '{{may|Echeverría}}')
.replace(/EGUILAZ/g, '{{may|Eguilaz}}')
.replace(/ERCILLA/g, '{{may|Ercilla}}')
.replace(/ESPINOSA/g, '{{may|Espinosa}}')
.replace(/ESPINOZA/g, '{{may|Espinoza}}')
.replace(/FALKNER/g, '{{may|Falkner}}')
.replace(/F[FE][BER][BRK][EËÉÈ]S/g, '{{may|Febrés}}')
.replace(/FERN[ÁA]NDEZ/g, '{{may|Fernández}}')
.replace(/FERRAZ/g, '{{may|Ferraz}}')
.replace(/FEUILL[EÉ]E/g, '{{may|Feuillée}}')
.replace(/FONCK/g, '{{may|Fonck}}')
.replace(/F[UL][FE]NTES/g, '{{may|Fuentes}}')
.replace(/GAGINI/g, '{{may|Gagini}}')
.replace(/GARC[IÍ]A/g, '{{may|García}}')
.replace(/GA[YV]\b/g, '{{may|Gay}}')
.replace(/G[OÓ]MARA/g, '{{may|Gómara}}')
.replace(/GRANADA/g, '{{may|Granada}}')
.replace(/GU[EF]VARA/g, '{{may|Guevara}}')
.replace(/HAVESTA[DU]T/g, '{{may|Havestadt}}')
.replace(/HERNANDEZ/g, '{{may|Hernandez}}')
.replace(/HERNÁNDEZ/g, '{{may|Hernandez}}')
.replace(/HERRERA/g, '{{may|Herrera}}')
.replace(/JOHOW/g, '{{may|Johow}}')
.replace(/JOTABECHE/g, '{{may|Jotabeche}}')
.replace(/JUAN/g, '{{may|Juan}}')
.replace(/JULIET/g, '{{may|Juliet}}')
.replace(/K[ÖO]NIG/g, '{{may|König}}')
.replace(/K[ÖO]RTING/g, '{{may|Körting}}')
.replace(/LAFONE/g, '{{may|Lafone}}')
.replace(/LOVERA/g, '{{may|Lovera}}')
.replace(/MALDONADO/g, '{{may|Maldonado}}')
.replace(/MEDINA/g, '{{may|Medina}}')
.replace(/MEM[EB][RB]E[NÑS]O/g, '{{may|Membreño}}')
.replace(/MENDOZA/g, '{{may|Mendoza}}')
.replace(/MENENDEZ/g, '{{may|Menendez}}')
.replace(/MI*DDEN ?D+O[RKE][EFK]/g, '{{may|Middendorf}}')
.replace(/MOLINA/g, '{{may|Molina}}')
.replace(/MONLAU/g, '{{may|Monlau}}')
.replace(/MONTO[YV]A/g, '{{may|Montoya}}')
.replace(/MURILLO/g, '{{may|Murillo}}')
.replace(/N[ÁA]JERA/g, '{{may|Nájera}}')
.replace(/N[Oo]T[Aa]/g, '{{may|Nota}}')
.replace(/OLIVARES/g, '{{may|Olivares}}')
.replace(/\b[ÖO][NÑ]A\b/g, '{{may|Oña}}')
.replace(/[ÖO]RT[UÚ]ZAR/g, '{{may|Ortúzar}}')
.replace(/[ÖO]VALLE/g, '{{may|Ovalle}}')
.replace(/[ÖO]VIED[ÖO]/g, '{{may|Oviedo}}')
.replace(/PALMA/g, '{{may|Palma}}')
.replace(/P[HI].?I[LI]I[PF][PF]I/g, '{{may|Philippi}}')
.replace(/PICHARD[Oo]/g, '{{may|Pichardo}}')
.replace(/R[Aa]M[Oo]S/g, '{{may|Ramos}}')
.replace(/REED/g, '{{may|Reed}}')
.replace(/REICHE/g, '{{may|Reiche}}')
.replace(/R[oO]D[KR][IÍ]GUEZ/g, '{{may|Rodriguez}}')
.replace(/R[Oo]M[Aa]N/g, '{{may|Roman}}')
.replace(/R[Oo][Ss]ALES/g, '{{may|Rosales}}')
.replace(/SAAVEDRA/g, '{{may|Saavedra}}')
.replace(/SOLAR/g, '{{may|Solar}}')
.replace(/TO[ERB]AR/g, '{{may|Tobar}}')
.replace(/TRIBALDOS/g, '{{may|Tribaldos}}')
.replace(/TSCHUDI/g, '{{may|Tschudi}}')
.replace(/ULLOA/g, '{{may|Ulloa}}')
.replace(/URI[BE]E/g, '{{may|Uribe}}')
.replace(/VALDIVIA/g, '{{may|Valdivia}}')
.replace(/V[AÁ]S[QO]UEZ/g, '{{may|Vásquez}}')
.replace(/V[Il]DAURRE/g, '{{may|Vidaurre}}')
.replace(/ZEROLO/g, '{{may|Zerolo}}')
.replace(/\$/g, '§')
.replace(/\s*=\s*(?!})/g, ' = ')
.replace(/ ling[iuüí]+stic/g, ' lingüístic')
.replace(/ etimolojia/g, ' etimolojía')
.replace(/ pucd/g, ' pued')
.replace(/ scr/g, ' ser')
.replace(/ cst/g, ' est')
.replace(/encr/g, 'ener')
.replace(/ orijen/g, ' oríjen')
.replace(/ asi\b/g, ' así ').replace(/ Asi\b/g, ' Así')
.replace(/[\.I1]rjentina\b/g, 'Arjentina')
.replace(/M[ie]jico\b/g, 'Méjico')
.replace(/Chil[oc][eé]\b/g, 'Chiloé')
.replace(/\b[PFr]eri\b/g, 'Perú')
.replace(/[1l][1l]onduras\b/g, 'Honduras')
.replace(/Calamarca\b/g, 'Catamarca')
.replace(/Gualemala\b/g, 'Guatemala')
.replace(/Celombia\b/g, 'Colombia')
.replace(/[Vr][ec]n[ce]zu[ce]la\b/g, 'Venezuela')
.replace(/inapuche/g, 'mapuche')
.replace(/misino/g, 'mismo')
.replace(/misina/g, 'misma')
.replace(/Nuble/g, 'Ñuble')
.replace(/ Z[Oo0][Oo0][l!]\b/g, ' Zool')
.replace(/ Var[iz]ante:/g, " ''Variante'':")
.replace(/ Var[iz]antes:/g, " ''Variantes'':")
.replace(/ [PD]erivado:/g, " ''Derivado'':")
.replace(/ [PD]erivados:/g, " ''Derivados'':")
.replace(/ Etimoloj[íi]a:/g, " ''Etimolojía'':")
.replace(/(Arjentina|Brasil|Catamarca|Colombia|Costa Rica|Cuba|Ecuador|Guatemala|Honduras|Méjico|Perú|Rio Grande|Salvador|Venezuela),/g, "''$1'',")
.replace(/ n\. vulg /g, " n. vulg. ")
.replace(/ (vulg|sust),/g, " $1.")
.replace(/ in\. /g, ' m. ')
.replace(/ th\. /g, ' tb. ')
.replace(/ [1I][\.,] c\./g, ' l. c.')
.replace(/ vu[ i]g\. /g, ' vulg. ')
.replace(/ (?:11\.|a\.|n) vulg\./g, ' n. vulg.')
.replace(/Dic+\. ?Ac\. ?[¹1][³3]/g,"''Dicc. Ac.''<sup>13</sup>")
.replace(/en La Lei/g, "en ''La Lei''")
.replace(/ Io(\d)/g, ' 10$1')
.replace(/ I(\d)/g, ' 1$1')
.replace(/ I\| /g, ' || ')
.replace(/ - [IJ]\./g, ' - 1.')
.replace(/( |\(|\[)(f|m|i ss|n. vulg|adj. invar|adj. inv.|n. p|adv|adj|ant|ac|burl|cast|Cm|Cp|cp|dep|dim|esp|etn|etnol|fam|hist|ibid|ib|id|jen|l. c|lat|lit|map|mar|met|min|metaf|metáf|ort|p. ej|plur|quech|refl|s. v|sig|sust|tb|var|vulg|NN)\.(?!})/g, '$1{{a|$2.}}')
.replace(/\((?:\d|i)\)/g, '<ref></ref>')
.replace(/ı/g, 'i')
;
} if (mw.config.get('wgTitle').match(/Daireaux/)) {
editor
.replace(/ a /g, ' á ')
.replace(/ e /g, ' é ')
.replace(/ o /g, ' ó ')
.replace(/-/g, '—')
;
} if (mw.config.get('wgTitle').match(/Blas/)) {
editor
.replace(/FIG(\d+)/g, '{{Img float\n| archivo = Blas Cabrera - Principio de relatividad (page XX crop).jpg\n| alinear = right\n| alinearley = center\n| alt = Fig. $1.\n| leyenda = Fig. $1.\n| ancho=16em}}')
.replace(/FORMULA/g, '{{cel|<math></math>}}')
.replace(/\((\d+), *(\d+)\)$/gm, '{{fd|($1, $2)|id=$1_$2}}')
.replace(/\((\d+), *(\d+)\)\s*(?!}|\|)/g, '{{ea|$1_$2||($1, $2)}}')
;
} if (mw.config.get('wgTitle').match(/heraldos/)) {
editor
.replace(/< *\/* *br *\/* *>/g, '')
.replace(/'''([IVX]+''')/g, '{{t4|$1}}')
;
} if (mw.config.get('wgTitle').match(/Adivinanza/)) {
editor
.replace(/(?<=^|\n)(\d+) *\n([\p{L} \n,.;:<>/?¿¡!]*?)((?:[Cc]p\. *)*D\. *\d+[^\n]+)?(?=\n\n|$)/gu, '{{bc|{{c|$1|id=$1}}\n<poem>:$2</poem>{{d|$3}}}}\n')
.replace(/{{d\|}}/g, '')
.replace(/\n\n+/g, '\n\n')
/*.replace(/\d+ *([\p{L} \(),\*]+)[\.]*\n((?:\d+[ ">»]*\n)+)/gu, function(match, p1, p2){
var local = '';
p2.match(/\d+/g).forEach((element) => {
local = local + '\n# {{ditto|' + p1 + '}}';
});
return "# "+ p1 +"."+local+"\n";
})
.replace(/^\d+ *([\p{L} \(),\*]+)/gmu, '# $1')*/
;
} if (mw.config.get('wgTitle').match(/Lenz/)) {
editor
.replace(/’/g, "'")
.replace(/”/g, "»")
.replace(/“/g, "«")
.replace(/(?<!\[)\[([^\[\]]{10,})\]/g, '<ref>$1</ref>')
// .replace(/^('*\d+.*)\n(.*?)\n\n([^'\d\s].*?)\n([^'\d\s].*?)\n+/gm, '$1 $3 \n $2 $4\n\n') //orden en pareaditos
.replace(/ņ/g, 'ŋ')
.replace(/’/g, "'")
.replace(/\n\n+/g, '\n\n')
.replace(/ $/gm, '')
.replace(/(?<=\w)-\n/g, '') //elimina guion salto sin resguardos
.replace(/(?<=\w)\n(?=\w)/g, ' ') //elimina saltos de línea sin ataos
.replace(/ +/g, ' ')
.replace(/[Mm][Uu][Ss][Tt][Ee][Rr][Ss](?!})/g, '{{may|Musters}}')
.replace(/,\n+/g, '. ')
.replace(/,[\-—]/g, '.—')
.replace(/[I1][I1][I1]/g, 'III')
.replace(/I(?=\d\d)/g, '1')
// .replace(/(\d+)[\.,][\*\?"”\%\d]+\s*/g, "'''$1'''.<sup></sup> ")
.replace(/(\d+)\.\s*/g, "'''$1'''. ")
.replace(/^(?:\d\d\d\s+)?[A-Z]{4,}[A-Z\d \n]*([A-Z])/g, '{{npt}}\n|$1')
.replace(/ 1 /g, ' i ')
.replace(/\(\d+\)/g, '<ref></ref>')
/* .replace(/(?<=\P{L})[F₤£]\./gu, " ''F''.") // F cursiva */
.replace(/(?<=\P{L})[F₤£]\./gu, "F.")// F no cursiva
.replace(/(?<='*F'*\. )([a-züùúñí]+)/g, function(match, p1){
p1 = p1.replace(/ú/g, 'ù');
return "''"+p1+"''";
})
.replace(/(?<=\P{L})"(?=[\p{L}¿¡])/gu, ' «')
.replace(/(?<=\P{L})[nw](?=[A-Z])/gu, ' «')
.replace(/(?<=[\p{L}?!])"\s*(?=\P{L})/gu, '» ')
.replace(/(?<=[?!])\s*[nw]\s*(?=\P{L})/gu, '» ')
//.replace(/ür/g, 'üt')
//mapuzugun
.replace(/ s /g, " s'")
.replace(/s k/g, "s'k")
.replace(/ii/g, 'ü')
.replace(/ü'/g, 'ü´')
//.replace(/ú/g, 'ü')
.replace(/mcu/g, 'meu')
.replace(/(u|ú)ŋe(?=\P{L})/gu, '$1ŋe') // uŋe/úŋe
.replace(/n(e|é)i(?=\P{L})/gu, 'ŋ$1i') // ŋei/ŋéi
.replace(/nn(?=\P{L})/gu, 'ŋn')
.replace(/ine(?=\P{L})/gu, 'iŋe')
.replace(/(?<=[a-záéíóúüñ])[KA4ÁZ]+(?=[a-záéíóúüñ'])/g, 'ʎ')
.replace(/(?<=l|u|n| )nen(?=\P{L})/gu, 'ŋen') //lnen -> lŋen
.replace(/nelai(?=\P{L})/gu, 'ŋelai')
.replace(/(?<!ka)nin(?=\P{L})/gu, 'ŋin')
.replace(/ei[pn]u(?=\P{L})/gu, 'eiŋu')
.replace(/(?<=\P{L})ant[aeo]\b/gu, 'antə')
.replace(/(?<=\P{L})ánt[aeo]\b/gu, 'ántə')
.replace(/(?<=\P{L})dunu/gu, 'duŋu')
.replace(/(?<=\P{L})femne/gu, 'femŋe')
.replace(/(?<=\P{L})kawe.u/gu, 'kaweʎu')
.replace(/k[oa]+la/g, 'kəla')
.replace(/(?<=\P{L})kuchi.u/gu, 'kuchiʎu')
.replace(/k[oea]+me/g, 'kəme')
.replace(/K[oea]+me/g, 'Kəme')
.replace(/k[oe]+p/g, 'kəp')
.replace(/K[oe]+p/g, 'Kəp')
.replace(/kapa/g, 'kəpa')
.replace(/Kapa/g, 'Kəpa')
.replace(/(?<=\P{L})ki+me\b/gu, 'küme')
.replace(/(?<=\P{L})kol/gu, 'kəl')
.replace(/(?<=\P{L})kordi.era\b/gu, 'kordiʎera')
.replace(/(?<=\P{L})lo[np]k/gu, 'loŋk')
.replace(/(?<=\P{L})ma.é\b/gu, 'maʎé')
.replace(/(?<=\P{L})m[oea]+lei/gu, 'məlei')
.replace(/(?<=\P{L})m[oea]+l ei/gu, "məl'ei")
.replace(/(?<=\P{L})m[oea]+rei/gu, "məl'ei")
.replace(/(?<=\P{L})m[oea]+li /gu, 'məli ')
.replace(/(?<=\P{L})mon(e|i|é|k)/gu, 'moŋ$1')
.replace(/(?<=\P{L})m[oe]te/gu, 'məte')
.replace(/(?<=\P{L})m[oe]tt+/gu, 'mətt·')
.replace(/(?<=\P{L})nem/gu, 'ŋem')
.replace(/nechi\b/g, 'ŋechi')
.replace(/nep\b/g, 'ŋep')
.replace(/(?<=\P{L})(?:n(?:ü|[íúui]+)r(?:ü|[íúui]+)|miri)/gu, 'ŋürü')
.replace(/(?<=\P{L})no.in/gu, 'ŋoʎin')
.replace(/(?<=\P{L})pi[ny]e/gu, 'piŋe') // piŋei
.replace(/(?<=\P{L})rani/gu, 'raŋi')
.replace(/(?<=\P{L})suka/gu, "s'uka")
.replace(/(?<=\P{L})t[aeo]+fa/gu, 'təfa')
.replace(/(?<=\P{L})t[aeo]+fi/gu, 'təfi')
.replace(/(?<=\P{L})t[aeo]+v/gu, 'təv')
.replace(/(?<=\P{L})T[aeo]+v/gu, 'Təv')
.replace(/(?<=\P{L})t[aeo]+k/gu, 'tək')
.replace(/(?<=\P{L})tinre/gu, 'tiŋre')
.replace(/(?<=\P{L})[Ct] *ipa/gu, "t'ipa")
.replace(/wen[rt] *u/g, "went'u")
.replace(/wo/g, 'wə')
.replace(/(?<=\P{L})(?!wit')w[üi][tr' ]+a/gu, "wüt'a")
.replace(/zün/g, 'züŋ')
//picunche
.replace(/nérk/gu, 'ŋërk')
;
}
if (mw.config.get('wgTitle').match(/Lecturas Araucanas/)) {
editor
.replace(/\[\[\d+\]\]/g, '<ref></ref>')
.replace(/"/g, '“')
.replace(/\u0009/g, ' ')
.replace(/\s((?:“|\.|;|:|,|\)|\?|!)+)\s*/g, '$1 ')
.replace(/\s*((?:\(|¿|„|¡)+)\s*/g, ' $1')
.replace(/\s+(\d+)\./g, '\n|-\n|$1.')
.replace(/\|-\n\|(\d+)\./g, '|}\n\n{{t3|$1.}}\n\n{|class=_comp\n|');
}
if (mw.config.get('wgTitle').match(/Confucio/)) {
editor.replace(/^([CLXVI]+)\.*\n+/gm, '{{t3|$1.}}\n\n')
;
}
if (mw.config.get('wgTitle').match(/Zool/)) {
editor.replace(/ón\b/g,'on')
.replace(/espués/g,'espues')
.replace(/ambién/g,'ambien')
.replace(/ún\b/g,'un')
;
}
if (mw.config.get('wgTitle').match(/Cosmos/)) {
editor.replace(/ón\b/g,'on')
.replace(/^[-—\^]* ?\d+ ?[-—\^]*/g,'')
.replace(/espués/g,'espues')
.replace(/ambién/g,'ambien')
.replace(/ún\b/g,'un')
.replace(/Sy\b/g,'s,')
.replace(/umen\b/g,'úmen')
.replace(/amen\b/g,'ámen')
.replace(/frió\b/g,'frio')
.replace(/ orden\b/g,' órden')
.replace(/úan\b/g,'uan')
// .replace(/ ser\b/g,' sér')
.replace(/ serie\b/g,' série')
.replace(/ seres\b/g,' séres')
.replace(/ origen/g,' orígen')
.replace(/ déla/g,' de la')
.replace(/ délos/g,' de los')
.replace(/g[\-\^]/g,'g')
.replace(/ían\b/g,'ian')
.replace(/\bmutu/g,'mútu')
.replace(/\bperpetu/g,'perpétu')
.replace(/ babia/g,' habia')
.replace(/ becho/g,' hecho')
.replace(/ bistoria/g,' historia')
.replace(/\bba\b/g,'ha')
.replace(/\bban\b/g,'han')
.replace(/\bbe\b/g,'he')
.replace(/([\w;,]) V (\w)/g,'$1 y $2')
.replace(/\bha[jv]\b/g,'hay')
.replace(/\bho[jv]\b/g,'hoy')
.replace(/ ha ?va\b/g,' haya')
.replace(/ ha ?van\b/g,' hayan')
.replace(/\bserio/g,'sério')
.replace(/\bserias/g,'sérias')
.replace(/\bja\b/g,'ya')
.replace(/\babora\b/g,'ahora')
.replace(/ [jv] /g,' y ')
.replace(/ [jv],/g,' y,')
.replace(/ le ?[jyv]es/g,' leyes')
.replace(/ le ?[jyv]\b/g,' ley')
.replace(/ major/g,' mayor')
.replace(/ ravo/g,' rayo')
.replace(/ ja\b/g,' ya')
.replace(/ jo\b/g,' yo')
.replace(/ mu ?[jy] /g,' muy ')
.replace(/ cu[jv]a\b/g,' cuya')
.replace(/ cu[jv]o\b/g,' cuyo')
.replace(/ cu[jv]as\b/g,' cuyas')
.replace(/ cu[jv]os\b/g,' cuyos')
.replace(/ rajo/g,' rayo')
.replace(/ en ?[jyv]a\b/g,' cuya')
.replace(/ en ?[jyv]o\b/g,' cuyo')
.replace(/ en ?[jyv]as\b/g,' cuyas')
.replace(/ en ?[jyv]os\b/g,' cuyos')
.replace(/ransad[\.,]/g,'ransact.')
.replace(/ist,/g,'ist.')
.replace(/céntrale/g,'centrale')
.replace(/ A[nm][nui]ales/g,' Annales')
.replace(/ A[nm][nui]?alen/g,' Annalen')
.replace(/ P[áa]g\,/g,' Pág.')
.replace(/ Geogr,/g,' Geogr.')
.replace(/ phys,/g,' phys.')
.replace(/ vio\b/g,' vió')
.replace(/ crej[oó]\b/g,' creyó')
.replace(/ arrojo\b/g,' arroyo')
.replace(/ arrojos\b/g,' arroyos')
.replace(/ joven\b/g,' jóven')
.replace(/ deberla\b/g,' deberia')
.replace(/ pies\b/g,' piés')
.replace(/ pie\b/g,' pié')
.replace(/ Etua/g,' Etna')
.replace(/ gueiss/g,' gneiss')
.replace(/Leo\?,/g,'Leop.')
.replace(/ de ?r([A-Z])/g, " de l'$1")
.replace(/Transad/g, "Transact")
.replace(/(Acad|[Gg]eogr?|[Gg]eol|[Hh]ist|crit|Relat|Transact),/g,'$1.')
.replace(/ 1\. ([IXVLCM]{2,})/g,' l. $1')
.replace(/ i\. ([IXVLCM]{2,})/g,' t. $1')
.replace(/ t\. [lIí]/g, " t. I")
.replace(/ t\. [lIí][lIí]/g, " t. II")
.replace(/ t\. [lIí][lIí][lIí]/g, " t. III")
.replace(/ \((\d\d)\)/g, ' {{ref|4$1|($1)}}')
;
}
if (mw.config.get('wgTitle').match(/Origen/)) {
editor.replace(/rigen\b/g,'rígen')
.replace(/ antes/g,' ántes')
.replace(/ ambas /g,' ámbas ')
.replace(/ ambos /g,' ámbos ')
.replace(/ volumen/g,' volúmen')
.replace(/ entonces/g,' entónces')
.replace(/ menos\b/g,' ménos')
.replace(/gco/g,'geo')
.replace(/ [àa] /g,' á ')
.replace(/ſ/g,'f')
.replace(/ fue /g,' fué ')
.replace(/ II([aeiou])/g,' H$1')
.replace(/ aunquo\b/g,' aunque')
.replace(/ quo /g,' que ')
.replace(/ ol /g,' el ')
.replace(/ on /g,' en ')
.replace(/ os /g,' es ')
.replace(/ ho /g,' he ')
.replace(/ anto /g,' ante ')
.replace(/ osta /g,' esta ')
.replace(/ sor\b/g,' ser')
.replace(/ soa\b/g,' sea')
.replace(/ llor\b/g, ' flor')
.replace(/cran\b/g, 'eran')
.replace(/ individuo/g, ' indivíduo')
.replace(/ v[oe]c[oe]s /g,' veces ')
.replace(/(\w)dados\b/g,'$1dades')
.replace(/ s[oée]r[eo]s /g,' séres ')
.replace(/ esp[eo]ci[eoc]/g,' especie')
.replace(/ cf/g,' ef')
.replace(/ lejos\b/g, ' léjos')
.replace(/ apenas\b/g, ' apénas')
.replace(/ diferonte/g,' diferente')
.replace(/ [lt]icuen /g,' tienen ')
.replace(/ entro /g,' entre ')
.replace(/(!el)(..)emento\b/g,'$1emente')
.replace(/menle\b/g, 'mente')
.replace(/onos\b/g,'ones')
.replace(/rablo\b/g,'rable')
.replace(/ pudi[co]/g,' pudie')
.replace(/ loy/g,' ley')
.replace(/ perfectam[oe]nt[oe]/g,' perfectamente')
.replace(/ [eo]sp[oe]ci[eo]/g,' especie')
;
}
if (mw.config.get('wgTitle').match(/Museo/)) {
editor.replace(/ [0O)]\. (\w+)/g," ''O. $1''")
;
}
if (mw.config.get('wgTitle').match(/fueguino/)) {
editor.replace(/[’‘]/g, "'")
.replace(/[\. ,2\+]{3,}/g, "||")
.replace(/^(?:\|-\n)?[ !\|':\]\[\{\}]*([A-Z])/mg, "|-\n|$1")
.replace(/^(?:\|-\n)?«/mg, "|-\n{{ditto|}}")
.replace(/6/g, 'ó')
;
}
if (mw.config.get('wgTitle').match(/Neologismos/)) {
editor.replace(/\n\n([\w, áéíóúü]+?)\s*[-—]\s*/g, "\n;$1:—")
;
}
if (mw.config.get('wgTitle').match(/leguas/)) {
editor.replace(/ión/g, 'ion')
.replace(/ía([ .,:;\n])/g, 'ia$1')
.replace(/ían([ .,:;\n])/g, 'ian$1')
.replace(/también/g, 'tambien')
.replace(/ orden/g, ' órden')
.replace(/ origen/g, ' orígen')
.replace(/ según/g, ' segun')
.replace(/ examen/g, ' exámen')
.replace(/ croquis/g, ' cróquis')
.replace(/ continuo/g, ' contínuo')
.replace(/ río/g, ' rio')
.replace(/ dio /g, ' dió ')
.replace(/ copia/g, ' cópia')
.replace(/{{[Gg]uion\|([^\|]*)\|}}/g, '$1')
.replace(/{{[Gg]uion\|([^\|]*)\|([^}]*)}}/g, '$1')
.replace(/\n{{brecha}}/g, '\n')
;
}
if (mw.config.get('wgTitle').match(/Compendio/) ) {
editor
.replace(/^.{0,8}Compendio de la Historia civil[\S]{0,3}/s, '')
.replace(/^.{0,8}del Rey ?no de Chile.\s*\d*[\S]{0,3}/s, '')
.replace(/((?:uno|dos|tres|quatro|cinco|seis|siete|ocho|nueve|diez),?) (?:el|6) (uno|dos|tres|quatro|cinco|seis|siete|ocho|nueve|diez)/g, '$1 ó $2')
.replace(/^CAP[ÍI]TULO ([IVX]+)[\.,]*\s*\n+([A-Z,\.ÑÁÉÍÓÚÜ: ]+)\n+([\p{L},\.: ]+)[,\.]/mgu, "{{t3|CAPITULO $1.<br/>\n''$2''<br/>\n{{menor|''$3''\.}}}}")
.replace(/JVI/g, 'M')
.replace(/án(?=[ .,:;\n])/g, 'an')
.replace(/án(?=[ .,:;\n])/g, 'an')
.replace(/ón(?=[ .,:;\n])/g, 'on')
.replace(/[íi][áa]n([ .,:;\n])/g, 'ian$1')
// .replace(/[íi][áa]([ .,:;\n])/g, 'ia$1')
.replace(/eria(?=[ .,:;\n])/g, 'ería')
.replace(/ Chiloe/g, ' Chiloé')
.replace(/ fol,/g, ' fol.')
.replace(/ mió/g, ' mio')
.replace(/ muí/g, ' mui')
.replace(/ orden([ .,:;\n])/g, ' órden$1')
.replace(/ ordenes([ .,:;\n])/g, ' órdenes$1')
.replace(/ reí/g, ' rei')
.replace(/ Valparaíso/g, ' Valparaiso')
.replace(/\bpaís/g, 'pais')
.replace(/ag,/g, 'ag.')
.replace(/algún/g, 'algun')
.replace(/B[ií][ao][hb][íi][ao]/g, 'Biobio')
.replace(/Ca(?:[nu]|ti)pol(?:[itl][ce]|k)a[nu]/g, 'Caupolican')
.replace(/C[oó]l[oó][ce][oó]l[oó]/g, 'Colocolo')
.replace(/común/g, 'comun')
.replace(/crimen/g, 'crímen')
.replace(/cónico/g, 'conico')
.replace(/debía/g, 'debia')
.replace(/demás/g, 'demas')
.replace(/después/g, 'despues')
.replace(/día/g, 'dia')
.replace(/ d[íi]o(?=\P{L})/gu, 'dió')
.replace(/espía/g, 'espia')
.replace(/están([ .,:;\n])/g, 'estan$1')
.replace(/Europe/g, 'Europé')
.replace(/europe/g, 'europé')
.replace(/ex[eé]rc[ií]to/g, 'exército')
.replace(/fr[ií][óo]/g, 'frio')
.replace(/ fue(?=\P{L})/gu, ' fué')
.replace(/Gar(?:cí|d)a/g, 'Garcia')
.replace(/había/g, 'habia')
.replace(/Jos\b/g, 'los')
.replace(/medió/g, 'medio')
.replace(/ningún/g, 'ningun')
.replace(/océano/g, 'oceano')
.replace(/P ?tiren/g, 'Puren')
.replace(/rchipiélago/g, 'rchipielago')
.replace(/río/g, 'rio')
.replace(/según/g, 'segun')
.replace(/también/g, 'tambien')
.replace(/También/g, 'Tambien')
.replace(/todavía/g, 'todavia')
.replace(/Ulmén/g, 'Ulmen')
.replace(/¬ /g, '')
.replace(/ándo/g, 'ando')
.replace(/éndo/g, 'endo')
.replace(/\((?:\d|i)\)/g, '<ref></ref>')
/* específicos de Molina??? */
.replace(/(?<=[a-z,]) [aíid] (?=[a-z])/g, ' á ')
.replace(/(?<=[a-z,]) [o6] (?=[a-z])/g, ' ó ')
.replace(/ alli/g, ' allí')
.replace(/exi/g, 'exî')
.replace(/ éxi/g, ' éxî')
.replace(/ exa/g, ' exâ')
.replace(/ exo/g, ' exô')
.replace(/oxi/g, 'oxî')
.replace(/óxi/g, 'óxî')
.replace(/auxi/g, 'auxî')
.replace(/ flexi/g, ' flexî')
.replace(/ sexo/g, ' sexô')
.replace(/\n([A-Z] ?[a-z]?(?: ?\d)?) ([\p{L}\-\.~]{1,8})\s*$/gu, function(match, p1, p2) {
$('#wpFooterTextbox').val('{{pie|2='+p1+'|3='+p2+'}}');
return ''})
.replace(/\n([\p{L}\-\.~]{1,8})\s*$/gu, function(match, p1) {
$('#wpFooterTextbox').val('{{pie|3='+p1+'}}');
return ''})
;
}
if (mw.config.get('wgTitle').match(/Reyno/) ) { /*Ovalle y Luis de Valdivia*/
editor
//general
.replace(/[\|!\+'¡«»]/gu, '')
.replace(/=/gu, '-')
.replace(/[£€]/g, 'e')
.replace(/\$/g, '§')
.replace(/w/g, 'v')
.replace(/\n\n\n+/g, '\n\n')
.replace(/[\[\]/]/gu, 'ſ')
.replace(/(?<=\p{L})\.(?=\p{L})/gu, ' ')
//acentos no acentos en siglo 17
.replace(/[íi][óo]n([ .,:;\n])/gu, 'ion$1')
.replace(/[íi][áa]n([ .,:;\n])/gu, 'ian$1')
.replace(/[íi][áa]s([ .,:;\n])/gu, 'ias$1')
//acentos graves
.replace(/á(?=\P{L})/gu, 'à') // \P{L} cualquier cosa menos una letra en unicode (!)
.replace(/ó(?=\P{L})/gu, 'ò') // \P{L} cualquier cosa menos una letra en unicode (!)
.replace(/Per[iú]/gu, 'Perù')
//otras faltas graues de fuerça
.replace(/J/gu, 'l')
.replace(/\s*abra[gc]/gu, ' abraç')
.replace(/\s*alaban[gc]a/gu, ' alabança')
.replace(/\s*alcan[gc]/gu, ' alcanç')
.replace(/\s*apro[nvy]ech/gu, ' aprouech') //aprouech
.replace(/\s*atre[nvy]/gu, ' atreu') //atreuido
.replace(/\s*Ara[un]c(?=o|a)/g, ' Arauc')
.replace(/\s*ba[rt]all/gu, ' batall')
.replace(/\s*bonan[gc]a/gu, ' bonança')
.replace(/(?<=\P{L})bra[gc](?=o|a)/gu, 'braç')
.replace(/\s*Ca[nv]alle/gu, ' Caualle')
.replace(/\s*ca[nv]alle/gu, ' caualle')
.replace(/\s*ca[nv]allo/gu, ' cauallo')
.replace(/\s*ca[nv]ti[nu]/gu, ' cautiu')
.replace(/\s*cabe[gc]a/gu, ' cabeça')
.replace(/(?<=\P{L})ca[gc]a/gu, 'caça')
.replace(/\s*comen[gc]/gu, ' començ')
.replace(/\s*comien[gc]/gu, ' comienç')
.replace(/\s*confian[gc]/gu, ' confianç')
// .replace(/(?<=\P{L})conv/gu, 'conu')
.replace(/ c[oóò] /gu, ' cõ ')
.replace(/\s*cora[gc]on/gu, ' coraçon')
.replace(/\s*culti[nv]/gu, ' cultiu')
.replace(/\s*de[nvy]ocio/gu, ' deuocio')
.replace(/\s*de[nvy]ot(?=a|o)/gu, ' deuot')
.replace(/\s*di[fl][fl][ce]r[ce]n/gu, ' differen')
.replace(/(?<=\P{L})di[nvy]i(?=d|s|n)/gu, 'diui')
.replace(/\s*endere[gc]/gu, ' endereç')
.replace(/\s*esfuer[gc]/gu, ' esfuerç')
.replace(/\s*[ce]x[ce][rt]ci[tr]/gu, ' exercit')
.replace(/\s*Enrop/gu, ' Europ')
.replace(/\s*E[yn]ang[ce]l/gu, ' Euangel')
.replace(/\s*fa[vny]or/gu, ' fauor')
.replace(/\s*freguen/gu, ' frequen')
.replace(/\s*fu[ce]r[gc]a/gu, ' fuerça')
.replace(/\s*garban[gc]/gu, ' garbanç')
.replace(/\s*go[ynv][ce]r[nm]/gu, ' gouern')
.replace(/\s*Go[ynv][ce]r[nm]/gu, ' Gouern')
.replace(/\s*go[ynv]i[ce]r[nm]/gu, ' gouiern')
.replace(/\s*Go[ynv]i[ce]r[nm]/gu, ' Gouiern')
.replace(/(?<=\P{L})go[gc](?=a|o)/gu, 'goç')
.replace(/(?<=\P{L})ha[yvn][ce]r(?=\P{L})/gu, 'hauer')
.replace(/(?<=\P{L})ha[vn]ia/gu, 'hauia')
.replace(/(?<=\P{L})ha[yvn]ien/gu, 'hauien')
.replace(/\s*[bh]aze/gu, ' haze')
.replace(/\s*[hb]i[yvn]iern/gu, ' hiuiern')
.replace(/\s*hu[yvn]ie/gu, ' huuie')
.replace(/\s*[l1IL][unoa] *dio/gu, ' Indio')
.replace(/(?<=\P{L})[l1I][yvun]an/gu, 'Iuan')
.replace(/(?<=\P{L})lan[cg]a/gu, 'lança') //*blanca
.replace(/\s*le[yvn]ant/gu, ' leuant')
.replace(/(?<=\P{L})llev(?=e|ar)/gu, 'lleu')
.replace(/(?<=\P{L})llo[ynv](?=er|iend)/gu, 'llou')
.replace(/\s*llue[yvn]e/gu, ' llueue')
.replace(/\s*llu[yvn]ia/gu, ' lluuia')
.replace(/\s*mara[yvn]ill/gu, ' marauill')
.replace(/\s*matan[cg]a/gu, ' matança')
.replace(/(?<=\P{L})mo[cg]o/gu, 'moço')
.replace(/\s*Mendo[gc]a/gu, ' Mendoça')
.replace(/\s*moti[yvn]o/gu, ' motiuo')
.replace(/(?<=\P{L})na[yvn][ce](?=\P{L}|s)/gu, 'naue')
.replace(/\s*na[yvn][ce]ga/gu, ' nauega')
.replace(/\s*na[yvn]io(?=\P{L}|s)/gu, ' nauio')
.replace(/(?<=\P{L})nie[yvn]e/gu, 'nieue')
.replace(/(?<=\P{L})Nu[ce][yvnu](?=o|a)/gu, 'Nueu')
.replace(/(?<=\P{L})nu[ce][yvnu](?=o|a)/gu, 'nueu')
.replace(/(?<=\P{L})orra(?=\P{L}|s)/gu, 'otra')
.replace(/(?<=\P{L})orro(?=\P{L}|s)/gu, 'otro')
.replace(/(?<=\P{L})parre(?=\P{L}|s)/gu, 'parte')
.replace(/\s*peda[gc]o/gu, ' pedaço')
.replace(/(?<=\P{L})pla[gc]a/gu, 'plaça')
.replace(/\s*prima[yvn]era/gu, ' primauera')
.replace(/(?<=\P{L})propric/gu, 'proprie')
.replace(/(?<=\P{L})pro[yvn]ech/gu, 'prouech')
.replace(/\s*pro[yvn]incia/gu, ' prouincia')
.replace(/\s*Pro[yvn]incia/gu, ' Prouincia')
.replace(/\s*P.ren/gu, ' Puren')
.replace(/(?<=\P{L})gue(?=\P{L})/gu, 'que')
.replace(/(?<=\P{L})ra[cg]on/gu, 'raçon')
.replace(/\s*rece[yvn]i/gu, ' receui')
.replace(/\s*Se[yvnu]illa/gu, ' Seuilla')
.replace(/\s*[rt]ambi[ce]n\s*/gu, ' tambien ')
.replace(/(?<=\P{L})ran(?=\P{L})/gu, 'tan')
.replace(/(?<=\P{L})[tr]an[tr](?=o|a)/gu, 'tant')
.replace(/\s*[rt]ie[tr][tr]a/gu, ' tierra')
.replace(/\s*riempo/g, ' tiempo')
.replace(/(?<=\P{L})tu[vn](?=\P{L}|o|ie|e)/gu, 'tuu')
.replace(/(?<=\P{L})[uy]n(?=\P{L}|a|o)/gu, 'vn')
.replace(/(?<=\P{L})vu(?=\P{L}|a|o)/gu, 'vn')
.replace(/(?<=\P{L})yan(?=\P{L})/gu, 'van')
.replace(/(?<=\P{L})ye(?=\P{L}|n|a|z|ces|r)/gu, 've')
.replace(/(?<=\P{L})yiene/gu, 'viene')
.replace(/(?<=\P{L})[vy][li]tim/gu, 'vltim')
.replace(/(?<=\P{L})vol[yvn](?=i|e)/gu, 'volu') //volver, volviesse
.replace(/\s*Valdi[nv]/gu, ' Valdiu')
.replace(/\s*Xa[nv]ier/gu, ' Xauier')
.replace(/Y /gu, 'Y')
.replace(/(?<=\P{L})[yv]er[vnu]a/gu, 'yerua')
.replace(/Yralia/gu, 'Ytalia')
// preprocesamiento: separar palabrasjuntas
.replace(/(?<=\p{L})(?!alli)a[flſ][flſ]i(?=\P{L})/gu, ' aſſi')
.replace(/\s*algun/gu, ' algun')
.replace(/algun(os*|as*)(?=\p{L})(?!s)/gu, 'algun$1 ')
.replace(/\s*aun[gq]ue/gu, ' aunque')
.replace(/aunque(?=\p{L})/gu, 'aunque ')
.replace(/([^ aeiunrlſõẽ\(\[])de(?=\P{L})/g, '$1 de')
.replace(/\s*qual(?!\P{L}|es|q|i)/gu, ' qual ')
.replace(/\s*(?<!n|a)como(?!d)\s*/gu, ' como ')
.replace(/(?<=\P{L})delas(?=\p{L})/gu, 'delas ')
.replace(/(?<=\P{L})delos(?=\p{L})/gu, 'delos ')
.replace(/(?<=\P{L})donde(?=\p{L})/gu, 'donde ')
.replace(/(?<=\P{L})eltos(?=\p{L})/gu, 'eſtos ')
.replace(/(?<=\P{L})elto(?=\p{L})(?!s)/gu, 'eſto ')
.replace(/(?<=\P{L})eltas(?=\p{L})/gu, 'eſtas ')
.replace(/(?<=\P{L})eltar(?=\p{L})/gu, 'eſtas ')
.replace(/(?<=\P{L})elta(?=\p{L})(?!s|n|r|do)/gu, 'eſta ')
.replace(/\s*[ce]lte\s*/gu, ' eſte ')
.replace(/(?<=\p{L})enel(?=\P{L})/gu, ' en el')
.replace(/(?<=\P{L})enla(?=\p{L})(?!s)/gu, 'en la ')
.replace(/(?<=\P{L})enlas(?=\p{L})/gu, 'en las ')
.replace(/(?<=\P{L})enlos(?=\p{L})/gu, 'en los ')
.replace(/\s*por[gq]ue/gu, ' porque')
.replace(/porque(?=\p{L})/gu, 'porque ')
.replace(/\s*tant(os*|as*)(?=\p{L})(?!s)/gu, ' tant$1 ')
.replace(/\s*tod(os*|as*)(?=\p{L})(?!s)/gu, ' tod$1 ')
.replace(/dela(?! |s|n)/gu, 'dela ')
.replace(/(?<=\P{L})delas(?=\p{L})/gu, 'delas ')
.replace(/(?<=\P{L})haze(?=\p{L})(?!n|l|r)\s*/gu, 'haze ')
.replace(/(?<=\P{L})[yv]n(?=\p{L})(?!a|o|i)/gu, 'vn ')
.replace(/(?<=\P{L})[yv]nos(?=\p{L})/gu, 'vnos ')
.replace(/(?<=\P{L})[yv]na(?=\p{L})(?!s)/gu, 'vna ')
.replace(/(?<=\P{L})[yv]nas(?=\p{L})/gu, 'vnas ')
// .replace(/(?<=\p{L})[yv]n(?=\P{L})/gu, ' vn')
// .replace(/(?<=\p{L})[yv]nos(?=\P{L})/gu, ' vnos')
// .replace(/(?<=\p{L})[yv]na(?=\P{L})/gu, ' vna')
// .replace(/(?<=\p{L})[yv]nas(?=\P{L})/gu, ' vnas')
.replace(/(?<=\p{L})dela(?=\P{L})/gu, ' dela')
.replace(/(?<=\p{L})delas(?=\P{L})/gu, ' delas')
.replace(/(?<=\p{L})e[fl]te(?=\P{L})/gu, ' eſte')
// .replace(/(?<=\p{L})elto(?=\P{L})/gu, ' eſto')
// .replace(/(?<=\p{L})eltos(?=\P{L})/gu, ' eſtos')
.replace(/(?<=\p{L})por(?=\P{L})/gu, ' por')
.replace(/(?<=\p{L})tant(os*|as*)(?=\P{L})/gu, ' tant$1 ')
.replace(/(?<=\p{L})tod(os*|as*)(?=\P{L})/gu, ' tod$1 ')
// .replace(/(?<=\p{L})(?<!n|e)de(?=\P{L})/gu, ' de')
// .replace(/(?<=\p{L})(?<!por|aun|Caci|para)que(?=\P{L})/gu, ' que')
.replace(/yy /g, ', y ')
// .replace(/y y/g, ', y')
.replace(/(?<=s|r)y /g, ', ')
.replace(/yla/g, 'y la')
.replace(/ylo/g, 'y lo')
.replace(/yde/g, 'y de')
.replace(/porno/g, 'por no')
.replace(/(?<=\P{L})comoel(?=\P{L})/gu, 'como el')
.replace(/(?<=\P{L})comola(?=\P{L}|s)/gu, 'como la')
.replace(/(?<=\P{L})[tc]onel(?=\P{L})/gu, 'con el')
.replace(/(?<=\P{L})[tc]onla(?=\P{L}|s)/gu, 'con la')
.replace(/(?<=\P{L})[tc]onlo(?=\P{L}|s)/gu, 'con lo')
.replace(/(?<=\P{L})[tc]ontan(?=\P{L})/gu, 'con tan')
.replace(/(?<=\P{L})e[hn]la(?=\P{L}|s)/gu, 'en la')
.replace(/(?<=\P{L})e[hn]lo(?=\P{L}|s)/gu, 'en lo')
.replace(/(?<=\P{L})e[hn]el(?=\P{L})/gu, 'en el')
.replace(/(?<=\P{L})entrela(?=\P{L}|s)/gu, 'entre la')
.replace(/(?<=\P{L})ni[ce]n(?=\P{L})/gu, 'ni en')
.replace(/(?<=\P{L})ni[ce]l(?=\P{L})/gu, 'ni el')
.replace(/(?<=\P{L})nila(?=\P{L}|s)/gu, 'ni la')
.replace(/(?<=\P{L})nila(?=\P{L}|s)/gu, 'ni lo')
.replace(/(?<=\P{L})no[ce]s(?=\P{L})/gu, 'no es')
.replace(/(?<=\P{L})nolo(?=\P{L}|s)/gu, 'no la')
.replace(/(?<=\P{L})nolo(?=\P{L}|s)/gu, 'no lo')
.replace(/(?<=\P{L})porel(?=\P{L})/gu, 'por el')
.replace(/(?<=\P{L})porla(?=\P{L}|s)/gu, 'por la')
.replace(/(?<=\P{L})porlo(?=\P{L}|s)/gu, 'por lo')
.replace(/(?<=\P{L})pordonde/gu, 'por donde')
.replace(/(?<=\P{L})ef(?!\P{L}|[fe])que\s*(?!\s|d|b|l|m|n|r)/gu, 'que ') //quedar etc
.replace(/(?<=\P{L})que(?=lo|la)/gu, 'que ')
// ſ larga
.replace(/(?<=\P{L})a[fíÍI\(\/]e(?!c|mi|rr)/gu, 'aſe')
.replace(/(?<=\P{L})a\s*[flíÍI\(\/]u(?=\P{L}|s)/gu, 'aſu')
.replace(/\s*ab[flíÍI\(\/]ol/gu, ' abſol')
.replace(/(?<=\P{L})acu[flíÍI\(\/][tl]/gu, 'acoſt')
.replace(/(?<=\P{L})acu[flíÍI\(\/]/gu, 'acuſ')
.replace(/\s*Ago[flíÍI\(\/]to/gu, ' Agoſto')
.replace(/\s*Alon[flíÍI\(\/]o/gu, ' Alonſo')
.replace(/\s*ami[flíÍI\(\/][tl]/gu, ' amiſt')
.replace(/\s*ango[flíÍI\(\/][tl]/gu, ' angoſt')
.replace(/\s*Apo[flíÍI\(\/][tl]ol/gu, ' Apoſtol')
.replace(/\s*apo[flíÍI\(\/][tl]ol/gu, ' apoſtol')
.replace(/\s*apre[flíÍI\(\/][tl]/gu, ' apreſt')
.replace(/(?<=\P{L})(?!alli)a[flíÍI\(\/][flíÍI\(\/][íi](?=\P{L}|s)/gu, 'aſſi')
.replace(/ af /gu, ' aſſi ')
.replace(/(?<=\P{L})a[flíÍI\(\/]n/gu, 'aſſi') //afn -> aſſi ...
.replace(/(?<=\P{L})a[flíÍI\(\/][ce]en/gu, 'aſcen')
.replace(/(?<=\P{L})a[flíÍI\(\/]p[ce]r/gu, 'aſper')
.replace(/(?<=\P{L})a[flíÍI\(\/][tl]ro/gu, 'aſtro')
.replace(/\s*aui[flíÍI\(\/](?=o|a)/gu, ' auiſ')
.replace(/\s*au[flíÍ\(/t]+ral/gu, ' auſtral')
.replace(/\s*Au[flíÍ\(/t]+ral/gu, ' Auſtral')
.replace(/(?<=\P{L})a[fí\(][flíÍI\(\/]i(?=\P{L})/gu, 'aſſi')
.replace(/(?<=\P{L})ba[flíÍI\(\/]allo/gu, 'baſallo')
.replace(/(?<=\P{L})ba[flíÍI\(\/]t/gu, 'baſt')
.replace(/\s*Bra[flíÍI\(\/]il/gu, ' Braſil')
.replace(/\s*bo[flíÍI\(\/]que/gu, ' boſque')
.replace(/(?<=\P{L})bu[flíÍI\(\/][ce]a/gu, 'buſca')
.replace(/\s*Ca[flíÍI\(\/][tl]/gu, ' Caſt') //Castellanos etc
.replace(/\s*ca[flíÍI\(\/][tl]el/gu, ' caſtel') //castellanos etc
.replace(/(?<=\P{L})ca[flíÍI\(\/]a(?=\P{L}|s)/gu, 'caſa')
.replace(/(?<=\P{L})ca[flíÍI\(\/][ií](?=\P{L})/gu, 'caſi')
.replace(/(?<=\P{L})ca[flíÍI\(\/]o(?=\P{L}|s)/gu, 'caſo')
.replace(/\s*ca[flíÍI\(\/][tl]illo(?=\P{L}|s)/gu, ' caſtillo')
.replace(/(?<=\P{L})can[flíÍI\(\/]a(?=d)/gu, 'canſa')
.replace(/(?<=\P{L})ca[nu][flíÍI\(\/]a(?=\P{L}|s|n|r)/gu, 'cauſa')
.replace(/\s*cele[flíÍI\(\/][tl]e/gu, ' celeſte')
.replace(/\s*chri[flíÍI\(\/][tli]/gu, ' chriſt')
.replace(/\s*Chri[flíÍI\(\/][tli]/gu, ' Chriſt')
.replace(/\s*compa[flíÍI\(\/][flíÍI\(\/]/gu, ' compaſſ')
.replace(/\s*como[flíÍI\(\/]i(?=\P{L})/gu, ' como ſi')
.replace(/\s*cono[flíÍI\(\/][ce]a/gu, ' conoſca')
.replace(/\s*con[flíÍI\(\/]ejo/gu, ' conſejo')
.replace(/\s*con[flíÍI\(\/]er[un]/gu, ' conſeru')
.replace(/\s*con[flíÍI\(\/]ider/gu, ' conſider')
.replace(/\s*con[flíÍI\(\/]igo/gu, ' conſigo')
.replace(/\s*con[flíÍI\(\/]ol/gu, 'conſol')
.replace(/\s*con[flíÍI\(\/]t/gu, ' conſt')
.replace(/(?<=\P{L})con[flíÍI\(\/]u(?=e|l|m)/gu, 'conſu')
.replace(/(?<=\P{L})con[flíÍI\(\/]u(?=\P{L}|s)/gu, 'con ſu')
.replace(/\s*conqui[flíÍ\(/t]+/gu, ' conquiſt')
.replace(/\s*corre[flíÍI\(\/]p/gu, ' correſp')
.replace(/(?<=\P{L})co[flíÍI\(\/]a(?=\P{L})/gu, 'coſa')
.replace(/(?<=\P{L})co[flíÍI\(\/]as(?=\P{L})/gu, 'coſas')
.replace(/(?<=\P{L})co[flíÍI\(\/]ech/gu, 'coſech')
.replace(/(?<=\P{L})co[flíÍI\(\/]ta/gu, 'coſta')
.replace(/co[flíÍI\(\/]tumbr/gu, 'coſtumbr')
.replace(/cu[tr]io[flíÍI\(\/]/gu, 'curioſ')
.replace(/(?<=\P{L})da[fíÍ]e(?=\P{L})/gu, 'daſe')
.replace(/(?<=\P{L})de[flíÍI\(\/]u(?=\P{L}|s)/gu, 'de ſu')
.replace(/\s*defen[flíÍI\(\/]/gu, ' defenſ')
.replace(/\s*dema[flíÍI\(\/]i/gu, ' demasſi')
.replace(/(?<=\P{L})de[fíÍ\(/]a/gu, 'deſa') //desangrar y desamparar: no delatar
.replace(/(?<=\P{L})de[flíÍI\(\/][ce]an[flíÍI\(\/](?=o|a)/gu, 'deſcanſ')
.replace(/\s*de[flíÍI\(\/][ec][e]ri/gu, ' deſcri') //descripcion etc
.replace(/\s*de[flíÍI\(\/][ec][un]bie/gu, ' deſcubie')//descubier
.replace(/\s*de[flíÍI\(\/][ec][un]br/gu, ' deſcubr')//descubrimientos etc
.replace(/(?<=\P{L})(?!defen)de[flíÍI\(\/][ce][nu]/gu, 'deſcu')
.replace(/(?<=\P{L})de[flíÍI\(\/][ce][nu]y/gu, 'deſcuy')
.replace(/(?<=\P{L})de[flíÍI\(\/]d/gu, 'deſd') //desde, desdicha
.replace(/(?<=\P{L})de[flíÍI\(\/]em/gu, 'deſem')
.replace(/\s*de[flíÍI\(\/]e[mn]ga[ñn]/gu, ' deſengañ')
.replace(/(?<=\P{L})de[flíÍI\(\/]e(?=o|a)/gu, 'deſe')
.replace(/(?<=\P{L})de[flíÍI\(\/][flíÍI\(\/]e(?=o|a)/gu, 'deſſe')
.replace(/(?<=\P{L})de[fíÍ\(/]i/gu, 'deſi') //*delicadas
.replace(/\s*de[flíÍI\(\/]nu/gu, ' deſnu')
.replace(/(?<=\P{L})de[flíÍI\(\/]p/gu, 'deſp')
.replace(/(?<=\P{L})de[flíÍI\(\/]t/gu, 'deſt')
.replace(/\s*de[flíÍI\(\/][flíÍI\(\/]eo/gu, ' deſſeo')
.replace(/\s*die[flíÍI\(\/][tl]r/gu, ' dieſtr')
.replace(/\s*dige[flíÍI\(\/][flt]i/gu, ' digeſti')
.replace(/\s*(?!diff)di[flíÍI\(\/][ft]/gu, ' diſt') //todo dist
// .replace(/(?<=\P{L})di[flíÍI\(\/][flt]an/gu, 'diſtan') //distancia
// .replace(/(?<=\P{L})di[flíÍI\(\/][flt]in/gu, 'diſtin') //distinguir, distinto (ver si separar)
.replace(/\s*di[flíÍI\(\/][ce]re(?=t|c)/gu, ' diſcre') //discreto, discrecion
.replace(/\s*di[flíÍI\(\/][ce]ur[flíÍI\(\/]/gu, ' diſcurſ') //discurso
.replace(/(?<=\P{L})di[flíÍI\(\/]po[flíÍI\(\/]/gu, 'diſpoſ')
.replace(/\s*di[flíÍI\(\/]pue[flíÍI\(\/][tl]/gu, ' diſpueſt')
.replace(/(?<=\P{L})di[flíÍI\(\/][flt]r/gu, 'diſtr')
.replace(/(?<=\P{L})di[flíÍI\(\/](?=c|p)/gu, 'diſ') //al final
.replace(/(?<=\P{L})diui[flíÍI\(\/]/gu, 'diuiſ') //division
.replace(/\s*dome[flíÍI\(\/][tl]/gu, ' domeſt') //domesticar
.replace(/\s*e[ce][ce]l[ce][flíÍI\(\/]ia[flíÍI\(\/][tl]/gu, ' eccleſiaſt')
.replace(/\s*[ce]mb[ce][flíÍI\(\/][tl]i/gu, ' embeſti')
.replace(/\s*[ce]mbo[flíÍI\(\/]/gu, ' emboſ')
.replace(/(?<=\P{L})en[flíÍI\(\/]eñ/gu, 'enſeñ')
.replace(/(?<=\P{L})en[flíÍI\(\/]u(?=\P{L}|s)/gu, 'en ſu')
.replace(/(?<=\P{L})[ce]ntre[flíÍI\(\/][íi]/gu, 'entreſi')
.replace(/(?<=\P{L})e[flíÍI\(\/][ce]ap/gu, 'eſcap') //escapar
.replace(/(?<=\P{L})e[flíÍI\(\/][ce]ar/gu, 'eſcar') //escarcha
.replace(/(?<=\P{L})e[flíÍI\(\/][ce]lar/gu, 'eſclar')
.replace(/(?<=\P{L})e[flíÍI\(\/][ce]la[nu]/gu, 'eſclau')
.replace(/\s*e[flíÍI\(\/][ce]ond/gu, ' eſcond') //esconder
.replace(/\s*e[flíÍI\(\/][ce]re/gu, ' eſcre') //escrebir
.replace(/(?<=\P{L})e[flíÍI\(\/][ce]ri/gu, 'eſcri') //ojo con referi-
// .replace(/(?<=\P{L})e[flíÍI\(\/][ce]rit/gu, 'eſcrit')
.replace(/\s*e[flíÍI\(\/]mer/gu, ' eſmer')
.replace(/\s*E[flíÍI\(\/]peran[cgç]a/gu, ' Eſperança')
.replace(/\s*e[flíÍI\(\/]peran[cgç]a/gu, ' eſperança')
.replace(/(?<=\P{L})e[flíÍI\(\/]per/gu, 'eſper')
.replace(/(?<=\P{L})e[flíÍI\(\/]p/gu, 'eſp')
.replace(/(?<=\P{L})e[flíÍI\(\/]pe[flíÍI\(\/]o/gu, 'eſpeſo')
.replace(/\s*e[flíÍI\(\/]piri/gu, ' eſpiri')
.replace(/(?<=\P{L})[ce][flíÍI\(\/][lt][áàd](?=\P{L})/gu, 'eſtà')
.replace(/(?<=\P{L})(?!ella)[ce][flíÍI\(\/][lt]a(?=\P{L}|s)/gu, 'eſta')
.replace(/(?<=\P{L})[ce][flíÍ\(/lt]a(?=\P{L}|s)/gu, 'eſta')
.replace(/(?<=\P{L})celta(?=\P{L}|s)/gu, 'eſta')
.replace(/\s*[ce][flíÍI\(\/][lt]ado(?=\P{L})/gu, ' eſtado')
.replace(/(?<=\P{L})[ce][flíÍI\(\/][lt]an/gu, 'eſtan')
.replace(/(?<=\P{L})[ce][flíÍI\(\/][lt]ar(?=\P{L})/gu, 'eſtar')
.replace(/(?<=\P{L})[ce][flíÍI\(\/]ta[uvn]a(?=\P{L}|n)/gu, 'eſtaua')
.replace(/(?<=\P{L})[ce][flíÍI\(\/][lt][ce](?=\P{L})/gu, 'eſte')
.replace(/(?<=\P{L})[ce][flíÍ\(/lt][ce](?=\P{L})/gu, 'eſte')
.replace(/\s*[ce][flíÍI\(\/][lt]ien/gu, ' eſtien')
.replace(/\s*[ce][flíÍI\(\/][lt][ce]nd/gu, ' eſtend')
.replace(/(?<=\P{L})[ce][flíÍI\(\/][tl]io/gu, 'eſtio')
.replace(/(?<=\P{L})[ce][flíÍI\(\/][tl]im/gu, 'eſtim')
.replace(/\s*[ce][flíÍI\(\/][tl]omago/gu, ' eſtomago')
.replace(/(?<=\P{L})[ce][flíÍI\(\/][tl]ra/gu, 'eſtra')
.replace(/\s*[ce][flíÍI\(\/][tl]rella/gu, ' eſtrella')
.replace(/\s*[ce][flíÍI\(\/][tl]re[ce]h/gu, ' eſtrech')
.replace(/(?<=\P{L})(?!ello)[ce][flíÍI\(\/][lt]o(?=\P{L}|s)/gu, 'eſto')
.replace(/(?<=\P{L})[ce][flíÍ\([lt]o(?=\P{L}|s)/gu, 'eſto')
.replace(/(?<=\P{L})(?!ello)[ce][flíÍI\(\/][lt]oes(?=\P{L})/gu, 'eſto es')
.replace(/\s*e[flíÍ\(/t]+udi/gu, ' eſtudi')
.replace(/(?<=\P{L})ef(?![fei])/gu, 'eſ') // ef + cualquier cosa - ef[f]icaz ef[f]ecto
.replace(/\s*[EB][flíÍI\(\/]pa[hñ]/gu, ' Eſpañ')
.replace(/(?<=\P{L})e[flíÍI\(\/]pa[hñ]/gu, 'eſpañ')
.replace(/(?<=\P{L})exce[fíÍ\(/]+/gu, 'exceſſ')
.replace(/\s*famo[flíÍI\(\/]/gu, ' famoſ')
.replace(/\s*fie[flíÍI\(\/][tl]/gu, ' fieſt')
.replace(/\s*[EF]ranci[flíÍI\(\/][ec]o/gu, ' Franciſco')
.replace(/\s*fre[flíÍI\(\/][ce]/gu, ' freſc')
.replace(/\s*ga[flíÍI\(\/]t(?=a|o)/gu, ' gaſt')
.replace(/\s*grue[flíÍI\(\/][flíÍI\(\/]/gu, ' grueſſ')
.replace(/(?<=\P{L})grue[flíÍI\(\/]/gu, 'grueſ')
.replace(/(?<=\P{L})gu[flíÍI\(\/]t/gu, 'guſt')
.replace(/(?<=\P{L})ha[flíÍI\(\/]ido(?=\P{L})/gu, 'ha ſido')
.replace(/\s*ha[flíÍI\(\/]ta(?=\P{L})/gu, ' haſta')
.replace(/\s*hermo[flíÍI\(\/]/gu, ' hermoſ')
.replace(/\s*hi[flíÍ\(/t]+ori/gu, ' hiſtori')
.replace(/\s*Hi[flíÍ\(/t]+ori/gu, ' Hiſtori')
.replace(/(?<=\P{L})hue[flíÍI\(\/]o/gu, 'hueſo')
.replace(/(?<=\P{L})[Il]e[flíÍI\(\/]us(?=\P{L})/gu, 'Ieſus')
.replace(/\s*ilu[flíÍI\(\/][tl]r/gu, ' iluſtr')
.replace(/\s*i[mn][mn]en[flíÍI\(\/]/gu, ' immenſ')
.replace(/\s*indu[flíÍI\(\/][lt]ri/gu, ' induſtri')
.replace(/(?<=\P{L})in[flíÍI\(\/]ig/gu, 'inſig')
.replace(/(?<=\P{L})juri[flíÍI\(\/]/gu, 'juriſ')
.replace(/(?<=\P{L})ju[flíÍI\(\/][tl]/gu, 'juſt')
.replace(/\s*la[flíÍI\(\/][tl]im/gu, ' laſtim')
.replace(/\s*lu[flíÍI\(\/][tl]r/gu, ' luſtr')
.replace(/\s*ma[ce][flíÍI\(\/][flíÍI\(\/]/gu, ' maeſſ')
.replace(/\s*Ma[ce][flíÍI\(\/][flíÍI\(\/]/gu, ' Maeſſ')
.replace(/\s*ma[ce][flíÍI\(\/][tl]r/gu, ' maeſtr')
.replace(/\s*Ma[ce][flíÍI\(\/][tl]r/gu, ' Maeſtr')
.replace(/\s*Mage[flíÍt\(/ñ]+ad/gu, ' Mageſtad')
.replace(/\s*mari[flíÍI\(\/][ce]o/gu, ' mariſco')
.replace(/\s*m[ce]n[ce][flíÍI\(\/][tl][ce]r/gu, ' meneſter')
.replace(/\s*men[flíÍI\(\/]aj/gu, ' menſaj') //mensaje
.replace(/(?<=\P{L})me[flíÍI\(\/]es(?=\P{L})/gu, 'meſes')
.replace(/\s*me[flíÍI\(\/]ma/gu, ' meſma')
.replace(/\s*me[flíÍI\(\/]mo/gu, ' meſmo')
.replace(/mini[flíÍI\(\/][flt]/gu, 'miniſt') //adminiſtrar
.replace(/\s*mi[flíÍI\(\/]er(?=i|a)/gu, ' miſer')
.replace(/\s*mi[flíÍI\(\/]ma/gu, ' miſma')
.replace(/\s*mi[flíÍI\(\/]mo/gu, ' miſmo')
.replace(/\s*mi[flíÍI\(\/]+ion/gu, ' miſſion')
.replace(/\s*mi(?!ll)[flíÍI\(\/]+a(?!g)/gu, ' miſſa')
.replace(/\s*mi[flíÍI\(\/][tl]erio/gu, ' miſterio')
.replace(/\s*mole[flíÍI\(\/][tl]/gu, ' moleſt')
.replace(/\s*mona[flíÍI\(\/][tl]/gu, ' monaſt')
.replace(/(?<=\P{L})mo[flíÍI\(\/][tl]r/gu, 'moſtr')
.replace(/\s*mu[ce][flíÍI\(\/][tl]r/gu, ' mueſtr')
.replace(/\s*mu[flíÍI\(\/]ica/gu, ' muſica')
.replace(/\s*n[ce]c[ce][flíÍI\(\/]+/gu, ' neceſſ')
.replace(/\s*nue[flíÍI\(\/][lt]r/gu, ' nueſtr')
.replace(/\s*Nue[flíÍI\(\/]tr/gu, ' Nueſtr')
.replace(/\s*obi[flíÍI\(\/]p/gu, ' obiſp')
.replace(/\s*Obi[flíÍI\(\/]p/gu, ' Obiſp')
.replace(/(?<=\P{L})ob[flíÍI\(\/]er/gu, 'obſer')
.replace(/(?<=\P{L})oca[flíÍI\(\/][flíÍI\(\/]/gu, 'ocaſſ')
.replace(/(?<=\P{L})oca[flíÍI\(\/]/gu, 'ocaſ')
.replace(/\s*occa[flíÍI\(\/][flíÍI\(\/]/gu, ' occaſſ')
.replace(/\s*occa[flíÍI\(\/]/gu, ' occaſ')
.replace(/\s*Olande[flíÍI\(\/]/gu, ' Olandeſ')
.replace(/\s*opue[flíÍ\(/t][lt]/gu, ' opueſt')
.replace(/(?<=\P{L})para[flíÍI\(\/]i(?=\P{L})/gu, 'paraſi')
.replace(/(?<=\P{L})para[flíÍI\(\/]u(?=\P{L}|s)/gu, 'para ſu')
.replace(/(?<=\P{L})pa[flíÍI\(\/][flíÍI\(\/]/gu, 'paſſ')
.replace(/\s*pa[flíÍI\(\/]to/gu, ' paſto')
.replace(/\s*pen[flíÍI\(\/]/gu, ' penſ')
.replace(/\s*per[flíÍI\(\/]on/gu, ' perſon')
.replace(/\s*per[flíÍI\(\/]ua/gu, ' perſua')
.replace(/(?<=\P{L})(?!pelea)pe[flíÍI\(\/][ce]a/gu, 'peſca')
.replace(/(?<=\P{L})pe[fíÍ\(]o(?=\P{L}|s)/gu, 'peſo')
.replace(/(?<=\P{L})pien[flíÍI\(\/]/gu, 'pienſ')
.replace(/(?<=\P{L})por[flíÍI\(\/]u(?=\P{L}|s)/gu, 'por ſu')
.replace(/(?<=\P{L})po[flíÍI\(\/][flíÍI\(\/]e[flíÍI\(\/][flíÍI\(\/]/gu, 'poſſeſſ')
.replace(/po[flíÍI\(\/]+i*ble/gu, 'poſſible')
.replace(/\s*Poto[flíÍI\(\/]i/gu, ' Potoſi')
.replace(/\s*pre[flíÍI\(\/]id/g, ' preſid')
.replace(/\s*pre[flíÍI\(\/][flíÍI\(\/]a/g, ' preſſa')
.replace(/\s*pre[flíÍI\(\/]t/g, ' preſt')
.replace(/\s*pre[flíÍI\(\/]en[tr]/g, ' preſent')
.replace(/(?<=\P{L})pre[flíÍI\(\/]/g, 'preſ')
.replace(/prie[flíÍI\(\/][flíÍI\(\/]/g, 'prieſſ')
.replace(/\s*proce[flíÍ\(/i]+/gu, ' proceſſi')
.replace(/\s*pro[flíÍI\(\/]ig/gu, ' proſig')
.replace(/\s*pro[flíÍI\(\/]egu/gu, ' proſegu')
.replace(/propo[flíÍI\(\/]/gu, 'propoſ')
.replace(/\s*pue[flíÍI\(\/][lt](?=o|a)/gu, ' pueſt')
.replace(/(?<=\P{L})pu[flíÍI\(\/]ier/gu, 'puſier')
.replace(/(?<=\P{L})pu[flíÍI\(\/]o(?=\P{L})/gu, 'puſo')
.replace(/pu[flíÍI\(\/]+i*ble/gu, 'puſſible')
.replace(/(?<=\P{L})que[flíÍI\(\/]on/gu, 'que ſon')
.replace(/(?<=\P{L})qui[flíÍI\(\/]/gu, 'quiſ') //quiso, quisieran
.replace(/(?<=\P{L})refre[flíÍI\(\/][ce]/gu, 'refreſc')
.replace(/\s*re[flíÍI\(\/]i[flíÍI\(\/][tl]/gu, ' reſiſt') //resistencia
.replace(/\s*re[flíÍI\(\/]p[tl]/gu, ' reſpl') //resplandor
.replace(/(?!refor)re[flíÍI\(/]o/gu, 'reſo')
.replace(/\s*re[flíÍI\(\/]p(?=ue|on|et)/gu, ' reſp') //resplandor
.replace(/(?<=\P{L})rigoro[flíÍI\(\/]([ao]s?)/gu, 'rigoroſ$1') //rigorosas, os.
.replace(/\s*ro[flíÍI\(\/][tl]ro/gu, ' roſtro')
.replace(/(?<=\P{L})[flíÍI\(\/]abia(?=\P{L}|n)/gu, 'ſabia')
.replace(/(?<=\P{L})[flíÍI\(\/]abe(?=\P{L}|n|r)/gu, 'ſabe')
.replace(/(?<=\P{L})[fí\(]abor/gu, 'ſabor') //pero no labor
.replace(/(?<=\P{L})(?!labio)[flíÍI\(\/]abi/gu, 'ſabi')
.replace(/(?<=\P{L})[flíÍI\(\/]aca(?=n|r|\P{L})/gu, 'ſaca')
.replace(/(?<=\P{L})[fíÍI\(\/]a[ec](?!i|ul)/gu, 'ſac')
.replace(/(?<=\P{L})[flíÍI\(\/]agra/gu, ' ſagra') // no cambiar x Villagran
.replace(/(?<=\P{L})[flíÍI\(\/]ale(?=\P{L}|n)/gu, 'ſale')
.replace(/(?<=\P{L})[flíÍI\(\/]al(?=\P{L})/gu, 'ſal')
.replace(/(?<=\P{L})[flíÍI\(\/]alga(?=\P{L}|n)/gu, 'ſalga')
.replace(/\s*[flíÍI\(\/]ali(?=\P{L}|r|d|e|o|ò|a)/gu, ' ſali')
.replace(/(?<=\P{L})[flíÍI\(\/]alua/gu, 'ſalua')
.replace(/(?<=\P{L})[líÍI\(/]alta/gu, 'ſalta') // saltar, importante sin f x falta
.replace(/\s*[flíÍI\(\/]alud/gu, ' ſalud')
.replace(/fal(?!d|t|ſ|l|i|e)/gu, 'ſal')
.replace(/(?<=\P{L})fan(?=\P{L}|to|ta)/gu, 'ſan')
.replace(/(?<=\P{L})[flíÍI\(\/]ant(?=o|i)/gu, 'ſant')
.replace(/\s*[flíÍI\(\/]angr/gu, ' ſangr')
.replace(/(?<=\P{L})[flíÍI\(\/]atisf/gu, 'ſatisf')
.replace(/(?<=\P{L})[\(\[ef][ée](?=\P{L}|a)/gu, 'ſe')
.replace(/(?<=\P{L})[flíÍI\(\/]ec(?=o|a)/gu, 'ſec') // seco
.replace(/(?<=\P{L})[flíÍI\(\/]ecria/gu, 'ſe cria') // seco
.replace(/(?<=\P{L})[flíÍI\(\/]eda(?=\P{L})/gu, 'ſeda')
.replace(/(?<=\P{L})[flíÍI\(\/]egu(?=i|n|r)/gu, 'ſegu') //segui, segun, segur
.replace(/(?<=\P{L})[flíÍI\(\/]eis(?=\P{L})/gu, 'ſeis')
.replace(/(?<=\P{L})[flíÍI\(\/]ela(?=\P{L}|s)/gu, 'ſe la')
.replace(/(?<=\P{L})[flíÍI\(\/]elo(?=\P{L}|s)/gu, 'ſe lo')
.replace(/\s*[flíÍI\(\/]emana/gu, ' ſemana')
.replace(/(?<=\P{L})[flíÍI\(\/]embr/gu, 'ſembr')
.replace(/(?<=\P{L})[flíÍI\(\/]eme/gu, 'ſeme')
.replace(/\s*[flíÍI\(\/]enti(?=d|r|m|an)/gu, ' ſenti')
.replace(/(?<=\P{L})[flíÍI\(\/]eña/gu, 'ſeña') // ojo con Ygleña
.replace(/\s*[flíÍI\(\/]eñor/gu, ' ſeñor')
.replace(/(?<=\P{L})[flíÍI\(\/]epa(?=\P{L}|n)/gu, 'ſepa')
.replace(/\s*[flíÍI\(\/]epul/gu, ' ſepul')
.replace(/(?<=\P{L})[flíÍI\(\/]er(?=\P{L}|an|a\P{L})/gu, 'ſer')
.replace(/(?<=\P{L})[flíÍI\(\/]eria(?=\P{L}|n)/gu, 'ſeria')
.replace(/\s*[flíÍI\(\/]er[uvn]ici/gu, ' ſeruici') //servicio
.replace(/\s*[flíÍI\(\/]er[uvn]ir/gu, ' ſeruir')
.replace(/(?<=\P{L})[flíÍI\(\/]i(?=\P{L})/gu, 'ſi')
.replace(/(?<=\P{L})[flíÍI\(\/]ido(?=\P{L})/gu, 'ſido')
.replace(/(?<=\P{L})[flíÍI\(\/]iendo(?=\P{L}|l)/gu, 'ſiendo')
.replace(/(?<=\P{L})[flíÍI\(\/]iente/gu, 'ſiente')
.replace(/(?<=\P{L})[flíÍI\(\/]i[ce][tr][ce](?=\P{L})/gu, 'ſiete')
.replace(/(?<=\P{L})[flíÍI\(\/]ign/gu, ' ſign')
.replace(/\s*[flíÍI\(\/]igui/gu, ' ſigui')
.replace(/\s*[flíÍI\(\/]iembr/gu, ' ſiembr')
.replace(/\s*[flíÍI\(\/]iempre/gu, ' ſiempre')
.replace(/(?<=\P{L})[flíÍI\(\/]iete/gu, 'ſiete')
.replace(/(?<=\P{L})[flíÍI\(\/]igue/gu, 'ſigue')
.replace(/\s*[flíÍI\(\/]imple/gu, ' ſimple')
.replace(/(?<!en )(?<=\P{L})[flíÍI\(\/]in /gu, 'ſin ') //fin -> ſin, evaluar continuidad
.replace(/(?<=\P{L})[flíÍI\(\/]ing(?!i)/gu, 'ſing') // fingir
.replace(/(?<=\P{L})[flíÍI\(\/]ino/gu, 'ſino')
.replace(/(?<=\P{L})[flíÍI\(\/]ir[uvn](?=e|a|ie)/gu, 'ſiru')
.replace(/(?<=\P{L})[flíÍI\(\/]itio(?=\P{L}|s)/gu, 'ſitio')
.replace(/\s*[flíÍI\(\/]ober/gu, ' ſober')
.replace(/(?<=\P{L})[flíÍI\(\/]obr/gu, 'ſobr')
.replace(/\s*[flíÍI\(\/]ocorr/gu, ' ſocorr')
.replace(/(?<=\P{L})[flíÍI\(\/]ola/gu, 'ſola')
.replace(/\s*[flíÍI\(\/]oldad/gu, ' ſoldad')
.replace(/\s*[flíÍI\(\/]ole[mn]+/gu, ' ſolemn')
.replace(/(?<=\P{L})[flíÍI\(\/]olia/gu, 'ſolia')
.replace(/\s*[flíÍI\(\/]olici/gu, ' ſolici')
.replace(/(?<=\P{L})[flíÍI\(\/]olo/gu, 'ſolo')
.replace(/\s*[flíÍI\(\/]ombr/gu, ' ſombr')
.replace(/(?<=\P{L})[flíÍI\(\/]on(?=\P{L})/gu, 'ſon')
.replace(/(?<=\P{L})[flíÍI\(\/]opl/gu, 'ſopl')
.replace(/\s*[flíÍI\(\/]o[flíÍI\(\/]p/gu, ' ſoſp') //echa
.replace(/(?<=\P{L})[\(flíIÍ][nuú](?=\P{L}|s)/gu, 'ſu')
.replace(/\s[\(fíIÍ]a\s/gu, ' ſu ')
.replace(/\s*[\(fíIÍ]us/gu, ' ſus ')
.replace(/(?<=\P{L})[flíÍI\(\/]ua[vnu]e/gu, 'ſuaue')
.replace(/(?<=\P{L})[flíÍI\(\/]ua[vnu]i/gu, 'ſuaui')
.replace(/(?<=\P{L})[flíÍI\(\/]ube/gu, 'ſube')
.replace(/(?<=\P{L})[flíÍI\(\/]ubi/gu, 'ſubi')
.replace(/(?<=\P{L})[flíÍI\(\/]u[ce]+d/gu, 'ſucced')
.replace(/(?<=\P{L})[flíÍI\(\/]ucc/gu, 'ſucc')
.replace(/\s*[flíÍI\(\/]uele(?=\P{L}|n)/gu, ' ſuele') //ſuelen*
.replace(/(?!lucio)[flíÍI\(\/]u[ce][li]o/gu, 'ſuelo') //no cambiar x reſolucion
.replace(/[flíÍI\(\/]uelt/gu, 'ſuelt')
.replace(/a [flíÍI\(\/]uerte/gu, 'a ſuerte')
.replace(/\s*[flíÍI\(\/]uerte ?de/gu, ' ſuerte de')
.replace(/\s*[flíÍI\(\/]uertes ?de/gu, ' ſuertes de')
.replace(/\s*[flíÍI\(\/]uffi/gu, ' ſuffi')
.replace(/[flíÍI\(\/]ufr/gu, 'ſufr')
.replace(/(?<=\P{L})[flíÍI\(\/]uge/gu, 'ſuge')
.replace(/(?<=\P{L})[flíÍI\(\/]umma/gu, 'ſumma')
.replace(/(?<=\P{L})[flíÍI\(\/]up/gu, 'ſup')
.replace(/(?<=\P{L})[fíÍ\(/][ua]s(?=\P{L})/gu, 'ſus')
.replace(/(?<=\P{L})[flíÍI\(\/]us(?=\P{L})/gu, 'ſus')
.replace(/(?<=\P{L})[flíÍI\(\/]u[flíÍI\(\/][tl]en/gu, 'ſuſten')
.replace(/(?<=\P{L})[\(flíIÍ]u[yv]a(?=\P{L}|s)/gu, 'ſuya')
.replace(/(?<=\P{L})[\(flíIÍ]u[yv]o(?=\P{L}|s)/gu, 'ſuyo')
.replace(/\s*tempe[flíÍI\(\/][tl]/gu, ' tempeſt')
.replace(/\s*te[flíÍI\(\/][flíÍI\(\/]on/gu, ' teſſon')
.replace(/(?<=\P{L})te[flíÍI\(\/]ti/gu, 'teſti')
.replace(/\s*th[ec][flíÍI\(\/]or/gu, ' theſor')
.replace(/\s*tri[flíÍI\(\/]te/gu, ' triſte')
.replace(/(?<=\P{L})[uv][flíÍI\(\/](?=\P{L}|o|a|ua)/gu, 'vſ') //vſo (uso)
.replace(/\s*ve[flíÍI\(\/][tl]i(?=r|d)/gu, ' veſti')
.replace(/(?<=\P{L})[yv]ito/gu, 'viſto')
.replace(/(?<=\P{L})[yv]i[flíÍI\(\/][tl]o[flíÍI\(\/]/gu, 'viſtoſ')
.replace(/(?<=\P{L})[yv]i(?!ll)[flíÍI\(\/][tl]/gu, 'viſt')
.replace(/\s*vn ?i[un]er[flíÍI\(\/]/gu, ' vniuerſ')
.replace(/\s*[yv]ue[flíÍI\(\/][tr]+/gu, ' vueſtr')
.replace(/\s*[yv]o[flíÍI\(\/]o[tr]+os/gu, ' voſotros')
.replace(/\s*Ygle[flíÍ\(/ñ][íi]*a/gu, ' Ygleſia')
//consonantongos
.replace(/[íÍ\(/]u/g, 'ſu')
.replace(/e[flíÍI\(\/](c|p)(?!h)/g, 'eſ$1')
.replace(/[gd]t/g, 'ct')
.replace(/(?<=o|e)[fl]q/g, 'ſq')
.replace(/fea/g, 'ſca')
.replace(/feo/g, 'ſco')
.replace(/feu/g, 'ſcu')
.replace(/fon(?!d|ſ)/g, 'ſon')
.replace(/ftr/g, 'ſtr')
.replace(/rf(o|a|e[^c])/g, 'rſ$1')
.replace(/tl/g, 'rl')
.replace(/ſtana/g, 'ſtaua')
.replace(/ſtun/g, 'ſtuu')
.replace(/(?<!m)anga/g, 'ança')
.replace(/(?<!opor)tuno/g, 'tuuo')
.replace(/faua/g, 'ſaua')
.replace(/(?<!por|gra)fia(?=\P{L})/gu, 'ſia')
//endings
.replace(/cr(?=\P{L}|on)/gu, 'er')
.replace(/uf([oa])/g, 'uſ$1')
.replace(/(?<=[dejnpſz])a[vn]a(?=\P{L})/gu, 'aua')
.replace(/(?<!m|g|ſ)anan(?=\P{L})/gu, 'auan')
.replace(/avan(?=\P{L})/gu, 'auan')
.replace(/(?<!vi)nieran/gu, 'uieran')
.replace(/(?<!vi)nieron/gu, 'uieron')
.replace(/enre/gu, 'ente')
.replace(/(?<!u)\s*[ce]lt(?=a|o)/gu, ' eſt')
.replace(/o[fíÍ\(/]([oa]s?)(?=\P{L})/gu, 'oſ$1')
.replace(/[flíÍI\(\/]el([oea]s?)(?=\P{L})/gu, 'ſel$1')
.replace(/[fíÍ\(/]ando/gu, 'ſando')
.replace(/[flíÍI\(\/][flíÍI\(\/]ion(?=\P{L})/gu, 'ſſion')
.replace(/(?<!e)[flíÍI\(\/]ion(?=\P{L})/gu, 'ſion')
.replace(/ro[flíÍI\(\/]o(?=\P{L}|s)/gu, 'roſo') //poderoſo, valeroſo
.replace(/(?!ella)[ce][flíÍI\(\/][flíÍI\(\/]a/gu, 'eſſa')
.replace(/[ce][flíÍI\(\/][flíÍI\(\/][ce](?=\P{L}|n\P{L})/gu, 'eſſe')
.replace(/(?!ello)[ce][flíÍI\(\/][flíÍI\(\/]o/gu, 'eſſo')
.replace(/(?!ll)[flíÍI\(\/][flíÍI\(\/](os?)(?=\P{L})/gu, 'ſſ$1')
.replace(/(?!ll)[flíÍI\(\/][flíÍI\(\/](a[nrs]?)(?=\P{L})/gu, 'ſſ$1')
.replace(/(?!ll)[flíÍI\(\/][flíÍ\(/)](en?)(?=\P{L})/gu, 'ſſ$1')
.replace(/[flíÍI\(\/]+(im[ao]s?)(?=\P{L})/gu, 'ſſ$1') //ilustriſſimas, os, etc
.replace(/[fíÍI\(\/]t([ao])(?=\P{L}|s)/gu, 'ſt$1')
.replace(/[fíÍI\(\/]amente(?=\P{L})/gu, 'ſamente')
.replace(/[fíÍ\(/][ce](?=\P{L})/gu, 'ſe') //al final
.replace(/[fíÍ\(/]as(?=\P{L})/gu, 'ſas')
.replace(/[fíÍ\(/]os(?=\P{L})/gu, 'ſos')
//otras
//.replace(/(?<!di|o)[fí][fí]/gu, 'ſſ') // risky - difficil - officio
.replace(/(q|G) /gu, 'q̃ ') //risky
// post-correcciones
.replace(/(?<=\P{L})eſſos/gu, 'ellos')
.replace(/[fíÍ](?=c|d|g|m|n|p|q|s|t)/g, 'ſ') // f+consonantes raras
.replace(/cſ/g, 'eſ')
//pies de pagina
.replace(/\n(Libro [VIX]+)\.*\s([A-Z] ?[a-z][a-z]?(?: ?\d)?)\s([\p{L}\-\.~]{1,8})\s*$/gu, function(match, p1, p2 , p3) {
$('#wpFooterTextbox').val('{{div col end}}\n{{pie|'+p1+'|'+p2+'|'+p3+'}}');
return ''})
.replace(/\n([\p{L}\-\.~]{1,8})\s*$/gu, function(match, p1) {
$('#wpFooterTextbox').val('{{div col end}}\n{{pie|3='+p1+'}}');
return ''})
//CAPITVLOS
.replace(/^CAP[ÍI]TVLO ([IVX]+)[\.,]*\s*\n+([\p{L},: ſ]+)[,\.]/mgu, "\n{{t3|CAPITVLO $1.<br/>\n''$2.''}}\n")
.replace(/[-]\s*/g, '')
.replace(/ (ſ|s) /g, ' ')
.replace(/ aura/g, ' aora')
.replace(/ (de|en|para|tenia|que|ya|a|entre|fue)s /g, ' $1 ')
.replace(/(?<=\p{L})(ſ|j)(?=\P{L})/gu, '')
.replace(/eẽt/g, 'ect')
.replace(/([a-z])([A-Z])/g, '$1 $2')
.replace(/(?<!ſ)s(?=\w)(?!l|f|b|t)/g, 's ')
//casi no hay acentos agudos y el OCR confunde acento agudo x tilde
.replace(/[áä]/gu, 'ã')
.replace(/[éë]/gu, 'ẽ')
.replace(/[óö]/gu, 'õ')
.replace(/ẽ(?=\P{L})/gu, 'è')
;
}
if (mw.config.get('wgTitle').match(/reyno567845683457634576835834/) ) { /* Molina y Rosales, fuera Molina x miles de ataos*/
editor
// .replace(/CAP[IÍ]TULO ([IVXL]+)\.*\s*/g, '{{t3|CAPÍTULO $1.}}\n{{línea|5em|e=1em}}\n{{c|')
.replace(/[íi][óo]n([ .,:;\n])/g, 'ion$1')
.replace(/[íi][áa]n([ .,:;\n])/g, 'ian$1')
// .replace(/[íi][áa]s([ .,:;\n])/g, 'ias$1')
// .replace(/ía([ .,:;\n])/g, 'ia$1')
.replace(/ón([ .,:;\n])/g, 'on$1')
.replace(/([a-záéíóú])H([a-záéíóú])/g, '$1li$2')
.replace(/ muí/g, ' mui')
.replace(/ ks/g, ' las')
.replace(/ (?:j|7) /g, ' y ')
.replace(/ fácil/g, ' facil')
.replace(/ mió/g, ' mio')
.replace(/ río/g, ' rio')
.replace(/ árbol\b/g, ' arbol')
.replace(/ débil/g, ' debil')
.replace(/tólic/g, 'tolic')
.replace(/ dio /g, ' dió ')
.replace(/ Ue/g, ' lle')
.replace(/volumen/g, 'volúmen')
.replace(/después/g, 'despues')
.replace(/también/g, 'tambien')
.replace(/También/g, 'Tambien')
.replace(/ imbiemo/g, ' imbierno')
.replace(/ jomada/g, ' jornada')
.replace(/ camero/g, ' carnero')
.replace(/rchipiélago/g, 'rchipielago')
.replace(/ atrás/g, ' atras')
.replace(/ fábula/g, ' fabula')
.replace(/ evangélic/g, ' evangelic')
.replace(/ógra/g, 'ogra')
.replace(/ógic/g, 'ogic')
.replace(/ompañía/g, 'ompañia')
.replace(/ príncipe/g, ' principe')
.replace(/ rápid/g, ' rapid')
.replace(/según/g, 'segun')
.replace(/algún/g, 'algun')
.replace(/ningún/g, 'ningun')
.replace(/común/g, 'comun')
.replace(/ únic/g, ' unic')
.replace(/océano/g, 'oceano')
.replace(/rópico/g, 'ropico')
.replace(/cónico/g, 'conico')
.replace(/ género/g, ' genero')
.replace(/apitán/g, 'apitan')
.replace(/ revés/g, 'reves')
.replace(/crimen/g, 'crímen')
.replace(/lférez/g, 'lferez')
.replace(/ Peni/g, ' Perú')
.replace(/Jesús/g, 'Jesus')
.replace(/Osomo/g, 'Osorno')
.replace(/Román/g, 'Roman')
.replace(/Femando/g, 'Fernando')
.replace(/García/g, 'Garcia')
.replace(/Gutiérrez/g, 'Gutierrez')
.replace(/ Valparaíso/g, ' Valparaiso')
.replace(/ Chiloe/g, ' Chiloé')
.replace(/ Ohi/g, ' Chi')
.replace(/\((?:\d|i)\)/g, '<ref></ref>')
.replace(/Jos\b/g, 'los')
.replace(/fr[ií][óo]([ .,:;\n])/g, 'frio$1')
.replace(/demás/g, 'demas')
.replace(/ag,/g, 'ag.')
.replace(/¬ /g, '')
.replace(/«|»/g, '"')
.replace(/\bpaís/g, 'pais')
.replace(/ reí/g, ' rei')
.replace(/ fol,/g, ' fol.')
}
if (mw.config.get('wgTitle').match(/perfeta/)) {
editor.replace(/a(?![\w\s]*>|[\w\s]*\||[\w\s]*}|[\w\s]*=)/g,'ɑ')
.replace(/á(?![\w\s]*>|[\w\s]*\||[\w\s]*}|[\w\s]*=)/g,'ɑ́')
.replace(/d(?!\'|[\w\s]*>|[\w\s]*\||[\w\s]*}|[\w\s]*=)/g,"''d''")
.replace(/<strike>LL<\/strike>/g,"{{ok-LL}}")
.replace(/<strike>ll<\/strike>/g,"{{ok-ll}}")
.replace(/R<sup>r<\/sup>/g,"{{ok-RR}}")
.replace(/<strike>rr<\/strike>/g,"{{ok-rr}}")
.replace(/<strike>CH<\/strike>/g,"{{ok-CH}}")
.replace(/<strike>ch<\/strike>/g,"{{ok-ch}}")
.replace(/LL(?![\w\s]*})/g,"{{ok-LL}}")
.replace(/ll(?![\w\s]*})/g,"{{ok-ll}}")
.replace(/RR(?![\w\s]*})/g,"{{ok-RR}}")
.replace(/rr(?![\w\s]*})/g,"{{ok-rr}}")
.replace(/CH(?![\w\s]*})/g,"{{ok-CH}}")
.replace(/ch(?![\w\s]*})/g,"{{ok-ch}}")
.replace(/K/g, "k")
.replace(/â/g, "ɑ᷄")
.replace(/ê/g, "e᷄")
.replace(/î/g, "i᷄")
.replace(/ô/g, "o᷄")
.replace(/û/g, "u᷄")
;
}
};
});
// </nowiki>