var IndonesianStemmer=function(){var s=new BaseStemmer,c=[["kah",-1,1],["lah",-1,1],["pun",-1,1]],o=[["nya",-1,1],["ku",-1,1],["mu",-1,1]],r=[["i",-1,1,function(){if(2<a)return!1;var r=s.limit-s.cursor;if(s.eq_s_b("s"))return!1;return s.cursor=s.limit-r,!0}],["an",-1,1,function(){return 1!=a}],["kan",1,1,function(){return 3!=a&&2!=a}]],n=[["di",-1,1],["ke",-1,2],["me",-1,1],["mem",2,5],["men",2,1],["meng",4,1],["meny",4,3,i],["pem",-1,6],["pen",-1,2],["peng",8,2],["peny",8,4,i],["ter",-1,1]],e=[["be",-1,3,function(){return!!s.out_grouping(t,97,117)&&!!s.eq_s("er")}],["belajar",0,4],["ber",0,3],["pe",-1,1],["pelajar",3,2],["per",3,1]],t=[17,65,16],a=0,l=0;function f(){return s.ket=s.cursor,0!=s.find_among_b(r)&&(s.bra=s.cursor,s.slice_del())&&(--l,1)}function i(){return!!s.in_grouping(t,97,117)}function m(){var r;if(s.bra=s.cursor,0!=(r=s.find_among(e))){switch(s.ket=s.cursor,r){case 1:if(!s.slice_del())return;a=2,--l;break;case 2:if(!s.slice_from("ajar"))return;--l;break;case 3:if(!s.slice_del())return;a=4,--l;break;case 4:if(!s.slice_from("ajar"))return;a=4,--l}return 1}}this.stem=function(){l=0;for(var r=s.cursor;s.go_out_grouping(t,97,117);)s.cursor++,l+=1;if(s.cursor=r,l<=2)return!1;a=0,s.limit_backward=s.cursor,s.cursor=s.limit;var e,i,u,r=s.limit-s.cursor;return s.ket=s.cursor,0!=s.find_among_b(c)&&(s.bra=s.cursor,s.slice_del())&&--l,s.cursor=s.limit-r,!(l<=2||(r=s.limit-s.cursor,s.ket=s.cursor,0!=s.find_among_b(o)&&(s.bra=s.cursor,s.slice_del())&&--l,s.cursor=s.limit-r,s.cursor=s.limit_backward,l<=2)||(r=s.cursor,e=s.cursor,(()=>{var r;if(s.bra=s.cursor,0!=(r=s.find_among(n))){switch(s.ket=s.cursor,r){case 1:if(!s.slice_del())return;a=1,--l;break;case 2:if(!s.slice_del())return;a=3,--l;break;case 3:if(a=1,!s.slice_from("s"))return;--l;break;case 4:if(a=3,!s.slice_from("s"))return;--l;break;case 5:a=1,--l;r:{var e=s.cursor,i=s.cursor;if(s.in_grouping(t,97,117)){if(s.cursor=i,s.slice_from("p"))break r;return}if(s.cursor=e,!s.slice_del())return}break;case 6:a=3,--l;r:{var u=s.cursor,c=s.cursor;if(s.in_grouping(t,97,117)){if(s.cursor=c,s.slice_from("p"))break r;return}if(s.cursor=u,!s.slice_del())return}}return 1}})()?(u=s.cursor,i=s.cursor,l<=2||(s.limit_backward=s.cursor,s.cursor=s.limit,f()&&(s.cursor=s.limit_backward,s.cursor=i,l<=2||m())),s.cursor=u,s.cursor=e):(s.cursor=r,i=s.cursor,m(),s.cursor=i,u=s.cursor,l<=2||(s.limit_backward=s.cursor,s.cursor=s.limit,f()&&(s.cursor=s.limit_backward)),s.cursor=u),0))},this.stemWord=function(r){return s.setCurrent(r),this.stem(),s.getCurrent()}};