Skip to content

Instantly share code, notes, and snippets.

@fabiospampinato
Created June 23, 2022 19:25
Show Gist options
  • Save fabiospampinato/751fc6a6327ad803ba49880f5393b3cb to your computer and use it in GitHub Desktop.
Save fabiospampinato/751fc6a6327ad803ba49880f5393b3cb to your computer and use it in GitHub Desktop.
English or Spanish classifier
var l=["eng","spa"],G=l,f=Object.fromEntries(l.map((e,s)=>[e,s]));var b={output:e=>e.map((N,o)=>({language:G[o],probability:N})).sort((N,o)=>o.probability-N.probability)},H=b;var S={getHashes:(e,s)=>[(e.charCodeAt(0)&255)/255,s]},x=S;var _={getFrequencies:(e,s,a=1/0)=>{let N=_.getTable(e,s),o=Object.entries(N),r=o.reduce((E,A)=>E+A[1],0);return o.slice(0,a).map(([E,A])=>[E,A/r]).sort((E,A)=>A[1]-E[1])},getHashes:(e,s,a=1/0)=>_.getFrequencies(e,s,a).flatMap(([r,c])=>x.getHashes(r,c)),getTable:(e,s)=>{let a=/\d/g,N=/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,\-.\/:;<=>?@\[\]^_`{|}~]/g,r=e.toLowerCase().replace(a,"").replace(N,"").split(/\s+/g),c={};for(let T=0,E=r.length;T<E;T++){let A=r[T];for(let g=0,D=A.length-s;g<=D;g++){let h=A.slice(g,g+s),O=(c[h]||0)+1;c[h]=O}}return c}},m=_;var U={input:e=>{let s=m.getHashes(e,1,40),a=m.getHashes(e,2,20),N=m.getHashes(e,3,10),o=new Array(40+20+10).fill(0);return s.forEach((r,c)=>{o[c]=r}),a.forEach((r,c)=>{o[c+40]=r}),N.forEach((r,c)=>{o[c+40+20]=r}),o},output:e=>{let s=new Array(l.length).fill(0),a=f[e];return s[a]=1,s}},M=U;function d(e){return[1/(1+1/Math.exp(-.672571063041687+6.93455171585083*1/(1+1/Math.exp(.841010570526123+.9608888030052185*(e[0]||0)-2.199734926223755*(e[1]||0)+4.318807601928711*(e[2]||0)-1.4821300506591797*(e[3]||0)+.8962650895118713*(e[4]||0)+.3159785568714142*(e[5]||0)-.29353079199790955*(e[6]||0)+.7397826910018921*(e[7]||0)+.09789010137319565*(e[8]||0)+.6985691785812378*(e[9]||0)-.3734580874443054*(e[10]||0)+.6484885215759277*(e[11]||0)+1.2653168439865112*(e[12]||0)-.036430541425943375*(e[13]||0)+.5393277406692505*(e[14]||0)-.6878035068511963*(e[15]||0)+.40408799052238464*(e[16]||0)-.29186657071113586*(e[17]||0)+.22860309481620789*(e[18]||0)-.3715086281299591*(e[19]||0)-2.230182409286499*(e[20]||0)-.35477468371391296*(e[21]||0)-4.210361957550049*(e[22]||0)+.04031825065612793*(e[23]||0)-2.091130495071411*(e[24]||0)+.11710327863693237*(e[25]||0)-1.5163564682006836*(e[26]||0)+.533817708492279*(e[27]||0)-1.3918695449829102*(e[28]||0)+.797065258026123*(e[29]||0)-2.0199778079986572*(e[30]||0)+.9391012191772461*(e[31]||0)-1.996896743774414*(e[32]||0)+.7549800276756287*(e[33]||0)-1.6290465593338013*(e[34]||0)+.6273425221443176*(e[35]||0)-.8011078834533691*(e[36]||0)+.5252278447151184*(e[37]||0)-.6874058842658997*(e[38]||0)+.7089119553565979*(e[39]||0)+3.4538769721984863*(e[40]||0)-.9632924199104309*(e[41]||0)+2.2980265617370605*(e[42]||0)-.326960951089859*(e[43]||0)+1.689473271369934*(e[44]||0)-.26793038845062256*(e[45]||0)+.18798935413360596*(e[46]||0)-.07186221331357956*(e[47]||0)+.18230217695236206*(e[48]||0)-.1782747209072113*(e[49]||0)+.04997736215591431*(e[50]||0)-.11405995488166809*(e[51]||0)-.29049748182296753*(e[52]||0)-.17203070223331451*(e[53]||0)-.18596182763576508*(e[54]||0)-.10004443675279617*(e[55]||0)+.3587644696235657*(e[56]||0)+.0038997263181954622*(e[57]||0)+.45897844433784485*(e[58]||0)-.1495363414287567*(e[59]||0)+.9705561399459839*(e[60]||0)+.9509556293487549*(e[61]||0)+.6122007966041565*(e[62]||0)+.10207831859588623*(e[63]||0)+.3056499660015106*(e[64]||0)-.023820875212550163*(e[65]||0)+.12170688062906265*(e[66]||0)-.0038301197346299887*(e[67]||0)-.32222211360931396*(e[68]||0)-.1409883201122284*(e[69]||0)-.04922665283083916*(e[70]||0)-.15029728412628174*(e[71]||0)-.5574071407318115*(e[72]||0)-.22983966767787933*(e[73]||0)-.21768328547477722*(e[74]||0)-.13901087641716003*(e[75]||0)+.8932532668113708*(e[76]||0)-.28109729290008545*(e[77]||0)+.12630656361579895*(e[78]||0)-.08572656661272049*(e[79]||0)))-5.266615390777588*1/(1+1/Math.exp(-.5973936319351196-.9308860898017883*(e[0]||0)+1.8214871883392334*(e[1]||0)-3.1016287803649902*(e[2]||0)+1.0629639625549316*(e[3]||0)-.5562313199043274*(e[4]||0)-.2720854878425598*(e[5]||0)+.3181038498878479*(e[6]||0)-.5217929482460022*(e[7]||0)-.30054378509521484*(e[8]||0)-.3209865391254425*(e[9]||0)+.3603309988975525*(e[10]||0)-.36649495363235474*(e[11]||0)-.7987774014472961*(e[12]||0)-.09267842769622803*(e[13]||0)-.4380982518196106*(e[14]||0)+.5816940665245056*(e[15]||0)-.371826171875*(e[16]||0)+.11377377808094025*(e[17]||0)-.1024317517876625*(e[18]||0)+.27525123953819275*(e[19]||0)+1.3917834758758545*(e[20]||0)+.49590981006622314*(e[21]||0)+3.0715889930725098*(e[22]||0)+.04268656671047211*(e[23]||0)+1.6217708587646484*(e[24]||0)-.14063182473182678*(e[25]||0)+1.085949182510376*(e[26]||0)-.19761347770690918*(e[27]||0)+.9241688251495361*(e[28]||0)-.6926320195198059*(e[29]||0)+1.4669042825698853*(e[30]||0)-.7897417545318604*(e[31]||0)+1.4677032232284546*(e[32]||0)-.7987170815467834*(e[33]||0)+.9907728433609009*(e[34]||0)-.61884605884552*(e[35]||0)+.3538714051246643*(e[36]||0)-.3747459650039673*(e[37]||0)+.3708418607711792*(e[38]||0)-.3053472936153412*(e[39]||0)-2.333292007446289*(e[40]||0)+.7206805348396301*(e[41]||0)-1.4453736543655396*(e[42]||0)+.4028736352920532*(e[43]||0)-1.358162760734558*(e[44]||0)+.3046856224536896*(e[45]||0)-.24911555647850037*(e[46]||0)-.060104817152023315*(e[47]||0)-.21798793971538544*(e[48]||0)+.021167539060115814*(e[49]||0)-.15372245013713837*(e[50]||0)+.13148394227027893*(e[51]||0)+.24037881195545197*(e[52]||0)+.24475446343421936*(e[53]||0)+.11827909201383591*(e[54]||0)+.19051745533943176*(e[55]||0)-.31595686078071594*(e[56]||0)-.020983071997761726*(e[57]||0)-.1614471822977066*(e[58]||0)+.03266844525933266*(e[59]||0)-.5322415828704834*(e[60]||0)-.3803841471672058*(e[61]||0)-.29653871059417725*(e[62]||0)-.17979459464550018*(e[63]||0)-.3158247470855713*(e[64]||0)-.1813209056854248*(e[65]||0)-.044424787163734436*(e[66]||0)-.15078105032444*(e[67]||0)+.0111430324614048*(e[68]||0)+.12021337449550629*(e[69]||0)+.11390230059623718*(e[70]||0)-.004399062134325504*(e[71]||0)+.45580780506134033*(e[72]||0)+.05511792376637459*(e[73]||0)+.31477105617523193*(e[74]||0)+.19071651995182037*(e[75]||0)-.380367636680603*(e[76]||0)+.07175406068563461*(e[77]||0)+.04567624628543854*(e[78]||0)+.049385715276002884*(e[79]||0)))+7.118618011474609*1/(1+1/Math.exp(.8242306709289551+1.0338181257247925*(e[0]||0)-2.3158175945281982*(e[1]||0)+4.1063103675842285*(e[2]||0)-1.3892120122909546*(e[3]||0)+.8535661697387695*(e[4]||0)+.13773217797279358*(e[5]||0)-.3617292642593384*(e[6]||0)+.42140138149261475*(e[7]||0)+.41732344031333923*(e[8]||0)+.7900794744491577*(e[9]||0)-.33837321400642395*(e[10]||0)+.5434768795967102*(e[11]||0)+1.071194052696228*(e[12]||0)-.12407613545656204*(e[13]||0)+.6900293231010437*(e[14]||0)-.4954645037651062*(e[15]||0)+.48270344734191895*(e[16]||0)-.11852894723415375*(e[17]||0)+.005157445557415485*(e[18]||0)-.16990111768245697*(e[19]||0)-2.2098724842071533*(e[20]||0)-.31567689776420593*(e[21]||0)-4.019402980804443*(e[22]||0)+.11087624728679657*(e[23]||0)-2.1309690475463867*(e[24]||0)+.19127218425273895*(e[25]||0)-1.5463526248931885*(e[26]||0)+.5592865943908691*(e[27]||0)-1.3366587162017822*(e[28]||0)+1.0826648473739624*(e[29]||0)-2.006927728652954*(e[30]||0)+.8460788726806641*(e[31]||0)-2.3102190494537354*(e[32]||0)+.6953321099281311*(e[33]||0)-1.6665408611297607*(e[34]||0)+.6790331602096558*(e[35]||0)-.7593835592269897*(e[36]||0)+.8474642038345337*(e[37]||0)-.6522541642189026*(e[38]||0)+.6448646187782288*(e[39]||0)+3.397916078567505*(e[40]||0)-.9548044800758362*(e[41]||0)+2.220546245574951*(e[42]||0)-.5148365497589111*(e[43]||0)+1.7203048467636108*(e[44]||0)-.1372094303369522*(e[45]||0)+.32978785037994385*(e[46]||0)+.018849676474928856*(e[47]||0)+.2605251967906952*(e[48]||0)-.31381288170814514*(e[49]||0)+.13910438120365143*(e[50]||0)-.13189519941806793*(e[51]||0)-.41227900981903076*(e[52]||0)-.17932067811489105*(e[53]||0)-.0019862332846969366*(e[54]||0)-.21177466213703156*(e[55]||0)+.3168182671070099*(e[56]||0)-.06476399302482605*(e[57]||0)+.3549676835536957*(e[58]||0)-.13223078846931458*(e[59]||0)+.9598760008811951*(e[60]||0)+.7372063398361206*(e[61]||0)+.4373340904712677*(e[62]||0)+.27421316504478455*(e[63]||0)+.29600799083709717*(e[64]||0)+.24652260541915894*(e[65]||0)+.2690505087375641*(e[66]||0)+.00490084383636713*(e[67]||0)-.37254616618156433*(e[68]||0)+.18937315046787262*(e[69]||0)-.03641790151596069*(e[70]||0)-.06950914114713669*(e[71]||0)-.48459264636039734*(e[72]||0)-.004394939169287682*(e[73]||0)-.07731488347053528*(e[74]||0)-.18012405931949615*(e[75]||0)+.8691295981407166*(e[76]||0)+.009676612913608551*(e[77]||0)+.08972589671611786*(e[78]||0)-.23802435398101807*(e[79]||0)))-6.279572486877441*1/(1+1/Math.exp(-.6469148397445679-.7750658988952637*(e[0]||0)+1.9550774097442627*(e[1]||0)-3.6871464252471924*(e[2]||0)+1.3240402936935425*(e[3]||0)-.8980710506439209*(e[4]||0)-.3391975462436676*(e[5]||0)+.1709056794643402*(e[6]||0)-.5108146071434021*(e[7]||0)-.20450982451438904*(e[8]||0)-.4443972408771515*(e[9]||0)+.30008769035339355*(e[10]||0)-.3138246238231659*(e[11]||0)-1.1596028804779053*(e[12]||0)+.23894907534122467*(e[13]||0)-.6196499466896057*(e[14]||0)+.2974141240119934*(e[15]||0)-.5736003518104553*(e[16]||0)+.27574074268341064*(e[17]||0)-.03804868459701538*(e[18]||0)+.33894455432891846*(e[19]||0)+1.8905185461044312*(e[20]||0)+.29869207739830017*(e[21]||0)+3.605703830718994*(e[22]||0)+.007341236807405949*(e[23]||0)+1.7926138639450073*(e[24]||0)+.09402725845575333*(e[25]||0)+1.3146711587905884*(e[26]||0)-.24937523901462555*(e[27]||0)+1.0468031167984009*(e[28]||0)-.9515969753265381*(e[29]||0)+1.7283649444580078*(e[30]||0)-.9117634892463684*(e[31]||0)+1.933893084526062*(e[32]||0)-.8951558470726013*(e[33]||0)+1.154077410697937*(e[34]||0)-.6487945914268494*(e[35]||0)+.5925531387329102*(e[36]||0)-.7838349342346191*(e[37]||0)+.6526076197624207*(e[38]||0)-.3238188624382019*(e[39]||0)-2.8675248622894287*(e[40]||0)+.848716139793396*(e[41]||0)-2.0411484241485596*(e[42]||0)+.5287250280380249*(e[43]||0)-1.3254629373550415*(e[44]||0)+.3935633599758148*(e[45]||0)-.24573862552642822*(e[46]||0)+.09893545508384705*(e[47]||0)-.11550172418355942*(e[48]||0)+.13954271376132965*(e[49]||0)-.0805666595697403*(e[50]||0)+.15759192407131195*(e[51]||0)+.3535737097263336*(e[52]||0)-.01619178242981434*(e[53]||0)+.11694545298814774*(e[54]||0)+.08557531237602234*(e[55]||0)-.2623326778411865*(e[56]||0)+.15387731790542603*(e[57]||0)-.038919609040021896*(e[58]||0)+.0756826251745224*(e[59]||0)-.647724449634552*(e[60]||0)-.7363694906234741*(e[61]||0)-.5101007223129272*(e[62]||0)-.12350009381771088*(e[63]||0)-.12267045676708221*(e[64]||0)-.2708742022514343*(e[65]||0)-.21613793075084686*(e[66]||0)+.10241352766752243*(e[67]||0)+.05274118855595589*(e[68]||0)-.17893706262111664*(e[69]||0)-.07247257232666016*(e[70]||0)+.19630879163742065*(e[71]||0)+.49441036581993103*(e[72]||0)-.07811818271875381*(e[73]||0)+.1898929327726364*(e[74]||0)+.0744263082742691*(e[75]||0)-.6331313252449036*(e[76]||0)+.12507092952728271*(e[77]||0)-.08266297727823257*(e[78]||0)+.17958274483680725*(e[79]||0))))),1/(1+1/Math.exp(.5889949798583984-7.18779182434082*1/(1+1/Math.exp(.841010570526123+.9608888030052185*(e[0]||0)-2.199734926223755*(e[1]||0)+4.318807601928711*(e[2]||0)-1.4821300506591797*(e[3]||0)+.8962650895118713*(e[4]||0)+.3159785568714142*(e[5]||0)-.29353079199790955*(e[6]||0)+.7397826910018921*(e[7]||0)+.09789010137319565*(e[8]||0)+.6985691785812378*(e[9]||0)-.3734580874443054*(e[10]||0)+.6484885215759277*(e[11]||0)+1.2653168439865112*(e[12]||0)-.036430541425943375*(e[13]||0)+.5393277406692505*(e[14]||0)-.6878035068511963*(e[15]||0)+.40408799052238464*(e[16]||0)-.29186657071113586*(e[17]||0)+.22860309481620789*(e[18]||0)-.3715086281299591*(e[19]||0)-2.230182409286499*(e[20]||0)-.35477468371391296*(e[21]||0)-4.210361957550049*(e[22]||0)+.04031825065612793*(e[23]||0)-2.091130495071411*(e[24]||0)+.11710327863693237*(e[25]||0)-1.5163564682006836*(e[26]||0)+.533817708492279*(e[27]||0)-1.3918695449829102*(e[28]||0)+.797065258026123*(e[29]||0)-2.0199778079986572*(e[30]||0)+.9391012191772461*(e[31]||0)-1.996896743774414*(e[32]||0)+.7549800276756287*(e[33]||0)-1.6290465593338013*(e[34]||0)+.6273425221443176*(e[35]||0)-.8011078834533691*(e[36]||0)+.5252278447151184*(e[37]||0)-.6874058842658997*(e[38]||0)+.7089119553565979*(e[39]||0)+3.4538769721984863*(e[40]||0)-.9632924199104309*(e[41]||0)+2.2980265617370605*(e[42]||0)-.326960951089859*(e[43]||0)+1.689473271369934*(e[44]||0)-.26793038845062256*(e[45]||0)+.18798935413360596*(e[46]||0)-.07186221331357956*(e[47]||0)+.18230217695236206*(e[48]||0)-.1782747209072113*(e[49]||0)+.04997736215591431*(e[50]||0)-.11405995488166809*(e[51]||0)-.29049748182296753*(e[52]||0)-.17203070223331451*(e[53]||0)-.18596182763576508*(e[54]||0)-.10004443675279617*(e[55]||0)+.3587644696235657*(e[56]||0)+.0038997263181954622*(e[57]||0)+.45897844433784485*(e[58]||0)-.1495363414287567*(e[59]||0)+.9705561399459839*(e[60]||0)+.9509556293487549*(e[61]||0)+.6122007966041565*(e[62]||0)+.10207831859588623*(e[63]||0)+.3056499660015106*(e[64]||0)-.023820875212550163*(e[65]||0)+.12170688062906265*(e[66]||0)-.0038301197346299887*(e[67]||0)-.32222211360931396*(e[68]||0)-.1409883201122284*(e[69]||0)-.04922665283083916*(e[70]||0)-.15029728412628174*(e[71]||0)-.5574071407318115*(e[72]||0)-.22983966767787933*(e[73]||0)-.21768328547477722*(e[74]||0)-.13901087641716003*(e[75]||0)+.8932532668113708*(e[76]||0)-.28109729290008545*(e[77]||0)+.12630656361579895*(e[78]||0)-.08572656661272049*(e[79]||0)))+5.296215057373047*1/(1+1/Math.exp(-.5973936319351196-.9308860898017883*(e[0]||0)+1.8214871883392334*(e[1]||0)-3.1016287803649902*(e[2]||0)+1.0629639625549316*(e[3]||0)-.5562313199043274*(e[4]||0)-.2720854878425598*(e[5]||0)+.3181038498878479*(e[6]||0)-.5217929482460022*(e[7]||0)-.30054378509521484*(e[8]||0)-.3209865391254425*(e[9]||0)+.3603309988975525*(e[10]||0)-.36649495363235474*(e[11]||0)-.7987774014472961*(e[12]||0)-.09267842769622803*(e[13]||0)-.4380982518196106*(e[14]||0)+.5816940665245056*(e[15]||0)-.371826171875*(e[16]||0)+.11377377808094025*(e[17]||0)-.1024317517876625*(e[18]||0)+.27525123953819275*(e[19]||0)+1.3917834758758545*(e[20]||0)+.49590981006622314*(e[21]||0)+3.0715889930725098*(e[22]||0)+.04268656671047211*(e[23]||0)+1.6217708587646484*(e[24]||0)-.14063182473182678*(e[25]||0)+1.085949182510376*(e[26]||0)-.19761347770690918*(e[27]||0)+.9241688251495361*(e[28]||0)-.6926320195198059*(e[29]||0)+1.4669042825698853*(e[30]||0)-.7897417545318604*(e[31]||0)+1.4677032232284546*(e[32]||0)-.7987170815467834*(e[33]||0)+.9907728433609009*(e[34]||0)-.61884605884552*(e[35]||0)+.3538714051246643*(e[36]||0)-.3747459650039673*(e[37]||0)+.3708418607711792*(e[38]||0)-.3053472936153412*(e[39]||0)-2.333292007446289*(e[40]||0)+.7206805348396301*(e[41]||0)-1.4453736543655396*(e[42]||0)+.4028736352920532*(e[43]||0)-1.358162760734558*(e[44]||0)+.3046856224536896*(e[45]||0)-.24911555647850037*(e[46]||0)-.060104817152023315*(e[47]||0)-.21798793971538544*(e[48]||0)+.021167539060115814*(e[49]||0)-.15372245013713837*(e[50]||0)+.13148394227027893*(e[51]||0)+.24037881195545197*(e[52]||0)+.24475446343421936*(e[53]||0)+.11827909201383591*(e[54]||0)+.19051745533943176*(e[55]||0)-.31595686078071594*(e[56]||0)-.020983071997761726*(e[57]||0)-.1614471822977066*(e[58]||0)+.03266844525933266*(e[59]||0)-.5322415828704834*(e[60]||0)-.3803841471672058*(e[61]||0)-.29653871059417725*(e[62]||0)-.17979459464550018*(e[63]||0)-.3158247470855713*(e[64]||0)-.1813209056854248*(e[65]||0)-.044424787163734436*(e[66]||0)-.15078105032444*(e[67]||0)+.0111430324614048*(e[68]||0)+.12021337449550629*(e[69]||0)+.11390230059623718*(e[70]||0)-.004399062134325504*(e[71]||0)+.45580780506134033*(e[72]||0)+.05511792376637459*(e[73]||0)+.31477105617523193*(e[74]||0)+.19071651995182037*(e[75]||0)-.380367636680603*(e[76]||0)+.07175406068563461*(e[77]||0)+.04567624628543854*(e[78]||0)+.049385715276002884*(e[79]||0)))-6.7894086837768555*1/(1+1/Math.exp(.8242306709289551+1.0338181257247925*(e[0]||0)-2.3158175945281982*(e[1]||0)+4.1063103675842285*(e[2]||0)-1.3892120122909546*(e[3]||0)+.8535661697387695*(e[4]||0)+.13773217797279358*(e[5]||0)-.3617292642593384*(e[6]||0)+.42140138149261475*(e[7]||0)+.41732344031333923*(e[8]||0)+.7900794744491577*(e[9]||0)-.33837321400642395*(e[10]||0)+.5434768795967102*(e[11]||0)+1.071194052696228*(e[12]||0)-.12407613545656204*(e[13]||0)+.6900293231010437*(e[14]||0)-.4954645037651062*(e[15]||0)+.48270344734191895*(e[16]||0)-.11852894723415375*(e[17]||0)+.005157445557415485*(e[18]||0)-.16990111768245697*(e[19]||0)-2.2098724842071533*(e[20]||0)-.31567689776420593*(e[21]||0)-4.019402980804443*(e[22]||0)+.11087624728679657*(e[23]||0)-2.1309690475463867*(e[24]||0)+.19127218425273895*(e[25]||0)-1.5463526248931885*(e[26]||0)+.5592865943908691*(e[27]||0)-1.3366587162017822*(e[28]||0)+1.0826648473739624*(e[29]||0)-2.006927728652954*(e[30]||0)+.8460788726806641*(e[31]||0)-2.3102190494537354*(e[32]||0)+.6953321099281311*(e[33]||0)-1.6665408611297607*(e[34]||0)+.6790331602096558*(e[35]||0)-.7593835592269897*(e[36]||0)+.8474642038345337*(e[37]||0)-.6522541642189026*(e[38]||0)+.6448646187782288*(e[39]||0)+3.397916078567505*(e[40]||0)-.9548044800758362*(e[41]||0)+2.220546245574951*(e[42]||0)-.5148365497589111*(e[43]||0)+1.7203048467636108*(e[44]||0)-.1372094303369522*(e[45]||0)+.32978785037994385*(e[46]||0)+.018849676474928856*(e[47]||0)+.2605251967906952*(e[48]||0)-.31381288170814514*(e[49]||0)+.13910438120365143*(e[50]||0)-.13189519941806793*(e[51]||0)-.41227900981903076*(e[52]||0)-.17932067811489105*(e[53]||0)-.0019862332846969366*(e[54]||0)-.21177466213703156*(e[55]||0)+.3168182671070099*(e[56]||0)-.06476399302482605*(e[57]||0)+.3549676835536957*(e[58]||0)-.13223078846931458*(e[59]||0)+.9598760008811951*(e[60]||0)+.7372063398361206*(e[61]||0)+.4373340904712677*(e[62]||0)+.27421316504478455*(e[63]||0)+.29600799083709717*(e[64]||0)+.24652260541915894*(e[65]||0)+.2690505087375641*(e[66]||0)+.00490084383636713*(e[67]||0)-.37254616618156433*(e[68]||0)+.18937315046787262*(e[69]||0)-.03641790151596069*(e[70]||0)-.06950914114713669*(e[71]||0)-.48459264636039734*(e[72]||0)-.004394939169287682*(e[73]||0)-.07731488347053528*(e[74]||0)-.18012405931949615*(e[75]||0)+.8691295981407166*(e[76]||0)+.009676612913608551*(e[77]||0)+.08972589671611786*(e[78]||0)-.23802435398101807*(e[79]||0)))+6.340412139892578*1/(1+1/Math.exp(-.6469148397445679-.7750658988952637*(e[0]||0)+1.9550774097442627*(e[1]||0)-3.6871464252471924*(e[2]||0)+1.3240402936935425*(e[3]||0)-.8980710506439209*(e[4]||0)-.3391975462436676*(e[5]||0)+.1709056794643402*(e[6]||0)-.5108146071434021*(e[7]||0)-.20450982451438904*(e[8]||0)-.4443972408771515*(e[9]||0)+.30008769035339355*(e[10]||0)-.3138246238231659*(e[11]||0)-1.1596028804779053*(e[12]||0)+.23894907534122467*(e[13]||0)-.6196499466896057*(e[14]||0)+.2974141240119934*(e[15]||0)-.5736003518104553*(e[16]||0)+.27574074268341064*(e[17]||0)-.03804868459701538*(e[18]||0)+.33894455432891846*(e[19]||0)+1.8905185461044312*(e[20]||0)+.29869207739830017*(e[21]||0)+3.605703830718994*(e[22]||0)+.007341236807405949*(e[23]||0)+1.7926138639450073*(e[24]||0)+.09402725845575333*(e[25]||0)+1.3146711587905884*(e[26]||0)-.24937523901462555*(e[27]||0)+1.0468031167984009*(e[28]||0)-.9515969753265381*(e[29]||0)+1.7283649444580078*(e[30]||0)-.9117634892463684*(e[31]||0)+1.933893084526062*(e[32]||0)-.8951558470726013*(e[33]||0)+1.154077410697937*(e[34]||0)-.6487945914268494*(e[35]||0)+.5925531387329102*(e[36]||0)-.7838349342346191*(e[37]||0)+.6526076197624207*(e[38]||0)-.3238188624382019*(e[39]||0)-2.8675248622894287*(e[40]||0)+.848716139793396*(e[41]||0)-2.0411484241485596*(e[42]||0)+.5287250280380249*(e[43]||0)-1.3254629373550415*(e[44]||0)+.3935633599758148*(e[45]||0)-.24573862552642822*(e[46]||0)+.09893545508384705*(e[47]||0)-.11550172418355942*(e[48]||0)+.13954271376132965*(e[49]||0)-.0805666595697403*(e[50]||0)+.15759192407131195*(e[51]||0)+.3535737097263336*(e[52]||0)-.01619178242981434*(e[53]||0)+.11694545298814774*(e[54]||0)+.08557531237602234*(e[55]||0)-.2623326778411865*(e[56]||0)+.15387731790542603*(e[57]||0)-.038919609040021896*(e[58]||0)+.0756826251745224*(e[59]||0)-.647724449634552*(e[60]||0)-.7363694906234741*(e[61]||0)-.5101007223129272*(e[62]||0)-.12350009381771088*(e[63]||0)-.12267045676708221*(e[64]||0)-.2708742022514343*(e[65]||0)-.21613793075084686*(e[66]||0)+.10241352766752243*(e[67]||0)+.05274118855595589*(e[68]||0)-.17893706262111664*(e[69]||0)-.07247257232666016*(e[70]||0)+.19630879163742065*(e[71]||0)+.49441036581993103*(e[72]||0)-.07811818271875381*(e[73]||0)+.1898929327726364*(e[74]||0)+.0744263082742691*(e[75]||0)-.6331313252449036*(e[76]||0)+.12507092952728271*(e[77]||0)-.08266297727823257*(e[78]||0)+.17958274483680725*(e[79]||0)))))]}var F={detect:e=>H.output(d(M.input(e)))},v=F;export{v as default};
// Spanish
console.log ( F.detect ( 'La piedra de Rosetta es un fragmento de una antigua estela egipcia de granodiorita inscrita con un decreto publicado en Menfis en el año 196 a. C. en nombre del faraón Ptolomeo V. El decreto aparece en tres escrituras distintas: el texto superior en jeroglíficos egipcios, la parte intermedia en escritura demótica y la inferior en griego antiguo. Gracias a que presenta esencialmente el mismo contenido en las tres inscripciones, con diferencias menores entre ellas, esta piedra facilitó la clave para el desciframiento moderno de los jeroglíficos egipcios.' ) );
// English
console.log ( F.detect ( 'The Rosetta Stone is a stele composed of granodiorite inscribed with three versions of a decree issued in Memphis, Egypt, in 196 BC during the Ptolemaic dynasty on behalf of King Ptolemy V Epiphanes. The top and middle texts are in Ancient Egyptian using hieroglyphic and Demotic scripts respectively, while the bottom is in Ancient Greek. The decree has only minor differences between the three versions, making the Rosetta Stone key to deciphering the Egyptian scripts.' ) );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment