PageSourceSearch

https://diffsnap.com/dist/static/js/tokenizers.js

js diffsnap.com collected 2026-10-08 06:44:13 UTC 6,399 bytes, 1 lines download raw bytes

1function _0x2889(){const _0x3a6ace=['984004VOBuMv','15786IHCGjK','4PyEpAN','[Tokenizers]\x20Segmentit\x20not\x20found','_initializing','4385367uhpkcW','947175GGncHk','22WyEkqn','log','338020qrfhap','toFixed','81yXxsrW','all','ready','tokenizeSync','_jp','16LSFbuI','Segmentit','[Tokenizers]\x20All\x20tokenizers\x20ready','japanese','replace','entries','|$1|','640289VXeZig','2796918RnUYCy','5VqWmnB','36aZuLCd','split','trim','chinese','match','error','_ready','length'];_0x2889=function(){return _0x3a6ace;};return _0x2889();}function _0x39f9(_0xa39d4b,_0x24e5ac){const _0x28898e=_0x2889();return _0x39f9=function(_0x39f9bc,_0x42d402){_0x39f9bc=_0x39f9bc-0x1a5;let _0x268dad=_0x28898e[_0x39f9bc];return _0x268dad;},_0x39f9(_0xa39d4b,_0x24e5ac);}(function(_0x408d5d,_0x46df4c){const _0x9413da=_0x39f9,_0x4f054c=_0x408d5d();while(!![]){try{const _0x293cbd=parseInt(_0x9413da(0x1ae))/0x1*(-parseInt(_0x9413da(0x1c6))/0x2)+parseInt(_0x9413da(0x1a9))/0x3*(-parseInt(_0x9413da(0x1a5))/0x4)+parseInt(_0x9413da(0x1bc))/0x5*(parseInt(_0x9413da(0x1bb))/0x6)+-parseInt(_0x9413da(0x1c5))/0x7+-parseInt(_0x9413da(0x1b3))/0x8*(-parseInt(_0x9413da(0x1a8))/0x9)+parseInt(_0x9413da(0x1ac))/0xa*(parseInt(_0x9413da(0x1aa))/0xb)+-parseInt(_0x9413da(0x1bd))/0xc*(-parseInt(_0x9413da(0x1ba))/0xd);if(_0x293cbd===_0x46df4c)break;else _0x4f054c['push'](_0x4f054c['shift']());}catch(_0x1e5d8a){_0x4f054c['push'](_0x4f054c['shift']());}}}(_0x2889,0x88d1c),function(_0x18012a){const _0x5276e0=_0x39f9;function _0x1f78ab(_0xc4615b){const _0x5a909c=_0x39f9,_0x5a677d=_0xc4615b['slice'](0x0,0x1f4),_0x11bf85=_0x5a677d['length'];if(_0x11bf85===0x0)return'english';const _0x4188f9=(_0x5a677d['match'](/[\u3040-\u309f]/g)||[])['length'],_0x547ab1=(_0x5a677d['match'](/[\u30a0-\u30ff]/g)||[])['length'],_0x31365f=(_0x5a677d['match'](/[\u4e00-\u9fff]/g)||[])['length'],_0xd5736c=(_0x5a677d[_0x5a909c(0x1c1)](/[\uac00-\ud7af]/g)||[])[_0x5a909c(0x1c4)],_0x593a9d=(_0x5a677d['match'](/[\u0600-\u06FF]/g)||[])['length'],_0x45074b=(_0x5a677d['match'](/[a-zA-Z]/g)||[])['length'],_0x5caad6=_0x4188f9/_0x11bf85,_0x409eba=_0x547ab1/_0x11bf85,_0x5ced12=_0x31365f/_0x11bf85,_0x4be93c=_0xd5736c/_0x11bf85,_0x36b77f=_0x593a9d/_0x11bf85,_0x318c45=_0x45074b/_0x11bf85,_0x5c2117=_0x5caad6*0x3+_0x409eba*2.5+(_0x5ced12>0.05&&(_0x5caad6>0.03||_0x409eba>0.02)?0.8:0x0),_0x1b9ecc=_0x4be93c*0x2,_0x226ee4=_0x5ced12>0.3&&_0x5caad6<0.01&&_0x409eba<0.01?_0x5ced12*0x2:_0x5ced12>0.5&&_0x5caad6<0.03&&_0x409eba<0.02?_0x5ced12*1.5:0x0,_0x32381a=_0x36b77f*0x2,_0x115b33=_0x318c45>0.5?_0x318c45:0x0,_0xe576cf={'japanese':_0x5c2117,'korean':_0x1b9ecc,'chinese':_0x226ee4,'arabic':_0x32381a,'english':_0x115b33};let _0x240517=0x0,_0x305909='english';for(const [_0x58e2b8,_0xf809ee]of Object[_0x5a909c(0x1b8)](_0xe576cf)){_0xf809ee>_0x240517&&(_0x240517=_0xf809ee,_0x305909=_0x58e2b8);}return console[_0x5a909c(0x1ab)]('[Tokenizers]\x20Language\x20detection:',{'sample':_0x5a677d['slice'](0x0,0x50)+'...','counts':{'hiragana':_0x4188f9,'katakana':_0x547ab1,'cjk':_0x31365f,'latin':_0x45074b},'ratios':{'hiragana':(_0x5caad6*0x64)[_0x5a909c(0x1ad)](0x1)+'%','katakana':(_0x409eba*0x64)['toFixed'](0x1)+'%','cjk':(_0x5ced12*0x64)[_0x5a909c(0x1ad)](0x1)+'%','latin':(_0x318c45*0x64)['toFixed'](0x1)+'%'},'scores':{'japanese':_0x5c2117['toFixed'](0x3),'chinese':_0x226ee4[_0x5a909c(0x1ad)](0x3),'english':_0x115b33['toFixed'](0x3),'korean':_0x1b9ecc['toFixed'](0x3),'arabic':_0x32381a[_0x5a909c(0x1ad)](0x3)},'detected':_0x305909,'maxScore':_0x240517['toFixed'](0x3)}),console['log']('[Tokenizers]\x20Detected\x20language:',_0x305909),_0x305909;}function _0x4b6a72(){return new Promise(_0x3a1a14=>{console['log']('[Tokenizers]\x20Using\x20fast\x20simple\x20Japanese\x20tokenizer\x20(no\x20dictionary)'),_0x3a1a14(_0x14ce4b);});}function _0x14ce4b(_0x4d49c3){const _0xc924af=_0x39f9;return _0x4d49c3['replace'](/([ぁ-ん]+)/g,'|$1|')['replace'](/([ァ-ヴー]+)/g,'|$1|')[_0xc924af(0x1b7)](/([一-龯]+)/g,_0xc924af(0x1b9))['replace'](/([a-zA-Z0-9]+)/g,'|$1|')['split']('|')['filter'](_0x50d41d=>_0x50d41d['trim']()[_0xc924af(0x1c4)]>0x0);}function _0x478028(){return new Promise(_0x19275a=>{const _0x3c60b7=_0x39f9;if(!_0x18012a['Segmentit'])return console['warn'](_0x3c60b7(0x1a6)),_0x19275a(_0x28917f=>_0x28917f['split'](''));try{const _0x11e0f1=_0x18012a[_0x3c60b7(0x1b4)]['useDefault'](new _0x18012a[(_0x3c60b7(0x1b4))]['Segment']());_0x19275a(_0x2f6bc0=>_0x11e0f1['doSegment'](_0x2f6bc0)['map'](_0x2c3e7e=>_0x2c3e7e['w']));}catch(_0x1f274f){console[_0x3c60b7(0x1c2)]('[Tokenizers]\x20Segmentit\x20init\x20error',_0x1f274f),_0x19275a(_0x40
1a8aa=>_0x40a8aa['split'](''));}});}const _0xccc3d6={'_ready':![],'_initializing':null,'_jp':null,'_zh':null,async 'ready'(){const _0x550916=_0x39f9;if(this['_ready'])return;if(this[_0x550916(0x1a7)])return this['_initializing'];return this['_initializing']=((async()=>{const _0x506a87=_0x550916;try{[this['_zh'],this[_0x506a87(0x1b2)]]=await Promise[_0x506a87(0x1af)]([_0x478028(),_0x4b6a72()]),this[_0x506a87(0x1c3)]=!![],console['log'](_0x506a87(0x1b5),this['_jp'],this['_zh']);}catch(_0x198322){console['error']('[Tokenizers]\x20initialization\x20failed',_0x198322),this['_zh']=_0x2c0396=>_0x2c0396[_0x506a87(0x1be)](''),this[_0x506a87(0x1b2)]=_0x2c108f=>_0x2c108f['split'](''),this['_ready']=!![];}})()),this[_0x550916(0x1a7)];},async 'tokenize'(_0x2bac81){const _0x20ca20=_0x39f9;await this[_0x20ca20(0x1b0)]();const _0x450cd0=_0x1f78ab(_0x2bac81);console['log']('[Tokenizers]\x20Detected\x20language:',_0x450cd0);switch(_0x450cd0){case'chinese':return this['_zh']?this['_zh'](_0x2bac81):_0x2bac81[_0x20ca20(0x1be)]('');case'japanese':return this['_jp']?this[_0x20ca20(0x1b2)](_0x2bac81):_0x2bac81['split']('');case'english':default:return _0x2bac81['trim']()[_0x20ca20(0x1be)](/\s+/);}}};_0x18012a['Tokenizers']=_0xccc3d6,_0xccc3d6[_0x5276e0(0x1b1)]=function(_0x4a124d){const _0xf04fb8=_0x5276e0;if(!_0xccc3d6[_0xf04fb8(0x1c3)])return _0x4a124d[_0xf04fb8(0x1bf)]()['split'](/\s+/);const _0x30ad10=_0x1f78ab(_0x4a124d);console[_0xf04fb8(0x1ab)]('[Tokenizers]\x20Detected\x20language\x20(sync):',_0x30ad10);switch(_0x30ad10){case _0xf04fb8(0x1c0):return _0xccc3d6['_zh']?_0xccc3d6['_zh'](_0x4a124d):_0x4a124d['split']('');case _0xf04fb8(0x1b6):return _0xccc3d6['_jp']?_0xccc3d6[_0xf04fb8(0x1b2)](_0x4a124d):_0x4a124d[_0xf04fb8(0x1be)]('');case'english':default:return _0x4a124d['trim']()['split'](/\s+/);}};}(window));

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.