var pv = {};(function(){ function form(id,cond) {this.id=id;this.cond=cond;}form.prototype={mutate:function(pre,post,env,preM,postM,envM,preF,postF){for(var x in this.opt){if(this.cond[x](pre,post,env,preM,postM,envM,preF,postF)) {return cF(this.opt[x],pre,post,env,preM,postM,envM,preF,postF);}} return cF(this.def,pre,post,env,preM,postM,envM,preF,postF);}};function dR(ms,fs) {this.ms=ms;this.fs=fs;}function decom(f,morphs,morphs2,b,m) {this.f=f;this.morphs=morphs;this.morphs2=morphs2;this.b=b;this.m=m;}function morph(id,form,bit,mask,nid,empty,aid,abit,amask) {this.id=id;this.form=form;this.bit=bit;this.mask=mask;this.nid=nid;this.empty=empty;this.aid=aid;this.abit=abit;this.amask=amask;}morph.prototype={test:function(f,fs){for(var i in this.bit){if((f&this.mask[i])==this.bit[i] && (fs&this.mask[i])==this.mask[i]) {return i;}} return -1;},get:function(n,mc){return new morphet(this.id,this.form,this.bit[n],this.mask[n],mc,this.aid,this.abit,this.amask);}};function morphet(id,form,bit,mask,mclass,aid,abit,amask) {this.id=id;this.form=form;this.bit=bit;this.mask=mask;this.mclass=mclass;this.aid=aid;this.abit=abit;this.amask=amask;}morphet.prototype={attr:function(a,b,c){if(this.aid) {var ft=this.aid; var t=ft(a,b,c); this.abit=t[0];this.amask=t[1];}},ubit:function(){return (this.bit&~this.amask)|this.abit;},umask:function(){return this.mask|this.amask;}};function err0(id,f,fm){return new Error('Morphset '+id+' doesnt have element matching with ['+FTS(f,fm)+']');} function err1(id,s,f,fm){return new Error('Morphset '+id+' doesnt have element matching with '+s+' ['+FTS(f,fm)+']');} function cF(ar, pre, post, env, preM, postM, envM, preF, postF) { var m = ''; for(var y in ar) { if(ar[y] instanceof form) m += ar[y].mutate(pre, post, env, preM, postM, envM, preF, postF); else m += ar[y]; } return m; } function cC(ar,p){ console.trace(); var s=p.join('\x01'); for(var i in ar) { s=s.replace(ar[i][0],ar[i][1]); } return s.split('\x01'); } function cJ(ar) { return ar.join(''); } function cM(m,f){ return {id:m.id,set:m.mclass,form:f,feat:FTS(m.bit,m.mask)}; } if (!String.prototype.endsWith) { String.prototype.endsWith = function(searchString, position) { var subjectString = this.toString(); if (typeof position !== 'number' || !isFinite(position) || Math.floor(position) !== position || position > subjectString.length) { position = subjectString.length; } position -= searchString.length; var lastIndex = subjectString.indexOf(searchString, position); return lastIndex !== -1 && lastIndex === position; }; } if (!String.prototype.startsWith) { String.prototype.startsWith = function(searchString, position) { position = position || 0; return this.indexOf(searchString, position) === position; }; }pv.F_act=0;pv.F_psv=1;pv.F_unhonor=0;pv.F_honor=2;pv.F_present=0;pv.F_perfect=4;pv.F_pluperf=8;pv.F_gnomic=12;pv.F_real=0;pv.F_irreal=16;pv.F_formal=0;pv.F_fpolite=32;pv.F_familiar=64;pv.F_intimate=96;pv.F_casual=128;pv.F_att_con=0;pv.F_indi=256;pv.F_retr=512;pv.F_subj=768;pv.F_at_prog=0;pv.F_at_perf=1024;pv.F_at_imperf=2048;pv.F_at_futr=3072;pv.F_at_nom=4096;pv.F_at_nom2=5120;pv.F_at_adv=6144;pv.F_at_adv2=7168;pv.F_at_adv3=8192;pv.F_con_go=9216;pv.F_con_myeo=10240;pv.F_con_myeonseo=11264;pv.F_con_geona=12288;pv.F_con_na=13312;pv.F_con_ni=14336;pv.F_con_nikka=15360;pv.F_con_myeon=16384;pv.F_con_seo=17408;pv.F_con_neunde=18432;pv.F_con_eo=19456;pv.F_con_ge=20480;pv.F_con_ji=21504;pv.F_decl=0;pv.F_prop=32768;pv.F_roga=65536;pv.F_impe=98304;pv.F_unpolite=0;pv.F_polite=131072;pv.F_negative=0;pv.F_positive=262144;pv.F_p_ieoji=0;pv.F_p_i=524288;pv.F_p_eoji=1048576;pv.FS_Valency=1;pv.FS_Honor=2;pv.FS_Tense=12;pv.FS_Irrealis=16;pv.FS_Formal=224;pv.FS_Syntatic=768;pv.FS_Attributive=31744;pv.FS_Pragmatic=98304;pv.FS_Polite=131072;pv.FS_Harmonry=262144;pv.FS_PsvType=1572864;function FTS(f,fm){r=[];if((fm&1)==1) {r.push((['act','psv'])[(f&1)/1]);}if((fm&2)==2) {r.push((['unhonor','honor'])[(f&2)/2]);}if((fm&12)==12) {r.push((['present','perfect','pluperf','gnomic'])[(f&12)/4]);}if((fm&16)==16) {r.push((['real','irreal'])[(f&16)/16]);}if((fm&224)==224) {r.push((['formal','fpolite','familiar','intimate','casual'])[(f&224)/32]);}if((fm&768)==768) {r.push((['att_con','indi','retr','subj'])[(f&768)/256]);}if((fm&31744)==31744) {r.push((['at_prog','at_perf','at_imperf','at_futr','at_nom','at_nom2','at_adv','at_adv2','at_adv3','con_go','con_myeo','con_myeonseo','con_geona','con_na','con_ni','con_nikka','con_myeon','con_seo','con_neunde','con_eo','con_ge','con_ji'])[(f&31744)/1024]);}if((fm&98304)==98304) {r.push((['decl','prop','roga','impe'])[(f&98304)/32768]);}if((fm&131072)==131072) {r.push((['unpolite','polite'])[(f&131072)/131072]);}if((fm&262144)==262144) {r.push((['negative','positive'])[(f&262144)/262144]);}if((fm&1572864)==1572864) {r.push((['p_ieoji','p_i','p_eoji'])[(f&1572864)/524288]);}return r;};var Fpassive;var Fipassive;var Fhvowel;var Fneun_prs;var Fseup;var Fmov_eu;var Fmov_r;var Fmov_n;var MSRoot;var ORoot;var MSValency;var MSHonor;var MSTense;var MSReal;var MSFormal;var MSSMood;var MSPMood;var MSPolite;var C0;var C1;var C2;var C3;var C4;var FAS_Valency;var FAS_Honor;var FAS_Tense;var FAS_Irrealis;var FAS_Formal;var FAS_Syntatic;var FAS_Attributive;var FAS_Pragmatic;var FAS_Polite;var FAS_Harmonry;var FAS_PsvType;var WORD;Fpassive=new form('passive',[function(a,b,c,d,e,f,g,h){return /ㅜ$/.test(g);},function(a,b,c,d,e,f,g,h){return /[ㅎㅏ-ㅣ]$/.test(g);},function(a,b,c,d,e,f,g,h){return /[ㄱㄷㅈㅂ]$/.test(g);},function(a,b,c,d,e,f,g,h){return /[ㅪㄹ]$/.test(g);},function(a,b,c,d,e,f,g,h){return /[ㄴㄶㅅㅁ]$/.test(g);}]);Fipassive=new form('ipassive',[function(a,b,c,d,e,f,g,h){return /[ㅎㅏ-ㅣ]$/.test(g);},function(a,b,c,d,e,f,g,h){return /[ㄱㄷㅈㅂ]$/.test(g);},function(a,b,c,d,e,f,g,h){return /[ㅪㄹ]$/.test(g);},function(a,b,c,d,e,f,g,h){return /[ㄴㄶㅅㅁ]$/.test(g);}]);Fhvowel=new form('hvowel',[function(a,b,c,d,e,f,g,h){return (((a)&262144)==262144&&((d)&262144)==262144);}]);Fneun_prs=new form('neun_prs',[function(a,b,c,d,e,f,g,h){return /[^ㅏ-ㅣㄹㅭㆆ]$/.test(g);}]);Fseup=new form('seup',[function(a,b,c,d,e,f,g,h){return (/[^ㅏ-ㅣㄹㅭ]$/.test(g)&&(((c)&768)!=768&&((f)&768)==768));},function(a,b,c,d,e,f,g,h){return (/[^ㅏ-ㅣㄹㅭ]$/.test(g)&&(((c)&768)==768&&((f)&768)==768));}]);Fmov_eu=new form('mov_eu',[function(a,b,c,d,e,f,g,h){return /[^ㅏ-ㅣㄹㅭㆆ]$/.test(g);}]);Fmov_r=new form('mov_r',[function(a,b,c,d,e,f,g,h){return /[ㄹ]$/.test(g);}]);Fmov_n=new form('mov_n',[function(a,b,c,d,e,f,g,h){return (((c)&98304)==0&&((f)&98304)==98304);}]);MSRoot=[new morph('base',[''],[0],[0],0,false,ATATHarmory,0,0)];ORoot=['base'];MSValency=[new morph('',[],[0],[0],0,true,null,0,0),new morph('',[Fpassive,'ㅣ'],[1],[1572865],1,false,null,0,0),new morph('',['ㅇ',Fhvowel,'ㅈㅣ'],[1048577],[1572865],2,false,null,0,0),new morph('',[Fipassive,'ㅣ'],[524289],[1572865],3,false,null,0,0)];MSHonor=[new morph('',[],[0],[2],0,true,null,0,0),new morph('',[Fmov_eu,'ㅅㅣ'],[2],[2],1,false,null,0,0)];MSTense=[new morph('',[],[12,0,32,64,96,128,16,512,768,33024,65792,98560],[12,780,236,236,236,236,252,1020,1020,99324,99324,99324],0,true,null,0,0),new morph('',[Fneun_prs],[256],[99324],1,false,null,0,0),new morph('',['ㅇ',Fhvowel,'ㅆ'],[4],[12],2,false,null,0,0),new morph('',['ㅇ',Fhvowel,'ㅆㅇㅓㅆ'],[8],[12],3,false,null,0,0)];MSReal=[new morph('',[],[0],[16],0,true,null,0,0),new morph('',['ㄱㅔㅆ'],[16],[16],1,false,null,0,0)];MSFormal=[new morph('',[],[0,64,96,128,0],[224,224,224,224,768],0,true,null,0,0),new morph('',[Fseup],[32],[224],1,false,null,0,0)];MSSMood=[new morph('',[],[96,128,256,33024,768,98368],[224,224,99296,99296,992,98528],0,true,null,0,0),new morph('',['ㄴㅣ'],[288],[992],1,false,null,0,0),new morph('',['ㄷㅣ'],[544],[992],2,false,null,0,0),new morph('',['ㅅㅣ'],[800],[992],3,false,null,0,0),new morph('',['ㄴ'],[320,33088],[99296,99296],4,false,null,0,0),new morph('',['ㄷ'],[576,33344],[99296,99296],5,false,null,0,0),new morph('',['ㅅ'],[832,33600],[99296,99296],6,false,null,0,0),new morph('',['ㄴㅡㄴ'],[65792,65856],[99296,99296],7,false,null,0,0),new morph('',['ㄷㅓ',Fmov_n],[512,66112],[992,99296],8,false,null,0,0),new morph('',['ㄴㅡㄴ'],[0],[32512],9,false,null,0,0),new morph('',[Fmov_eu,'ㄴ'],[1024],[32512],10,false,null,0,0),new morph('',['ㄷㅓㄴ'],[2048],[32512],11,false,null,0,0),new morph('',[Fmov_eu,Fmov_r],[3072],[32512],12,false,null,0,0),new morph('',['ㄱㅣ'],[4096],[32512],13,false,null,0,0),new morph('',[Fmov_eu,'ㅁ'],[5120],[32512],14,false,null,0,0),new morph('',['ㅇㅣ'],[6144],[32512],15,false,null,0,0),new morph('',['ㄱㅔ'],[7168],[32512],16,false,null,0,0),new morph('',['ㄷㅗㄹㅗㄱ'],[8192],[32512],17,false,null,0,0),new morph('',['ㄱㅗ'],[9216],[32512],18,false,null,0,0),new morph('',[Fmov_eu,'ㅁㅕ'],[10240],[32512],19,false,null,0,0),new morph('',[Fmov_eu,'ㅁㅕㄴㅅㅓ'],[11264],[32512],20,false,null,0,0),new morph('',[Fmov_eu,'ㄴㅏ'],[13312],[32512],21,false,null,0,0),new morph('',[Fmov_eu,'ㄴㅣ'],[14336],[32512],22,false,null,0,0),new morph('',[Fmov_eu,'ㄴㅣㄲㅏ'],[15360],[32512],23,false,null,0,0),new morph('',[Fmov_eu,'ㅁㅕㄴ'],[16384],[32512],24,false,null,0,0),new morph('',['ㅇ',Fhvowel,'ㅅㅓ'],[17408],[32512],25,false,null,0,0),new morph('',['ㄴㅡㄴㄷㅔ'],[18432],[32512],26,false,null,0,0),new morph('',['ㅇ',Fhvowel],[19456],[32512],27,false,null,0,0),new morph('',['ㄱㅔ'],[20480],[32512],28,false,null,0,0),new morph('',['ㅈㅣ'],[21504],[32512],29,false,null,0,0),new morph('',['ㄱㅓㄴㅏ'],[12288],[32512],30,false,null,0,0)];MSPMood=[new morph('',[],[0],[768],0,true,null,0,0),new morph('',['ㄷㅏ'],[32,32800,256],[98528,98528,99296],1,false,null,0,0),new morph('',['ㄲㅏ'],[65568],[98528],2,false,null,0,0),new morph('',['ㅇㅗ'],[98336],[98528],3,false,null,0,0),new morph('',['ㄹㅏ'],[512],[99296],4,false,null,0,0),new morph('',['ㅈㅏ'],[32768],[98528],5,false,null,0,0),new morph('',['ㅑ'],[65536],[98528],6,false,null,0,0),new morph('',['ㅇ',Fhvowel,'ㄹㅏ'],[98304],[98528],7,false,null,0,0),new morph('',['ㅔ'],[64,32832],[98528,98528],8,false,null,0,0),new morph('',['ㄱㅏ'],[65600],[98528],9,false,null,0,0),new morph('',['ㄱㅔ'],[98368],[98528],10,false,null,0,0),new morph('',['ㅇ',Fhvowel],[96],[224],11,false,null,0,0),new morph('',['ㅈㅣ'],[128],[224],12,false,null,0,0)];MSPolite=[new morph('',[],[0,0],[131072,768],0,true,null,0,0),new morph('',['ㅇㅛ'],[131072],[131072],1,false,null,0,0)];C0=[[/ㅎㅏㅇㅕ/,"ㅎㅐ"]];C1=[[/ㅎㅏㅇㅏ/,"ㅎㅐ"],[/ㅏㅇㅏ/,"ㅏ"],[/ㅓㅇㅓ/,"ㅓ"],[/ㅗㅇㅏ/,"ㅘ"],[/ㅜㅓ/,"ㅝ"],[/ㅭㅡㅇ([ㅏㅓ])/,"ㄹㅡㄹ$1"],[/ㅭㅡ/,"ㄹㅡ"],[/ㅡㅇ([ㅏㅓ])/,"$1"],[/ㄹ([ㄴㅂㅅ])/,"$1"],[/ㄹㅁ$/,"ㄻ"],[/ㅪㅇ([ㅏ-ㅣ])/,"ㄹㅇ$1"],[/ㅪㄹ/,"ㄹㄹ"],[/ㅪ/,"ㄷ"],[/ㅸㅇㅏ/,"ㅇㅘ"],[/ㅸㅇㅓ/,"ㅇㅝ"],[/ㅸㅇㅡ/,"ㅇㅜ"],[/ㅸ/,"ㅂ"],[/ㅿㅇ([ㅏ-ㅣ])/,"ㅇ$1"],[/ㅿ/,"ㅅ"],[/ㅭㅇ?([ㅏㅓㅣ])/,"ㄹㄹ$1"],[/ㅭ/,"ㄹㅡ"],[/[ㅏㅓ]ㆆㅇ[ㅏㅓ]/,"ㅐ"],[/[ㅑㅕ]ㆆㅇ[ㅏㅓ]/,"ㅒ"],[/ㆆㅅㅡ/,"ㅎㅅㅡ"],[/ㆆ([ㄴㄹㅁㅅ])/,"$1"],[/ㆆ/,"ㅎ"]];C2=[[/ㅣㅇㅓ/,"ㅕ"]];C3=[[/ㅣㅇㅓ/,"ㅕ"]];C4=[[/ㅣㅇ[ㅓㅕ]/,"ㅕ"]];Fpassive.opt=[['ㅓㅈ'],['ㅇㅕㅈ'],['ㅎ'],['ㄹㅕㅈ'],['ㄱ']];Fpassive.def=['ㅇㅓㅈ'];Fipassive.opt=[['ㅇ'],['ㅎ'],['ㄹ'],['ㄱ']];Fipassive.def=[''];Fhvowel.opt=[['ㅏ']];Fhvowel.def=['ㅓ'];Fneun_prs.opt=[['ㄴㅡㄴ']];Fneun_prs.def=['ㄴ'];Fseup.opt=[['ㅅㅡㅂ'],['ㅇㅡㅂ']];Fseup.def=['ㅂ'];Fmov_eu.opt=[['ㅇㅡ']];Fmov_eu.def=[''];Fmov_r.opt=[['']];Fmov_r.def=['ㄹ'];Fmov_n.opt=[['']];Fmov_n.def=['ㄴ'];FAS_Valency={act:0,psv:1};FAS_Honor={unhonor:0,honor:2};FAS_Tense={present:0,perfect:4,pluperf:8,gnomic:12};FAS_Irrealis={real:0,irreal:16};FAS_Formal={formal:0,fpolite:32,familiar:64,intimate:96,casual:128};FAS_Syntatic={att_con:0,indi:256,retr:512,subj:768};FAS_Attributive={at_prog:0,at_perf:1024,at_imperf:2048,at_futr:3072,at_nom:4096,at_nom2:5120,at_adv:6144,at_adv2:7168,at_adv3:8192,con_go:9216,con_myeo:10240,con_myeonseo:11264,con_geona:12288,con_na:13312,con_ni:14336,con_nikka:15360,con_myeon:16384,con_seo:17408,con_neunde:18432,con_eo:19456,con_ge:20480,con_ji:21504};FAS_Pragmatic={decl:0,prop:32768,roga:65536,impe:98304};FAS_Polite={unpolite:0,polite:131072};FAS_Harmonry={negative:0,positive:262144};FAS_PsvType={p_ieoji:0,p_i:524288,p_eoji:1048576};WORD={Verb:'Root'};function SMRoot(f,fs){var r=[]; for(var i in MSRoot){if((t=MSRoot[i].test(f,fs))>=0) {r.push([i,t]);}} return r;};pv.getOpenRoot=function(){return ORoot;};function SMValency(f,fs){var r=[]; for(var i in MSValency){if((t=MSValency[i].test(f,fs))>=0) {r.push([i,t]);}} return r;};function SMHonor(f,fs){var r=[]; for(var i in MSHonor){if((t=MSHonor[i].test(f,fs))>=0) {r.push([i,t]);}} return r;};function SMTense(f,fs){var r=[]; for(var i in MSTense){if((t=MSTense[i].test(f,fs))>=0) {r.push([i,t]);}} return r;};function SMReal(f,fs){var r=[]; for(var i in MSReal){if((t=MSReal[i].test(f,fs))>=0) {r.push([i,t]);}} return r;};function SMFormal(f,fs){var r=[]; for(var i in MSFormal){if((t=MSFormal[i].test(f,fs))>=0) {r.push([i,t]);}} return r;};function SMSMood(f,fs){var r=[]; for(var i in MSSMood){if((t=MSSMood[i].test(f,fs))>=0) {r.push([i,t]);}} return r;};function SMPMood(f,fs){var r=[]; for(var i in MSPMood){if((t=MSPMood[i].test(f,fs))>=0) {r.push([i,t]);}} return r;};function SMPolite(f,fs){var r=[]; for(var i in MSPolite){if((t=MSPolite[i].test(f,fs))>=0) {r.push([i,t]);}} return r;};function ATATHarmory(a,b,c){if(/[ㅏㅑㅗ][ㄱ-ㅎㅪㅭㅿㆆ]*ㅡ?$/.test(c)) {return [262144,262144];}if(/([^ㅏㅑㅗ]|ㅸ)[ㄱ-ㅎㅪㅭㅿㆆㅡ]*$/.test(c)) {return [0,262144];}return [0,0];};pv.getFeatValency=function(){return FAS_Valency;};pv.getFeatHonor=function(){return FAS_Honor;};pv.getFeatTense=function(){return FAS_Tense;};pv.getFeatIrrealis=function(){return FAS_Irrealis;};pv.getFeatFormal=function(){return FAS_Formal;};pv.getFeatSyntatic=function(){return FAS_Syntatic;};pv.getFeatAttributive=function(){return FAS_Attributive;};pv.getFeatPragmatic=function(){return FAS_Pragmatic;};pv.getFeatPolite=function(){return FAS_Polite;};pv.getFeatHarmonry=function(){return FAS_Harmonry;};pv.getFeatPsvType=function(){return FAS_PsvType;};function EMRoot(s,b,c,e,f){var r=[]; if(s.endsWith('')) { if((f&0)==(c&0))r.push(new morphet('','',0,0,'Root')); } return r;} function ERMRoot(s,a,c,d,f){var r=[]; if(s.startsWith('')) { if((f&0)==(c&0))r.push(new morphet('','',0,0,'Root')); } return r;} function EMValency(s,b,c,e,f){var r=[]; if(s.endsWith('')) { if((f&0)==(c&0))r.push(new morphet('true','',0,0,'Valency')); } if(s.endsWith('ㅓㅈㅣ')) { if((f&1)==(c&1572865))r.push(new morphet('','ㅓㅈㅣ',1,1572865,'Valency')); } if(s.endsWith('ㅇㅕㅈㅣ')) { if((f&1)==(c&1572865))r.push(new morphet('','ㅇㅕㅈㅣ',1,1572865,'Valency')); } if(s.endsWith('ㅎㅣ')) { if((f&1)==(c&1572865))r.push(new morphet('','ㅎㅣ',1,1572865,'Valency')); if((f&524289)==(c&1572865))r.push(new morphet('','ㅎㅣ',524289,1572865,'Valency')); } if(s.endsWith('ㄹㅕㅈㅣ')) { if((f&1)==(c&1572865))r.push(new morphet('','ㄹㅕㅈㅣ',1,1572865,'Valency')); } if(s.endsWith('ㄱㅣ')) { if((f&1)==(c&1572865))r.push(new morphet('','ㄱㅣ',1,1572865,'Valency')); if((f&524289)==(c&1572865))r.push(new morphet('','ㄱㅣ',524289,1572865,'Valency')); } if(s.endsWith('ㅇㅓㅈㅣ')) { if((f&1)==(c&1572865))r.push(new morphet('','ㅇㅓㅈㅣ',1,1572865,'Valency')); if((f&1048577)==(c&1572865))r.push(new morphet('','ㅇㅓㅈㅣ',1048577,1572865,'Valency')); } if(s.endsWith('ㅇㅏㅈㅣ')) { if((f&1048577)==(c&1572865))r.push(new morphet('','ㅇㅏㅈㅣ',1048577,1572865,'Valency')); } if(s.endsWith('ㅇㅣ')) { if((f&524289)==(c&1572865))r.push(new morphet('','ㅇㅣ',524289,1572865,'Valency')); } if(s.endsWith('ㄹㅣ')) { if((f&524289)==(c&1572865))r.push(new morphet('','ㄹㅣ',524289,1572865,'Valency')); } if(s.endsWith('ㅣ')) { if((f&524289)==(c&1572865))r.push(new morphet('','ㅣ',524289,1572865,'Valency')); } return r;} function ERMValency(s,a,c,d,f){var r=[]; if(s.startsWith('')) { if((f&0)==(c&0))r.push(new morphet('true','',0,0,'Valency')); } if(s.startsWith('ㅓㅈㅣ')) { if((f&1)==(c&1572865))r.push(new morphet('','ㅓㅈㅣ',1,1572865,'Valency')); } if(s.startsWith('ㅇㅕㅈㅣ')) { if((f&1)==(c&1572865))r.push(new morphet('','ㅇㅕㅈㅣ',1,1572865,'Valency')); } if(s.startsWith('ㅎㅣ')) { if((f&1)==(c&1572865))r.push(new morphet('','ㅎㅣ',1,1572865,'Valency')); if((f&524289)==(c&1572865))r.push(new morphet('','ㅎㅣ',524289,1572865,'Valency')); } if(s.startsWith('ㄹㅕㅈㅣ')) { if((f&1)==(c&1572865))r.push(new morphet('','ㄹㅕㅈㅣ',1,1572865,'Valency')); } if(s.startsWith('ㄱㅣ')) { if((f&1)==(c&1572865))r.push(new morphet('','ㄱㅣ',1,1572865,'Valency')); if((f&524289)==(c&1572865))r.push(new morphet('','ㄱㅣ',524289,1572865,'Valency')); } if(s.startsWith('ㅇㅓㅈㅣ')) { if((f&1)==(c&1572865))r.push(new morphet('','ㅇㅓㅈㅣ',1,1572865,'Valency')); if((f&1048577)==(c&1572865))r.push(new morphet('','ㅇㅓㅈㅣ',1048577,1572865,'Valency')); } if(s.startsWith('ㅇㅏㅈㅣ')) { if((f&1048577)==(c&1572865)&&((a&262144)==262144))r.push(new morphet('','ㅇㅏㅈㅣ',1048577,1572865,'Valency')); } if(s.startsWith('ㅇㅣ')) { if((f&524289)==(c&1572865))r.push(new morphet('','ㅇㅣ',524289,1572865,'Valency')); } if(s.startsWith('ㄹㅣ')) { if((f&524289)==(c&1572865))r.push(new morphet('','ㄹㅣ',524289,1572865,'Valency')); } if(s.startsWith('ㅣ')) { if((f&524289)==(c&1572865))r.push(new morphet('','ㅣ',524289,1572865,'Valency')); } return r;} function EMHonor(s,b,c,e,f){var r=[]; if(s.endsWith('')) { if((f&0)==(c&2))r.push(new morphet('true','',0,2,'Honor')); } if(s.endsWith('ㅇㅡㅅㅣ')) { if((f&2)==(c&2))r.push(new morphet('','ㅇㅡㅅㅣ',2,2,'Honor')); } if(s.endsWith('ㅅㅣ')) { if((f&2)==(c&2))r.push(new morphet('','ㅅㅣ',2,2,'Honor')); } return r;} function ERMHonor(s,a,c,d,f){var r=[]; if(s.startsWith('')) { if((f&0)==(c&2))r.push(new morphet('true','',0,2,'Honor')); } if(s.startsWith('ㅇㅡㅅㅣ')) { if((f&2)==(c&2))r.push(new morphet('','ㅇㅡㅅㅣ',2,2,'Honor')); } if(s.startsWith('ㅅㅣ')) { if((f&2)==(c&2))r.push(new morphet('','ㅅㅣ',2,2,'Honor')); } return r;} function EMTense(s,b,c,e,f){var r=[]; if(s.endsWith('')) { if((f&12)==(c&12))r.push(new morphet('true','',12,12,'Tense')); if((f&0)==(c&780))r.push(new morphet('true','',0,780,'Tense')); if((f&32)==(c&236))r.push(new morphet('true','',32,236,'Tense')); if((f&64)==(c&236))r.push(new morphet('true','',64,236,'Tense')); if((f&96)==(c&236))r.push(new morphet('true','',96,236,'Tense')); if((f&128)==(c&236))r.push(new morphet('true','',128,236,'Tense')); if((f&16)==(c&252))r.push(new morphet('true','',16,252,'Tense')); if((f&512)==(c&1020))r.push(new morphet('true','',512,1020,'Tense')); if((f&768)==(c&1020))r.push(new morphet('true','',768,1020,'Tense')); if((f&33024)==(c&99324))r.push(new morphet('true','',33024,99324,'Tense')); if((f&65792)==(c&99324))r.push(new morphet('true','',65792,99324,'Tense')); if((f&98560)==(c&99324))r.push(new morphet('true','',98560,99324,'Tense')); } if(s.endsWith('ㄴㅡㄴ')) { if((f&256)==(c&99324))r.push(new morphet('','ㄴㅡㄴ',256,99324,'Tense')); } if(s.endsWith('ㄴ')) { if((f&256)==(c&99324))r.push(new morphet('','ㄴ',256,99324,'Tense')); } if(s.endsWith('ㅇㅏㅆ')) { if((f&4)==(c&12))r.push(new morphet('','ㅇㅏㅆ',4,12,'Tense')); } if(s.endsWith('ㅇㅓㅆ')) { if((f&4)==(c&12))r.push(new morphet('','ㅇㅓㅆ',4,12,'Tense')); } if(s.endsWith('ㅇㅏㅆㅇㅓㅆ')) { if((f&8)==(c&12))r.push(new morphet('','ㅇㅏㅆㅇㅓㅆ',8,12,'Tense')); } if(s.endsWith('ㅇㅓㅆㅇㅓㅆ')) { if((f&8)==(c&12))r.push(new morphet('','ㅇㅓㅆㅇㅓㅆ',8,12,'Tense')); } return r;} function ERMTense(s,a,c,d,f){var r=[]; if(s.startsWith('')) { if((f&12)==(c&12))r.push(new morphet('true','',12,12,'Tense')); if((f&0)==(c&780))r.push(new morphet('true','',0,780,'Tense')); if((f&32)==(c&236))r.push(new morphet('true','',32,236,'Tense')); if((f&64)==(c&236))r.push(new morphet('true','',64,236,'Tense')); if((f&96)==(c&236))r.push(new morphet('true','',96,236,'Tense')); if((f&128)==(c&236))r.push(new morphet('true','',128,236,'Tense')); if((f&16)==(c&252))r.push(new morphet('true','',16,252,'Tense')); if((f&512)==(c&1020))r.push(new morphet('true','',512,1020,'Tense')); if((f&768)==(c&1020))r.push(new morphet('true','',768,1020,'Tense')); if((f&33024)==(c&99324))r.push(new morphet('true','',33024,99324,'Tense')); if((f&65792)==(c&99324))r.push(new morphet('true','',65792,99324,'Tense')); if((f&98560)==(c&99324))r.push(new morphet('true','',98560,99324,'Tense')); } if(s.startsWith('ㄴㅡㄴ')) { if((f&256)==(c&99324))r.push(new morphet('','ㄴㅡㄴ',256,99324,'Tense')); } if(s.startsWith('ㄴ')) { if((f&256)==(c&99324))r.push(new morphet('','ㄴ',256,99324,'Tense')); } if(s.startsWith('ㅇㅏㅆ')) { if((f&4)==(c&12)&&((a&262144)==262144))r.push(new morphet('','ㅇㅏㅆ',4,12,'Tense')); } if(s.startsWith('ㅇㅓㅆ')) { if((f&4)==(c&12))r.push(new morphet('','ㅇㅓㅆ',4,12,'Tense')); } if(s.startsWith('ㅇㅏㅆㅇㅓㅆ')) { if((f&8)==(c&12)&&((a&262144)==262144))r.push(new morphet('','ㅇㅏㅆㅇㅓㅆ',8,12,'Tense')); } if(s.startsWith('ㅇㅓㅆㅇㅓㅆ')) { if((f&8)==(c&12))r.push(new morphet('','ㅇㅓㅆㅇㅓㅆ',8,12,'Tense')); } return r;} function EMReal(s,b,c,e,f){var r=[]; if(s.endsWith('')) { if((f&0)==(c&16))r.push(new morphet('true','',0,16,'Real')); } if(s.endsWith('ㄱㅔㅆ')) { if((f&16)==(c&16))r.push(new morphet('','ㄱㅔㅆ',16,16,'Real')); } return r;} function ERMReal(s,a,c,d,f){var r=[]; if(s.startsWith('')) { if((f&0)==(c&16))r.push(new morphet('true','',0,16,'Real')); } if(s.startsWith('ㄱㅔㅆ')) { if((f&16)==(c&16))r.push(new morphet('','ㄱㅔㅆ',16,16,'Real')); } return r;} function EMFormal(s,b,c,e,f){var r=[]; if(s.endsWith('')) { if((f&0)==(c&224))r.push(new morphet('true','',0,224,'Formal')); if((f&64)==(c&224))r.push(new morphet('true','',64,224,'Formal')); if((f&96)==(c&224))r.push(new morphet('true','',96,224,'Formal')); if((f&128)==(c&224))r.push(new morphet('true','',128,224,'Formal')); if((f&0)==(c&768))r.push(new morphet('true','',0,768,'Formal')); } if(s.endsWith('ㅅㅡㅂ')) { if((f&32)==(c&224))r.push(new morphet('','ㅅㅡㅂ',32,224,'Formal')); } if(s.endsWith('ㅇㅡㅂ')) { if((f&800)==(c&992))r.push(new morphet('','ㅇㅡㅂ',800,992,'Formal')); } if(s.endsWith('ㅂ')) { if((f&32)==(c&224))r.push(new morphet('','ㅂ',32,224,'Formal')); } return r;} function ERMFormal(s,a,c,d,f){var r=[]; if(s.startsWith('')) { if((f&0)==(c&224))r.push(new morphet('true','',0,224,'Formal')); if((f&64)==(c&224))r.push(new morphet('true','',64,224,'Formal')); if((f&96)==(c&224))r.push(new morphet('true','',96,224,'Formal')); if((f&128)==(c&224))r.push(new morphet('true','',128,224,'Formal')); if((f&0)==(c&768))r.push(new morphet('true','',0,768,'Formal')); } if(s.startsWith('ㅅㅡㅂ')) { if((f&32)==(c&224))r.push(new morphet('','ㅅㅡㅂ',32,224,'Formal')); } if(s.startsWith('ㅇㅡㅂ')) { if((f&800)==(c&992))r.push(new morphet('','ㅇㅡㅂ',800,992,'Formal')); } if(s.startsWith('ㅂ')) { if((f&32)==(c&224))r.push(new morphet('','ㅂ',32,224,'Formal')); } return r;} function EMSMood(s,b,c,e,f){var r=[]; if(s.endsWith('')) { if((f&96)==(c&224))r.push(new morphet('true','',96,224,'SMood')); if((f&128)==(c&224))r.push(new morphet('true','',128,224,'SMood')); if((f&256)==(c&99296))r.push(new morphet('true','',256,99296,'SMood')); if((f&33024)==(c&99296))r.push(new morphet('true','',33024,99296,'SMood')); if((f&768)==(c&992))r.push(new morphet('true','',768,992,'SMood')); if((f&98368)==(c&98528))r.push(new morphet('true','',98368,98528,'SMood')); if((f&3072)==(c&32512))r.push(new morphet('','',3072,32512,'SMood')); } if(s.endsWith('ㄴㅣ')) { if((f&288)==(c&992))r.push(new morphet('','ㄴㅣ',288,992,'SMood')); if((f&14336)==(c&32512))r.push(new morphet('','ㄴㅣ',14336,32512,'SMood')); } if(s.endsWith('ㄷㅣ')) { if((f&544)==(c&992))r.push(new morphet('','ㄷㅣ',544,992,'SMood')); } if(s.endsWith('ㅅㅣ')) { if((f&800)==(c&992))r.push(new morphet('','ㅅㅣ',800,992,'SMood')); } if(s.endsWith('ㄴ')) { if((f&320)==(c&99296))r.push(new morphet('','ㄴ',320,99296,'SMood')); if((f&33088)==(c&99296))r.push(new morphet('','ㄴ',33088,99296,'SMood')); if((f&1024)==(c&32512))r.push(new morphet('','ㄴ',1024,32512,'SMood')); } if(s.endsWith('ㄷ')) { if((f&576)==(c&99296))r.push(new morphet('','ㄷ',576,99296,'SMood')); if((f&33344)==(c&99296))r.push(new morphet('','ㄷ',33344,99296,'SMood')); } if(s.endsWith('ㅅ')) { if((f&832)==(c&99296))r.push(new morphet('','ㅅ',832,99296,'SMood')); if((f&33600)==(c&99296))r.push(new morphet('','ㅅ',33600,99296,'SMood')); } if(s.endsWith('ㄴㅡㄴ')) { if((f&65792)==(c&99296))r.push(new morphet('','ㄴㅡㄴ',65792,99296,'SMood')); if((f&65856)==(c&99296))r.push(new morphet('','ㄴㅡㄴ',65856,99296,'SMood')); if((f&0)==(c&32512))r.push(new morphet('','ㄴㅡㄴ',0,32512,'SMood')); } if(s.endsWith('ㄷㅓ')) { if((f&512)==(c&99296))r.push(new morphet('','ㄷㅓ',512,99296,'SMood')); if((f&66112)==(c&99296))r.push(new morphet('','ㄷㅓ',66112,99296,'SMood')); } if(s.endsWith('ㄷㅓㄴ')) { if((f&512)==(c&992))r.push(new morphet('','ㄷㅓㄴ',512,992,'SMood')); if((f&66112)==(c&99296))r.push(new morphet('','ㄷㅓㄴ',66112,99296,'SMood')); if((f&2048)==(c&32512))r.push(new morphet('','ㄷㅓㄴ',2048,32512,'SMood')); } if(s.endsWith('ㅇㅡㄴ')) { if((f&1024)==(c&32512))r.push(new morphet('','ㅇㅡㄴ',1024,32512,'SMood')); } if(s.endsWith('ㅇㅡ')) { if((f&3072)==(c&32512))r.push(new morphet('','ㅇㅡ',3072,32512,'SMood')); } if(s.endsWith('ㅇㅡㄹ')) { if((f&3072)==(c&32512))r.push(new morphet('','ㅇㅡㄹ',3072,32512,'SMood')); } if(s.endsWith('ㄹ')) { if((f&3072)==(c&32512))r.push(new morphet('','ㄹ',3072,32512,'SMood')); } if(s.endsWith('ㄱㅣ')) { if((f&4096)==(c&32512))r.push(new morphet('','ㄱㅣ',4096,32512,'SMood')); } if(s.endsWith('ㅇㅡㅁ')) { if((f&5120)==(c&32512))r.push(new morphet('','ㅇㅡㅁ',5120,32512,'SMood')); } if(s.endsWith('ㅁ')) { if((f&5120)==(c&32512))r.push(new morphet('','ㅁ',5120,32512,'SMood')); } if(s.endsWith('ㅇㅣ')) { if((f&6144)==(c&32512))r.push(new morphet('','ㅇㅣ',6144,32512,'SMood')); } if(s.endsWith('ㄱㅔ')) { if((f&7168)==(c&32512))r.push(new morphet('','ㄱㅔ',7168,32512,'SMood')); if((f&20480)==(c&32512))r.push(new morphet('','ㄱㅔ',20480,32512,'SMood')); } if(s.endsWith('ㄷㅗㄹㅗㄱ')) { if((f&8192)==(c&32512))r.push(new morphet('','ㄷㅗㄹㅗㄱ',8192,32512,'SMood')); } if(s.endsWith('ㄱㅗ')) { if((f&9216)==(c&32512))r.push(new morphet('','ㄱㅗ',9216,32512,'SMood')); } if(s.endsWith('ㅇㅡㅁㅕ')) { if((f&10240)==(c&32512))r.push(new morphet('','ㅇㅡㅁㅕ',10240,32512,'SMood')); } if(s.endsWith('ㅁㅕ')) { if((f&10240)==(c&32512))r.push(new morphet('','ㅁㅕ',10240,32512,'SMood')); } if(s.endsWith('ㅇㅡㅁㅕㄴㅅㅓ')) { if((f&11264)==(c&32512))r.push(new morphet('','ㅇㅡㅁㅕㄴㅅㅓ',11264,32512,'SMood')); } if(s.endsWith('ㅁㅕㄴㅅㅓ')) { if((f&11264)==(c&32512))r.push(new morphet('','ㅁㅕㄴㅅㅓ',11264,32512,'SMood')); } if(s.endsWith('ㅇㅡㄴㅏ')) { if((f&13312)==(c&32512))r.push(new morphet('','ㅇㅡㄴㅏ',13312,32512,'SMood')); } if(s.endsWith('ㄴㅏ')) { if((f&13312)==(c&32512))r.push(new morphet('','ㄴㅏ',13312,32512,'SMood')); } if(s.endsWith('ㅇㅡㄴㅣ')) { if((f&14336)==(c&32512))r.push(new morphet('','ㅇㅡㄴㅣ',14336,32512,'SMood')); } if(s.endsWith('ㅇㅡㄴㅣㄲㅏ')) { if((f&15360)==(c&32512))r.push(new morphet('','ㅇㅡㄴㅣㄲㅏ',15360,32512,'SMood')); } if(s.endsWith('ㄴㅣㄲㅏ')) { if((f&15360)==(c&32512))r.push(new morphet('','ㄴㅣㄲㅏ',15360,32512,'SMood')); } if(s.endsWith('ㅇㅡㅁㅕㄴ')) { if((f&16384)==(c&32512))r.push(new morphet('','ㅇㅡㅁㅕㄴ',16384,32512,'SMood')); } if(s.endsWith('ㅁㅕㄴ')) { if((f&16384)==(c&32512))r.push(new morphet('','ㅁㅕㄴ',16384,32512,'SMood')); } if(s.endsWith('ㅇㅏㅅㅓ')) { if((f&17408)==(c&32512))r.push(new morphet('','ㅇㅏㅅㅓ',17408,32512,'SMood')); } if(s.endsWith('ㅇㅓㅅㅓ')) { if((f&17408)==(c&32512))r.push(new morphet('','ㅇㅓㅅㅓ',17408,32512,'SMood')); } if(s.endsWith('ㄴㅡㄴㄷㅔ')) { if((f&18432)==(c&32512))r.push(new morphet('','ㄴㅡㄴㄷㅔ',18432,32512,'SMood')); } if(s.endsWith('ㅇㅏ')) { if((f&19456)==(c&32512))r.push(new morphet('','ㅇㅏ',19456,32512,'SMood')); } if(s.endsWith('ㅇㅓ')) { if((f&19456)==(c&32512))r.push(new morphet('','ㅇㅓ',19456,32512,'SMood')); } if(s.endsWith('ㅈㅣ')) { if((f&21504)==(c&32512))r.push(new morphet('','ㅈㅣ',21504,32512,'SMood')); } if(s.endsWith('ㄱㅓㄴㅏ')) { if((f&12288)==(c&32512))r.push(new morphet('','ㄱㅓㄴㅏ',12288,32512,'SMood')); } return r;} function ERMSMood(s,a,c,d,f){var r=[]; if(s.startsWith('')) { if((f&96)==(c&224))r.push(new morphet('true','',96,224,'SMood')); if((f&128)==(c&224))r.push(new morphet('true','',128,224,'SMood')); if((f&256)==(c&99296))r.push(new morphet('true','',256,99296,'SMood')); if((f&33024)==(c&99296))r.push(new morphet('true','',33024,99296,'SMood')); if((f&768)==(c&992))r.push(new morphet('true','',768,992,'SMood')); if((f&98368)==(c&98528))r.push(new morphet('true','',98368,98528,'SMood')); if((f&3072)==(c&32512))r.push(new morphet('','',3072,32512,'SMood')); } if(s.startsWith('ㄴㅣ')) { if((f&288)==(c&992))r.push(new morphet('','ㄴㅣ',288,992,'SMood')); if((f&14336)==(c&32512))r.push(new morphet('','ㄴㅣ',14336,32512,'SMood')); } if(s.startsWith('ㄷㅣ')) { if((f&544)==(c&992))r.push(new morphet('','ㄷㅣ',544,992,'SMood')); } if(s.startsWith('ㅅㅣ')) { if((f&800)==(c&992))r.push(new morphet('','ㅅㅣ',800,992,'SMood')); } if(s.startsWith('ㄴ')) { if((f&320)==(c&99296))r.push(new morphet('','ㄴ',320,99296,'SMood')); if((f&33088)==(c&99296))r.push(new morphet('','ㄴ',33088,99296,'SMood')); if((f&1024)==(c&32512))r.push(new morphet('','ㄴ',1024,32512,'SMood')); } if(s.startsWith('ㄷ')) { if((f&576)==(c&99296))r.push(new morphet('','ㄷ',576,99296,'SMood')); if((f&33344)==(c&99296))r.push(new morphet('','ㄷ',33344,99296,'SMood')); } if(s.startsWith('ㅅ')) { if((f&832)==(c&99296))r.push(new morphet('','ㅅ',832,99296,'SMood')); if((f&33600)==(c&99296))r.push(new morphet('','ㅅ',33600,99296,'SMood')); } if(s.startsWith('ㄴㅡㄴ')) { if((f&65792)==(c&99296))r.push(new morphet('','ㄴㅡㄴ',65792,99296,'SMood')); if((f&65856)==(c&99296))r.push(new morphet('','ㄴㅡㄴ',65856,99296,'SMood')); if((f&0)==(c&32512))r.push(new morphet('','ㄴㅡㄴ',0,32512,'SMood')); } if(s.startsWith('ㄷㅓ')) { if((f&512)==(c&99296))r.push(new morphet('','ㄷㅓ',512,99296,'SMood')); if((f&66112)==(c&99296))r.push(new morphet('','ㄷㅓ',66112,99296,'SMood')); } if(s.startsWith('ㄷㅓㄴ')) { if((f&512)==(c&992))r.push(new morphet('','ㄷㅓㄴ',512,992,'SMood')); if((f&66112)==(c&99296))r.push(new morphet('','ㄷㅓㄴ',66112,99296,'SMood')); if((f&2048)==(c&32512))r.push(new morphet('','ㄷㅓㄴ',2048,32512,'SMood')); } if(s.startsWith('ㅇㅡㄴ')) { if((f&1024)==(c&32512))r.push(new morphet('','ㅇㅡㄴ',1024,32512,'SMood')); } if(s.startsWith('ㅇㅡ')) { if((f&3072)==(c&32512))r.push(new morphet('','ㅇㅡ',3072,32512,'SMood')); } if(s.startsWith('ㅇㅡㄹ')) { if((f&3072)==(c&32512))r.push(new morphet('','ㅇㅡㄹ',3072,32512,'SMood')); } if(s.startsWith('ㄹ')) { if((f&3072)==(c&32512))r.push(new morphet('','ㄹ',3072,32512,'SMood')); } if(s.startsWith('ㄱㅣ')) { if((f&4096)==(c&32512))r.push(new morphet('','ㄱㅣ',4096,32512,'SMood')); } if(s.startsWith('ㅇㅡㅁ')) { if((f&5120)==(c&32512))r.push(new morphet('','ㅇㅡㅁ',5120,32512,'SMood')); } if(s.startsWith('ㅁ')) { if((f&5120)==(c&32512))r.push(new morphet('','ㅁ',5120,32512,'SMood')); } if(s.startsWith('ㅇㅣ')) { if((f&6144)==(c&32512))r.push(new morphet('','ㅇㅣ',6144,32512,'SMood')); } if(s.startsWith('ㄱㅔ')) { if((f&7168)==(c&32512))r.push(new morphet('','ㄱㅔ',7168,32512,'SMood')); if((f&20480)==(c&32512))r.push(new morphet('','ㄱㅔ',20480,32512,'SMood')); } if(s.startsWith('ㄷㅗㄹㅗㄱ')) { if((f&8192)==(c&32512))r.push(new morphet('','ㄷㅗㄹㅗㄱ',8192,32512,'SMood')); } if(s.startsWith('ㄱㅗ')) { if((f&9216)==(c&32512))r.push(new morphet('','ㄱㅗ',9216,32512,'SMood')); } if(s.startsWith('ㅇㅡㅁㅕ')) { if((f&10240)==(c&32512))r.push(new morphet('','ㅇㅡㅁㅕ',10240,32512,'SMood')); } if(s.startsWith('ㅁㅕ')) { if((f&10240)==(c&32512))r.push(new morphet('','ㅁㅕ',10240,32512,'SMood')); } if(s.startsWith('ㅇㅡㅁㅕㄴㅅㅓ')) { if((f&11264)==(c&32512))r.push(new morphet('','ㅇㅡㅁㅕㄴㅅㅓ',11264,32512,'SMood')); } if(s.startsWith('ㅁㅕㄴㅅㅓ')) { if((f&11264)==(c&32512))r.push(new morphet('','ㅁㅕㄴㅅㅓ',11264,32512,'SMood')); } if(s.startsWith('ㅇㅡㄴㅏ')) { if((f&13312)==(c&32512))r.push(new morphet('','ㅇㅡㄴㅏ',13312,32512,'SMood')); } if(s.startsWith('ㄴㅏ')) { if((f&13312)==(c&32512))r.push(new morphet('','ㄴㅏ',13312,32512,'SMood')); } if(s.startsWith('ㅇㅡㄴㅣ')) { if((f&14336)==(c&32512))r.push(new morphet('','ㅇㅡㄴㅣ',14336,32512,'SMood')); } if(s.startsWith('ㅇㅡㄴㅣㄲㅏ')) { if((f&15360)==(c&32512))r.push(new morphet('','ㅇㅡㄴㅣㄲㅏ',15360,32512,'SMood')); } if(s.startsWith('ㄴㅣㄲㅏ')) { if((f&15360)==(c&32512))r.push(new morphet('','ㄴㅣㄲㅏ',15360,32512,'SMood')); } if(s.startsWith('ㅇㅡㅁㅕㄴ')) { if((f&16384)==(c&32512))r.push(new morphet('','ㅇㅡㅁㅕㄴ',16384,32512,'SMood')); } if(s.startsWith('ㅁㅕㄴ')) { if((f&16384)==(c&32512))r.push(new morphet('','ㅁㅕㄴ',16384,32512,'SMood')); } if(s.startsWith('ㅇㅏㅅㅓ')) { if((f&17408)==(c&32512)&&((a&262144)==262144))r.push(new morphet('','ㅇㅏㅅㅓ',17408,32512,'SMood')); } if(s.startsWith('ㅇㅓㅅㅓ')) { if((f&17408)==(c&32512))r.push(new morphet('','ㅇㅓㅅㅓ',17408,32512,'SMood')); } if(s.startsWith('ㄴㅡㄴㄷㅔ')) { if((f&18432)==(c&32512))r.push(new morphet('','ㄴㅡㄴㄷㅔ',18432,32512,'SMood')); } if(s.startsWith('ㅇㅏ')) { if((f&19456)==(c&32512)&&((a&262144)==262144))r.push(new morphet('','ㅇㅏ',19456,32512,'SMood')); } if(s.startsWith('ㅇㅓ')) { if((f&19456)==(c&32512))r.push(new morphet('','ㅇㅓ',19456,32512,'SMood')); } if(s.startsWith('ㅈㅣ')) { if((f&21504)==(c&32512))r.push(new morphet('','ㅈㅣ',21504,32512,'SMood')); } if(s.startsWith('ㄱㅓㄴㅏ')) { if((f&12288)==(c&32512))r.push(new morphet('','ㄱㅓㄴㅏ',12288,32512,'SMood')); } return r;} function EMPMood(s,b,c,e,f){var r=[]; if(s.endsWith('')) { if((f&0)==(c&768))r.push(new morphet('true','',0,768,'PMood')); } if(s.endsWith('ㄷㅏ')) { if((f&32)==(c&98528))r.push(new morphet('','ㄷㅏ',32,98528,'PMood')); if((f&32800)==(c&98528))r.push(new morphet('','ㄷㅏ',32800,98528,'PMood')); if((f&256)==(c&99296))r.push(new morphet('','ㄷㅏ',256,99296,'PMood')); } if(s.endsWith('ㄲㅏ')) { if((f&65568)==(c&98528))r.push(new morphet('','ㄲㅏ',65568,98528,'PMood')); } if(s.endsWith('ㅇㅗ')) { if((f&98336)==(c&98528))r.push(new morphet('','ㅇㅗ',98336,98528,'PMood')); } if(s.endsWith('ㄹㅏ')) { if((f&512)==(c&99296))r.push(new morphet('','ㄹㅏ',512,99296,'PMood')); } if(s.endsWith('ㅈㅏ')) { if((f&32768)==(c&98528))r.push(new morphet('','ㅈㅏ',32768,98528,'PMood')); } if(s.endsWith('ㅑ')) { if((f&65536)==(c&98528))r.push(new morphet('','ㅑ',65536,98528,'PMood')); } if(s.endsWith('ㅇㅏㄹㅏ')) { if((f&98304)==(c&98528))r.push(new morphet('','ㅇㅏㄹㅏ',98304,98528,'PMood')); } if(s.endsWith('ㅇㅓㄹㅏ')) { if((f&98304)==(c&98528))r.push(new morphet('','ㅇㅓㄹㅏ',98304,98528,'PMood')); } if(s.endsWith('ㅔ')) { if((f&64)==(c&98528))r.push(new morphet('','ㅔ',64,98528,'PMood')); if((f&32832)==(c&98528))r.push(new morphet('','ㅔ',32832,98528,'PMood')); } if(s.endsWith('ㄱㅏ')) { if((f&65600)==(c&98528))r.push(new morphet('','ㄱㅏ',65600,98528,'PMood')); } if(s.endsWith('ㄱㅔ')) { if((f&98368)==(c&98528))r.push(new morphet('','ㄱㅔ',98368,98528,'PMood')); } if(s.endsWith('ㅇㅏ')) { if((f&96)==(c&224))r.push(new morphet('','ㅇㅏ',96,224,'PMood')); } if(s.endsWith('ㅇㅓ')) { if((f&96)==(c&224))r.push(new morphet('','ㅇㅓ',96,224,'PMood')); } if(s.endsWith('ㅈㅣ')) { if((f&128)==(c&224))r.push(new morphet('','ㅈㅣ',128,224,'PMood')); } return r;} function ERMPMood(s,a,c,d,f){var r=[]; if(s.startsWith('')) { if((f&0)==(c&768))r.push(new morphet('true','',0,768,'PMood')); } if(s.startsWith('ㄷㅏ')) { if((f&32)==(c&98528))r.push(new morphet('','ㄷㅏ',32,98528,'PMood')); if((f&32800)==(c&98528))r.push(new morphet('','ㄷㅏ',32800,98528,'PMood')); if((f&256)==(c&99296))r.push(new morphet('','ㄷㅏ',256,99296,'PMood')); } if(s.startsWith('ㄲㅏ')) { if((f&65568)==(c&98528))r.push(new morphet('','ㄲㅏ',65568,98528,'PMood')); } if(s.startsWith('ㅇㅗ')) { if((f&98336)==(c&98528))r.push(new morphet('','ㅇㅗ',98336,98528,'PMood')); } if(s.startsWith('ㄹㅏ')) { if((f&512)==(c&99296))r.push(new morphet('','ㄹㅏ',512,99296,'PMood')); } if(s.startsWith('ㅈㅏ')) { if((f&32768)==(c&98528))r.push(new morphet('','ㅈㅏ',32768,98528,'PMood')); } if(s.startsWith('ㅑ')) { if((f&65536)==(c&98528))r.push(new morphet('','ㅑ',65536,98528,'PMood')); } if(s.startsWith('ㅇㅏㄹㅏ')) { if((f&98304)==(c&98528)&&((a&262144)==262144))r.push(new morphet('','ㅇㅏㄹㅏ',98304,98528,'PMood')); } if(s.startsWith('ㅇㅓㄹㅏ')) { if((f&98304)==(c&98528))r.push(new morphet('','ㅇㅓㄹㅏ',98304,98528,'PMood')); } if(s.startsWith('ㅔ')) { if((f&64)==(c&98528))r.push(new morphet('','ㅔ',64,98528,'PMood')); if((f&32832)==(c&98528))r.push(new morphet('','ㅔ',32832,98528,'PMood')); } if(s.startsWith('ㄱㅏ')) { if((f&65600)==(c&98528))r.push(new morphet('','ㄱㅏ',65600,98528,'PMood')); } if(s.startsWith('ㄱㅔ')) { if((f&98368)==(c&98528))r.push(new morphet('','ㄱㅔ',98368,98528,'PMood')); } if(s.startsWith('ㅇㅏ')) { if((f&96)==(c&224)&&((a&262144)==262144))r.push(new morphet('','ㅇㅏ',96,224,'PMood')); } if(s.startsWith('ㅇㅓ')) { if((f&96)==(c&224))r.push(new morphet('','ㅇㅓ',96,224,'PMood')); } if(s.startsWith('ㅈㅣ')) { if((f&128)==(c&224))r.push(new morphet('','ㅈㅣ',128,224,'PMood')); } return r;} function EMPolite(s,b,c,e,f){var r=[]; if(s.endsWith('')) { if((f&0)==(c&131072))r.push(new morphet('true','',0,131072,'Polite')); if((f&0)==(c&768))r.push(new morphet('true','',0,768,'Polite')); } if(s.endsWith('ㅇㅛ')) { if((f&131072)==(c&131072))r.push(new morphet('','ㅇㅛ',131072,131072,'Polite')); } return r;} function ERMPolite(s,a,c,d,f){var r=[]; if(s.startsWith('')) { if((f&0)==(c&131072))r.push(new morphet('true','',0,131072,'Polite')); if((f&0)==(c&768))r.push(new morphet('true','',0,768,'Polite')); } if(s.startsWith('ㅇㅛ')) { if((f&131072)==(c&131072))r.push(new morphet('','ㅇㅛ',131072,131072,'Polite')); } return r;} function apC(a,b,m,pf,pfm,qf,qfm,cf,cfm){if(a=='Root'&&b=='Valency')m=cC(C0,m);if(a=='Root')m=cC(C1,m);if(a=='Honor')m=cC(C2,m);if(a=='Valency')m=cC(C3,m);if(a=='Root')m=cC(C4,m);return m;};pv.composeVerb=function(s,f,fm,_hook){var i;var t;var m=[]; var r;var a;var pos;if(_hook&&_hook["begin"]) {_hook["begin"]();}pos=m.length;a=SMRoot(f,fm);if(a.length==0) {throw err0('Root',f,fm);}var om=MSRoot[a[0][0]].get(a[0][1],'Root'); if(!s[om.id]) {return false;}om.form=[s[om.id]];om.attr(f,fm,s[om.id]);m.push([om]);a=SMValency(f,fm);if(a.length==0) {throw err0('Valency',f,fm);}t=[];for(var i in a){if(!MSValency[a[i][0]].empty) {var fb=MSValency[a[i][0]].get(a[i][1],'Valency'); fb.attr(f,fm,'');t.push(fb);}} if(t.length) {m.push(t);}a=SMHonor(f,fm);if(a.length==0) {throw err0('Honor',f,fm);}t=[];for(var i in a){if(!MSHonor[a[i][0]].empty) {var fb=MSHonor[a[i][0]].get(a[i][1],'Honor'); fb.attr(f,fm,'');t.push(fb);}} if(t.length) {m.push(t);}a=SMTense(f,fm);if(a.length==0) {throw err0('Tense',f,fm);}t=[];for(var i in a){if(!MSTense[a[i][0]].empty) {var fb=MSTense[a[i][0]].get(a[i][1],'Tense'); fb.attr(f,fm,'');t.push(fb);}} if(t.length) {m.push(t);}a=SMReal(f,fm);if(a.length==0) {throw err0('Real',f,fm);}t=[];for(var i in a){if(!MSReal[a[i][0]].empty) {var fb=MSReal[a[i][0]].get(a[i][1],'Real'); fb.attr(f,fm,'');t.push(fb);}} if(t.length) {m.push(t);}a=SMFormal(f,fm);if(a.length==0) {throw err0('Formal',f,fm);}t=[];for(var i in a){if(!MSFormal[a[i][0]].empty) {var fb=MSFormal[a[i][0]].get(a[i][1],'Formal'); fb.attr(f,fm,'');t.push(fb);}} if(t.length) {m.push(t);}a=SMSMood(f,fm);if(a.length==0) {throw err0('SMood',f,fm);}t=[];for(var i in a){if(!MSSMood[a[i][0]].empty) {var fb=MSSMood[a[i][0]].get(a[i][1],'SMood'); fb.attr(f,fm,'');t.push(fb);}} if(t.length) {m.push(t);}a=SMPMood(f,fm);if(a.length==0) {throw err0('PMood',f,fm);}t=[];for(var i in a){if(!MSPMood[a[i][0]].empty) {var fb=MSPMood[a[i][0]].get(a[i][1],'PMood'); fb.attr(f,fm,'');t.push(fb);}} if(t.length) {m.push(t);}a=SMPolite(f,fm);if(a.length==0) {throw err0('Polite',f,fm);}t=[];for(var i in a){if(!MSPolite[a[i][0]].empty) {var fb=MSPolite[a[i][0]].get(a[i][1],'Polite'); fb.attr(f,fm,'');t.push(fb);}} if(t.length) {m.push(t);}var j;var rs=[]; var rms=[]; var rrs=[]; var cs=[]; t=1;for(var i in m){t*=m[i].length;cs.push(m[i].length);} for(j=0;j0) {mt=m[i-1][ik[i-1]];c=(mt.bit&~mt.amask)|mt.abit;n=mt.mask|mt.amask;}if(ipos&&(i-1 in rr)) {var ma=m[i-1][ik[i-1]]; var mb=m[i][ik[i]]; var rt=[rr[i-1],r[i]]; rt=apC(ma.mclass,mb.mclass,rt,ma.ubit(),ma.umask(),mb.ubit(),mb.umask(),f,fm);rr[i-1]=rt[0];rr[i]=rt[1];}else {if(i<=pos&&(i+1 in rr)) {var ma=m[i][ik[i]]; var mb=m[i+1][ik[i+1]]; var rt=[r[i],rr[i+1]]; rt=apC(ma.mclass,mb.mclass,rt,ma.ubit(),ma.umask(),mb.ubit(),mb.umask(),f,fm);rr[i]=rt[0];rr[i+1]=rt[1];}else {rr[i]=r[i];}}if(_hook&&_hook["rr"]) {_hook["rr"](rr,i);}} rrs.push(rr);rms.push(rm);}return {f:rrs.map(cJ),fs:rms};};pv.decomposeVerb=function(s,f,fm) {if(typeof fm=='undefined')fm=0xFFFFFFFF;var r;var t;var nt;r=EMPolite(s,0,f,0,fm); if(r.length==0)throw err1('Polite',s,f,fm);t=[]; for(var i in r)t.push(new decom(s.substr(0,s.length-r[i].form.length),[],[r[i]],r[i].bit,r[i].mask));nt=[];for(var i in t){ var tm2=t[i].morphs2;r=EMPMood(t[i].f,tm2[tm2.length-1].bit,t[i].b,tm2[tm2.length-1].mask,t[i].m); if(r.length==0)continue;for(var j in r)nt.push(new decom(t[i].f.substr(0,t[i].f.length-r[j].form.length),t[i].morphs,r[j].id?tm2:tm2.concat(r[j]),t[i].b|r[j].bit,t[i].m|r[j].mask));} t=nt; if(t.length==0)throw err1('PMood',s,f,fm);nt=[];for(var i in t){ var tm2=t[i].morphs2;r=EMSMood(t[i].f,tm2[tm2.length-1].bit,t[i].b,tm2[tm2.length-1].mask,t[i].m); if(r.length==0)continue;for(var j in r)nt.push(new decom(t[i].f.substr(0,t[i].f.length-r[j].form.length),t[i].morphs,r[j].id?tm2:tm2.concat(r[j]),t[i].b|r[j].bit,t[i].m|r[j].mask));} t=nt; if(t.length==0)throw err1('SMood',s,f,fm);nt=[];for(var i in t){ var tm2=t[i].morphs2;r=EMFormal(t[i].f,tm2[tm2.length-1].bit,t[i].b,tm2[tm2.length-1].mask,t[i].m); if(r.length==0)continue;for(var j in r)nt.push(new decom(t[i].f.substr(0,t[i].f.length-r[j].form.length),t[i].morphs,r[j].id?tm2:tm2.concat(r[j]),t[i].b|r[j].bit,t[i].m|r[j].mask));} t=nt; if(t.length==0)throw err1('Formal',s,f,fm);nt=[];for(var i in t){ var tm2=t[i].morphs2;r=EMReal(t[i].f,tm2[tm2.length-1].bit,t[i].b,tm2[tm2.length-1].mask,t[i].m); if(r.length==0)continue;for(var j in r)nt.push(new decom(t[i].f.substr(0,t[i].f.length-r[j].form.length),t[i].morphs,r[j].id?tm2:tm2.concat(r[j]),t[i].b|r[j].bit,t[i].m|r[j].mask));} t=nt; if(t.length==0)throw err1('Real',s,f,fm);nt=[];for(var i in t){ var tm2=t[i].morphs2;r=EMTense(t[i].f,tm2[tm2.length-1].bit,t[i].b,tm2[tm2.length-1].mask,t[i].m); if(r.length==0)continue;for(var j in r)nt.push(new decom(t[i].f.substr(0,t[i].f.length-r[j].form.length),t[i].morphs,r[j].id?tm2:tm2.concat(r[j]),t[i].b|r[j].bit,t[i].m|r[j].mask));} t=nt; if(t.length==0)throw err1('Tense',s,f,fm);nt=[];for(var i in t){ var tm2=t[i].morphs2;r=EMHonor(t[i].f,tm2[tm2.length-1].bit,t[i].b,tm2[tm2.length-1].mask,t[i].m); if(r.length==0)continue;for(var j in r)nt.push(new decom(t[i].f.substr(0,t[i].f.length-r[j].form.length),t[i].morphs,r[j].id?tm2:tm2.concat(r[j]),t[i].b|r[j].bit,t[i].m|r[j].mask));} t=nt; if(t.length==0)throw err1('Honor',s,f,fm);nt=[];for(var i in t){ var tm2=t[i].morphs2;r=EMValency(t[i].f,tm2[tm2.length-1].bit,t[i].b,tm2[tm2.length-1].mask,t[i].m); if(r.length==0)continue;for(var j in r)nt.push(new decom(t[i].f.substr(0,t[i].f.length-r[j].form.length),t[i].morphs,r[j].id?tm2:tm2.concat(r[j]),t[i].b|r[j].bit,t[i].m|r[j].mask));} t=nt; if(t.length==0)throw err1('Valency',s,f,fm);r=[];for(var i in t) { var ms={}; for(var j in t[i].morphs) { var a=t[i].morphs[j]; ms[a.mclass]=a.form; } ms.Root=t[i].f; for(var j=t[i].morphs2.length-1;j>=0;j--) { var a=t[i].morphs2[j]; ms[a.mclass]=a.form; } r.push(new dR(ms, FTS(t[i].b,t[i].m))); }return r;}; pv.getWord=function(){return WORD;};}());