var PorterStemmer=function(){var u=new BaseStemmer,t=[["s",-1,3],["ies",0,2],["sses",0,1],["ss",0,-1]],a=[["",-1,3],["bb",0,2],["dd",0,2],["ff",0,2],["gg",0,2],["bl",0,1],["mm",0,2],["nn",0,2],["pp",0,2],["rr",0,2],["at",0,1],["tt",0,2],["iz",0,1]],n=[["ed",-1,2],["eed",0,1],["ing",-1,2]],l=[["anci",-1,3],["enci",-1,2],["abli",-1,4],["eli",-1,6],["alli",-1,9],["ousli",-1,11],["entli",-1,5],["aliti",-1,9],["biliti",-1,13],["iviti",-1,12],["tional",-1,1],["ational",10,8],["alism",-1,9],["ation",-1,8],["ization",13,7],["izer",-1,7],["ator",-1,8],["iveness",-1,12],["fulness",-1,10],["ousness",-1,11]],f=[["icate",-1,2],["ative",-1,3],["alize",-1,1],["iciti",-1,2],["ical",-1,2],["ful",-1,3],["ness",-1,3]],_=[["ic",-1,1],["ance",-1,1],["ence",-1,1],["able",-1,1],["ible",-1,1],["ate",-1,1],["ive",-1,1],["ize",-1,1],["iti",-1,1],["al",-1,1],["ism",-1,1],["ion",-1,2],["er",-1,1],["ous",-1,1],["ant",-1,1],["ent",-1,1],["ment",15,1],["ement",16,1],["ou",-1,1]],m=[17,65,16,1],r=[1,17,65,208,1],b=!1,k=0,g=0;function d(){return u.out_grouping_b(r,89,121)&&u.in_grouping_b(m,97,121)&&!!u.out_grouping_b(m,97,121)}function v(){return g<=u.cursor}function p(){return k<=u.cursor}this.stem=function(){b=!1;var r=u.cursor;if(u.bra=u.cursor,u.eq_s("y")){if(u.ket=u.cursor,!u.slice_from("Y"))return!1;b=!0}u.cursor=r;for(r=u.cursor;;){var i=u.cursor;r:{for(;;){var e=u.cursor;if(u.in_grouping(m,97,121)&&(u.bra=u.cursor,u.eq_s("y"))){u.ket=u.cursor,u.cursor=e;break}if(u.cursor=e,u.cursor>=u.limit)break r;u.cursor++}if(!u.slice_from("Y"))return!1;b=!0;continue}u.cursor=i;break}u.cursor=r,g=u.limit,k=u.limit;var r=u.cursor,r=(u.go_out_grouping(m,97,121)&&(u.cursor++,u.go_in_grouping(m,97,121))&&(u.cursor++,g=u.cursor,u.go_out_grouping(m,97,121))&&(u.cursor++,u.go_in_grouping(m,97,121))&&(u.cursor++,k=u.cursor),u.cursor=r,u.limit_backward=u.cursor,u.cursor=u.limit,u.limit-u.cursor),r=((()=>{var r;if(u.ket=u.cursor,0!=(r=u.find_among_b(t)))switch(u.bra=u.cursor,r){case 1:if(u.slice_from("ss"))break;return;case 2:if(u.slice_from("i"))break;return;case 3:if(u.slice_del())break}})(),u.cursor=u.limit-r,u.limit-u.cursor),r=((()=>{if(u.ket=u.cursor,0!=(i=u.find_among_b(n)))switch(u.bra=u.cursor,i){case 1:if(!v())return;if(u.slice_from("ee"))break;return;case 2:var r=u.limit-u.cursor;if(!u.go_out_grouping_b(m,97,121))return;if(u.cursor--,u.cursor=u.limit-r,!u.slice_del())return;var r=u.limit-u.cursor,i=u.find_among_b(a);switch(u.cursor=u.limit-r,i){case 1:var e=u.cursor;u.insert(u.cursor,u.cursor,"e"),u.cursor=e;break;case 2:if(u.ket=u.cursor,u.cursor<=u.limit_backward)return;if(u.cursor--,u.bra=u.cursor,u.slice_del())break;return;case 3:if(u.cursor!=g)return;e=u.limit-u.cursor;if(!d())return;u.cursor=u.limit-e;e=u.cursor;u.insert(u.cursor,u.cursor,"e"),u.cursor=e}}})(),u.cursor=u.limit-r,u.limit-u.cursor),s=(u.ket=u.cursor,s=u.limit-u.cursor,(u.eq_s_b("y")||(u.cursor=u.limit-s,u.eq_s_b("Y")))&&(u.bra=u.cursor,u.go_out_grouping_b(m,97,121))&&(u.cursor--,u.slice_from("i")),u.cursor=u.limit-r,u.limit-u.cursor),r=((()=>{var r;if(u.ket=u.cursor,0!=(r=u.find_among_b(l))&&(u.bra=u.cursor,v()))switch(r){case 1:if(u.slice_from("tion"))break;return;case 2:if(u.slice_from("ence"))break;return;case 3:if(u.slice_from("ance"))break;return;case 4:if(u.slice_from("able"))break;return;case 5:if(u.slice_from("ent"))break;return;case 6:if(u.slice_from("e"))break;return;case 7:if(u.slice_from("ize"))break;return;case 8:if(u.slice_from("ate"))break;return;case 9:if(u.slice_from("al"))break;return;case 10:if(u.slice_from("ful"))break;return;case 11:if(u.slice_from("ous"))break;return;case 12:if(u.slice_from("ive"))break;return;case 13:if(u.slice_from("ble"))break}})(),u.cursor=u.limit-s,u.limit-u.cursor),s=((()=>{var r;if(u.ket=u.cursor,0!=(r=u.find_among_b(f))&&(u.bra=u.cursor,v()))switch(r){case 1:if(u.slice_from("al"))break;return;case 2:if(u.slice_from("ic"))break;return;case 3:if(u.slice_del())break}})(),u.cursor=u.limit-r,u.limit-u.cursor),r=((()=>{var r;if(u.ket=u.cursor,0!=(r=u.find_among_b(_))&&(u.bra=u.cursor,p()))switch(r){case 1:if(u.slice_del())break;return;case 2:var i=u.limit-u.cursor;if(!u.eq_s_b("s")&&(u.cursor=u.limit-i,!u.eq_s_b("t")))return;if(u.slice_del())break}})(),u.cursor=u.limit-s,u.limit-u.cursor),s=((()=>{if(u.ket=u.cursor,u.eq_s_b("e")){if(u.bra=u.cursor,!p()){if(!v())return;var r=u.limit-u.cursor;if(d())return;u.cursor=u.limit-r}u.slice_del()}})(),u.cursor=u.limit-r,u.limit-u.cursor),r=(u.ket=u.cursor,u.eq_s_b("l")&&(u.bra=u.cursor,p())&&u.eq_s_b("l")&&u.slice_del(),u.cursor=u.limit-s,u.cursor=u.limit_backward,u.cursor);if(b)for(;;){var c=u.cursor;r:{for(;;){var o=u.cursor;if(u.bra=u.cursor,u.eq_s("Y")){u.ket=u.cursor,u.cursor=o;break}if(u.cursor=o,u.cursor>=u.limit)break r;u.cursor++}if(u.slice_from("y"))continue;return!1}u.cursor=c;break}return u.cursor=r,!0},this.stemWord=function(r){return u.setCurrent(r),this.stem(),u.getCurrent()}};