diff --git a/sphinx/builders/html/__init__.py b/sphinx/builders/html/__init__.py index f5152f6da3a..1dbde6e371e 100644 --- a/sphinx/builders/html/__init__.py +++ b/sphinx/builders/html/__init__.py @@ -754,9 +754,13 @@ def copy_translation_js(self) -> None: def copy_stemmer_js(self) -> None: """Copy a JavaScript file for stemmer.""" if self.indexer is not None: - jsfile = self.indexer.get_js_stemmer_rawcode() - if jsfile: - copyfile(jsfile, path.join(self.outdir, '_static', '_stemmer.js')) + if hasattr(self.indexer, 'get_js_stemmer_rawcodes'): + for jsfile in self.indexer.get_js_stemmer_rawcodes(): + copyfile(jsfile, path.join(self.outdir, '_static', path.basename(jsfile))) + else: + jsfile = self.indexer.get_js_stemmer_rawcode() + if jsfile: + copyfile(jsfile, path.join(self.outdir, '_static', '_stemmer.js')) def copy_theme_static_files(self, context: Dict) -> None: def onerror(filename: str, error: Exception) -> None: diff --git a/sphinx/search/__init__.py b/sphinx/search/__init__.py index 6c748aed19f..cd099a6b5c1 100644 --- a/sphinx/search/__init__.py +++ b/sphinx/search/__init__.py @@ -439,15 +439,34 @@ def context_for_searchtool(self) -> Dict[str, Any]: js_splitter_code = self.js_splitter_code return { - 'search_language_stemming_code': self.lang.js_stemmer_code, + 'search_language_stemming_code': self.get_js_stemmer_code(), 'search_language_stop_words': jsdump.dumps(sorted(self.lang.stopwords)), 'search_scorer_tool': self.js_scorer_code, 'search_word_splitter_code': js_splitter_code, } + def get_js_stemmer_rawcodes(self) -> List[str]: + """Returns a list of non-minified stemmer JS files to copy.""" + if self.lang.js_stemmer_rawcode: + return [ + path.join(package_dir, 'search', 'non-minified-js', fname) + for fname in ('base-stemmer.js', self.lang.js_stemmer_rawcode) + ] + else: + return [] + def get_js_stemmer_rawcode(self) -> str: + return None + + def get_js_stemmer_code(self) -> str: + """Returns JS code that will be inserted into language_data.js.""" if self.lang.js_stemmer_rawcode: - return path.join(package_dir, 'search', 'non-minified-js', - self.lang.js_stemmer_rawcode) + js_dir = path.join(package_dir, 'search', 'minified-js') + with open(path.join(js_dir, 'base-stemmer.js')) as js_file: + base_js = js_file.read() + with open(path.join(js_dir, self.lang.js_stemmer_rawcode)) as js_file: + language_js = js_file.read() + return ('%s\n%s\nStemmer = %sStemmer;' % + (base_js, language_js, self.lang.language_name)) else: - return None + return self.lang.js_stemmer_code diff --git a/sphinx/search/da.py b/sphinx/search/da.py index e164e02713d..74802c61475 100644 --- a/sphinx/search/da.py +++ b/sphinx/search/da.py @@ -112,17 +112,11 @@ sådan | such, like this/like that ''') -js_stemmer = """ -var JSX={};(function(g){function j(b,e){var a=function(){};a.prototype=e.prototype;var c=new a;for(var d in b){b[d].prototype=c}}function I(c,b){for(var a in b.prototype)if(b.prototype.hasOwnProperty(a))c.prototype[a]=b.prototype[a]}function i(a,b,d){function c(a,b,c){delete a[b];a[b]=c;return c}Object.defineProperty(a,b,{get:function(){return c(a,b,d())},set:function(d){c(a,b,d)},enumerable:true,configurable:true})}function J(a,b,c){return a[b]=a[b]/c|0}var E=parseInt;var D=parseFloat;function K(a){return a!==a}var A=isFinite;var z=encodeURIComponent;var y=decodeURIComponent;var x=encodeURI;var w=decodeURI;var u=Object.prototype.toString;var C=Object.prototype.hasOwnProperty;function f(){}g.require=function(b){var a=p[b];return a!==undefined?a:null};g.profilerIsRunning=function(){return f.getResults!=null};g.getProfileResults=function(){return(f.getResults||function(){return{}})()};g.postProfileResults=function(a,b){if(f.postResults==null)throw new Error('profiler has not been turned on');return f.postResults(a,b)};g.resetProfileResults=function(){if(f.resetResults==null)throw new Error('profiler has not been turned on');return f.resetResults()};g.DEBUG=false;function t(){};j([t],Error);function b(a,b,c){this.G=a.length;this.S=a;this.V=b;this.J=c;this.I=null;this.W=null};j([b],Object);function l(){};j([l],Object);function d(){var a;var b;var c;this.F={};a=this.D='';b=this._=0;c=this.A=a.length;this.B=0;this.C=b;this.E=c};j([d],l);function v(a,b){a.D=b.D;a._=b._;a.A=b.A;a.B=b.B;a.C=b.C;a.E=b.E};function n(b,d,c,e){var a;if(b._>=b.A){return false}a=b.D.charCodeAt(b._);if(a>e||a>>3]&1<<(a&7))===0){return false}b._++;return true};function m(b,d,c,e){var a;if(b._<=b.B){return false}a=b.D.charCodeAt(b._-1);if(a>e||a>>3]&1<<(a&7))===0){return false}b._--;return true};function r(a,d,c,e){var b;if(a._>=a.A){return false}b=a.D.charCodeAt(a._);if(b>e||b>>3]&1<<(b&7))===0){a._++;return true}return false};function q(a,d,c,e){var b;if(a._<=a.B){return false}b=a.D.charCodeAt(a._-1);if(b>e||b>>3]&1<<(b&7))===0){a._--;return true}return false};function h(a,b,d){var c;if(a._-a.B>1);h=0;c=f=0;j--){if(e-c===n){h=-1;break}h=d.D.charCodeAt(e-1-c)-a.S.charCodeAt(j);if(h!==0){break}c++}if(h<0){g=i;k=c}else{b=i;f=c}if(g-b<=1){if(b>0){break}if(g===b){break}if(l){break}l=true}}while(true){a=m[b];if(f>=a.G){d._=e-a.G|0;if(a.I==null){return a.J}o=a.I(d);d._=e-a.G|0;if(o){return a.J}}b=a.V;if(b<0){return 0}}return-1};function s(a,b,d,e){var c;c=e.length-(d-b);a.D=a.D.slice(0,b)+e+a.D.slice(d);a.A+=c|0;if(a._>=d){a._+=c|0}else if(a._>b){a._=b}return c|0};function c(a,f){var b;var c;var d;var e;b=false;if((c=a.C)<0||c>(d=a.E)||d>(e=a.A)||e>a.D.length?false:true){s(a,a.C,a.E,f);b=true}return b};function o(a,f){var b;var c;var d;var e;b='';if((c=a.C)<0||c>(d=a.E)||d>(e=a.A)||e>a.D.length?false:true){b=a.D.slice(a.C,a.E)}return b};d.prototype.H=function(){return false};d.prototype.T=function(b){var a;var c;var d;var e;a=this.F['.'+b];if(a==null){c=this.D=b;d=this._=0;e=this.A=c.length;this.B=0;this.C=d;this.E=e;this.H();a=this.D;this.F['.'+b]=a}return a};d.prototype.stemWord=d.prototype.T;d.prototype.U=function(e){var d;var b;var c;var a;var f;var g;var h;d=[];for(b=0;bb||b>j){return false}h=this._=b;this.I_x=h;this._=g;a:while(true){d=this._;e=true;b:while(e===true){e=false;if(!n(this,a.g_v,97,248)){break b}this._=d;break a}k=this._=d;if(k>=this.A){return false}this._++}a:while(true){c=true;b:while(c===true){c=false;if(!r(this,a.g_v,97,248)){break b}break a}if(this._>=this.A){return false}this._++}this.I_p1=this._;f=true;a:while(f===true){f=false;if(!(this.I_p1c||c>k){return false}i=b._=c;b.I_x=i;b._=h;a:while(true){e=b._;f=true;b:while(f===true){f=false;if(!n(b,a.g_v,97,248)){break b}b._=e;break a}l=b._=e;if(l>=b.A){return false}b._++}a:while(true){d=true;b:while(d===true){d=false;if(!r(b,a.g_v,97,248)){break b}break a}if(b._>=b.A){return false}b._++}b.I_p1=b._;g=true;a:while(g===true){g=false;if(!(b.I_p1 None: diff --git a/sphinx/search/de.py b/sphinx/search/de.py index 174eb8d2f49..3e87fe6d9e0 100644 --- a/sphinx/search/de.py +++ b/sphinx/search/de.py @@ -295,17 +295,11 @@ zwischen | between ''') -js_stemmer = """ -var JSX={};(function(j){function l(b,e){var a=function(){};a.prototype=e.prototype;var c=new a;for(var d in b){b[d].prototype=c}}function H(c,b){for(var a in b.prototype)if(b.prototype.hasOwnProperty(a))c.prototype[a]=b.prototype[a]}function g(a,b,d){function c(a,b,c){delete a[b];a[b]=c;return c}Object.defineProperty(a,b,{get:function(){return c(a,b,d())},set:function(d){c(a,b,d)},enumerable:true,configurable:true})}function I(a,b,c){return a[b]=a[b]/c|0}var C=parseInt;var r=parseFloat;function J(a){return a!==a}var z=isFinite;var y=encodeURIComponent;var x=decodeURIComponent;var w=encodeURI;var u=decodeURI;var t=Object.prototype.toString;var B=Object.prototype.hasOwnProperty;function i(){}j.require=function(b){var a=q[b];return a!==undefined?a:null};j.profilerIsRunning=function(){return i.getResults!=null};j.getProfileResults=function(){return(i.getResults||function(){return{}})()};j.postProfileResults=function(a,b){if(i.postResults==null)throw new Error('profiler has not been turned on');return i.postResults(a,b)};j.resetProfileResults=function(){if(i.resetResults==null)throw new Error('profiler has not been turned on');return i.resetResults()};j.DEBUG=false;function s(){};l([s],Error);function c(a,b,c){this.F=a.length;this.K=a;this.L=b;this.I=c;this.H=null;this.P=null};l([c],Object);function o(){};l([o],Object);function e(){var a;var b;var c;this.G={};a=this.D='';b=this._=0;c=this.A=a.length;this.E=0;this.C=b;this.B=c};l([e],o);function v(a,b){a.D=b.D;a._=b._;a.A=b.A;a.E=b.E;a.C=b.C;a.B=b.B};function f(b,d,c,e){var a;if(b._>=b.A){return false}a=b.D.charCodeAt(b._);if(a>e||a>>3]&1<<(a&7))===0){return false}b._++;return true};function m(b,d,c,e){var a;if(b._<=b.E){return false}a=b.D.charCodeAt(b._-1);if(a>e||a>>3]&1<<(a&7))===0){return false}b._--;return true};function n(a,d,c,e){var b;if(a._>=a.A){return false}b=a.D.charCodeAt(a._);if(b>e||b>>3]&1<<(b&7))===0){a._++;return true}return false};function k(a,b,d){var c;if(a.A-a._>>1);h=0;c=g0){break}if(d===b){break}if(l){break}l=true}}while(true){a=m[b];if(g>=a.F){f._=e+a.F|0;if(a.H==null){return a.I}o=a.H(a.P);f._=e+a.F|0;if(o){return a.I}}b=a.L;if(b<0){return 0}}return-1};function h(d,m,p){var b;var g;var e;var n;var f;var k;var l;var i;var h;var c;var a;var j;var o;b=0;g=p;e=d._;n=d.E;f=0;k=0;l=false;while(true){i=b+(g-b>>1);h=0;c=f=0;j--){if(e-c===n){h=-1;break}h=d.D.charCodeAt(e-1-c)-a.K.charCodeAt(j);if(h!==0){break}c++}if(h<0){g=i;k=c}else{b=i;f=c}if(g-b<=1){if(b>0){break}if(g===b){break}if(l){break}l=true}}while(true){a=m[b];if(f>=a.F){d._=e-a.F|0;if(a.H==null){return a.I}o=a.H(d);d._=e-a.F|0;if(o){return a.I}}b=a.L;if(b<0){return 0}}return-1};function D(a,b,d,e){var c;c=e.length-(d-b);a.D=a.D.slice(0,b)+e+a.D.slice(d);a.A+=c|0;if(a._>=d){a._+=c|0}else if(a._>b){a._=b}return c|0};function b(a,f){var b;var c;var d;var e;b=false;if((c=a.C)<0||c>(d=a.B)||d>(e=a.A)||e>a.D.length?false:true){D(a,a.C,a.B,f);b=true}return b};e.prototype.J=function(){return false};e.prototype.W=function(b){var a;var c;var d;var e;a=this.G['.'+b];if(a==null){c=this.D=b;d=this._=0;e=this.A=c.length;this.E=0;this.C=d;this.B=e;this.J();a=this.D;this.G['.'+b]=a}return a};e.prototype.stemWord=e.prototype.W;e.prototype.X=function(e){var d;var b;var c;var a;var f;var g;var h;d=[];for(b=0;b=this.A){break b}this._++}continue a}this._=r;break a}this._=m;b:while(true){o=this._;h=true;d:while(h===true){h=false;e:while(true){d=this._;i=true;a:while(i===true){i=false;if(!f(this,a.g_v,97,252)){break a}this.C=this._;j=true;f:while(j===true){j=false;q=this._;l=true;c:while(l===true){l=false;if(!k(this,1,'u')){break c}this.B=this._;if(!f(this,a.g_v,97,252)){break c}if(!b(this,'U')){return false}break f}this._=q;if(!k(this,1,'y')){break a}this.B=this._;if(!f(this,a.g_v,97,252)){break a}if(!b(this,'Y')){return false}}this._=d;break e}p=this._=d;if(p>=this.A){break d}this._++}continue b}this._=o;break b}return true};a.prototype.r_prelude=a.prototype.U;function G(c){var s;var n;var o;var p;var e;var r;var d;var g;var h;var i;var j;var l;var m;var t;var q;s=c._;a:while(true){n=c._;d=true;b:while(d===true){d=false;g=true;c:while(g===true){g=false;o=c._;h=true;d:while(h===true){h=false;c.C=c._;if(!k(c,1,'ß')){break d}c.B=c._;if(!b(c,'ss')){return false}break c}t=c._=o;if(t>=c.A){break b}c._++}continue a}c._=n;break a}c._=s;b:while(true){p=c._;i=true;d:while(i===true){i=false;e:while(true){e=c._;j=true;a:while(j===true){j=false;if(!f(c,a.g_v,97,252)){break a}c.C=c._;l=true;f:while(l===true){l=false;r=c._;m=true;c:while(m===true){m=false;if(!k(c,1,'u')){break c}c.B=c._;if(!f(c,a.g_v,97,252)){break c}if(!b(c,'U')){return false}break f}c._=r;if(!k(c,1,'y')){break a}c.B=c._;if(!f(c,a.g_v,97,252)){break a}if(!b(c,'Y')){return false}}c._=e;break e}q=c._=e;if(q>=c.A){break d}c._++}continue b}c._=p;break b}return true};a.prototype.S=function(){var j;var b;var d;var e;var c;var g;var h;var i;var l;var k;this.I_p1=i=this.A;this.I_p2=i;j=l=this._;b=l+3|0;if(0>b||b>i){return false}k=this._=b;this.I_x=k;this._=j;a:while(true){d=true;b:while(d===true){d=false;if(!f(this,a.g_v,97,252)){break b}break a}if(this._>=this.A){return false}this._++}a:while(true){e=true;b:while(e===true){e=false;if(!n(this,a.g_v,97,252)){break b}break a}if(this._>=this.A){return false}this._++}this.I_p1=this._;c=true;a:while(c===true){c=false;if(!(this.I_p1=this.A){return false}this._++}a:while(true){h=true;b:while(h===true){h=false;if(!n(this,a.g_v,97,252)){break b}break a}if(this._>=this.A){return false}this._++}this.I_p2=this._;return true};a.prototype.r_mark_regions=a.prototype.S;function F(b){var k;var c;var e;var g;var d;var h;var i;var j;var m;var l;b.I_p1=j=b.A;b.I_p2=j;k=m=b._;c=m+3|0;if(0>c||c>j){return false}l=b._=c;b.I_x=l;b._=k;a:while(true){e=true;b:while(e===true){e=false;if(!f(b,a.g_v,97,252)){break b}break a}if(b._>=b.A){return false}b._++}a:while(true){g=true;b:while(g===true){g=false;if(!n(b,a.g_v,97,252)){break b}break a}if(b._>=b.A){return false}b._++}b.I_p1=b._;d=true;a:while(d===true){d=false;if(!(b.I_p1=b.A){return false}b._++}a:while(true){i=true;b:while(i===true){i=false;if(!n(b,a.g_v,97,252)){break b}break a}if(b._>=b.A){return false}b._++}b.I_p2=b._;return true};a.prototype.T=function(){var c;var e;var d;b:while(true){e=this._;d=true;a:while(d===true){d=false;this.C=this._;c=p(this,a.a_0,6);if(c===0){break a}this.B=this._;switch(c){case 0:break a;case 1:if(!b(this,'y')){return false}break;case 2:if(!b(this,'u')){return false}break;case 3:if(!b(this,'a')){return false}break;case 4:if(!b(this,'o')){return false}break;case 5:if(!b(this,'u')){return false}break;case 6:if(this._>=this.A){break a}this._++;break}continue b}this._=e;break b}return true};a.prototype.r_postlude=a.prototype.T;function E(c){var d;var f;var e;b:while(true){f=c._;e=true;a:while(e===true){e=false;c.C=c._;d=p(c,a.a_0,6);if(d===0){break a}c.B=c._;switch(d){case 0:break a;case 1:if(!b(c,'y')){return false}break;case 2:if(!b(c,'u')){return false}break;case 3:if(!b(c,'a')){return false}break;case 4:if(!b(c,'o')){return false}break;case 5:if(!b(c,'u')){return false}break;case 6:if(c._>=c.A){break a}c._++;break}continue b}c._=f;break b}return true};a.prototype.Q=function(){return!(this.I_p1<=this._)?false:true};a.prototype.r_R1=a.prototype.Q;a.prototype.R=function(){return!(this.I_p2<=this._)?false:true};a.prototype.r_R2=a.prototype.R;a.prototype.V=function(){var c;var z;var n;var x;var y;var f;var A;var B;var p;var w;var g;var j;var k;var l;var e;var o;var i;var q;var r;var s;var t;var u;var v;var D;var E;var F;var G;var H;var I;var J;var K;var L;var M;var C;z=this.A-this._;j=true;a:while(j===true){j=false;this.B=this._;c=h(this,a.a_1,7);if(c===0){break a}this.C=D=this._;if(!(!(this.I_p1<=D)?false:true)){break a}switch(c){case 0:break a;case 1:if(!b(this,'')){return false}break;case 2:if(!b(this,'')){return false}n=this.A-this._;k=true;b:while(k===true){k=false;this.B=this._;if(!d(this,1,'s')){this._=this.A-n;break b}this.C=this._;if(!d(this,3,'nis')){this._=this.A-n;break b}if(!b(this,'')){return false}}break;case 3:if(!m(this,a.g_s_ending,98,116)){break a}if(!b(this,'')){return false}break}}G=this._=(F=this.A)-z;x=F-G;l=true;a:while(l===true){l=false;this.B=this._;c=h(this,a.a_2,4);if(c===0){break a}this.C=E=this._;if(!(!(this.I_p1<=E)?false:true)){break a}switch(c){case 0:break a;case 1:if(!b(this,'')){return false}break;case 2:if(!m(this,a.g_st_ending,98,116)){break a}e=this._-3|0;if(this.E>e||e>this.A){break a}this._=e;if(!b(this,'')){return false}break}}C=this._=(M=this.A)-x;y=M-C;o=true;a:while(o===true){o=false;this.B=this._;c=h(this,a.a_4,8);if(c===0){break a}this.C=H=this._;if(!(!(this.I_p2<=H)?false:true)){break a}switch(c){case 0:break a;case 1:if(!b(this,'')){return false}f=this.A-this._;i=true;b:while(i===true){i=false;this.B=this._;if(!d(this,2,'ig')){this._=this.A-f;break b}this.C=I=this._;A=this.A-I;q=true;c:while(q===true){q=false;if(!d(this,1,'e')){break c}this._=this.A-f;break b}J=this._=this.A-A;if(!(!(this.I_p2<=J)?false:true)){this._=this.A-f;break b}if(!b(this,'')){return false}}break;case 2:B=this.A-this._;r=true;b:while(r===true){r=false;if(!d(this,1,'e')){break b}break a}this._=this.A-B;if(!b(this,'')){return false}break;case 3:if(!b(this,'')){return false}p=this.A-this._;s=true;b:while(s===true){s=false;this.B=this._;t=true;c:while(t===true){t=false;w=this.A-this._;u=true;d:while(u===true){u=false;if(!d(this,2,'er')){break d}break c}this._=this.A-w;if(!d(this,2,'en')){this._=this.A-p;break b}}this.C=K=this._;if(!(!(this.I_p1<=K)?false:true)){this._=this.A-p;break b}if(!b(this,'')){return false}}break;case 4:if(!b(this,'')){return false}g=this.A-this._;v=true;b:while(v===true){v=false;this.B=this._;c=h(this,a.a_3,2);if(c===0){this._=this.A-g;break b}this.C=L=this._;if(!(!(this.I_p2<=L)?false:true)){this._=this.A-g;break b}switch(c){case 0:this._=this.A-g;break b;case 1:if(!b(this,'')){return false}break}}break}}this._=this.A-y;return true};a.prototype.r_standard_suffix=a.prototype.V;function A(c){var e;var A;var j;var y;var z;var g;var B;var C;var q;var x;var i;var k;var l;var n;var f;var p;var o;var r;var s;var t;var u;var v;var w;var E;var F;var G;var H;var I;var J;var K;var L;var M;var N;var D;A=c.A-c._;k=true;a:while(k===true){k=false;c.B=c._;e=h(c,a.a_1,7);if(e===0){break a}c.C=E=c._;if(!(!(c.I_p1<=E)?false:true)){break a}switch(e){case 0:break a;case 1:if(!b(c,'')){return false}break;case 2:if(!b(c,'')){return false}j=c.A-c._;l=true;b:while(l===true){l=false;c.B=c._;if(!d(c,1,'s')){c._=c.A-j;break b}c.C=c._;if(!d(c,3,'nis')){c._=c.A-j;break b}if(!b(c,'')){return false}}break;case 3:if(!m(c,a.g_s_ending,98,116)){break a}if(!b(c,'')){return false}break}}H=c._=(G=c.A)-A;y=G-H;n=true;a:while(n===true){n=false;c.B=c._;e=h(c,a.a_2,4);if(e===0){break a}c.C=F=c._;if(!(!(c.I_p1<=F)?false:true)){break a}switch(e){case 0:break a;case 1:if(!b(c,'')){return false}break;case 2:if(!m(c,a.g_st_ending,98,116)){break a}f=c._-3|0;if(c.E>f||f>c.A){break a}c._=f;if(!b(c,'')){return false}break}}D=c._=(N=c.A)-y;z=N-D;p=true;a:while(p===true){p=false;c.B=c._;e=h(c,a.a_4,8);if(e===0){break a}c.C=I=c._;if(!(!(c.I_p2<=I)?false:true)){break a}switch(e){case 0:break a;case 1:if(!b(c,'')){return false}g=c.A-c._;o=true;b:while(o===true){o=false;c.B=c._;if(!d(c,2,'ig')){c._=c.A-g;break b}c.C=J=c._;B=c.A-J;r=true;c:while(r===true){r=false;if(!d(c,1,'e')){break c}c._=c.A-g;break b}K=c._=c.A-B;if(!(!(c.I_p2<=K)?false:true)){c._=c.A-g;break b}if(!b(c,'')){return false}}break;case 2:C=c.A-c._;s=true;b:while(s===true){s=false;if(!d(c,1,'e')){break b}break a}c._=c.A-C;if(!b(c,'')){return false}break;case 3:if(!b(c,'')){return false}q=c.A-c._;t=true;b:while(t===true){t=false;c.B=c._;u=true;c:while(u===true){u=false;x=c.A-c._;v=true;d:while(v===true){v=false;if(!d(c,2,'er')){break d}break c}c._=c.A-x;if(!d(c,2,'en')){c._=c.A-q;break b}}c.C=L=c._;if(!(!(c.I_p1<=L)?false:true)){c._=c.A-q;break b}if(!b(c,'')){return false}}break;case 4:if(!b(c,'')){return false}i=c.A-c._;w=true;b:while(w===true){w=false;c.B=c._;e=h(c,a.a_3,2);if(e===0){c._=c.A-i;break b}c.C=M=c._;if(!(!(c.I_p2<=M)?false:true)){c._=c.A-i;break b}switch(e){case 0:c._=c.A-i;break b;case 1:if(!b(c,'')){return false}break}}break}}c._=c.A-z;return true};a.prototype.J=function(){var f;var g;var h;var b;var a;var c;var d;var i;var j;var e;f=this._;b=true;a:while(b===true){b=false;if(!G(this)){break a}}i=this._=f;g=i;a=true;a:while(a===true){a=false;if(!F(this)){break a}}j=this._=g;this.E=j;this._=this.A;c=true;a:while(c===true){c=false;if(!A(this)){break a}}e=this._=this.E;h=e;d=true;a:while(d===true){d=false;if(!E(this)){break a}}this._=h;return true};a.prototype.stem=a.prototype.J;a.prototype.N=function(b){return b instanceof a};a.prototype.equals=a.prototype.N;a.prototype.O=function(){var c;var a;var b;var d;c='GermanStemmer';a=0;for(b=0;b None: diff --git a/sphinx/search/es.py b/sphinx/search/es.py index e87584cfc84..57f0e3a0839 100644 --- a/sphinx/search/es.py +++ b/sphinx/search/es.py @@ -355,17 +355,11 @@ tened ''') -js_stemmer = """ -var JSX={};(function(k){function l(b,e){var a=function(){};a.prototype=e.prototype;var c=new a;for(var d in b){b[d].prototype=c}}function I(c,b){for(var a in b.prototype)if(b.prototype.hasOwnProperty(a))c.prototype[a]=b.prototype[a]}function g(a,b,d){function c(a,b,c){delete a[b];a[b]=c;return c}Object.defineProperty(a,b,{get:function(){return c(a,b,d())},set:function(d){c(a,b,d)},enumerable:true,configurable:true})}function J(a,b,c){return a[b]=a[b]/c|0}var p=parseInt;var z=parseFloat;function K(a){return a!==a}var x=isFinite;var w=encodeURIComponent;var u=decodeURIComponent;var t=encodeURI;var s=decodeURI;var A=Object.prototype.toString;var q=Object.prototype.hasOwnProperty;function j(){}k.require=function(b){var a=o[b];return a!==undefined?a:null};k.profilerIsRunning=function(){return j.getResults!=null};k.getProfileResults=function(){return(j.getResults||function(){return{}})()};k.postProfileResults=function(a,b){if(j.postResults==null)throw new Error('profiler has not been turned on');return j.postResults(a,b)};k.resetProfileResults=function(){if(j.resetResults==null)throw new Error('profiler has not been turned on');return j.resetResults()};k.DEBUG=false;function r(){};l([r],Error);function a(a,b,c){this.F=a.length;this.K=a;this.L=b;this.I=c;this.H=null;this.P=null};l([a],Object);function m(){};l([m],Object);function i(){var a;var b;var c;this.G={};a=this.E='';b=this._=0;c=this.A=a.length;this.D=0;this.B=b;this.C=c};l([i],m);function v(a,b){a.E=b.E;a._=b._;a.A=b.A;a.D=b.D;a.B=b.B;a.C=b.C};function f(b,d,c,e){var a;if(b._>=b.A){return false}a=b.E.charCodeAt(b._);if(a>e||a>>3]&1<<(a&7))===0){return false}b._++;return true};function h(a,d,c,e){var b;if(a._>=a.A){return false}b=a.E.charCodeAt(a._);if(b>e||b>>3]&1<<(b&7))===0){a._++;return true}return false};function d(a,b,d){var c;if(a._-a.D>>1);h=0;c=g0){break}if(d===b){break}if(l){break}l=true}}while(true){a=m[b];if(g>=a.F){f._=e+a.F|0;if(a.H==null){return a.I}o=a.H(a.P);f._=e+a.F|0;if(o){return a.I}}b=a.L;if(b<0){return 0}}return-1};function e(d,m,p){var b;var g;var e;var n;var f;var k;var l;var i;var h;var c;var a;var j;var o;b=0;g=p;e=d._;n=d.D;f=0;k=0;l=false;while(true){i=b+(g-b>>1);h=0;c=f=0;j--){if(e-c===n){h=-1;break}h=d.E.charCodeAt(e-1-c)-a.K.charCodeAt(j);if(h!==0){break}c++}if(h<0){g=i;k=c}else{b=i;f=c}if(g-b<=1){if(b>0){break}if(g===b){break}if(l){break}l=true}}while(true){a=m[b];if(f>=a.F){d._=e-a.F|0;if(a.H==null){return a.I}o=a.H(d);d._=e-a.F|0;if(o){return a.I}}b=a.L;if(b<0){return 0}}return-1};function B(a,b,d,e){var c;c=e.length-(d-b);a.E=a.E.slice(0,b)+e+a.E.slice(d);a.A+=c|0;if(a._>=d){a._+=c|0}else if(a._>b){a._=b}return c|0};function c(a,f){var b;var c;var d;var e;b=false;if((c=a.B)<0||c>(d=a.C)||d>(e=a.A)||e>a.E.length?false:true){B(a,a.B,a.C,f);b=true}return b};i.prototype.J=function(){return false};i.prototype.a=function(b){var a;var c;var d;var e;a=this.G['.'+b];if(a==null){c=this.E=b;d=this._=0;e=this.A=c.length;this.D=0;this.B=d;this.C=e;this.J();a=this.E;this.G['.'+b]=a}return a};i.prototype.stemWord=i.prototype.a;i.prototype.b=function(e){var d;var b;var c;var a;var f;var g;var h;d=[];for(b=0;b=this.A){break c}this._++}break f}this._=x;if(!f(this,b.g_v,97,252)){break b}c:while(true){j=true;d:while(j===true){j=false;if(!h(this,b.g_v,97,252)){break d}break c}if(this._>=this.A){break b}this._++}}break g}this._=w;if(!h(this,b.g_v,97,252)){break a}k=true;c:while(k===true){k=false;y=this._;a=true;b:while(a===true){a=false;if(!h(this,b.g_v,97,252)){break b}e:while(true){m=true;d:while(m===true){m=false;if(!f(this,b.g_v,97,252)){break d}break e}if(this._>=this.A){break b}this._++}break c}this._=y;if(!f(this,b.g_v,97,252)){break a}if(this._>=this.A){break a}this._++}}this.I_pV=this._}v=this._=u;t=v;n=true;a:while(n===true){n=false;b:while(true){o=true;c:while(o===true){o=false;if(!f(this,b.g_v,97,252)){break c}break b}if(this._>=this.A){break a}this._++}b:while(true){p=true;c:while(p===true){p=false;if(!h(this,b.g_v,97,252)){break c}break b}if(this._>=this.A){break a}this._++}this.I_p1=this._;b:while(true){q=true;c:while(q===true){q=false;if(!f(this,b.g_v,97,252)){break c}break b}if(this._>=this.A){break a}this._++}c:while(true){r=true;b:while(r===true){r=false;if(!h(this,b.g_v,97,252)){break b}break c}if(this._>=this.A){break a}this._++}this.I_p2=this._}this._=t;return true};b.prototype.r_mark_regions=b.prototype.U;function E(a){var x;var y;var z;var u;var v;var l;var d;var e;var g;var i;var j;var k;var c;var m;var n;var o;var p;var q;var r;var s;var t;var w;a.I_pV=t=a.A;a.I_p1=t;a.I_p2=t;x=a._;l=true;a:while(l===true){l=false;d=true;g:while(d===true){d=false;y=a._;e=true;b:while(e===true){e=false;if(!f(a,b.g_v,97,252)){break b}g=true;f:while(g===true){g=false;z=a._;i=true;c:while(i===true){i=false;if(!h(a,b.g_v,97,252)){break c}d:while(true){j=true;e:while(j===true){j=false;if(!f(a,b.g_v,97,252)){break e}break d}if(a._>=a.A){break c}a._++}break f}a._=z;if(!f(a,b.g_v,97,252)){break b}c:while(true){k=true;d:while(k===true){k=false;if(!h(a,b.g_v,97,252)){break d}break c}if(a._>=a.A){break b}a._++}}break g}a._=y;if(!h(a,b.g_v,97,252)){break a}c=true;c:while(c===true){c=false;u=a._;m=true;b:while(m===true){m=false;if(!h(a,b.g_v,97,252)){break b}e:while(true){n=true;d:while(n===true){n=false;if(!f(a,b.g_v,97,252)){break d}break e}if(a._>=a.A){break b}a._++}break c}a._=u;if(!f(a,b.g_v,97,252)){break a}if(a._>=a.A){break a}a._++}}a.I_pV=a._}w=a._=x;v=w;o=true;a:while(o===true){o=false;b:while(true){p=true;c:while(p===true){p=false;if(!f(a,b.g_v,97,252)){break c}break b}if(a._>=a.A){break a}a._++}b:while(true){q=true;c:while(q===true){q=false;if(!h(a,b.g_v,97,252)){break c}break b}if(a._>=a.A){break a}a._++}a.I_p1=a._;b:while(true){r=true;c:while(r===true){r=false;if(!f(a,b.g_v,97,252)){break c}break b}if(a._>=a.A){break a}a._++}c:while(true){s=true;b:while(s===true){s=false;if(!h(a,b.g_v,97,252)){break b}break c}if(a._>=a.A){break a}a._++}a.I_p2=a._}a._=v;return true};b.prototype.V=function(){var a;var e;var d;b:while(true){e=this._;d=true;a:while(d===true){d=false;this.B=this._;a=n(this,b.a_0,6);if(a===0){break a}this.C=this._;switch(a){case 0:break a;case 1:if(!c(this,'a')){return false}break;case 2:if(!c(this,'e')){return false}break;case 3:if(!c(this,'i')){return false}break;case 4:if(!c(this,'o')){return false}break;case 5:if(!c(this,'u')){return false}break;case 6:if(this._>=this.A){break a}this._++;break}continue b}this._=e;break b}return true};b.prototype.r_postlude=b.prototype.V;function F(a){var d;var f;var e;b:while(true){f=a._;e=true;a:while(e===true){e=false;a.B=a._;d=n(a,b.a_0,6);if(d===0){break a}a.C=a._;switch(d){case 0:break a;case 1:if(!c(a,'a')){return false}break;case 2:if(!c(a,'e')){return false}break;case 3:if(!c(a,'i')){return false}break;case 4:if(!c(a,'o')){return false}break;case 5:if(!c(a,'u')){return false}break;case 6:if(a._>=a.A){break a}a._++;break}continue b}a._=f;break b}return true};b.prototype.S=function(){return!(this.I_pV<=this._)?false:true};b.prototype.r_RV=b.prototype.S;b.prototype.Q=function(){return!(this.I_p1<=this._)?false:true};b.prototype.r_R1=b.prototype.Q;b.prototype.R=function(){return!(this.I_p2<=this._)?false:true};b.prototype.r_R2=b.prototype.R;b.prototype.T=function(){var a;this.C=this._;if(e(this,b.a_1,13)===0){return false}this.B=this._;a=e(this,b.a_2,11);if(a===0){return false}if(!(!(this.I_pV<=this._)?false:true)){return false}switch(a){case 0:return false;case 1:this.B=this._;if(!c(this,'iendo')){return false}break;case 2:this.B=this._;if(!c(this,'ando')){return false}break;case 3:this.B=this._;if(!c(this,'ar')){return false}break;case 4:this.B=this._;if(!c(this,'er')){return false}break;case 5:this.B=this._;if(!c(this,'ir')){return false}break;case 6:if(!c(this,'')){return false}break;case 7:if(!d(this,1,'u')){return false}if(!c(this,'')){return false}break}return true};b.prototype.r_attached_pronoun=b.prototype.T;function G(a){var f;a.C=a._;if(e(a,b.a_1,13)===0){return false}a.B=a._;f=e(a,b.a_2,11);if(f===0){return false}if(!(!(a.I_pV<=a._)?false:true)){return false}switch(f){case 0:return false;case 1:a.B=a._;if(!c(a,'iendo')){return false}break;case 2:a.B=a._;if(!c(a,'ando')){return false}break;case 3:a.B=a._;if(!c(a,'ar')){return false}break;case 4:a.B=a._;if(!c(a,'er')){return false}break;case 5:a.B=a._;if(!c(a,'ir')){return false}break;case 6:if(!c(a,'')){return false}break;case 7:if(!d(a,1,'u')){return false}if(!c(a,'')){return false}break}return true};b.prototype.X=function(){var a;var j;var f;var g;var h;var i;var k;var l;var m;var n;var o;var q;var r;var s;var p;this.C=this._;a=e(this,b.a_6,46);if(a===0){return false}this.B=this._;switch(a){case 0:return false;case 1:if(!(!(this.I_p2<=this._)?false:true)){return false}if(!c(this,'')){return false}break;case 2:if(!(!(this.I_p2<=this._)?false:true)){return false}if(!c(this,'')){return false}j=this.A-this._;k=true;a:while(k===true){k=false;this.C=this._;if(!d(this,2,'ic')){this._=this.A-j;break a}this.B=q=this._;if(!(!(this.I_p2<=q)?false:true)){this._=this.A-j;break a}if(!c(this,'')){return false}}break;case 3:if(!(!(this.I_p2<=this._)?false:true)){return false}if(!c(this,'log')){return false}break;case 4:if(!(!(this.I_p2<=this._)?false:true)){return false}if(!c(this,'u')){return false}break;case 5:if(!(!(this.I_p2<=this._)?false:true)){return false}if(!c(this,'ente')){return false}break;case 6:if(!(!(this.I_p1<=this._)?false:true)){return false}if(!c(this,'')){return false}f=this.A-this._;l=true;a:while(l===true){l=false;this.C=this._;a=e(this,b.a_3,4);if(a===0){this._=this.A-f;break a}this.B=r=this._;if(!(!(this.I_p2<=r)?false:true)){this._=this.A-f;break a}if(!c(this,'')){return false}switch(a){case 0:this._=this.A-f;break a;case 1:this.C=this._;if(!d(this,2,'at')){this._=this.A-f;break a}this.B=s=this._;if(!(!(this.I_p2<=s)?false:true)){this._=this.A-f;break a}if(!c(this,'')){return false}break}}break;case 7:if(!(!(this.I_p2<=this._)?false:true)){return false}if(!c(this,'')){return false}g=this.A-this._;m=true;a:while(m===true){m=false;this.C=this._;a=e(this,b.a_4,3);if(a===0){this._=this.A-g;break a}this.B=this._;switch(a){case 0:this._=this.A-g;break a;case 1:if(!(!(this.I_p2<=this._)?false:true)){this._=this.A-g;break a}if(!c(this,'')){return false}break}}break;case 8:if(!(!(this.I_p2<=this._)?false:true)){return false}if(!c(this,'')){return false}h=this.A-this._;n=true;a:while(n===true){n=false;this.C=this._;a=e(this,b.a_5,3);if(a===0){this._=this.A-h;break a}this.B=this._;switch(a){case 0:this._=this.A-h;break a;case 1:if(!(!(this.I_p2<=this._)?false:true)){this._=this.A-h;break a}if(!c(this,'')){return false}break}}break;case 9:if(!(!(this.I_p2<=this._)?false:true)){return false}if(!c(this,'')){return false}i=this.A-this._;o=true;a:while(o===true){o=false;this.C=this._;if(!d(this,2,'at')){this._=this.A-i;break a}this.B=p=this._;if(!(!(this.I_p2<=p)?false:true)){this._=this.A-i;break a}if(!c(this,'')){return false}}break}return true};b.prototype.r_standard_suffix=b.prototype.X;function H(a){var f;var k;var g;var h;var i;var j;var l;var m;var n;var o;var p;var r;var s;var t;var q;a.C=a._;f=e(a,b.a_6,46);if(f===0){return false}a.B=a._;switch(f){case 0:return false;case 1:if(!(!(a.I_p2<=a._)?false:true)){return false}if(!c(a,'')){return false}break;case 2:if(!(!(a.I_p2<=a._)?false:true)){return false}if(!c(a,'')){return false}k=a.A-a._;l=true;a:while(l===true){l=false;a.C=a._;if(!d(a,2,'ic')){a._=a.A-k;break a}a.B=r=a._;if(!(!(a.I_p2<=r)?false:true)){a._=a.A-k;break a}if(!c(a,'')){return false}}break;case 3:if(!(!(a.I_p2<=a._)?false:true)){return false}if(!c(a,'log')){return false}break;case 4:if(!(!(a.I_p2<=a._)?false:true)){return false}if(!c(a,'u')){return false}break;case 5:if(!(!(a.I_p2<=a._)?false:true)){return false}if(!c(a,'ente')){return false}break;case 6:if(!(!(a.I_p1<=a._)?false:true)){return false}if(!c(a,'')){return false}g=a.A-a._;m=true;a:while(m===true){m=false;a.C=a._;f=e(a,b.a_3,4);if(f===0){a._=a.A-g;break a}a.B=s=a._;if(!(!(a.I_p2<=s)?false:true)){a._=a.A-g;break a}if(!c(a,'')){return false}switch(f){case 0:a._=a.A-g;break a;case 1:a.C=a._;if(!d(a,2,'at')){a._=a.A-g;break a}a.B=t=a._;if(!(!(a.I_p2<=t)?false:true)){a._=a.A-g;break a}if(!c(a,'')){return false}break}}break;case 7:if(!(!(a.I_p2<=a._)?false:true)){return false}if(!c(a,'')){return false}h=a.A-a._;n=true;a:while(n===true){n=false;a.C=a._;f=e(a,b.a_4,3);if(f===0){a._=a.A-h;break a}a.B=a._;switch(f){case 0:a._=a.A-h;break a;case 1:if(!(!(a.I_p2<=a._)?false:true)){a._=a.A-h;break a}if(!c(a,'')){return false}break}}break;case 8:if(!(!(a.I_p2<=a._)?false:true)){return false}if(!c(a,'')){return false}i=a.A-a._;o=true;a:while(o===true){o=false;a.C=a._;f=e(a,b.a_5,3);if(f===0){a._=a.A-i;break a}a.B=a._;switch(f){case 0:a._=a.A-i;break a;case 1:if(!(!(a.I_p2<=a._)?false:true)){a._=a.A-i;break a}if(!c(a,'')){return false}break}}break;case 9:if(!(!(a.I_p2<=a._)?false:true)){return false}if(!c(a,'')){return false}j=a.A-a._;p=true;a:while(p===true){p=false;a.C=a._;if(!d(a,2,'at')){a._=a.A-j;break a}a.B=q=a._;if(!(!(a.I_p2<=q)?false:true)){a._=a.A-j;break a}if(!c(a,'')){return false}}break}return true};b.prototype.Z=function(){var a;var g;var f;var h;var i;var j;g=this.A-(h=this._);if(h None: diff --git a/sphinx/search/fi.py b/sphinx/search/fi.py index ceb38cb5ada..e4d01c55361 100644 --- a/sphinx/search/fi.py +++ b/sphinx/search/fi.py @@ -105,17 +105,11 @@ itse | self ''') -js_stemmer = """ -var JSX={};(function(j){function l(b,e){var a=function(){};a.prototype=e.prototype;var c=new a;for(var d in b){b[d].prototype=c}}function M(c,b){for(var a in b.prototype)if(b.prototype.hasOwnProperty(a))c.prototype[a]=b.prototype[a]}function f(a,b,d){function c(a,b,c){delete a[b];a[b]=c;return c}Object.defineProperty(a,b,{get:function(){return c(a,b,d())},set:function(d){c(a,b,d)},enumerable:true,configurable:true})}function N(a,b,c){return a[b]=a[b]/c|0}var s=parseInt;var C=parseFloat;function O(a){return a!==a}var A=isFinite;var z=encodeURIComponent;var y=decodeURIComponent;var x=encodeURI;var v=decodeURI;var u=Object.prototype.toString;var E=Object.prototype.hasOwnProperty;function k(){}j.require=function(b){var a=q[b];return a!==undefined?a:null};j.profilerIsRunning=function(){return k.getResults!=null};j.getProfileResults=function(){return(k.getResults||function(){return{}})()};j.postProfileResults=function(a,b){if(k.postResults==null)throw new Error('profiler has not been turned on');return k.postResults(a,b)};j.resetProfileResults=function(){if(k.resetResults==null)throw new Error('profiler has not been turned on');return k.resetResults()};j.DEBUG=false;function t(){};l([t],Error);function b(a,b,c){this.F=a.length;this.M=a;this.N=b;this.H=c;this.G=null;this.S=null};function m(a,b,c,d,e){this.F=a.length;this.M=a;this.N=b;this.H=c;this.G=d;this.S=e};l([b,m],Object);function p(){};l([p],Object);function g(){var a;var b;var c;this.I={};a=this.E='';b=this._=0;c=this.A=a.length;this.B=0;this.C=b;this.D=c};l([g],p);function w(a,b){a.E=b.E;a._=b._;a.A=b.A;a.B=b.B;a.C=b.C;a.D=b.D};function n(b,d,c,e){var a;if(b._>=b.A){return false}a=b.E.charCodeAt(b._);if(a>e||a>>3]&1<<(a&7))===0){return false}b._++;return true};g.prototype.L=function(c,b,d){var a;if(this._<=this.B){return false}a=this.E.charCodeAt(this._-1);if(a>d||a>>3]&1<<(a&7))===0){return false}this._--;return true};function h(b,d,c,e){var a;if(b._<=b.B){return false}a=b.E.charCodeAt(b._-1);if(a>e||a>>3]&1<<(a&7))===0){return false}b._--;return true};function o(a,d,c,e){var b;if(a._>=a.A){return false}b=a.E.charCodeAt(a._);if(b>e||b>>3]&1<<(b&7))===0){a._++;return true}return false};function i(a,d,c,e){var b;if(a._<=a.B){return false}b=a.E.charCodeAt(a._-1);if(b>e||b>>3]&1<<(b&7))===0){a._--;return true}return false};g.prototype.K=function(a,c){var b;if(this._-this.B>1);g=0;c=f=0;i--){if(e-c===m){g=-1;break}g=this.E.charCodeAt(e-1-c)-a.M.charCodeAt(i);if(g!==0){break}c++}if(g<0){d=h;j=c}else{b=h;f=c}if(d-b<=1){if(b>0){break}if(d===b){break}if(k){break}k=true}}while(true){a=l[b];if(f>=a.F){this._=e-a.F|0;if(a.G==null){return a.H}n=a.G(this);this._=e-a.F|0;if(n){return a.H}}b=a.N;if(b<0){return 0}}return-1};function e(d,m,p){var b;var g;var e;var n;var f;var k;var l;var i;var h;var c;var a;var j;var o;b=0;g=p;e=d._;n=d.B;f=0;k=0;l=false;while(true){i=b+(g-b>>1);h=0;c=f=0;j--){if(e-c===n){h=-1;break}h=d.E.charCodeAt(e-1-c)-a.M.charCodeAt(j);if(h!==0){break}c++}if(h<0){g=i;k=c}else{b=i;f=c}if(g-b<=1){if(b>0){break}if(g===b){break}if(l){break}l=true}}while(true){a=m[b];if(f>=a.F){d._=e-a.F|0;if(a.G==null){return a.H}o=a.G(d);d._=e-a.F|0;if(o){return a.H}}b=a.N;if(b<0){return 0}}return-1};function D(a,b,d,e){var c;c=e.length-(d-b);a.E=a.E.slice(0,b)+e+a.E.slice(d);a.A+=c|0;if(a._>=d){a._+=c|0}else if(a._>b){a._=b}return c|0};function d(a,f){var b;var c;var d;var e;b=false;if((c=a.C)<0||c>(d=a.D)||d>(e=a.A)||e>a.E.length?false:true){D(a,a.C,a.D,f);b=true}return b};function r(a,f){var b;var c;var d;var e;b='';if((c=a.C)<0||c>(d=a.D)||d>(e=a.A)||e>a.E.length?false:true){b=a.E.slice(a.C,a.D)}return b};g.prototype.J=function(){return false};g.prototype.e=function(b){var a;var c;var d;var e;a=this.I['.'+b];if(a==null){c=this.E=b;d=this._=0;e=this.A=c.length;this.B=0;this.C=d;this.D=e;this.J();a=this.E;this.I['.'+b]=a}return a};g.prototype.stemWord=g.prototype.e;g.prototype.f=function(e){var d;var b;var c;var a;var f;var g;var h;d=[];for(b=0;b=this.A){return false}this._++}a:while(true){e=true;b:while(e===true){e=false;if(!o(this,a.g_V1,97,246)){break b}break a}if(this._>=this.A){return false}this._++}this.I_p1=this._;a:while(true){c=this._;f=true;b:while(f===true){f=false;if(!n(this,a.g_V1,97,246)){break b}this._=c;break a}j=this._=c;if(j>=this.A){return false}this._++}a:while(true){g=true;b:while(g===true){g=false;if(!o(this,a.g_V1,97,246)){break b}break a}if(this._>=this.A){return false}this._++}this.I_p2=this._;return true};a.prototype.r_mark_regions=a.prototype.Y;function H(b){var d;var e;var f;var c;var g;var h;var j;var k;var i;b.I_p1=k=b.A;b.I_p2=k;a:while(true){d=b._;f=true;b:while(f===true){f=false;if(!n(b,a.g_V1,97,246)){break b}b._=d;break a}j=b._=d;if(j>=b.A){return false}b._++}a:while(true){c=true;b:while(c===true){c=false;if(!o(b,a.g_V1,97,246)){break b}break a}if(b._>=b.A){return false}b._++}b.I_p1=b._;a:while(true){e=b._;g=true;b:while(g===true){g=false;if(!n(b,a.g_V1,97,246)){break b}b._=e;break a}i=b._=e;if(i>=b.A){return false}b._++}a:while(true){h=true;b:while(h===true){h=false;if(!o(b,a.g_V1,97,246)){break b}break a}if(b._>=b.A){return false}b._++}b.I_p2=b._;return true};a.prototype.U=function(){return!(this.I_p2<=this._)?false:true};a.prototype.r_R2=a.prototype.U;a.prototype.a=function(){var b;var f;var c;var g;var i;var j;f=this.A-(g=this._);if(g None: diff --git a/sphinx/search/fr.py b/sphinx/search/fr.py index 46320a8638d..4e87d5c92ac 100644 --- a/sphinx/search/fr.py +++ b/sphinx/search/fr.py @@ -191,17 +191,11 @@ soi | oneself ''') -js_stemmer = """ -var JSX={};(function(l){function m(b,e){var a=function(){};a.prototype=e.prototype;var c=new a;for(var d in b){b[d].prototype=c}}function P(c,b){for(var a in b.prototype)if(b.prototype.hasOwnProperty(a))c.prototype[a]=b.prototype[a]}function g(a,b,d){function c(a,b,c){delete a[b];a[b]=c;return c}Object.defineProperty(a,b,{get:function(){return c(a,b,d())},set:function(d){c(a,b,d)},enumerable:true,configurable:true})}function O(a,b,c){return a[b]=a[b]/c|0}var u=parseInt;var v=parseFloat;function N(a){return a!==a}var x=isFinite;var y=encodeURIComponent;var z=decodeURIComponent;var A=encodeURI;var B=decodeURI;var C=Object.prototype.toString;var D=Object.prototype.hasOwnProperty;function k(){}l.require=function(b){var a=q[b];return a!==undefined?a:null};l.profilerIsRunning=function(){return k.getResults!=null};l.getProfileResults=function(){return(k.getResults||function(){return{}})()};l.postProfileResults=function(a,b){if(k.postResults==null)throw new Error('profiler has not been turned on');return k.postResults(a,b)};l.resetProfileResults=function(){if(k.resetResults==null)throw new Error('profiler has not been turned on');return k.resetResults()};l.DEBUG=false;function G(){};m([G],Error);function a(a,b,c){this.F=a.length;this.K=a;this.L=b;this.I=c;this.H=null;this.P=null};m([a],Object);function p(){};m([p],Object);function i(){var a;var b;var c;this.G={};a=this.E='';b=this._=0;c=this.A=a.length;this.B=0;this.D=b;this.C=c};m([i],p);function s(a,b){a.E=b.E;a._=b._;a.A=b.A;a.B=b.B;a.D=b.D;a.C=b.C};function e(b,d,c,e){var a;if(b._>=b.A){return false}a=b.E.charCodeAt(b._);if(a>e||a>>3]&1<<(a&7))===0){return false}b._++;return true};function r(b,d,c,e){var a;if(b._<=b.B){return false}a=b.E.charCodeAt(b._-1);if(a>e||a>>3]&1<<(a&7))===0){return false}b._--;return true};function o(a,d,c,e){var b;if(a._>=a.A){return false}b=a.E.charCodeAt(a._);if(b>e||b>>3]&1<<(b&7))===0){a._++;return true}return false};function j(a,d,c,e){var b;if(a._<=a.B){return false}b=a.E.charCodeAt(a._-1);if(b>e||b>>3]&1<<(b&7))===0){a._--;return true}return false};function h(a,b,d){var c;if(a.A-a._>>1);h=0;c=g0){break}if(d===b){break}if(l){break}l=true}}while(true){a=m[b];if(g>=a.F){f._=e+a.F|0;if(a.H==null){return a.I}o=a.H(a.P);f._=e+a.F|0;if(o){return a.I}}b=a.L;if(b<0){return 0}}return-1};function f(d,m,p){var b;var g;var e;var n;var f;var k;var l;var i;var h;var c;var a;var j;var o;b=0;g=p;e=d._;n=d.B;f=0;k=0;l=false;while(true){i=b+(g-b>>1);h=0;c=f=0;j--){if(e-c===n){h=-1;break}h=d.E.charCodeAt(e-1-c)-a.K.charCodeAt(j);if(h!==0){break}c++}if(h<0){g=i;k=c}else{b=i;f=c}if(g-b<=1){if(b>0){break}if(g===b){break}if(l){break}l=true}}while(true){a=m[b];if(f>=a.F){d._=e-a.F|0;if(a.H==null){return a.I}o=a.H(d);d._=e-a.F|0;if(o){return a.I}}b=a.L;if(b<0){return 0}}return-1};function E(a,b,d,e){var c;c=e.length-(d-b);a.E=a.E.slice(0,b)+e+a.E.slice(d);a.A+=c|0;if(a._>=d){a._+=c|0}else if(a._>b){a._=b}return c|0};function c(a,f){var b;var c;var d;var e;b=false;if((c=a.D)<0||c>(d=a.C)||d>(e=a.A)||e>a.E.length?false:true){E(a,a.D,a.C,f);b=true}return b};i.prototype.J=function(){return false};i.prototype.c=function(b){var a;var c;var d;var e;a=this.G['.'+b];if(a==null){c=this.E=b;d=this._=0;e=this.A=c.length;this.B=0;this.D=d;this.C=e;this.J();a=this.E;this.G['.'+b]=a}return a};i.prototype.stemWord=i.prototype.c;i.prototype.d=function(e){var d;var b;var c;var a;var f;var g;var h;d=[];for(b=0;b=this.A){break g}this._++}continue a}this._=p;break a}return true};b.prototype.r_prelude=b.prototype.W;function H(a){var q;var k;var f;var g;var i;var j;var d;var l;var m;var n;var o;var p;var r;a:while(true){q=a._;i=true;g:while(i===true){i=false;h:while(true){k=a._;j=true;b:while(j===true){j=false;d=true;c:while(d===true){d=false;f=a._;l=true;d:while(l===true){l=false;if(!e(a,b.g_v,97,251)){break d}a.D=a._;m=true;e:while(m===true){m=false;g=a._;n=true;f:while(n===true){n=false;if(!h(a,1,'u')){break f}a.C=a._;if(!e(a,b.g_v,97,251)){break f}if(!c(a,'U')){return false}break e}a._=g;o=true;f:while(o===true){o=false;if(!h(a,1,'i')){break f}a.C=a._;if(!e(a,b.g_v,97,251)){break f}if(!c(a,'I')){return false}break e}a._=g;if(!h(a,1,'y')){break d}a.C=a._;if(!c(a,'Y')){return false}}break c}a._=f;p=true;d:while(p===true){p=false;a.D=a._;if(!h(a,1,'y')){break d}a.C=a._;if(!e(a,b.g_v,97,251)){break d}if(!c(a,'Y')){return false}break c}a._=f;if(!h(a,1,'q')){break b}a.D=a._;if(!h(a,1,'u')){break b}a.C=a._;if(!c(a,'U')){return false}}a._=k;break h}r=a._=k;if(r>=a.A){break g}a._++}continue a}a._=q;break a}return true};b.prototype.U=function(){var t;var i;var r;var d;var f;var g;var h;var c;var a;var j;var k;var l;var m;var s;var p;var q;this.I_pV=p=this.A;this.I_p1=p;this.I_p2=p;t=this._;d=true;b:while(d===true){d=false;f=true;c:while(f===true){f=false;i=this._;g=true;a:while(g===true){g=false;if(!e(this,b.g_v,97,251)){break a}if(!e(this,b.g_v,97,251)){break a}if(this._>=this.A){break a}this._++;break c}this._=i;h=true;a:while(h===true){h=false;if(n(this,b.a_0,3)===0){break a}break c}s=this._=i;if(s>=this.A){break b}this._++;a:while(true){c=true;d:while(c===true){c=false;if(!e(this,b.g_v,97,251)){break d}break a}if(this._>=this.A){break b}this._++}}this.I_pV=this._}q=this._=t;r=q;a=true;a:while(a===true){a=false;c:while(true){j=true;b:while(j===true){j=false;if(!e(this,b.g_v,97,251)){break b}break c}if(this._>=this.A){break a}this._++}b:while(true){k=true;c:while(k===true){k=false;if(!o(this,b.g_v,97,251)){break c}break b}if(this._>=this.A){break a}this._++}this.I_p1=this._;b:while(true){l=true;c:while(l===true){l=false;if(!e(this,b.g_v,97,251)){break c}break b}if(this._>=this.A){break a}this._++}c:while(true){m=true;b:while(m===true){m=false;if(!o(this,b.g_v,97,251)){break b}break c}if(this._>=this.A){break a}this._++}this.I_p2=this._}this._=r;return true};b.prototype.r_mark_regions=b.prototype.U;function I(a){var s;var i;var r;var d;var f;var g;var h;var c;var j;var k;var l;var m;var p;var t;var q;var u;a.I_pV=q=a.A;a.I_p1=q;a.I_p2=q;s=a._;d=true;b:while(d===true){d=false;f=true;c:while(f===true){f=false;i=a._;g=true;a:while(g===true){g=false;if(!e(a,b.g_v,97,251)){break a}if(!e(a,b.g_v,97,251)){break a}if(a._>=a.A){break a}a._++;break c}a._=i;h=true;a:while(h===true){h=false;if(n(a,b.a_0,3)===0){break a}break c}t=a._=i;if(t>=a.A){break b}a._++;a:while(true){c=true;d:while(c===true){c=false;if(!e(a,b.g_v,97,251)){break d}break a}if(a._>=a.A){break b}a._++}}a.I_pV=a._}u=a._=s;r=u;j=true;a:while(j===true){j=false;c:while(true){k=true;b:while(k===true){k=false;if(!e(a,b.g_v,97,251)){break b}break c}if(a._>=a.A){break a}a._++}b:while(true){l=true;c:while(l===true){l=false;if(!o(a,b.g_v,97,251)){break c}break b}if(a._>=a.A){break a}a._++}a.I_p1=a._;b:while(true){m=true;c:while(m===true){m=false;if(!e(a,b.g_v,97,251)){break c}break b}if(a._>=a.A){break a}a._++}c:while(true){p=true;b:while(p===true){p=false;if(!o(a,b.g_v,97,251)){break b}break c}if(a._>=a.A){break a}a._++}a.I_p2=a._}a._=r;return true};b.prototype.V=function(){var a;var e;var d;b:while(true){e=this._;d=true;a:while(d===true){d=false;this.D=this._;a=n(this,b.a_1,4);if(a===0){break a}this.C=this._;switch(a){case 0:break a;case 1:if(!c(this,'i')){return false}break;case 2:if(!c(this,'u')){return false}break;case 3:if(!c(this,'y')){return false}break;case 4:if(this._>=this.A){break a}this._++;break}continue b}this._=e;break b}return true};b.prototype.r_postlude=b.prototype.V;function J(a){var d;var f;var e;b:while(true){f=a._;e=true;a:while(e===true){e=false;a.D=a._;d=n(a,b.a_1,4);if(d===0){break a}a.C=a._;switch(d){case 0:break a;case 1:if(!c(a,'i')){return false}break;case 2:if(!c(a,'u')){return false}break;case 3:if(!c(a,'y')){return false}break;case 4:if(a._>=a.A){break a}a._++;break}continue b}a._=f;break b}return true};b.prototype.S=function(){return!(this.I_pV<=this._)?false:true};b.prototype.r_RV=b.prototype.S;b.prototype.Q=function(){return!(this.I_p1<=this._)?false:true};b.prototype.r_R1=b.prototype.Q;b.prototype.R=function(){return!(this.I_p2<=this._)?false:true};b.prototype.r_R2=b.prototype.R;b.prototype.Y=function(){var a;var E;var H;var e;var D;var g;var F;var G;var h;var I;var A;var B;var p;var k;var l;var m;var n;var o;var i;var q;var s;var t;var u;var v;var w;var x;var y;var z;var J;var K;var L;var C;this.C=this._;a=f(this,b.a_4,43);if(a===0){return false}this.D=this._;switch(a){case 0:return false;case 1:if(!(!(this.I_p2<=this._)?false:true)){return false}if(!c(this,'')){return false}break;case 2:if(!(!(this.I_p2<=this._)?false:true)){return false}if(!c(this,'')){return false}E=this.A-this._;p=true;c:while(p===true){p=false;this.C=this._;if(!d(this,2,'ic')){this._=this.A-E;break c}this.D=this._;k=true;b:while(k===true){k=false;H=this.A-this._;l=true;a:while(l===true){l=false;if(!(!(this.I_p2<=this._)?false:true)){break a}if(!c(this,'')){return false}break b}this._=this.A-H;if(!c(this,'iqU')){return false}}}break;case 3:if(!(!(this.I_p2<=this._)?false:true)){return false}if(!c(this,'log')){return false}break;case 4:if(!(!(this.I_p2<=this._)?false:true)){return false}if(!c(this,'u')){return false}break;case 5:if(!(!(this.I_p2<=this._)?false:true)){return false}if(!c(this,'ent')){return false}break;case 6:if(!(!(this.I_pV<=this._)?false:true)){return false}if(!c(this,'')){return false}e=this.A-this._;m=true;a:while(m===true){m=false;this.C=this._;a=f(this,b.a_2,6);if(a===0){this._=this.A-e;break a}this.D=this._;switch(a){case 0:this._=this.A-e;break a;case 1:if(!(!(this.I_p2<=this._)?false:true)){this._=this.A-e;break a}if(!c(this,'')){return false}this.C=this._;if(!d(this,2,'at')){this._=this.A-e;break a}this.D=J=this._;if(!(!(this.I_p2<=J)?false:true)){this._=this.A-e;break a}if(!c(this,'')){return false}break;case 2:n=true;b:while(n===true){n=false;D=this.A-this._;o=true;c:while(o===true){o=false;if(!(!(this.I_p2<=this._)?false:true)){break c}if(!c(this,'')){return false}break b}K=this._=this.A-D;if(!(!(this.I_p1<=K)?false:true)){this._=this.A-e;break a}if(!c(this,'eux')){return false}}break;case 3:if(!(!(this.I_p2<=this._)?false:true)){this._=this.A-e;break a}if(!c(this,'')){return false}break;case 4:if(!(!(this.I_pV<=this._)?false:true)){this._=this.A-e;break a}if(!c(this,'i')){return false}break}}break;case 7:if(!(!(this.I_p2<=this._)?false:true)){return false}if(!c(this,'')){return false}g=this.A-this._;i=true;a:while(i===true){i=false;this.C=this._;a=f(this,b.a_3,3);if(a===0){this._=this.A-g;break a}this.D=this._;switch(a){case 0:this._=this.A-g;break a;case 1:q=true;c:while(q===true){q=false;F=this.A-this._;s=true;b:while(s===true){s=false;if(!(!(this.I_p2<=this._)?false:true)){break b}if(!c(this,'')){return false}break c}this._=this.A-F;if(!c(this,'abl')){return false}}break;case 2:t=true;b:while(t===true){t=false;G=this.A-this._;u=true;c:while(u===true){u=false;if(!(!(this.I_p2<=this._)?false:true)){break c}if(!c(this,'')){return false}break b}this._=this.A-G;if(!c(this,'iqU')){return false}}break;case 3:if(!(!(this.I_p2<=this._)?false:true)){this._=this.A-g;break a}if(!c(this,'')){return false}break}}break;case 8:if(!(!(this.I_p2<=this._)?false:true)){return false}if(!c(this,'')){return false}h=this.A-this._;v=true;a:while(v===true){v=false;this.C=this._;if(!d(this,2,'at')){this._=this.A-h;break a}this.D=L=this._;if(!(!(this.I_p2<=L)?false:true)){this._=this.A-h;break a}if(!c(this,'')){return false}this.C=this._;if(!d(this,2,'ic')){this._=this.A-h;break a}this.D=this._;w=true;b:while(w===true){w=false;I=this.A-this._;x=true;c:while(x===true){x=false;if(!(!(this.I_p2<=this._)?false:true)){break c}if(!c(this,'')){return false}break b}this._=this.A-I;if(!c(this,'iqU')){return false}}}break;case 9:if(!c(this,'eau')){return false}break;case 10:if(!(!(this.I_p1<=this._)?false:true)){return false}if(!c(this,'al')){return false}break;case 11:y=true;a:while(y===true){y=false;A=this.A-this._;z=true;b:while(z===true){z=false;if(!(!(this.I_p2<=this._)?false:true)){break b}if(!c(this,'')){return false}break a}C=this._=this.A-A;if(!(!(this.I_p1<=C)?false:true)){return false}if(!c(this,'eux')){return false}}break;case 12:if(!(!(this.I_p1<=this._)?false:true)){return false}if(!j(this,b.g_v,97,251)){return false}if(!c(this,'')){return false}break;case 13:if(!(!(this.I_pV<=this._)?false:true)){return false}if(!c(this,'ant')){return false}return false;case 14:if(!(!(this.I_pV<=this._)?false:true)){return false}if(!c(this,'ent')){return false}return false;case 15:B=this.A-this._;if(!r(this,b.g_v,97,251)){return false}if(!(!(this.I_pV<=this._)?false:true)){return false}this._=this.A-B;if(!c(this,'')){return false}return false}return true};b.prototype.r_standard_suffix=b.prototype.Y;function K(a){var g;var F;var I;var e;var E;var h;var G;var H;var i;var J;var B;var C;var p;var l;var m;var n;var o;var k;var q;var s;var t;var u;var v;var w;var x;var y;var z;var A;var K;var L;var M;var D;a.C=a._;g=f(a,b.a_4,43);if(g===0){return false}a.D=a._;switch(g){case 0:return false;case 1:if(!(!(a.I_p2<=a._)?false:true)){return false}if(!c(a,'')){return false}break;case 2:if(!(!(a.I_p2<=a._)?false:true)){return false}if(!c(a,'')){return false}F=a.A-a._;p=true;c:while(p===true){p=false;a.C=a._;if(!d(a,2,'ic')){a._=a.A-F;break c}a.D=a._;l=true;b:while(l===true){l=false;I=a.A-a._;m=true;a:while(m===true){m=false;if(!(!(a.I_p2<=a._)?false:true)){break a}if(!c(a,'')){return false}break b}a._=a.A-I;if(!c(a,'iqU')){return false}}}break;case 3:if(!(!(a.I_p2<=a._)?false:true)){return false}if(!c(a,'log')){return false}break;case 4:if(!(!(a.I_p2<=a._)?false:true)){return false}if(!c(a,'u')){return false}break;case 5:if(!(!(a.I_p2<=a._)?false:true)){return false}if(!c(a,'ent')){return false}break;case 6:if(!(!(a.I_pV<=a._)?false:true)){return false}if(!c(a,'')){return false}e=a.A-a._;n=true;a:while(n===true){n=false;a.C=a._;g=f(a,b.a_2,6);if(g===0){a._=a.A-e;break a}a.D=a._;switch(g){case 0:a._=a.A-e;break a;case 1:if(!(!(a.I_p2<=a._)?false:true)){a._=a.A-e;break a}if(!c(a,'')){return false}a.C=a._;if(!d(a,2,'at')){a._=a.A-e;break a}a.D=K=a._;if(!(!(a.I_p2<=K)?false:true)){a._=a.A-e;break a}if(!c(a,'')){return false}break;case 2:o=true;b:while(o===true){o=false;E=a.A-a._;k=true;c:while(k===true){k=false;if(!(!(a.I_p2<=a._)?false:true)){break c}if(!c(a,'')){return false}break b}L=a._=a.A-E;if(!(!(a.I_p1<=L)?false:true)){a._=a.A-e;break a}if(!c(a,'eux')){return false}}break;case 3:if(!(!(a.I_p2<=a._)?false:true)){a._=a.A-e;break a}if(!c(a,'')){return false}break;case 4:if(!(!(a.I_pV<=a._)?false:true)){a._=a.A-e;break a}if(!c(a,'i')){return false}break}}break;case 7:if(!(!(a.I_p2<=a._)?false:true)){return false}if(!c(a,'')){return false}h=a.A-a._;q=true;a:while(q===true){q=false;a.C=a._;g=f(a,b.a_3,3);if(g===0){a._=a.A-h;break a}a.D=a._;switch(g){case 0:a._=a.A-h;break a;case 1:s=true;c:while(s===true){s=false;G=a.A-a._;t=true;b:while(t===true){t=false;if(!(!(a.I_p2<=a._)?false:true)){break b}if(!c(a,'')){return false}break c}a._=a.A-G;if(!c(a,'abl')){return false}}break;case 2:u=true;b:while(u===true){u=false;H=a.A-a._;v=true;c:while(v===true){v=false;if(!(!(a.I_p2<=a._)?false:true)){break c}if(!c(a,'')){return false}break b}a._=a.A-H;if(!c(a,'iqU')){return false}}break;case 3:if(!(!(a.I_p2<=a._)?false:true)){a._=a.A-h;break a}if(!c(a,'')){return false}break}}break;case 8:if(!(!(a.I_p2<=a._)?false:true)){return false}if(!c(a,'')){return false}i=a.A-a._;w=true;a:while(w===true){w=false;a.C=a._;if(!d(a,2,'at')){a._=a.A-i;break a}a.D=M=a._;if(!(!(a.I_p2<=M)?false:true)){a._=a.A-i;break a}if(!c(a,'')){return false}a.C=a._;if(!d(a,2,'ic')){a._=a.A-i;break a}a.D=a._;x=true;b:while(x===true){x=false;J=a.A-a._;y=true;c:while(y===true){y=false;if(!(!(a.I_p2<=a._)?false:true)){break c}if(!c(a,'')){return false}break b}a._=a.A-J;if(!c(a,'iqU')){return false}}}break;case 9:if(!c(a,'eau')){return false}break;case 10:if(!(!(a.I_p1<=a._)?false:true)){return false}if(!c(a,'al')){return false}break;case 11:z=true;a:while(z===true){z=false;B=a.A-a._;A=true;b:while(A===true){A=false;if(!(!(a.I_p2<=a._)?false:true)){break b}if(!c(a,'')){return false}break a}D=a._=a.A-B;if(!(!(a.I_p1<=D)?false:true)){return false}if(!c(a,'eux')){return false}}break;case 12:if(!(!(a.I_p1<=a._)?false:true)){return false}if(!j(a,b.g_v,97,251)){return false}if(!c(a,'')){return false}break;case 13:if(!(!(a.I_pV<=a._)?false:true)){return false}if(!c(a,'ant')){return false}return false;case 14:if(!(!(a.I_pV<=a._)?false:true)){return false}if(!c(a,'ent')){return false}return false;case 15:C=a.A-a._;if(!r(a,b.g_v,97,251)){return false}if(!(!(a.I_pV<=a._)?false:true)){return false}a._=a.A-C;if(!c(a,'')){return false}return false}return true};b.prototype.T=function(){var d;var e;var a;var g;var h;var i;e=this.A-(g=this._);if(g0){return false}this.C=this._;f=true;a:while(f===true){f=false;h=this.A-this._;g=true;b:while(g===true){g=false;if(!d(this,1,'é')){break b}break a}this._=this.A-h;if(!d(this,1,'è')){return false}}this.D=this._;return!c(this,'e')?false:true};b.prototype.r_un_accent=b.prototype.Z;function F(a){var i;var e;var f;var g;var h;e=1;a:while(true){f=true;b:while(f===true){f=false;if(!j(a,b.g_v,97,251)){break b}e--;continue a}break a}if(e>0){return false}a.C=a._;g=true;a:while(g===true){g=false;i=a.A-a._;h=true;b:while(h===true){h=false;if(!d(a,1,'é')){break b}break a}a._=a.A-i;if(!d(a,1,'è')){return false}}a.D=a._;return!c(a,'e')?false:true};b.prototype.J=function(){var u;var z;var A;var B;var C;var j;var s;var v;var x;var y;var e;var f;var g;var h;var i;var a;var b;var k;var l;var m;var n;var o;var p;var q;var D;var E;var G;var N;var O;var P;var Q;var R;var r;u=this._;e=true;a:while(e===true){e=false;if(!H(this)){break a}}D=this._=u;z=D;f=true;a:while(f===true){f=false;if(!I(this)){break a}}N=this._=z;this.B=N;P=this._=O=this.A;A=O-P;g=true;c:while(g===true){g=false;h=true;d:while(h===true){h=false;B=this.A-this._;i=true;e:while(i===true){i=false;C=this.A-this._;a=true;a:while(a===true){a=false;j=this.A-this._;b=true;b:while(b===true){b=false;if(!K(this)){break b}break a}this._=this.A-j;k=true;b:while(k===true){k=false;if(!L(this)){break b}break a}this._=this.A-j;if(!M(this)){break e}}G=this._=(E=this.A)-C;s=E-G;l=true;a:while(l===true){l=false;this.C=this._;m=true;b:while(m===true){m=false;v=this.A-this._;n=true;f:while(n===true){n=false;if(!d(this,1,'Y')){break f}this.D=this._;if(!c(this,'i')){return false}break b}this._=this.A-v;if(!d(this,1,'ç')){this._=this.A-s;break a}this.D=this._;if(!c(this,'c')){return false}}}break d}this._=this.A-B;if(!w(this)){break c}}}R=this._=(Q=this.A)-A;x=Q-R;o=true;a:while(o===true){o=false;if(!t(this)){break a}}this._=this.A-x;p=true;a:while(p===true){p=false;if(!F(this)){break a}}r=this._=this.B;y=r;q=true;a:while(q===true){q=false;if(!J(this)){break a}}this._=y;return true};b.prototype.stem=b.prototype.J;b.prototype.N=function(a){return a instanceof b};b.prototype.equals=b.prototype.N;b.prototype.O=function(){var c;var a;var b;var d;c='FrenchStemmer';a=0;for(b=0;b None: diff --git a/sphinx/search/hu.py b/sphinx/search/hu.py index 628dde63e45..bfee1e856d3 100644 --- a/sphinx/search/hu.py +++ b/sphinx/search/hu.py @@ -218,18 +218,11 @@ volna ''') -js_stemmer = """ - -var JSX={};(function(h){function j(b,e){var a=function(){};a.prototype=e.prototype;var c=new a;for(var d in b){b[d].prototype=c}}function P(c,b){for(var a in b.prototype)if(b.prototype.hasOwnProperty(a))c.prototype[a]=b.prototype[a]}function e(a,b,d){function c(a,b,c){delete a[b];a[b]=c;return c}Object.defineProperty(a,b,{get:function(){return c(a,b,d())},set:function(d){c(a,b,d)},enumerable:true,configurable:true})}function O(a,b,c){return a[b]=a[b]/c|0}var u=parseInt;var v=parseFloat;function N(a){return a!==a}var x=isFinite;var y=encodeURIComponent;var z=decodeURIComponent;var B=encodeURI;var C=decodeURI;var E=Object.prototype.toString;var F=Object.prototype.hasOwnProperty;function i(){}h.require=function(b){var a=q[b];return a!==undefined?a:null};h.profilerIsRunning=function(){return i.getResults!=null};h.getProfileResults=function(){return(i.getResults||function(){return{}})()};h.postProfileResults=function(a,b){if(i.postResults==null)throw new Error('profiler has not been turned on');return i.postResults(a,b)};h.resetProfileResults=function(){if(i.resetResults==null)throw new Error('profiler has not been turned on');return i.resetResults()};h.DEBUG=false;function r(){};j([r],Error);function a(a,b,c){this.F=a.length;this.K=a;this.L=b;this.I=c;this.H=null;this.P=null};j([a],Object);function n(){};j([n],Object);function f(){var a;var b;var c;this.G={};a=this.D='';b=this._=0;c=this.A=a.length;this.E=0;this.B=b;this.C=c};j([f],n);function s(a,b){a.D=b.D;a._=b._;a.A=b.A;a.E=b.E;a.B=b.B;a.C=b.C};function k(b,d,c,e){var a;if(b._>=b.A){return false}a=b.D.charCodeAt(b._);if(a>e||a>>3]&1<<(a&7))===0){return false}b._++;return true};function l(a,d,c,e){var b;if(a._>=a.A){return false}b=a.D.charCodeAt(a._);if(b>e||b>>3]&1<<(b&7))===0){a._++;return true}return false};function o(f,m,p){var b;var d;var e;var n;var g;var k;var l;var i;var h;var c;var a;var j;var o;b=0;d=p;e=f._;n=f.A;g=0;k=0;l=false;while(true){i=b+(d-b>>>1);h=0;c=g0){break}if(d===b){break}if(l){break}l=true}}while(true){a=m[b];if(g>=a.F){f._=e+a.F|0;if(a.H==null){return a.I}o=a.H(a.P);f._=e+a.F|0;if(o){return a.I}}b=a.L;if(b<0){return 0}}return-1};function d(d,m,p){var b;var g;var e;var n;var f;var k;var l;var i;var h;var c;var a;var j;var o;b=0;g=p;e=d._;n=d.E;f=0;k=0;l=false;while(true){i=b+(g-b>>1);h=0;c=f=0;j--){if(e-c===n){h=-1;break}h=d.D.charCodeAt(e-1-c)-a.K.charCodeAt(j);if(h!==0){break}c++}if(h<0){g=i;k=c}else{b=i;f=c}if(g-b<=1){if(b>0){break}if(g===b){break}if(l){break}l=true}}while(true){a=m[b];if(f>=a.F){d._=e-a.F|0;if(a.H==null){return a.I}o=a.H(d);d._=e-a.F|0;if(o){return a.I}}b=a.L;if(b<0){return 0}}return-1};function A(a,b,d,e){var c;c=e.length-(d-b);a.D=a.D.slice(0,b)+e+a.D.slice(d);a.A+=c|0;if(a._>=d){a._+=c|0}else if(a._>b){a._=b}return c|0};function b(a,f){var b;var c;var d;var e;b=false;if((c=a.B)<0||c>(d=a.C)||d>(e=a.A)||e>a.D.length?false:true){A(a,a.B,a.C,f);b=true}return b};f.prototype.J=function(){return false};f.prototype.e=function(b){var a;var c;var d;var e;a=this.G['.'+b];if(a==null){c=this.D=b;d=this._=0;e=this.A=c.length;this.E=0;this.B=d;this.C=e;this.J();a=this.D;this.G['.'+b]=a}return a};f.prototype.stemWord=f.prototype.e;f.prototype.f=function(e){var d;var b;var c;var a;var f;var g;var h;d=[];for(b=0;b=this.A){break a}this._++}f=true;c:while(f===true){f=false;j=this._;g=true;d:while(g===true){g=false;if(o(this,c.a_0,8)===0){break d}break c}i=this._=j;if(i>=this.A){break a}this._++}this.I_p1=this._;break b}this._=m;if(!l(this,c.g_v,97,252)){return false}a:while(true){h=true;c:while(h===true){h=false;if(!k(this,c.g_v,97,252)){break c}break a}if(this._>=this.A){return false}this._++}this.I_p1=this._}return true};c.prototype.r_mark_regions=c.prototype.X;function D(a){var j;var d;var n;var e;var b;var f;var g;var h;var i;var p;var m;a.I_p1=a.A;e=true;b:while(e===true){e=false;j=a._;b=true;a:while(b===true){b=false;if(!k(a,c.g_v,97,252)){break a}c:while(true){d=a._;f=true;d:while(f===true){f=false;if(!l(a,c.g_v,97,252)){break d}a._=d;break c}p=a._=d;if(p>=a.A){break a}a._++}g=true;c:while(g===true){g=false;n=a._;h=true;d:while(h===true){h=false;if(o(a,c.a_0,8)===0){break d}break c}m=a._=n;if(m>=a.A){break a}a._++}a.I_p1=a._;break b}a._=j;if(!l(a,c.g_v,97,252)){return false}a:while(true){i=true;c:while(i===true){i=false;if(!k(a,c.g_v,97,252)){break c}break a}if(a._>=a.A){return false}a._++}a.I_p1=a._}return true};c.prototype.Q=function(){return!(this.I_p1<=this._)?false:true};c.prototype.r_R1=c.prototype.Q;c.prototype.d=function(){var a;var e;this.C=this._;a=d(this,c.a_1,2);if(a===0){return false}this.B=e=this._;if(!(!(this.I_p1<=e)?false:true)){return false}switch(a){case 0:return false;case 1:if(!b(this,'a')){return false}break;case 2:if(!b(this,'e')){return false}break}return true};c.prototype.r_v_ending=c.prototype.d;function p(a){var e;var f;a.C=a._;e=d(a,c.a_1,2);if(e===0){return false}a.B=f=a._;if(!(!(a.I_p1<=f)?false:true)){return false}switch(e){case 0:return false;case 1:if(!b(a,'a')){return false}break;case 2:if(!b(a,'e')){return false}break}return true};c.prototype.U=function(){var a;a=this.A-this._;if(d(this,c.a_2,23)===0){return false}this._=this.A-a;return true};c.prototype.r_double=c.prototype.U;function g(a){var b;b=a.A-a._;if(d(a,c.a_2,23)===0){return false}a._=a.A-b;return true};c.prototype.c=function(){var a;var c;var d;if(this._<=this.E){return false}this._--;this.C=c=this._;a=c-1|0;if(this.E>a||a>this.A){return false}d=this._=a;this.B=d;return!b(this,'')?false:true};c.prototype.r_undouble=c.prototype.c;function m(a){var c;var d;var e;if(a._<=a.E){return false}a._--;a.C=d=a._;c=d-1|0;if(a.E>c||c>a.A){return false}e=a._=c;a.B=e;return!b(a,'')?false:true};c.prototype.W=function(){var a;var e;this.C=this._;a=d(this,c.a_3,2);if(a===0){return false}this.B=e=this._;if(!(!(this.I_p1<=e)?false:true)){return false}switch(a){case 0:return false;case 1:if(!g(this)){return false}break;case 2:if(!g(this)){return false}break}return!b(this,'')?false:!m(this)?false:true};c.prototype.r_instrum=c.prototype.W;function H(a){var e;var f;a.C=a._;e=d(a,c.a_3,2);if(e===0){return false}a.B=f=a._;if(!(!(a.I_p1<=f)?false:true)){return false}switch(e){case 0:return false;case 1:if(!g(a)){return false}break;case 2:if(!g(a)){return false}break}return!b(a,'')?false:!m(a)?false:true};c.prototype.R=function(){var a;this.C=this._;if(d(this,c.a_4,44)===0){return false}this.B=a=this._;return!(!(this.I_p1<=a)?false:true)?false:!b(this,'')?false:!p(this)?false:true};c.prototype.r_case=c.prototype.R;function I(a){var e;a.C=a._;if(d(a,c.a_4,44)===0){return false}a.B=e=a._;return!(!(a.I_p1<=e)?false:true)?false:!b(a,'')?false:!p(a)?false:true};c.prototype.T=function(){var a;var e;this.C=this._;a=d(this,c.a_5,3);if(a===0){return false}this.B=e=this._;if(!(!(this.I_p1<=e)?false:true)){return false}switch(a){case 0:return false;case 1:if(!b(this,'e')){return false}break;case 2:if(!b(this,'a')){return false}break;case 3:if(!b(this,'a')){return false}break}return true};c.prototype.r_case_special=c.prototype.T;function J(a){var e;var f;a.C=a._;e=d(a,c.a_5,3);if(e===0){return false}a.B=f=a._;if(!(!(a.I_p1<=f)?false:true)){return false}switch(e){case 0:return false;case 1:if(!b(a,'e')){return false}break;case 2:if(!b(a,'a')){return false}break;case 3:if(!b(a,'a')){return false}break}return true};c.prototype.S=function(){var a;var e;this.C=this._;a=d(this,c.a_6,6);if(a===0){return false}this.B=e=this._;if(!(!(this.I_p1<=e)?false:true)){return false}switch(a){case 0:return false;case 1:if(!b(this,'')){return false}break;case 2:if(!b(this,'')){return false}break;case 3:if(!b(this,'a')){return false}break;case 4:if(!b(this,'e')){return false}break}return true};c.prototype.r_case_other=c.prototype.S;function K(a){var e;var f;a.C=a._;e=d(a,c.a_6,6);if(e===0){return false}a.B=f=a._;if(!(!(a.I_p1<=f)?false:true)){return false}switch(e){case 0:return false;case 1:if(!b(a,'')){return false}break;case 2:if(!b(a,'')){return false}break;case 3:if(!b(a,'a')){return false}break;case 4:if(!b(a,'e')){return false}break}return true};c.prototype.V=function(){var a;var e;this.C=this._;a=d(this,c.a_7,2);if(a===0){return false}this.B=e=this._;if(!(!(this.I_p1<=e)?false:true)){return false}switch(a){case 0:return false;case 1:if(!g(this)){return false}break;case 2:if(!g(this)){return false}break}return!b(this,'')?false:!m(this)?false:true};c.prototype.r_factive=c.prototype.V;function L(a){var e;var f;a.C=a._;e=d(a,c.a_7,2);if(e===0){return false}a.B=f=a._;if(!(!(a.I_p1<=f)?false:true)){return false}switch(e){case 0:return false;case 1:if(!g(a)){return false}break;case 2:if(!g(a)){return false}break}return!b(a,'')?false:!m(a)?false:true};c.prototype.a=function(){var a;var e;this.C=this._;a=d(this,c.a_8,7);if(a===0){return false}this.B=e=this._;if(!(!(this.I_p1<=e)?false:true)){return false}switch(a){case 0:return false;case 1:if(!b(this,'a')){return false}break;case 2:if(!b(this,'e')){return false}break;case 3:if(!b(this,'')){return false}break;case 4:if(!b(this,'')){return false}break;case 5:if(!b(this,'')){return false}break;case 6:if(!b(this,'')){return false}break;case 7:if(!b(this,'')){return false}break}return true};c.prototype.r_plural=c.prototype.a;function M(a){var e;var f;a.C=a._;e=d(a,c.a_8,7);if(e===0){return false}a.B=f=a._;if(!(!(a.I_p1<=f)?false:true)){return false}switch(e){case 0:return false;case 1:if(!b(a,'a')){return false}break;case 2:if(!b(a,'e')){return false}break;case 3:if(!b(a,'')){return false}break;case 4:if(!b(a,'')){return false}break;case 5:if(!b(a,'')){return false}break;case 6:if(!b(a,'')){return false}break;case 7:if(!b(a,'')){return false}break}return true};c.prototype.Y=function(){var a;var e;this.C=this._;a=d(this,c.a_9,12);if(a===0){return false}this.B=e=this._;if(!(!(this.I_p1<=e)?false:true)){return false}switch(a){case 0:return false;case 1:if(!b(this,'')){return false}break;case 2:if(!b(this,'e')){return false}break;case 3:if(!b(this,'a')){return false}break;case 4:if(!b(this,'')){return false}break;case 5:if(!b(this,'e')){return false}break;case 6:if(!b(this,'a')){return false}break;case 7:if(!b(this,'')){return false}break;case 8:if(!b(this,'e')){return false}break;case 9:if(!b(this,'')){return false}break}return true};c.prototype.r_owned=c.prototype.Y;function w(a){var e;var f;a.C=a._;e=d(a,c.a_9,12);if(e===0){return false}a.B=f=a._;if(!(!(a.I_p1<=f)?false:true)){return false}switch(e){case 0:return false;case 1:if(!b(a,'')){return false}break;case 2:if(!b(a,'e')){return false}break;case 3:if(!b(a,'a')){return false}break;case 4:if(!b(a,'')){return false}break;case 5:if(!b(a,'e')){return false}break;case 6:if(!b(a,'a')){return false}break;case 7:if(!b(a,'')){return false}break;case 8:if(!b(a,'e')){return false}break;case 9:if(!b(a,'')){return false}break}return true};c.prototype.b=function(){var a;var e;this.C=this._;a=d(this,c.a_10,31);if(a===0){return false}this.B=e=this._;if(!(!(this.I_p1<=e)?false:true)){return false}switch(a){case 0:return false;case 1:if(!b(this,'')){return false}break;case 2:if(!b(this,'a')){return false}break;case 3:if(!b(this,'e')){return false}break;case 4:if(!b(this,'')){return false}break;case 5:if(!b(this,'a')){return false}break;case 6:if(!b(this,'e')){return false}break;case 7:if(!b(this,'')){return false}break;case 8:if(!b(this,'')){return false}break;case 9:if(!b(this,'')){return false}break;case 10:if(!b(this,'a')){return false}break;case 11:if(!b(this,'e')){return false}break;case 12:if(!b(this,'')){return false}break;case 13:if(!b(this,'')){return false}break;case 14:if(!b(this,'a')){return false}break;case 15:if(!b(this,'e')){return false}break;case 16:if(!b(this,'')){return false}break;case 17:if(!b(this,'')){return false}break;case 18:if(!b(this,'')){return false}break;case 19:if(!b(this,'a')){return false}break;case 20:if(!b(this,'e')){return false}break}return true};c.prototype.r_sing_owner=c.prototype.b;function t(a){var e;var f;a.C=a._;e=d(a,c.a_10,31);if(e===0){return false}a.B=f=a._;if(!(!(a.I_p1<=f)?false:true)){return false}switch(e){case 0:return false;case 1:if(!b(a,'')){return false}break;case 2:if(!b(a,'a')){return false}break;case 3:if(!b(a,'e')){return false}break;case 4:if(!b(a,'')){return false}break;case 5:if(!b(a,'a')){return false}break;case 6:if(!b(a,'e')){return false}break;case 7:if(!b(a,'')){return false}break;case 8:if(!b(a,'')){return false}break;case 9:if(!b(a,'')){return false}break;case 10:if(!b(a,'a')){return false}break;case 11:if(!b(a,'e')){return false}break;case 12:if(!b(a,'')){return false}break;case 13:if(!b(a,'')){return false}break;case 14:if(!b(a,'a')){return false}break;case 15:if(!b(a,'e')){return false}break;case 16:if(!b(a,'')){return false}break;case 17:if(!b(a,'')){return false}break;case 18:if(!b(a,'')){return false}break;case 19:if(!b(a,'a')){return false}break;case 20:if(!b(a,'e')){return false}break}return true};c.prototype.Z=function(){var a;var e;this.C=this._;a=d(this,c.a_11,42);if(a===0){return false}this.B=e=this._;if(!(!(this.I_p1<=e)?false:true)){return false}switch(a){case 0:return false;case 1:if(!b(this,'')){return false}break;case 2:if(!b(this,'a')){return false}break;case 3:if(!b(this,'e')){return false}break;case 4:if(!b(this,'')){return false}break;case 5:if(!b(this,'')){return false}break;case 6:if(!b(this,'')){return false}break;case 7:if(!b(this,'a')){return false}break;case 8:if(!b(this,'e')){return false}break;case 9:if(!b(this,'')){return false}break;case 10:if(!b(this,'')){return false}break;case 11:if(!b(this,'')){return false}break;case 12:if(!b(this,'a')){return false}break;case 13:if(!b(this,'e')){return false}break;case 14:if(!b(this,'')){return false}break;case 15:if(!b(this,'')){return false}break;case 16:if(!b(this,'')){return false}break;case 17:if(!b(this,'')){return false}break;case 18:if(!b(this,'a')){return false}break;case 19:if(!b(this,'e')){return false}break;case 20:if(!b(this,'')){return false}break;case 21:if(!b(this,'')){return false}break;case 22:if(!b(this,'a')){return false}break;case 23:if(!b(this,'e')){return false}break;case 24:if(!b(this,'')){return false}break;case 25:if(!b(this,'')){return false}break;case 26:if(!b(this,'')){return false}break;case 27:if(!b(this,'a')){return false}break;case 28:if(!b(this,'e')){return false}break;case 29:if(!b(this,'')){return false}break}return true};c.prototype.r_plur_owner=c.prototype.Z;function G(a){var e;var f;a.C=a._;e=d(a,c.a_11,42);if(e===0){return false}a.B=f=a._;if(!(!(a.I_p1<=f)?false:true)){return false}switch(e){case 0:return false;case 1:if(!b(a,'')){return false}break;case 2:if(!b(a,'a')){return false}break;case 3:if(!b(a,'e')){return false}break;case 4:if(!b(a,'')){return false}break;case 5:if(!b(a,'')){return false}break;case 6:if(!b(a,'')){return false}break;case 7:if(!b(a,'a')){return false}break;case 8:if(!b(a,'e')){return false}break;case 9:if(!b(a,'')){return false}break;case 10:if(!b(a,'')){return false}break;case 11:if(!b(a,'')){return false}break;case 12:if(!b(a,'a')){return false}break;case 13:if(!b(a,'e')){return false}break;case 14:if(!b(a,'')){return false}break;case 15:if(!b(a,'')){return false}break;case 16:if(!b(a,'')){return false}break;case 17:if(!b(a,'')){return false}break;case 18:if(!b(a,'a')){return false}break;case 19:if(!b(a,'e')){return false}break;case 20:if(!b(a,'')){return false}break;case 21:if(!b(a,'')){return false}break;case 22:if(!b(a,'a')){return false}break;case 23:if(!b(a,'e')){return false}break;case 24:if(!b(a,'')){return false}break;case 25:if(!b(a,'')){return false}break;case 26:if(!b(a,'')){return false}break;case 27:if(!b(a,'a')){return false}break;case 28:if(!b(a,'e')){return false}break;case 29:if(!b(a,'')){return false}break}return true};c.prototype.J=function(){var s;var l;var m;var n;var o;var p;var q;var r;var u;var b;var c;var d;var e;var f;var g;var h;var i;var a;var j;var v;var x;var y;var z;var A;var B;var C;var E;var F;var N;var O;var P;var Q;var R;var S;var T;var k;s=this._;b=true;a:while(b===true){b=false;if(!D(this)){break a}}v=this._=s;this.E=v;y=this._=x=this.A;l=x-y;c=true;a:while(c===true){c=false;if(!H(this)){break a}}A=this._=(z=this.A)-l;m=z-A;d=true;a:while(d===true){d=false;if(!I(this)){break a}}C=this._=(B=this.A)-m;n=B-C;e=true;a:while(e===true){e=false;if(!J(this)){break a}}F=this._=(E=this.A)-n;o=E-F;f=true;a:while(f===true){f=false;if(!K(this)){break a}}O=this._=(N=this.A)-o;p=N-O;g=true;a:while(g===true){g=false;if(!L(this)){break a}}Q=this._=(P=this.A)-p;q=P-Q;h=true;a:while(h===true){h=false;if(!w(this)){break a}}S=this._=(R=this.A)-q;r=R-S;i=true;a:while(i===true){i=false;if(!t(this)){break a}}k=this._=(T=this.A)-r;u=T-k;a=true;a:while(a===true){a=false;if(!G(this)){break a}}this._=this.A-u;j=true;a:while(j===true){j=false;if(!M(this)){break a}}this._=this.E;return true};c.prototype.stem=c.prototype.J;c.prototype.N=function(a){return a instanceof c};c.prototype.equals=c.prototype.N;c.prototype.O=function(){var c;var a;var b;var d;c='HungarianStemmer';a=0;for(b=0;b None: diff --git a/sphinx/search/it.py b/sphinx/search/it.py index 2ecf4c2c598..ad545f18d2f 100644 --- a/sphinx/search/it.py +++ b/sphinx/search/it.py @@ -308,17 +308,11 @@ stessero ''') -js_stemmer = """ -var JSX={};(function(k){function l(b,e){var a=function(){};a.prototype=e.prototype;var c=new a;for(var d in b){b[d].prototype=c}}function K(c,b){for(var a in b.prototype)if(b.prototype.hasOwnProperty(a))c.prototype[a]=b.prototype[a]}function e(a,b,d){function c(a,b,c){delete a[b];a[b]=c;return c}Object.defineProperty(a,b,{get:function(){return c(a,b,d())},set:function(d){c(a,b,d)},enumerable:true,configurable:true})}function L(a,b,c){return a[b]=a[b]/c|0}var r=parseInt;var B=parseFloat;function M(a){return a!==a}var z=isFinite;var y=encodeURIComponent;var x=decodeURIComponent;var w=encodeURI;var u=decodeURI;var t=Object.prototype.toString;var C=Object.prototype.hasOwnProperty;function j(){}k.require=function(b){var a=q[b];return a!==undefined?a:null};k.profilerIsRunning=function(){return j.getResults!=null};k.getProfileResults=function(){return(j.getResults||function(){return{}})()};k.postProfileResults=function(a,b){if(j.postResults==null)throw new Error('profiler has not been turned on');return j.postResults(a,b)};k.resetProfileResults=function(){if(j.resetResults==null)throw new Error('profiler has not been turned on');return j.resetResults()};k.DEBUG=false;function s(){};l([s],Error);function a(a,b,c){this.F=a.length;this.K=a;this.L=b;this.I=c;this.H=null;this.P=null};l([a],Object);function p(){};l([p],Object);function i(){var a;var b;var c;this.G={};a=this.E='';b=this._=0;c=this.A=a.length;this.D=0;this.C=b;this.B=c};l([i],p);function v(a,b){a.E=b.E;a._=b._;a.A=b.A;a.D=b.D;a.C=b.C;a.B=b.B};function d(b,d,c,e){var a;if(b._>=b.A){return false}a=b.E.charCodeAt(b._);if(a>e||a>>3]&1<<(a&7))===0){return false}b._++;return true};function m(b,d,c,e){var a;if(b._<=b.D){return false}a=b.E.charCodeAt(b._-1);if(a>e||a>>3]&1<<(a&7))===0){return false}b._--;return true};function h(a,d,c,e){var b;if(a._>=a.A){return false}b=a.E.charCodeAt(a._);if(b>e||b>>3]&1<<(b&7))===0){a._++;return true}return false};function o(a,b,d){var c;if(a.A-a._>>1);h=0;c=g0){break}if(d===b){break}if(l){break}l=true}}while(true){a=m[b];if(g>=a.F){f._=e+a.F|0;if(a.H==null){return a.I}o=a.H(a.P);f._=e+a.F|0;if(o){return a.I}}b=a.L;if(b<0){return 0}}return-1};function f(d,m,p){var b;var g;var e;var n;var f;var k;var l;var i;var h;var c;var a;var j;var o;b=0;g=p;e=d._;n=d.D;f=0;k=0;l=false;while(true){i=b+(g-b>>1);h=0;c=f=0;j--){if(e-c===n){h=-1;break}h=d.E.charCodeAt(e-1-c)-a.K.charCodeAt(j);if(h!==0){break}c++}if(h<0){g=i;k=c}else{b=i;f=c}if(g-b<=1){if(b>0){break}if(g===b){break}if(l){break}l=true}}while(true){a=m[b];if(f>=a.F){d._=e-a.F|0;if(a.H==null){return a.I}o=a.H(d);d._=e-a.F|0;if(o){return a.I}}b=a.L;if(b<0){return 0}}return-1};function D(a,b,d,e){var c;c=e.length-(d-b);a.E=a.E.slice(0,b)+e+a.E.slice(d);a.A+=c|0;if(a._>=d){a._+=c|0}else if(a._>b){a._=b}return c|0};function c(a,f){var b;var c;var d;var e;b=false;if((c=a.C)<0||c>(d=a.B)||d>(e=a.A)||e>a.E.length?false:true){D(a,a.C,a.B,f);b=true}return b};i.prototype.J=function(){return false};i.prototype.a=function(b){var a;var c;var d;var e;a=this.G['.'+b];if(a==null){c=this.E=b;d=this._=0;e=this.A=c.length;this.D=0;this.C=d;this.B=e;this.J();a=this.E;this.G['.'+b]=a}return a};i.prototype.stemWord=i.prototype.a;i.prototype.b=function(e){var d;var b;var c;var a;var f;var g;var h;d=[];for(b=0;b=this.A){break a}this._++;break}continue b}this._=q;break b}this._=p;b:while(true){l=this._;g=true;d:while(g===true){g=false;e:while(true){a=this._;h=true;a:while(h===true){h=false;if(!d(this,b.g_v,97,249)){break a}this.C=this._;i=true;f:while(i===true){i=false;k=this._;j=true;c:while(j===true){j=false;if(!o(this,1,'u')){break c}this.B=this._;if(!d(this,b.g_v,97,249)){break c}if(!c(this,'U')){return false}break f}this._=k;if(!o(this,1,'i')){break a}this.B=this._;if(!d(this,b.g_v,97,249)){break a}if(!c(this,'I')){return false}}this._=a;break e}m=this._=a;if(m>=this.A){break d}this._++}continue b}this._=l;break b}return true};b.prototype.r_prelude=b.prototype.W;function G(a){var e;var q;var r;var m;var f;var l;var g;var h;var i;var j;var k;var p;q=a._;b:while(true){r=a._;g=true;a:while(g===true){g=false;a.C=a._;e=n(a,b.a_0,7);if(e===0){break a}a.B=a._;switch(e){case 0:break a;case 1:if(!c(a,'à')){return false}break;case 2:if(!c(a,'è')){return false}break;case 3:if(!c(a,'ì')){return false}break;case 4:if(!c(a,'ò')){return false}break;case 5:if(!c(a,'ù')){return false}break;case 6:if(!c(a,'qU')){return false}break;case 7:if(a._>=a.A){break a}a._++;break}continue b}a._=r;break b}a._=q;b:while(true){m=a._;h=true;d:while(h===true){h=false;e:while(true){f=a._;i=true;a:while(i===true){i=false;if(!d(a,b.g_v,97,249)){break a}a.C=a._;j=true;f:while(j===true){j=false;l=a._;k=true;c:while(k===true){k=false;if(!o(a,1,'u')){break c}a.B=a._;if(!d(a,b.g_v,97,249)){break c}if(!c(a,'U')){return false}break f}a._=l;if(!o(a,1,'i')){break a}a.B=a._;if(!d(a,b.g_v,97,249)){break a}if(!c(a,'I')){return false}}a._=f;break e}p=a._=f;if(p>=a.A){break d}a._++}continue b}a._=m;break b}return true};b.prototype.U=function(){var u;var w;var x;var y;var t;var l;var e;var f;var g;var i;var c;var j;var k;var a;var m;var n;var o;var p;var q;var r;var s;var v;this.I_pV=s=this.A;this.I_p1=s;this.I_p2=s;u=this._;l=true;a:while(l===true){l=false;e=true;g:while(e===true){e=false;w=this._;f=true;b:while(f===true){f=false;if(!d(this,b.g_v,97,249)){break b}g=true;f:while(g===true){g=false;x=this._;i=true;c:while(i===true){i=false;if(!h(this,b.g_v,97,249)){break c}d:while(true){c=true;e:while(c===true){c=false;if(!d(this,b.g_v,97,249)){break e}break d}if(this._>=this.A){break c}this._++}break f}this._=x;if(!d(this,b.g_v,97,249)){break b}c:while(true){j=true;d:while(j===true){j=false;if(!h(this,b.g_v,97,249)){break d}break c}if(this._>=this.A){break b}this._++}}break g}this._=w;if(!h(this,b.g_v,97,249)){break a}k=true;c:while(k===true){k=false;y=this._;a=true;b:while(a===true){a=false;if(!h(this,b.g_v,97,249)){break b}e:while(true){m=true;d:while(m===true){m=false;if(!d(this,b.g_v,97,249)){break d}break e}if(this._>=this.A){break b}this._++}break c}this._=y;if(!d(this,b.g_v,97,249)){break a}if(this._>=this.A){break a}this._++}}this.I_pV=this._}v=this._=u;t=v;n=true;a:while(n===true){n=false;b:while(true){o=true;c:while(o===true){o=false;if(!d(this,b.g_v,97,249)){break c}break b}if(this._>=this.A){break a}this._++}b:while(true){p=true;c:while(p===true){p=false;if(!h(this,b.g_v,97,249)){break c}break b}if(this._>=this.A){break a}this._++}this.I_p1=this._;b:while(true){q=true;c:while(q===true){q=false;if(!d(this,b.g_v,97,249)){break c}break b}if(this._>=this.A){break a}this._++}c:while(true){r=true;b:while(r===true){r=false;if(!h(this,b.g_v,97,249)){break b}break c}if(this._>=this.A){break a}this._++}this.I_p2=this._}this._=t;return true};b.prototype.r_mark_regions=b.prototype.U;function H(a){var x;var y;var z;var u;var v;var l;var e;var f;var g;var i;var j;var k;var c;var m;var n;var o;var p;var q;var r;var s;var t;var w;a.I_pV=t=a.A;a.I_p1=t;a.I_p2=t;x=a._;l=true;a:while(l===true){l=false;e=true;g:while(e===true){e=false;y=a._;f=true;b:while(f===true){f=false;if(!d(a,b.g_v,97,249)){break b}g=true;f:while(g===true){g=false;z=a._;i=true;c:while(i===true){i=false;if(!h(a,b.g_v,97,249)){break c}d:while(true){j=true;e:while(j===true){j=false;if(!d(a,b.g_v,97,249)){break e}break d}if(a._>=a.A){break c}a._++}break f}a._=z;if(!d(a,b.g_v,97,249)){break b}c:while(true){k=true;d:while(k===true){k=false;if(!h(a,b.g_v,97,249)){break d}break c}if(a._>=a.A){break b}a._++}}break g}a._=y;if(!h(a,b.g_v,97,249)){break a}c=true;c:while(c===true){c=false;u=a._;m=true;b:while(m===true){m=false;if(!h(a,b.g_v,97,249)){break b}e:while(true){n=true;d:while(n===true){n=false;if(!d(a,b.g_v,97,249)){break d}break e}if(a._>=a.A){break b}a._++}break c}a._=u;if(!d(a,b.g_v,97,249)){break a}if(a._>=a.A){break a}a._++}}a.I_pV=a._}w=a._=x;v=w;o=true;a:while(o===true){o=false;b:while(true){p=true;c:while(p===true){p=false;if(!d(a,b.g_v,97,249)){break c}break b}if(a._>=a.A){break a}a._++}b:while(true){q=true;c:while(q===true){q=false;if(!h(a,b.g_v,97,249)){break c}break b}if(a._>=a.A){break a}a._++}a.I_p1=a._;b:while(true){r=true;c:while(r===true){r=false;if(!d(a,b.g_v,97,249)){break c}break b}if(a._>=a.A){break a}a._++}c:while(true){s=true;b:while(s===true){s=false;if(!h(a,b.g_v,97,249)){break b}break c}if(a._>=a.A){break a}a._++}a.I_p2=a._}a._=v;return true};b.prototype.V=function(){var a;var e;var d;b:while(true){e=this._;d=true;a:while(d===true){d=false;this.C=this._;a=n(this,b.a_1,3);if(a===0){break a}this.B=this._;switch(a){case 0:break a;case 1:if(!c(this,'i')){return false}break;case 2:if(!c(this,'u')){return false}break;case 3:if(this._>=this.A){break a}this._++;break}continue b}this._=e;break b}return true};b.prototype.r_postlude=b.prototype.V;function I(a){var d;var f;var e;b:while(true){f=a._;e=true;a:while(e===true){e=false;a.C=a._;d=n(a,b.a_1,3);if(d===0){break a}a.B=a._;switch(d){case 0:break a;case 1:if(!c(a,'i')){return false}break;case 2:if(!c(a,'u')){return false}break;case 3:if(a._>=a.A){break a}a._++;break}continue b}a._=f;break b}return true};b.prototype.S=function(){return!(this.I_pV<=this._)?false:true};b.prototype.r_RV=b.prototype.S;b.prototype.Q=function(){return!(this.I_p1<=this._)?false:true};b.prototype.r_R1=b.prototype.Q;b.prototype.R=function(){return!(this.I_p2<=this._)?false:true};b.prototype.r_R2=b.prototype.R;b.prototype.T=function(){var a;this.B=this._;if(f(this,b.a_2,37)===0){return false}this.C=this._;a=f(this,b.a_3,5);if(a===0){return false}if(!(!(this.I_pV<=this._)?false:true)){return false}switch(a){case 0:return false;case 1:if(!c(this,'')){return false}break;case 2:if(!c(this,'e')){return false}break}return true};b.prototype.r_attached_pronoun=b.prototype.T;function J(a){var d;a.B=a._;if(f(a,b.a_2,37)===0){return false}a.C=a._;d=f(a,b.a_3,5);if(d===0){return false}if(!(!(a.I_pV<=a._)?false:true)){return false}switch(d){case 0:return false;case 1:if(!c(a,'')){return false}break;case 2:if(!c(a,'e')){return false}break}return true};b.prototype.X=function(){var a;var j;var d;var h;var e;var k;var i;var l;var m;var o;var p;var q;var r;var n;this.B=this._;a=f(this,b.a_6,51);if(a===0){return false}this.C=this._;switch(a){case 0:return false;case 1:if(!(!(this.I_p2<=this._)?false:true)){return false}if(!c(this,'')){return false}break;case 2:if(!(!(this.I_p2<=this._)?false:true)){return false}if(!c(this,'')){return false}j=this.A-this._;k=true;a:while(k===true){k=false;this.B=this._;if(!g(this,2,'ic')){this._=this.A-j;break a}this.C=o=this._;if(!(!(this.I_p2<=o)?false:true)){this._=this.A-j;break a}if(!c(this,'')){return false}}break;case 3:if(!(!(this.I_p2<=this._)?false:true)){return false}if(!c(this,'log')){return false}break;case 4:if(!(!(this.I_p2<=this._)?false:true)){return false}if(!c(this,'u')){return false}break;case 5:if(!(!(this.I_p2<=this._)?false:true)){return false}if(!c(this,'ente')){return false}break;case 6:if(!(!(this.I_pV<=this._)?false:true)){return false}if(!c(this,'')){return false}break;case 7:if(!(!(this.I_p1<=this._)?false:true)){return false}if(!c(this,'')){return false}d=this.A-this._;i=true;a:while(i===true){i=false;this.B=this._;a=f(this,b.a_4,4);if(a===0){this._=this.A-d;break a}this.C=p=this._;if(!(!(this.I_p2<=p)?false:true)){this._=this.A-d;break a}if(!c(this,'')){return false}switch(a){case 0:this._=this.A-d;break a;case 1:this.B=this._;if(!g(this,2,'at')){this._=this.A-d;break a}this.C=q=this._;if(!(!(this.I_p2<=q)?false:true)){this._=this.A-d;break a}if(!c(this,'')){return false}break}}break;case 8:if(!(!(this.I_p2<=this._)?false:true)){return false}if(!c(this,'')){return false}h=this.A-this._;l=true;a:while(l===true){l=false;this.B=this._;a=f(this,b.a_5,3);if(a===0){this._=this.A-h;break a}this.C=this._;switch(a){case 0:this._=this.A-h;break a;case 1:if(!(!(this.I_p2<=this._)?false:true)){this._=this.A-h;break a}if(!c(this,'')){return false}break}}break;case 9:if(!(!(this.I_p2<=this._)?false:true)){return false}if(!c(this,'')){return false}e=this.A-this._;m=true;a:while(m===true){m=false;this.B=this._;if(!g(this,2,'at')){this._=this.A-e;break a}this.C=r=this._;if(!(!(this.I_p2<=r)?false:true)){this._=this.A-e;break a}if(!c(this,'')){return false}this.B=this._;if(!g(this,2,'ic')){this._=this.A-e;break a}this.C=n=this._;if(!(!(this.I_p2<=n)?false:true)){this._=this.A-e;break a}if(!c(this,'')){return false}}break}return true};b.prototype.r_standard_suffix=b.prototype.X;function F(a){var d;var k;var e;var i;var h;var l;var j;var m;var n;var p;var q;var r;var s;var o;a.B=a._;d=f(a,b.a_6,51);if(d===0){return false}a.C=a._;switch(d){case 0:return false;case 1:if(!(!(a.I_p2<=a._)?false:true)){return false}if(!c(a,'')){return false}break;case 2:if(!(!(a.I_p2<=a._)?false:true)){return false}if(!c(a,'')){return false}k=a.A-a._;l=true;a:while(l===true){l=false;a.B=a._;if(!g(a,2,'ic')){a._=a.A-k;break a}a.C=p=a._;if(!(!(a.I_p2<=p)?false:true)){a._=a.A-k;break a}if(!c(a,'')){return false}}break;case 3:if(!(!(a.I_p2<=a._)?false:true)){return false}if(!c(a,'log')){return false}break;case 4:if(!(!(a.I_p2<=a._)?false:true)){return false}if(!c(a,'u')){return false}break;case 5:if(!(!(a.I_p2<=a._)?false:true)){return false}if(!c(a,'ente')){return false}break;case 6:if(!(!(a.I_pV<=a._)?false:true)){return false}if(!c(a,'')){return false}break;case 7:if(!(!(a.I_p1<=a._)?false:true)){return false}if(!c(a,'')){return false}e=a.A-a._;j=true;a:while(j===true){j=false;a.B=a._;d=f(a,b.a_4,4);if(d===0){a._=a.A-e;break a}a.C=q=a._;if(!(!(a.I_p2<=q)?false:true)){a._=a.A-e;break a}if(!c(a,'')){return false}switch(d){case 0:a._=a.A-e;break a;case 1:a.B=a._;if(!g(a,2,'at')){a._=a.A-e;break a}a.C=r=a._;if(!(!(a.I_p2<=r)?false:true)){a._=a.A-e;break a}if(!c(a,'')){return false}break}}break;case 8:if(!(!(a.I_p2<=a._)?false:true)){return false}if(!c(a,'')){return false}i=a.A-a._;m=true;a:while(m===true){m=false;a.B=a._;d=f(a,b.a_5,3);if(d===0){a._=a.A-i;break a}a.C=a._;switch(d){case 0:a._=a.A-i;break a;case 1:if(!(!(a.I_p2<=a._)?false:true)){a._=a.A-i;break a}if(!c(a,'')){return false}break}}break;case 9:if(!(!(a.I_p2<=a._)?false:true)){return false}if(!c(a,'')){return false}h=a.A-a._;n=true;a:while(n===true){n=false;a.B=a._;if(!g(a,2,'at')){a._=a.A-h;break a}a.C=s=a._;if(!(!(a.I_p2<=s)?false:true)){a._=a.A-h;break a}if(!c(a,'')){return false}a.B=a._;if(!g(a,2,'ic')){a._=a.A-h;break a}a.C=o=a._;if(!(!(a.I_p2<=o)?false:true)){a._=a.A-h;break a}if(!c(a,'')){return false}}break}return true};b.prototype.Y=function(){var d;var e;var a;var g;var h;var i;e=this.A-(g=this._);if(g None: diff --git a/sphinx/search/minified-js/base-stemmer.js b/sphinx/search/minified-js/base-stemmer.js new file mode 100644 index 00000000000..0822908a5eb --- /dev/null +++ b/sphinx/search/minified-js/base-stemmer.js @@ -0,0 +1 @@ +BaseStemmer=function(){this.setCurrent=function(r){this.current=r;this.cursor=0;this.limit=this.current.length;this.limit_backward=0;this.bra=this.cursor;this.ket=this.limit};this.getCurrent=function(){return this.current};this.copy_from=function(r){this.current=r.current;this.cursor=r.cursor;this.limit=r.limit;this.limit_backward=r.limit_backward;this.bra=r.bra;this.ket=r.ket};this.in_grouping=function(r,t,i){if(this.cursor>=this.limit)return false;var s=this.current.charCodeAt(this.cursor);if(s>i||s>>3]&1<<(s&7))==0)return false;this.cursor++;return true};this.in_grouping_b=function(r,t,i){if(this.cursor<=this.limit_backward)return false;var s=this.current.charCodeAt(this.cursor-1);if(s>i||s>>3]&1<<(s&7))==0)return false;this.cursor--;return true};this.out_grouping=function(r,t,i){if(this.cursor>=this.limit)return false;var s=this.current.charCodeAt(this.cursor);if(s>i||s>>3]&1<<(s&7))==0){this.cursor++;return true}return false};this.out_grouping_b=function(r,t,i){if(this.cursor<=this.limit_backward)return false;var s=this.current.charCodeAt(this.cursor-1);if(s>i||s>>3]&1<<(s&7))==0){this.cursor--;return true}return false};this.eq_s=function(r){if(this.limit-this.cursor>>1);var a=0;var f=h0)break;if(i==t)break;if(n)break;n=true}}do{var l=r[t];if(h>=l[0].length){this.cursor=s+l[0].length;if(l.length<4)return l[2];var v=l[3](this);this.cursor=s+l[0].length;if(v)return l[2]}t=l[1]}while(t>=0);return 0};this.find_among_b=function(r){var t=0;var i=r.length;var s=this.cursor;var e=this.limit_backward;var h=0;var u=0;var n=false;while(true){var c=t+(i-t>>1);var a=0;var f=h=0;o--){if(s-f==e){a=-1;break}a=this.current.charCodeAt(s-1-f)-l[0].charCodeAt(o);if(a!=0)break;f++}if(a<0){i=c;u=f}else{t=c;h=f}if(i-t<=1){if(t>0)break;if(i==t)break;if(n)break;n=true}}do{var l=r[t];if(h>=l[0].length){this.cursor=s-l[0].length;if(l.length<4)return l[2];var v=l[3](this);this.cursor=s-l[0].length;if(v)return l[2]}t=l[1]}while(t>=0);return 0};this.replace_s=function(r,t,i){var s=i.length-(t-r);this.current=this.current.slice(0,r)+i+this.current.slice(t);this.limit+=s;if(this.cursor>=t)this.cursor+=s;else if(this.cursor>r)this.cursor=r;return s};this.slice_check=function(){if(this.bra<0||this.bra>this.ket||this.ket>this.limit||this.limit>this.current.length){return false}return true};this.slice_from=function(r){var t=false;if(this.slice_check()){this.replace_s(this.bra,this.ket,r);t=true}return t};this.slice_del=function(){return this.slice_from("")};this.insert=function(r,t,i){var s=this.replace_s(r,t,i);if(r<=this.bra)this.bra+=s;if(r<=this.ket)this.ket+=s};this.slice_to=function(){var r="";if(this.slice_check()){r=this.current.slice(this.bra,this.ket)}return r};this.assign_to=function(){return this.current.slice(0,this.limit)}}; \ No newline at end of file diff --git a/sphinx/search/minified-js/danish-stemmer.js b/sphinx/search/minified-js/danish-stemmer.js new file mode 100644 index 00000000000..f3fc600033c --- /dev/null +++ b/sphinx/search/minified-js/danish-stemmer.js @@ -0,0 +1 @@ +DanishStemmer=function(){var r=new BaseStemmer;var e=[["hed",-1,1],["ethed",0,1],["ered",-1,1],["e",-1,1],["erede",3,1],["ende",3,1],["erende",5,1],["ene",3,1],["erne",3,1],["ere",3,1],["en",-1,1],["heden",10,1],["eren",10,1],["er",-1,1],["heder",13,1],["erer",13,1],["s",-1,2],["heds",16,1],["es",16,1],["endes",18,1],["erendes",19,1],["enes",18,1],["ernes",18,1],["eres",18,1],["ens",16,1],["hedens",24,1],["erens",24,1],["ers",16,1],["ets",16,1],["erets",28,1],["et",-1,1],["eret",30,1]];var i=[["gd",-1,-1],["dt",-1,-1],["gt",-1,-1],["kt",-1,-1]];var s=[["ig",-1,1],["lig",0,1],["elig",1,1],["els",-1,1],["løst",-1,2]];var t=[119,223,119,1];var a=[17,65,16,1,0,0,0,0,0,0,0,0,0,0,0,0,48,0,128];var u=[239,254,42,3,0,0,0,0,0,0,0,0,0,0,0,0,16];var c=0;var l=0;var n="";function o(){l=r.limit;var e=r.cursor;{var i=r.cursor+3;if(i>r.limit){return false}r.cursor=i}c=r.cursor;r.cursor=e;r:while(true){var s=r.cursor;e:{if(!r.in_grouping(a,97,248)){break e}r.cursor=s;break r}r.cursor=s;if(r.cursor>=r.limit){return false}r.cursor++}r:while(true){e:{if(!r.out_grouping(a,97,248)){break e}break r}if(r.cursor>=r.limit){return false}r.cursor++}l=r.cursor;r:{if(!(l=r.limit){break r}r.cursor++;break}continue}r.cursor=s;break}r.cursor=u;var a=r.cursor;r:{r.bra=r.cursor;if(!r.eq_s("y")){r.cursor=a;break r}r.ket=r.cursor;if(!r.slice_from("Y")){return false}}while(true){var t=r.cursor;r:{e:while(true){var o=r.cursor;i:{if(!r.in_grouping(c,97,232)){break i}r.bra=r.cursor;u:{var f=r.cursor;s:{if(!r.eq_s("i")){break s}r.ket=r.cursor;if(!r.in_grouping(c,97,232)){break s}if(!r.slice_from("I")){return false}break u}r.cursor=f;if(!r.eq_s("y")){break i}r.ket=r.cursor;if(!r.slice_from("Y")){return false}}r.cursor=o;break e}r.cursor=o;if(r.cursor>=r.limit){break r}r.cursor++}continue}r.cursor=t;break}return true}function _(){n=r.limit;l=r.limit;r:while(true){e:{if(!r.in_grouping(c,97,232)){break e}break r}if(r.cursor>=r.limit){return false}r.cursor++}r:while(true){e:{if(!r.out_grouping(c,97,232)){break e}break r}if(r.cursor>=r.limit){return false}r.cursor++}n=r.cursor;r:{if(!(n<3)){break r}n=3}r:while(true){e:{if(!r.in_grouping(c,97,232)){break e}break r}if(r.cursor>=r.limit){return false}r.cursor++}r:while(true){e:{if(!r.out_grouping(c,97,232)){break e}break r}if(r.cursor>=r.limit){return false}r.cursor++}l=r.cursor;return true}function m(){var e;while(true){var u=r.cursor;r:{r.bra=r.cursor;e=r.find_among(i);if(e==0){break r}r.ket=r.cursor;switch(e){case 1:if(!r.slice_from("y")){return false}break;case 2:if(!r.slice_from("i")){return false}break;case 3:if(r.cursor>=r.limit){break r}r.cursor++;break}continue}r.cursor=u;break}return true}function v(){if(!(n<=r.cursor)){return false}return true}function g(){if(!(l<=r.cursor)){return false}return true}function d(){var e=r.limit-r.cursor;if(r.find_among_b(u)==0){return false}r.cursor=r.limit-e;r.ket=r.cursor;if(r.cursor<=r.limit_backward){return false}r.cursor--;r.bra=r.cursor;if(!r.slice_del()){return false}return true}function h(){b=false;r.ket=r.cursor;if(!r.eq_s_b("e")){return false}r.bra=r.cursor;if(!v()){return false}var e=r.limit-r.cursor;if(!r.out_grouping_b(c,97,232)){return false}r.cursor=r.limit-e;if(!r.slice_del()){return false}b=true;if(!d()){return false}return true}function w(){if(!v()){return false}var e=r.limit-r.cursor;if(!r.out_grouping_b(c,97,232)){return false}r.cursor=r.limit-e;{var i=r.limit-r.cursor;r:{if(!r.eq_s_b("gem")){break r}return false}r.cursor=r.limit-i}if(!r.slice_del()){return false}if(!d()){return false}return true}function p(){var e;var i=r.limit-r.cursor;r:{r.ket=r.cursor;e=r.find_among_b(s);if(e==0){break r}r.bra=r.cursor;switch(e){case 1:if(!v()){break r}if(!r.slice_from("heid")){return false}break;case 2:if(!w()){break r}break;case 3:if(!v()){break r}if(!r.out_grouping_b(f,97,232)){break r}if(!r.slice_del()){return false}break}}r.cursor=r.limit-i;var u=r.limit-r.cursor;h();r.cursor=r.limit-u;var l=r.limit-r.cursor;r:{r.ket=r.cursor;if(!r.eq_s_b("heid")){break r}r.bra=r.cursor;if(!g()){break r}{var n=r.limit-r.cursor;e:{if(!r.eq_s_b("c")){break e}break r}r.cursor=r.limit-n}if(!r.slice_del()){return false}r.ket=r.cursor;if(!r.eq_s_b("en")){break r}r.bra=r.cursor;if(!w()){break r}}r.cursor=r.limit-l;var k=r.limit-r.cursor;r:{r.ket=r.cursor;e=r.find_among_b(a);if(e==0){break r}r.bra=r.cursor;switch(e){case 1:if(!g()){break r}if(!r.slice_del()){return false}e:{var _=r.limit-r.cursor;i:{r.ket=r.cursor;if(!r.eq_s_b("ig")){break i}r.bra=r.cursor;if(!g()){break i}{var m=r.limit-r.cursor;u:{if(!r.eq_s_b("e")){break u}break i}r.cursor=r.limit-m}if(!r.slice_del()){return false}break e}r.cursor=r.limit-_;if(!d()){break r}}break;case 2:if(!g()){break r}{var p=r.limit-r.cursor;e:{if(!r.eq_s_b("e")){break e}break r}r.cursor=r.limit-p}if(!r.slice_del()){return false}break;case 3:if(!g()){break r}if(!r.slice_del()){return false}if(!h()){break r}break;case 4:if(!g()){break r}if(!r.slice_del()){return false}break;case 5:if(!g()){break r}if(!b){break r}if(!r.slice_del()){return false}break}}r.cursor=r.limit-k;var q=r.limit-r.cursor;r:{if(!r.out_grouping_b(o,73,232)){break r}var y=r.limit-r.cursor;if(r.find_among_b(t)==0){break r}if(!r.out_grouping_b(c,97,232)){break r}r.cursor=r.limit-y;r.ket=r.cursor;if(r.cursor<=r.limit_backward){break r}r.cursor--;r.bra=r.cursor;if(!r.slice_del()){return false}}r.cursor=r.limit-q;return true}this.stem=function(){var e=r.cursor;k();r.cursor=e;var i=r.cursor;_();r.cursor=i;r.limit_backward=r.cursor;r.cursor=r.limit;p();r.cursor=r.limit_backward;var u=r.cursor;m();r.cursor=u;return true};this["stemWord"]=function(e){r.setCurrent(e);this.stem();return r.getCurrent()}}; \ No newline at end of file diff --git a/sphinx/search/minified-js/finnish-stemmer.js b/sphinx/search/minified-js/finnish-stemmer.js new file mode 100644 index 00000000000..f6301fdfa56 --- /dev/null +++ b/sphinx/search/minified-js/finnish-stemmer.js @@ -0,0 +1 @@ +FinnishStemmer=function(){var r=new BaseStemmer;var i=[["pa",-1,1],["sti",-1,2],["kaan",-1,1],["han",-1,1],["kin",-1,1],["hän",-1,1],["kään",-1,1],["ko",-1,1],["pä",-1,1],["kö",-1,1]];var e=[["lla",-1,-1],["na",-1,-1],["ssa",-1,-1],["ta",-1,-1],["lta",3,-1],["sta",3,-1]];var a=[["llä",-1,-1],["nä",-1,-1],["ssä",-1,-1],["tä",-1,-1],["ltä",3,-1],["stä",3,-1]];var s=[["lle",-1,-1],["ine",-1,-1]];var t=[["nsa",-1,3],["mme",-1,3],["nne",-1,3],["ni",-1,2],["si",-1,1],["an",-1,4],["en",-1,6],["än",-1,5],["nsä",-1,3]];var u=[["aa",-1,-1],["ee",-1,-1],["ii",-1,-1],["oo",-1,-1],["uu",-1,-1],["ää",-1,-1],["öö",-1,-1]];var l=[["a",-1,8],["lla",0,-1],["na",0,-1],["ssa",0,-1],["ta",0,-1],["lta",4,-1],["sta",4,-1],["tta",4,2],["lle",-1,-1],["ine",-1,-1],["ksi",-1,-1],["n",-1,7],["han",11,1],["den",11,-1,S],["seen",11,-1,C],["hen",11,2],["tten",11,-1,S],["hin",11,3],["siin",11,-1,S],["hon",11,4],["hän",11,5],["hön",11,6],["ä",-1,8],["llä",22,-1],["nä",22,-1],["ssä",22,-1],["tä",22,-1],["ltä",26,-1],["stä",26,-1],["ttä",26,2]];var c=[["eja",-1,-1],["mma",-1,1],["imma",1,-1],["mpa",-1,1],["impa",3,-1],["mmi",-1,1],["immi",5,-1],["mpi",-1,1],["impi",7,-1],["ejä",-1,-1],["mmä",-1,1],["immä",10,-1],["mpä",-1,1],["impä",12,-1]];var n=[["i",-1,-1],["j",-1,-1]];var f=[["mma",-1,1],["imma",0,-1]];var o=[17,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8];var b=[119,223,119,1];var _=[17,65,16,1,0,0,0,0,0,0,0,0,0,0,0,0,8,0,32];var m=[17,65,16,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,32];var k=[17,97,24,1,0,0,0,0,0,0,0,0,0,0,0,0,8,0,32];var d=false;var v="";var w=0;var g=0;function p(){g=r.limit;w=r.limit;r:while(true){var i=r.cursor;i:{if(!r.in_grouping(_,97,246)){break i}r.cursor=i;break r}r.cursor=i;if(r.cursor>=r.limit){return false}r.cursor++}r:while(true){i:{if(!r.out_grouping(_,97,246)){break i}break r}if(r.cursor>=r.limit){return false}r.cursor++}g=r.cursor;r:while(true){var e=r.cursor;i:{if(!r.in_grouping(_,97,246)){break i}r.cursor=e;break r}r.cursor=e;if(r.cursor>=r.limit){return false}r.cursor++}r:while(true){i:{if(!r.out_grouping(_,97,246)){break i}break r}if(r.cursor>=r.limit){return false}r.cursor++}w=r.cursor;return true}function h(){if(!(w<=r.cursor)){return false}return true}function q(){var e;if(r.cursor=r.limit){break r}r.cursor++}continue}r.cursor=e;break}return true}function v(){m=r.limit;k=r.limit;b=r.limit;var i=r.cursor;r:{e:{var s=r.cursor;i:{if(!r.in_grouping(o,97,251)){break i}if(!r.in_grouping(o,97,251)){break i}if(r.cursor>=r.limit){break i}r.cursor++;break e}r.cursor=s;i:{if(r.find_among(e)==0){break i}break e}r.cursor=s;if(r.cursor>=r.limit){break r}r.cursor++;i:while(true){s:{if(!r.in_grouping(o,97,251)){break s}break i}if(r.cursor>=r.limit){break r}r.cursor++}}m=r.cursor}r.cursor=i;var a=r.cursor;r:{e:while(true){i:{if(!r.in_grouping(o,97,251)){break i}break e}if(r.cursor>=r.limit){break r}r.cursor++}e:while(true){i:{if(!r.out_grouping(o,97,251)){break i}break e}if(r.cursor>=r.limit){break r}r.cursor++}k=r.cursor;e:while(true){i:{if(!r.in_grouping(o,97,251)){break i}break e}if(r.cursor>=r.limit){break r}r.cursor++}e:while(true){i:{if(!r.out_grouping(o,97,251)){break i}break e}if(r.cursor>=r.limit){break r}r.cursor++}b=r.cursor}r.cursor=a;return true}function d(){var e;while(true){var s=r.cursor;r:{r.bra=r.cursor;e=r.find_among(i);if(e==0){break r}r.ket=r.cursor;switch(e){case 1:if(!r.slice_from("i")){return false}break;case 2:if(!r.slice_from("u")){return false}break;case 3:if(!r.slice_from("y")){return false}break;case 4:if(!r.slice_from("ë")){return false}break;case 5:if(!r.slice_from("ï")){return false}break;case 6:if(!r.slice_del()){return false}break;case 7:if(r.cursor>=r.limit){break r}r.cursor++;break}continue}r.cursor=s;break}return true}function g(){if(!(m<=r.cursor)){return false}return true}function w(){if(!(k<=r.cursor)){return false}return true}function q(){if(!(b<=r.cursor)){return false}return true}function h(){var e;r.ket=r.cursor;e=r.find_among_b(u);if(e==0){return false}r.bra=r.cursor;switch(e){case 1:if(!q()){return false}if(!r.slice_del()){return false}break;case 2:if(!q()){return false}if(!r.slice_del()){return false}var i=r.limit-r.cursor;r:{r.ket=r.cursor;if(!r.eq_s_b("ic")){r.cursor=r.limit-i;break r}r.bra=r.cursor;e:{var t=r.limit-r.cursor;i:{if(!q()){break i}if(!r.slice_del()){return false}break e}r.cursor=r.limit-t;if(!r.slice_from("iqU")){return false}}}break;case 3:if(!q()){return false}if(!r.slice_from("log")){return false}break;case 4:if(!q()){return false}if(!r.slice_from("u")){return false}break;case 5:if(!q()){return false}if(!r.slice_from("ent")){return false}break;case 6:if(!g()){return false}if(!r.slice_del()){return false}var c=r.limit-r.cursor;r:{r.ket=r.cursor;e=r.find_among_b(s);if(e==0){r.cursor=r.limit-c;break r}r.bra=r.cursor;switch(e){case 1:if(!q()){r.cursor=r.limit-c;break r}if(!r.slice_del()){return false}r.ket=r.cursor;if(!r.eq_s_b("at")){r.cursor=r.limit-c;break r}r.bra=r.cursor;if(!q()){r.cursor=r.limit-c;break r}if(!r.slice_del()){return false}break;case 2:e:{var f=r.limit-r.cursor;i:{if(!q()){break i}if(!r.slice_del()){return false}break e}r.cursor=r.limit-f;if(!w()){r.cursor=r.limit-c;break r}if(!r.slice_from("eux")){return false}}break;case 3:if(!q()){r.cursor=r.limit-c;break r}if(!r.slice_del()){return false}break;case 4:if(!g()){r.cursor=r.limit-c;break r}if(!r.slice_from("i")){return false}break}}break;case 7:if(!q()){return false}if(!r.slice_del()){return false}var l=r.limit-r.cursor;r:{r.ket=r.cursor;e=r.find_among_b(a);if(e==0){r.cursor=r.limit-l;break r}r.bra=r.cursor;switch(e){case 1:e:{var n=r.limit-r.cursor;i:{if(!q()){break i}if(!r.slice_del()){return false}break e}r.cursor=r.limit-n;if(!r.slice_from("abl")){return false}}break;case 2:e:{var b=r.limit-r.cursor;i:{if(!q()){break i}if(!r.slice_del()){return false}break e}r.cursor=r.limit-b;if(!r.slice_from("iqU")){return false}}break;case 3:if(!q()){r.cursor=r.limit-l;break r}if(!r.slice_del()){return false}break}}break;case 8:if(!q()){return false}if(!r.slice_del()){return false}var k=r.limit-r.cursor;r:{r.ket=r.cursor;if(!r.eq_s_b("at")){r.cursor=r.limit-k;break r}r.bra=r.cursor;if(!q()){r.cursor=r.limit-k;break r}if(!r.slice_del()){return false}r.ket=r.cursor;if(!r.eq_s_b("ic")){r.cursor=r.limit-k;break r}r.bra=r.cursor;e:{var m=r.limit-r.cursor;i:{if(!q()){break i}if(!r.slice_del()){return false}break e}r.cursor=r.limit-m;if(!r.slice_from("iqU")){return false}}}break;case 9:if(!r.slice_from("eau")){return false}break;case 10:if(!w()){return false}if(!r.slice_from("al")){return false}break;case 11:r:{var _=r.limit-r.cursor;e:{if(!q()){break e}if(!r.slice_del()){return false}break r}r.cursor=r.limit-_;if(!w()){return false}if(!r.slice_from("eux")){return false}}break;case 12:if(!w()){return false}if(!r.out_grouping_b(o,97,251)){return false}if(!r.slice_del()){return false}break;case 13:if(!g()){return false}if(!r.slice_from("ant")){return false}return false;case 14:if(!g()){return false}if(!r.slice_from("ent")){return false}return false;case 15:var v=r.limit-r.cursor;if(!r.in_grouping_b(o,97,251)){return false}if(!g()){return false}r.cursor=r.limit-v;if(!r.slice_del()){return false}return false}return true}function p(){if(r.cursor0){return false}}r.ket=r.cursor;r:{var i=r.limit-r.cursor;e:{if(!r.eq_s_b("é")){break e}break r}r.cursor=r.limit-i;if(!r.eq_s_b("è")){return false}}r.bra=r.cursor;if(!r.slice_from("e")){return false}return true}this.stem=function(){var e=r.cursor;_();r.cursor=e;v();r.limit_backward=r.cursor;r.cursor=r.limit;var i=r.limit-r.cursor;r:{e:{var s=r.limit-r.cursor;i:{var a=r.limit-r.cursor;s:{var u=r.limit-r.cursor;a:{if(!h()){break a}break s}r.cursor=r.limit-u;a:{if(!p()){break a}break s}r.cursor=r.limit-u;if(!z()){break i}}r.cursor=r.limit-a;var t=r.limit-r.cursor;s:{r.ket=r.cursor;a:{var c=r.limit-r.cursor;u:{if(!r.eq_s_b("Y")){break u}r.bra=r.cursor;if(!r.slice_from("i")){return false}break a}r.cursor=r.limit-c;if(!r.eq_s_b("ç")){r.cursor=r.limit-t;break s}r.bra=r.cursor;if(!r.slice_from("c")){return false}}}break e}r.cursor=r.limit-s;if(!I()){break r}}}r.cursor=r.limit-i;var f=r.limit-r.cursor;U();r.cursor=r.limit-f;var l=r.limit-r.cursor;H();r.cursor=r.limit-l;r.cursor=r.limit_backward;var o=r.cursor;d();r.cursor=o;return true};this["stemWord"]=function(e){r.setCurrent(e);this.stem();return r.getCurrent()}}; \ No newline at end of file diff --git a/sphinx/search/minified-js/german-stemmer.js b/sphinx/search/minified-js/german-stemmer.js new file mode 100644 index 00000000000..e2a335d15e0 --- /dev/null +++ b/sphinx/search/minified-js/german-stemmer.js @@ -0,0 +1 @@ +GermanStemmer=function(){var r=new BaseStemmer;var e=[["",-1,5],["U",0,2],["Y",0,1],["ä",0,3],["ö",0,4],["ü",0,2]];var i=[["e",-1,2],["em",-1,1],["en",-1,2],["ern",-1,1],["er",-1,1],["s",-1,3],["es",5,2]];var s=[["en",-1,1],["er",-1,1],["st",-1,2],["est",2,1]];var u=[["ig",-1,1],["lich",-1,1]];var a=[["end",-1,1],["ig",-1,2],["ung",-1,1],["lich",-1,3],["isch",-1,2],["ik",-1,2],["heit",-1,3],["keit",-1,4]];var c=[17,65,16,1,0,0,0,0,0,0,0,0,0,0,0,0,8,0,32,8];var t=[117,30,5];var o=[117,30,4];var f=0;var l=0;var n=0;function b(){var e=r.cursor;while(true){var i=r.cursor;r:{e:{var s=r.cursor;i:{r.bra=r.cursor;if(!r.eq_s("ß")){break i}r.ket=r.cursor;if(!r.slice_from("ss")){return false}break e}r.cursor=s;if(r.cursor>=r.limit){break r}r.cursor++}continue}r.cursor=i;break}r.cursor=e;while(true){var u=r.cursor;r:{e:while(true){var a=r.cursor;i:{if(!r.in_grouping(c,97,252)){break i}r.bra=r.cursor;s:{var t=r.cursor;u:{if(!r.eq_s("u")){break u}r.ket=r.cursor;if(!r.in_grouping(c,97,252)){break u}if(!r.slice_from("U")){return false}break s}r.cursor=t;if(!r.eq_s("y")){break i}r.ket=r.cursor;if(!r.in_grouping(c,97,252)){break i}if(!r.slice_from("Y")){return false}}r.cursor=a;break e}r.cursor=a;if(r.cursor>=r.limit){break r}r.cursor++}continue}r.cursor=u;break}return true}function k(){n=r.limit;l=r.limit;var e=r.cursor;{var i=r.cursor+3;if(i>r.limit){return false}r.cursor=i}f=r.cursor;r.cursor=e;r:while(true){e:{if(!r.in_grouping(c,97,252)){break e}break r}if(r.cursor>=r.limit){return false}r.cursor++}r:while(true){e:{if(!r.out_grouping(c,97,252)){break e}break r}if(r.cursor>=r.limit){return false}r.cursor++}n=r.cursor;r:{if(!(n=r.limit){return false}r.cursor++}r:while(true){e:{if(!r.out_grouping(c,97,252)){break e}break r}if(r.cursor>=r.limit){return false}r.cursor++}l=r.cursor;return true}function m(){var i;while(true){var s=r.cursor;r:{r.bra=r.cursor;i=r.find_among(e);if(i==0){break r}r.ket=r.cursor;switch(i){case 1:if(!r.slice_from("y")){return false}break;case 2:if(!r.slice_from("u")){return false}break;case 3:if(!r.slice_from("a")){return false}break;case 4:if(!r.slice_from("o")){return false}break;case 5:if(r.cursor>=r.limit){break r}r.cursor++;break}continue}r.cursor=s;break}return true}function _(){if(!(n<=r.cursor)){return false}return true}function v(){if(!(l<=r.cursor)){return false}return true}function g(){var e;var c=r.limit-r.cursor;r:{r.ket=r.cursor;e=r.find_among_b(i);if(e==0){break r}r.bra=r.cursor;if(!_()){break r}switch(e){case 1:if(!r.slice_del()){return false}break;case 2:if(!r.slice_del()){return false}var f=r.limit-r.cursor;e:{r.ket=r.cursor;if(!r.eq_s_b("s")){r.cursor=r.limit-f;break e}r.bra=r.cursor;if(!r.eq_s_b("nis")){r.cursor=r.limit-f;break e}if(!r.slice_del()){return false}}break;case 3:if(!r.in_grouping_b(t,98,116)){break r}if(!r.slice_del()){return false}break}}r.cursor=r.limit-c;var l=r.limit-r.cursor;r:{r.ket=r.cursor;e=r.find_among_b(s);if(e==0){break r}r.bra=r.cursor;if(!_()){break r}switch(e){case 1:if(!r.slice_del()){return false}break;case 2:if(!r.in_grouping_b(o,98,116)){break r}{var n=r.cursor-3;if(n=r.limit){break e}r.cursor++}i:{var t=r.cursor;a:{if(r.find_among(e)==0){break a}break i}r.cursor=t;if(r.cursor>=r.limit){break e}r.cursor++}b=r.cursor;break r}r.cursor=i;if(!r.out_grouping(m,97,369)){return false}e:while(true){i:{if(!r.in_grouping(m,97,369)){break i}break e}if(r.cursor>=r.limit){return false}r.cursor++}b=r.cursor}return true}function d(){if(!(b<=r.cursor)){return false}return true}function v(){var e;r.ket=r.cursor;e=r.find_among_b(i);if(e==0){return false}r.bra=r.cursor;if(!d()){return false}switch(e){case 1:if(!r.slice_from("a")){return false}break;case 2:if(!r.slice_from("e")){return false}break}return true}function g(){var e=r.limit-r.cursor;if(r.find_among_b(a)==0){return false}r.cursor=r.limit-e;return true}function j(){if(r.cursor<=r.limit_backward){return false}r.cursor--;r.ket=r.cursor;{var e=r.cursor-1;if(e=r.limit){break r}r.cursor++;break}continue}r.cursor=s;break}r.cursor=a;while(true){var o=r.cursor;r:{e:while(true){var u=r.cursor;i:{if(!r.in_grouping(l,97,249)){break i}r.bra=r.cursor;a:{var t=r.cursor;s:{if(!r.eq_s("u")){break s}r.ket=r.cursor;if(!r.in_grouping(l,97,249)){break s}if(!r.slice_from("U")){return false}break a}r.cursor=t;if(!r.eq_s("i")){break i}r.ket=r.cursor;if(!r.in_grouping(l,97,249)){break i}if(!r.slice_from("I")){return false}}r.cursor=u;break e}r.cursor=u;if(r.cursor>=r.limit){break r}r.cursor++}continue}r.cursor=o;break}return true}function v(){k=r.limit;m=r.limit;b=r.limit;var e=r.cursor;r:{e:{var i=r.cursor;i:{if(!r.in_grouping(l,97,249)){break i}a:{var a=r.cursor;s:{if(!r.out_grouping(l,97,249)){break s}o:while(true){u:{if(!r.in_grouping(l,97,249)){break u}break o}if(r.cursor>=r.limit){break s}r.cursor++}break a}r.cursor=a;if(!r.in_grouping(l,97,249)){break i}s:while(true){o:{if(!r.out_grouping(l,97,249)){break o}break s}if(r.cursor>=r.limit){break i}r.cursor++}}break e}r.cursor=i;if(!r.out_grouping(l,97,249)){break r}i:{var s=r.cursor;a:{if(!r.out_grouping(l,97,249)){break a}s:while(true){o:{if(!r.in_grouping(l,97,249)){break o}break s}if(r.cursor>=r.limit){break a}r.cursor++}break i}r.cursor=s;if(!r.in_grouping(l,97,249)){break r}if(r.cursor>=r.limit){break r}r.cursor++}}k=r.cursor}r.cursor=e;var o=r.cursor;r:{e:while(true){i:{if(!r.in_grouping(l,97,249)){break i}break e}if(r.cursor>=r.limit){break r}r.cursor++}e:while(true){i:{if(!r.out_grouping(l,97,249)){break i}break e}if(r.cursor>=r.limit){break r}r.cursor++}m=r.cursor;e:while(true){i:{if(!r.in_grouping(l,97,249)){break i}break e}if(r.cursor>=r.limit){break r}r.cursor++}e:while(true){i:{if(!r.out_grouping(l,97,249)){break i}break e}if(r.cursor>=r.limit){break r}r.cursor++}b=r.cursor}r.cursor=o;return true}function g(){var e;while(true){var a=r.cursor;r:{r.bra=r.cursor;e=r.find_among(i);if(e==0){break r}r.ket=r.cursor;switch(e){case 1:if(!r.slice_from("i")){return false}break;case 2:if(!r.slice_from("u")){return false}break;case 3:if(r.cursor>=r.limit){break r}r.cursor++;break}continue}r.cursor=a;break}return true}function d(){if(!(k<=r.cursor)){return false}return true}function w(){if(!(m<=r.cursor)){return false}return true}function h(){if(!(b<=r.cursor)){return false}return true}function p(){var e;r.ket=r.cursor;if(r.find_among_b(a)==0){return false}r.bra=r.cursor;e=r.find_among_b(s);if(e==0){return false}if(!d()){return false}switch(e){case 1:if(!r.slice_del()){return false}break;case 2:if(!r.slice_from("e")){return false}break}return true}function q(){var e;r.ket=r.cursor;e=r.find_among_b(t);if(e==0){return false}r.bra=r.cursor;switch(e){case 1:if(!h()){return false}if(!r.slice_del()){return false}break;case 2:if(!h()){return false}if(!r.slice_del()){return false}var i=r.limit-r.cursor;r:{r.ket=r.cursor;if(!r.eq_s_b("ic")){r.cursor=r.limit-i;break r}r.bra=r.cursor;if(!h()){r.cursor=r.limit-i;break r}if(!r.slice_del()){return false}}break;case 3:if(!h()){return false}if(!r.slice_from("log")){return false}break;case 4:if(!h()){return false}if(!r.slice_from("u")){return false}break;case 5:if(!h()){return false}if(!r.slice_from("ente")){return false}break;case 6:if(!d()){return false}if(!r.slice_del()){return false}break;case 7:if(!w()){return false}if(!r.slice_del()){return false}var a=r.limit-r.cursor;r:{r.ket=r.cursor;e=r.find_among_b(o);if(e==0){r.cursor=r.limit-a;break r}r.bra=r.cursor;if(!h()){r.cursor=r.limit-a;break r}if(!r.slice_del()){return false}switch(e){case 1:r.ket=r.cursor;if(!r.eq_s_b("at")){r.cursor=r.limit-a;break r}r.bra=r.cursor;if(!h()){r.cursor=r.limit-a;break r}if(!r.slice_del()){return false}break}}break;case 8:if(!h()){return false}if(!r.slice_del()){return false}var s=r.limit-r.cursor;r:{r.ket=r.cursor;if(r.find_among_b(u)==0){r.cursor=r.limit-s;break r}r.bra=r.cursor;if(!h()){r.cursor=r.limit-s;break r}if(!r.slice_del()){return false}}break;case 9:if(!h()){return false}if(!r.slice_del()){return false}var c=r.limit-r.cursor;r:{r.ket=r.cursor;if(!r.eq_s_b("at")){r.cursor=r.limit-c;break r}r.bra=r.cursor;if(!h()){r.cursor=r.limit-c;break r}if(!r.slice_del()){return false}r.ket=r.cursor;if(!r.eq_s_b("ic")){r.cursor=r.limit-c;break r}r.bra=r.cursor;if(!h()){r.cursor=r.limit-c;break r}if(!r.slice_del()){return false}}break}return true}function z(){if(r.cursorr.limit){return false}r.cursor=i}u=r.cursor;r.cursor=e;r:while(true){var t=r.cursor;e:{if(!r.in_grouping(a,97,248)){break e}r.cursor=t;break r}r.cursor=t;if(r.cursor>=r.limit){return false}r.cursor++}r:while(true){e:{if(!r.out_grouping(a,97,248)){break e}break r}if(r.cursor>=r.limit){return false}r.cursor++}c=r.cursor;r:{if(!(c=r.limit){break e}r.cursor++}if(!r.slice_from("Y")){return false}l=true;continue}r.cursor=s;break}}r.cursor=i;n=r.limit;o=r.limit;var u=r.cursor;r:{e:while(true){i:{if(!r.in_grouping(c,97,121)){break i}break e}if(r.cursor>=r.limit){break r}r.cursor++}e:while(true){i:{if(!r.out_grouping(c,97,121)){break i}break e}if(r.cursor>=r.limit){break r}r.cursor++}n=r.cursor;e:while(true){i:{if(!r.in_grouping(c,97,121)){break i}break e}if(r.cursor>=r.limit){break r}r.cursor++}e:while(true){i:{if(!r.out_grouping(c,97,121)){break i}break e}if(r.cursor>=r.limit){break r}r.cursor++}o=r.cursor}r.cursor=u;r.limit_backward=r.cursor;r.cursor=r.limit;var t=r.limit-r.cursor;k();r.cursor=r.limit-t;var f=r.limit-r.cursor;v();r.cursor=r.limit-f;var b=r.limit-r.cursor;g();r.cursor=r.limit-b;var m=r.limit-r.cursor;d();r.cursor=r.limit-m;var _=r.limit-r.cursor;w();r.cursor=r.limit-_;var z=r.limit-r.cursor;h();r.cursor=r.limit-z;var y=r.limit-r.cursor;p();r.cursor=r.limit-y;var Y=r.limit-r.cursor;q();r.cursor=r.limit-Y;r.cursor=r.limit_backward;var C=r.cursor;r:{if(!l){break r}while(true){var S=r.cursor;e:{i:while(true){var B=r.cursor;s:{r.bra=r.cursor;if(!r.eq_s("Y")){break s}r.ket=r.cursor;r.cursor=B;break i}r.cursor=B;if(r.cursor>=r.limit){break e}r.cursor++}if(!r.slice_from("y")){return false}continue}r.cursor=S;break}}r.cursor=C;return true};this["stemWord"]=function(e){r.setCurrent(e);this.stem();return r.getCurrent()}}; \ No newline at end of file diff --git a/sphinx/search/minified-js/portuguese-stemmer.js b/sphinx/search/minified-js/portuguese-stemmer.js new file mode 100644 index 00000000000..022d860e6b3 --- /dev/null +++ b/sphinx/search/minified-js/portuguese-stemmer.js @@ -0,0 +1 @@ +PortugueseStemmer=function(){var r=new BaseStemmer;var e=[["",-1,3],["ã",0,1],["õ",0,2]];var i=[["",-1,3],["a~",0,1],["o~",0,2]];var s=[["ic",-1,-1],["ad",-1,-1],["os",-1,-1],["iv",-1,1]];var a=[["ante",-1,1],["avel",-1,1],["ível",-1,1]];var u=[["ic",-1,1],["abil",-1,1],["iv",-1,1]];var o=[["ica",-1,1],["ância",-1,1],["ência",-1,4],["logia",-1,2],["ira",-1,9],["adora",-1,1],["osa",-1,1],["ista",-1,1],["iva",-1,8],["eza",-1,1],["idade",-1,7],["ante",-1,1],["mente",-1,6],["amente",12,5],["ável",-1,1],["ível",-1,1],["ico",-1,1],["ismo",-1,1],["oso",-1,1],["amento",-1,1],["imento",-1,1],["ivo",-1,8],["aça~o",-1,1],["uça~o",-1,3],["ador",-1,1],["icas",-1,1],["ências",-1,4],["logias",-1,2],["iras",-1,9],["adoras",-1,1],["osas",-1,1],["istas",-1,1],["ivas",-1,8],["ezas",-1,1],["idades",-1,7],["adores",-1,1],["antes",-1,1],["aço~es",-1,1],["uço~es",-1,3],["icos",-1,1],["ismos",-1,1],["osos",-1,1],["amentos",-1,1],["imentos",-1,1],["ivos",-1,8]];var t=[["ada",-1,1],["ida",-1,1],["ia",-1,1],["aria",2,1],["eria",2,1],["iria",2,1],["ara",-1,1],["era",-1,1],["ira",-1,1],["ava",-1,1],["asse",-1,1],["esse",-1,1],["isse",-1,1],["aste",-1,1],["este",-1,1],["iste",-1,1],["ei",-1,1],["arei",16,1],["erei",16,1],["irei",16,1],["am",-1,1],["iam",20,1],["ariam",21,1],["eriam",21,1],["iriam",21,1],["aram",20,1],["eram",20,1],["iram",20,1],["avam",20,1],["em",-1,1],["arem",29,1],["erem",29,1],["irem",29,1],["assem",29,1],["essem",29,1],["issem",29,1],["ado",-1,1],["ido",-1,1],["ando",-1,1],["endo",-1,1],["indo",-1,1],["ara~o",-1,1],["era~o",-1,1],["ira~o",-1,1],["ar",-1,1],["er",-1,1],["ir",-1,1],["as",-1,1],["adas",47,1],["idas",47,1],["ias",47,1],["arias",50,1],["erias",50,1],["irias",50,1],["aras",47,1],["eras",47,1],["iras",47,1],["avas",47,1],["es",-1,1],["ardes",58,1],["erdes",58,1],["irdes",58,1],["ares",58,1],["eres",58,1],["ires",58,1],["asses",58,1],["esses",58,1],["isses",58,1],["astes",58,1],["estes",58,1],["istes",58,1],["is",-1,1],["ais",71,1],["eis",71,1],["areis",73,1],["ereis",73,1],["ireis",73,1],["áreis",73,1],["éreis",73,1],["íreis",73,1],["ásseis",73,1],["ésseis",73,1],["ísseis",73,1],["áveis",73,1],["íeis",73,1],["aríeis",84,1],["eríeis",84,1],["iríeis",84,1],["ados",-1,1],["idos",-1,1],["amos",-1,1],["áramos",90,1],["éramos",90,1],["íramos",90,1],["ávamos",90,1],["íamos",90,1],["aríamos",95,1],["eríamos",95,1],["iríamos",95,1],["emos",-1,1],["aremos",99,1],["eremos",99,1],["iremos",99,1],["ássemos",99,1],["êssemos",99,1],["íssemos",99,1],["imos",-1,1],["armos",-1,1],["ermos",-1,1],["irmos",-1,1],["ámos",-1,1],["arás",-1,1],["erás",-1,1],["irás",-1,1],["eu",-1,1],["iu",-1,1],["ou",-1,1],["ará",-1,1],["erá",-1,1],["irá",-1,1]];var c=[["a",-1,1],["i",-1,1],["o",-1,1],["os",-1,1],["á",-1,1],["í",-1,1],["ó",-1,1]];var f=[["e",-1,1],["ç",-1,2],["é",-1,1],["ê",-1,1]];var l=[17,65,16,0,0,0,0,0,0,0,0,0,0,0,0,0,3,19,12,2];var n=0;var m=0;var b=0;function k(){var i;while(true){var s=r.cursor;r:{r.bra=r.cursor;i=r.find_among(e);if(i==0){break r}r.ket=r.cursor;switch(i){case 1:if(!r.slice_from("a~")){return false}break;case 2:if(!r.slice_from("o~")){return false}break;case 3:if(r.cursor>=r.limit){break r}r.cursor++;break}continue}r.cursor=s;break}return true}function _(){b=r.limit;m=r.limit;n=r.limit;var e=r.cursor;r:{e:{var i=r.cursor;i:{if(!r.in_grouping(l,97,250)){break i}s:{var s=r.cursor;a:{if(!r.out_grouping(l,97,250)){break a}u:while(true){o:{if(!r.in_grouping(l,97,250)){break o}break u}if(r.cursor>=r.limit){break a}r.cursor++}break s}r.cursor=s;if(!r.in_grouping(l,97,250)){break i}a:while(true){u:{if(!r.out_grouping(l,97,250)){break u}break a}if(r.cursor>=r.limit){break i}r.cursor++}}break e}r.cursor=i;if(!r.out_grouping(l,97,250)){break r}i:{var a=r.cursor;s:{if(!r.out_grouping(l,97,250)){break s}a:while(true){u:{if(!r.in_grouping(l,97,250)){break u}break a}if(r.cursor>=r.limit){break s}r.cursor++}break i}r.cursor=a;if(!r.in_grouping(l,97,250)){break r}if(r.cursor>=r.limit){break r}r.cursor++}}b=r.cursor}r.cursor=e;var u=r.cursor;r:{e:while(true){i:{if(!r.in_grouping(l,97,250)){break i}break e}if(r.cursor>=r.limit){break r}r.cursor++}e:while(true){i:{if(!r.out_grouping(l,97,250)){break i}break e}if(r.cursor>=r.limit){break r}r.cursor++}m=r.cursor;e:while(true){i:{if(!r.in_grouping(l,97,250)){break i}break e}if(r.cursor>=r.limit){break r}r.cursor++}e:while(true){i:{if(!r.out_grouping(l,97,250)){break i}break e}if(r.cursor>=r.limit){break r}r.cursor++}n=r.cursor}r.cursor=u;return true}function v(){var e;while(true){var s=r.cursor;r:{r.bra=r.cursor;e=r.find_among(i);if(e==0){break r}r.ket=r.cursor;switch(e){case 1:if(!r.slice_from("ã")){return false}break;case 2:if(!r.slice_from("õ")){return false}break;case 3:if(r.cursor>=r.limit){break r}r.cursor++;break}continue}r.cursor=s;break}return true}function d(){if(!(b<=r.cursor)){return false}return true}function g(){if(!(m<=r.cursor)){return false}return true}function w(){if(!(n<=r.cursor)){return false}return true}function h(){var e;r.ket=r.cursor;e=r.find_among_b(o);if(e==0){return false}r.bra=r.cursor;switch(e){case 1:if(!w()){return false}if(!r.slice_del()){return false}break;case 2:if(!w()){return false}if(!r.slice_from("log")){return false}break;case 3:if(!w()){return false}if(!r.slice_from("u")){return false}break;case 4:if(!w()){return false}if(!r.slice_from("ente")){return false}break;case 5:if(!g()){return false}if(!r.slice_del()){return false}var i=r.limit-r.cursor;r:{r.ket=r.cursor;e=r.find_among_b(s);if(e==0){r.cursor=r.limit-i;break r}r.bra=r.cursor;if(!w()){r.cursor=r.limit-i;break r}if(!r.slice_del()){return false}switch(e){case 1:r.ket=r.cursor;if(!r.eq_s_b("at")){r.cursor=r.limit-i;break r}r.bra=r.cursor;if(!w()){r.cursor=r.limit-i;break r}if(!r.slice_del()){return false}break}}break;case 6:if(!w()){return false}if(!r.slice_del()){return false}var t=r.limit-r.cursor;r:{r.ket=r.cursor;if(r.find_among_b(a)==0){r.cursor=r.limit-t;break r}r.bra=r.cursor;if(!w()){r.cursor=r.limit-t;break r}if(!r.slice_del()){return false}}break;case 7:if(!w()){return false}if(!r.slice_del()){return false}var c=r.limit-r.cursor;r:{r.ket=r.cursor;if(r.find_among_b(u)==0){r.cursor=r.limit-c;break r}r.bra=r.cursor;if(!w()){r.cursor=r.limit-c;break r}if(!r.slice_del()){return false}}break;case 8:if(!w()){return false}if(!r.slice_del()){return false}var f=r.limit-r.cursor;r:{r.ket=r.cursor;if(!r.eq_s_b("at")){r.cursor=r.limit-f;break r}r.bra=r.cursor;if(!w()){r.cursor=r.limit-f;break r}if(!r.slice_del()){return false}}break;case 9:if(!d()){return false}if(!r.eq_s_b("e")){return false}if(!r.slice_from("ir")){return false}break}return true}function p(){if(r.cursor=r.limit){break r}r.cursor++}continue}r.cursor=i;break}return true}function m(){n=r.limit;l=r.limit;f=r.limit;var i=r.cursor;r:{i:{var e=r.cursor;e:{if(!r.in_grouping(c,97,259)){break e}a:{var a=r.cursor;t:{if(!r.out_grouping(c,97,259)){break t}s:while(true){u:{if(!r.in_grouping(c,97,259)){break u}break s}if(r.cursor>=r.limit){break t}r.cursor++}break a}r.cursor=a;if(!r.in_grouping(c,97,259)){break e}t:while(true){s:{if(!r.out_grouping(c,97,259)){break s}break t}if(r.cursor>=r.limit){break e}r.cursor++}}break i}r.cursor=e;if(!r.out_grouping(c,97,259)){break r}e:{var t=r.cursor;a:{if(!r.out_grouping(c,97,259)){break a}t:while(true){s:{if(!r.in_grouping(c,97,259)){break s}break t}if(r.cursor>=r.limit){break a}r.cursor++}break e}r.cursor=t;if(!r.in_grouping(c,97,259)){break r}if(r.cursor>=r.limit){break r}r.cursor++}}n=r.cursor}r.cursor=i;var s=r.cursor;r:{i:while(true){e:{if(!r.in_grouping(c,97,259)){break e}break i}if(r.cursor>=r.limit){break r}r.cursor++}i:while(true){e:{if(!r.out_grouping(c,97,259)){break e}break i}if(r.cursor>=r.limit){break r}r.cursor++}l=r.cursor;i:while(true){e:{if(!r.in_grouping(c,97,259)){break e}break i}if(r.cursor>=r.limit){break r}r.cursor++}i:while(true){e:{if(!r.out_grouping(c,97,259)){break e}break i}if(r.cursor>=r.limit){break r}r.cursor++}f=r.cursor}r.cursor=s;return true}function k(){var e;while(true){var a=r.cursor;r:{r.bra=r.cursor;e=r.find_among(i);if(e==0){break r}r.ket=r.cursor;switch(e){case 1:if(!r.slice_from("i")){return false}break;case 2:if(!r.slice_from("u")){return false}break;case 3:if(r.cursor>=r.limit){break r}r.cursor++;break}continue}r.cursor=a;break}return true}function _(){if(!(n<=r.cursor)){return false}return true}function v(){if(!(l<=r.cursor)){return false}return true}function g(){if(!(f<=r.cursor)){return false}return true}function w(){var i;r.ket=r.cursor;i=r.find_among_b(e);if(i==0){return false}r.bra=r.cursor;if(!v()){return false}switch(i){case 1:if(!r.slice_del()){return false}break;case 2:if(!r.slice_from("a")){return false}break;case 3:if(!r.slice_from("e")){return false}break;case 4:if(!r.slice_from("i")){return false}break;case 5:{var a=r.limit-r.cursor;r:{if(!r.eq_s_b("ab")){break r}return false}r.cursor=r.limit-a}if(!r.slice_from("i")){return false}break;case 6:if(!r.slice_from("at")){return false}break;case 7:if(!r.slice_from("aţi")){return false}break}return true}function d(){var i;var e=r.limit-r.cursor;r.ket=r.cursor;i=r.find_among_b(a);if(i==0){return false}r.bra=r.cursor;if(!v()){return false}switch(i){case 1:if(!r.slice_from("abil")){return false}break;case 2:if(!r.slice_from("ibil")){return false}break;case 3:if(!r.slice_from("iv")){return false}break;case 4:if(!r.slice_from("ic")){return false}break;case 5:if(!r.slice_from("at")){return false}break;case 6:if(!r.slice_from("it")){return false}break}o=true;r.cursor=r.limit-e;return true}function h(){var i;o=false;while(true){var e=r.limit-r.cursor;r:{if(!d()){break r}continue}r.cursor=r.limit-e;break}r.ket=r.cursor;i=r.find_among_b(t);if(i==0){return false}r.bra=r.cursor;if(!g()){return false}switch(i){case 1:if(!r.slice_del()){return false}break;case 2:if(!r.eq_s_b("ţ")){return false}r.bra=r.cursor;if(!r.slice_from("t")){return false}break;case 3:if(!r.slice_from("ist")){return false}break}o=true;return true}function p(){var i;if(r.cursor=r.limit){break r}r.cursor++}n=r.cursor;e:while(true){i:{if(!r.out_grouping(l,1072,1103)){break i}break e}if(r.cursor>=r.limit){break r}r.cursor++}e:while(true){i:{if(!r.in_grouping(l,1072,1103)){break i}break e}if(r.cursor>=r.limit){break r}r.cursor++}e:while(true){i:{if(!r.out_grouping(l,1072,1103)){break i}break e}if(r.cursor>=r.limit){break r}r.cursor++}o=r.cursor}r.cursor=e;return true}function _(){if(!(o<=r.cursor)){return false}return true}function k(){var i;r.ket=r.cursor;i=r.find_among_b(e);if(i==0){return false}r.bra=r.cursor;switch(i){case 1:r:{var u=r.limit-r.cursor;e:{if(!r.eq_s_b("а")){break e}break r}r.cursor=r.limit-u;if(!r.eq_s_b("я")){return false}}if(!r.slice_del()){return false}break;case 2:if(!r.slice_del()){return false}break}return true}function m(){r.ket=r.cursor;if(r.find_among_b(i)==0){return false}r.bra=r.cursor;if(!r.slice_del()){return false}return true}function v(){var e;if(!m()){return false}var i=r.limit-r.cursor;r:{r.ket=r.cursor;e=r.find_among_b(u);if(e==0){r.cursor=r.limit-i;break r}r.bra=r.cursor;switch(e){case 1:e:{var s=r.limit-r.cursor;i:{if(!r.eq_s_b("а")){break i}break e}r.cursor=r.limit-s;if(!r.eq_s_b("я")){r.cursor=r.limit-i;break r}}if(!r.slice_del()){return false}break;case 2:if(!r.slice_del()){return false}break}}return true}function d(){r.ket=r.cursor;if(r.find_among_b(s)==0){return false}r.bra=r.cursor;if(!r.slice_del()){return false}return true}function g(){var e;r.ket=r.cursor;e=r.find_among_b(a);if(e==0){return false}r.bra=r.cursor;switch(e){case 1:r:{var i=r.limit-r.cursor;e:{if(!r.eq_s_b("а")){break e}break r}r.cursor=r.limit-i;if(!r.eq_s_b("я")){return false}}if(!r.slice_del()){return false}break;case 2:if(!r.slice_del()){return false}break}return true}function w(){r.ket=r.cursor;if(r.find_among_b(t)==0){return false}r.bra=r.cursor;if(!r.slice_del()){return false}return true}function h(){r.ket=r.cursor;if(r.find_among_b(c)==0){return false}r.bra=r.cursor;if(!_()){return false}if(!r.slice_del()){return false}return true}function q(){var e;r.ket=r.cursor;e=r.find_among_b(f);if(e==0){return false}r.bra=r.cursor;switch(e){case 1:if(!r.slice_del()){return false}r.ket=r.cursor;if(!r.eq_s_b("н")){return false}r.bra=r.cursor;if(!r.eq_s_b("н")){return false}if(!r.slice_del()){return false}break;case 2:if(!r.eq_s_b("н")){return false}if(!r.slice_del()){return false}break;case 3:if(!r.slice_del()){return false}break}return true}this.stem=function(){var e=r.cursor;r:{while(true){var i=r.cursor;e:{i:while(true){var u=r.cursor;u:{r.bra=r.cursor;if(!r.eq_s("ё")){break u}r.ket=r.cursor;r.cursor=u;break i}r.cursor=u;if(r.cursor>=r.limit){break e}r.cursor++}if(!r.slice_from("е")){return false}continue}r.cursor=i;break}}r.cursor=e;b();r.limit_backward=r.cursor;r.cursor=r.limit;if(r.cursor=r.limit){break s}r.cursor++}break a}r.cursor=a;if(!r.in_grouping(n,97,252)){break i}s:while(true){u:{if(!r.out_grouping(n,97,252)){break u}break s}if(r.cursor>=r.limit){break i}r.cursor++}}break e}r.cursor=i;if(!r.out_grouping(n,97,252)){break r}i:{var s=r.cursor;a:{if(!r.out_grouping(n,97,252)){break a}s:while(true){u:{if(!r.in_grouping(n,97,252)){break u}break s}if(r.cursor>=r.limit){break a}r.cursor++}break i}r.cursor=s;if(!r.in_grouping(n,97,252)){break r}if(r.cursor>=r.limit){break r}r.cursor++}}k=r.cursor}r.cursor=e;var u=r.cursor;r:{e:while(true){i:{if(!r.in_grouping(n,97,252)){break i}break e}if(r.cursor>=r.limit){break r}r.cursor++}e:while(true){i:{if(!r.out_grouping(n,97,252)){break i}break e}if(r.cursor>=r.limit){break r}r.cursor++}m=r.cursor;e:while(true){i:{if(!r.in_grouping(n,97,252)){break i}break e}if(r.cursor>=r.limit){break r}r.cursor++}e:while(true){i:{if(!r.out_grouping(n,97,252)){break i}break e}if(r.cursor>=r.limit){break r}r.cursor++}b=r.cursor}r.cursor=u;return true}function d(){var i;while(true){var a=r.cursor;r:{r.bra=r.cursor;i=r.find_among(e);if(i==0){break r}r.ket=r.cursor;switch(i){case 1:if(!r.slice_from("a")){return false}break;case 2:if(!r.slice_from("e")){return false}break;case 3:if(!r.slice_from("i")){return false}break;case 4:if(!r.slice_from("o")){return false}break;case 5:if(!r.slice_from("u")){return false}break;case 6:if(r.cursor>=r.limit){break r}r.cursor++;break}continue}r.cursor=a;break}return true}function v(){if(!(k<=r.cursor)){return false}return true}function g(){if(!(m<=r.cursor)){return false}return true}function w(){if(!(b<=r.cursor)){return false}return true}function h(){var e;r.ket=r.cursor;if(r.find_among_b(i)==0){return false}r.bra=r.cursor;e=r.find_among_b(a);if(e==0){return false}if(!v()){return false}switch(e){case 1:r.bra=r.cursor;if(!r.slice_from("iendo")){return false}break;case 2:r.bra=r.cursor;if(!r.slice_from("ando")){return false}break;case 3:r.bra=r.cursor;if(!r.slice_from("ar")){return false}break;case 4:r.bra=r.cursor;if(!r.slice_from("er")){return false}break;case 5:r.bra=r.cursor;if(!r.slice_from("ir")){return false}break;case 6:if(!r.slice_del()){return false}break;case 7:if(!r.eq_s_b("u")){return false}if(!r.slice_del()){return false}break}return true}function p(){var e;r.ket=r.cursor;e=r.find_among_b(t);if(e==0){return false}r.bra=r.cursor;switch(e){case 1:if(!w()){return false}if(!r.slice_del()){return false}break;case 2:if(!w()){return false}if(!r.slice_del()){return false}var i=r.limit-r.cursor;r:{r.ket=r.cursor;if(!r.eq_s_b("ic")){r.cursor=r.limit-i;break r}r.bra=r.cursor;if(!w()){r.cursor=r.limit-i;break r}if(!r.slice_del()){return false}}break;case 3:if(!w()){return false}if(!r.slice_from("log")){return false}break;case 4:if(!w()){return false}if(!r.slice_from("u")){return false}break;case 5:if(!w()){return false}if(!r.slice_from("ente")){return false}break;case 6:if(!g()){return false}if(!r.slice_del()){return false}var a=r.limit-r.cursor;r:{r.ket=r.cursor;e=r.find_among_b(s);if(e==0){r.cursor=r.limit-a;break r}r.bra=r.cursor;if(!w()){r.cursor=r.limit-a;break r}if(!r.slice_del()){return false}switch(e){case 1:r.ket=r.cursor;if(!r.eq_s_b("at")){r.cursor=r.limit-a;break r}r.bra=r.cursor;if(!w()){r.cursor=r.limit-a;break r}if(!r.slice_del()){return false}break}}break;case 7:if(!w()){return false}if(!r.slice_del()){return false}var c=r.limit-r.cursor;r:{r.ket=r.cursor;if(r.find_among_b(u)==0){r.cursor=r.limit-c;break r}r.bra=r.cursor;if(!w()){r.cursor=r.limit-c;break r}if(!r.slice_del()){return false}}break;case 8:if(!w()){return false}if(!r.slice_del()){return false}var l=r.limit-r.cursor;r:{r.ket=r.cursor;if(r.find_among_b(o)==0){r.cursor=r.limit-l;break r}r.bra=r.cursor;if(!w()){r.cursor=r.limit-l;break r}if(!r.slice_del()){return false}}break;case 9:if(!w()){return false}if(!r.slice_del()){return false}var f=r.limit-r.cursor;r:{r.ket=r.cursor;if(!r.eq_s_b("at")){r.cursor=r.limit-f;break r}r.bra=r.cursor;if(!w()){r.cursor=r.limit-f;break r}if(!r.slice_del()){return false}}break}return true}function y(){if(r.cursorr.limit){return false}r.cursor=a}u=r.cursor;r.cursor=e;r:while(true){var i=r.cursor;e:{if(!r.in_grouping(t,97,246)){break e}r.cursor=i;break r}r.cursor=i;if(r.cursor>=r.limit){return false}r.cursor++}r:while(true){e:{if(!r.out_grouping(t,97,246)){break e}break r}if(r.cursor>=r.limit){return false}r.cursor++}n=r.cursor;r:{if(!(nr.limit_backward){return false}return true}function gr(){var i=r.cursor;{var e=2;while(true){var u=r.cursor;r:{i:while(true){e:{if(!r.in_grouping(C,97,305)){break e}break i}if(r.cursor>=r.limit){break r}r.cursor++}e--;continue}r.cursor=u;break}if(e>0){return false}}r.cursor=i;return true}function wr(){r.limit_backward=r.cursor;r.cursor=r.limit;{var i=r.limit-r.cursor;r:{if(!dr()){break r}return false}r.cursor=r.limit-i}var e=r.limit-r.cursor;vr();r.cursor=r.limit-e;var u=r.limit-r.cursor;_r();r.cursor=r.limit-u;r.cursor=r.limit_backward;return true}this.stem=function(){if(!gr()){return false}r.limit_backward=r.cursor;r.cursor=r.limit;var i=r.limit-r.cursor;br();r.cursor=r.limit-i;if(!D){return false}var e=r.limit-r.cursor;kr();r.cursor=r.limit-e;r.cursor=r.limit_backward;if(!wr()){return false}return true};this["stemWord"]=function(i){r.setCurrent(i);this.stem();return r.getCurrent()}}; \ No newline at end of file diff --git a/sphinx/search/nl.py b/sphinx/search/nl.py index f98cdf8ad80..2216fbe05da 100644 --- a/sphinx/search/nl.py +++ b/sphinx/search/nl.py @@ -119,17 +119,11 @@ andere | other ''') -js_stemmer = """ -var JSX={};(function(m){function n(b,e){var a=function(){};a.prototype=e.prototype;var c=new a;for(var d in b){b[d].prototype=c}}function L(c,b){for(var a in b.prototype)if(b.prototype.hasOwnProperty(a))c.prototype[a]=b.prototype[a]}function e(a,b,d){function c(a,b,c){delete a[b];a[b]=c;return c}Object.defineProperty(a,b,{get:function(){return c(a,b,d())},set:function(d){c(a,b,d)},enumerable:true,configurable:true})}function K(a,b,c){return a[b]=a[b]/c|0}var I=parseInt;var E=parseFloat;function M(a){return a!==a}var B=isFinite;var A=encodeURIComponent;var z=decodeURIComponent;var y=encodeURI;var x=decodeURI;var w=Object.prototype.toString;var C=Object.prototype.hasOwnProperty;function l(){}m.require=function(b){var a=t[b];return a!==undefined?a:null};m.profilerIsRunning=function(){return l.getResults!=null};m.getProfileResults=function(){return(l.getResults||function(){return{}})()};m.postProfileResults=function(a,b){if(l.postResults==null)throw new Error('profiler has not been turned on');return l.postResults(a,b)};m.resetProfileResults=function(){if(l.resetResults==null)throw new Error('profiler has not been turned on');return l.resetResults()};m.DEBUG=false;function v(){};n([v],Error);function c(a,b,c){this.F=a.length;this.K=a;this.L=b;this.I=c;this.H=null;this.P=null};n([c],Object);function s(){};n([s],Object);function g(){var a;var b;var c;this.G={};a=this.D='';b=this._=0;c=this.A=a.length;this.E=0;this.C=b;this.B=c};n([g],s);function D(a,b){a.D=b.D;a._=b._;a.A=b.A;a.E=b.E;a.C=b.C;a.B=b.B};function i(b,d,c,e){var a;if(b._>=b.A){return false}a=b.D.charCodeAt(b._);if(a>e||a>>3]&1<<(a&7))===0){return false}b._++;return true};function r(a,d,c,e){var b;if(a._>=a.A){return false}b=a.D.charCodeAt(a._);if(b>e||b>>3]&1<<(b&7))===0){a._++;return true}return false};function f(a,d,c,e){var b;if(a._<=a.E){return false}b=a.D.charCodeAt(a._-1);if(b>e||b>>3]&1<<(b&7))===0){a._--;return true}return false};function k(a,b,d){var c;if(a.A-a._>>1);h=0;c=g0){break}if(d===b){break}if(l){break}l=true}}while(true){a=m[b];if(g>=a.F){f._=e+a.F|0;if(a.H==null){return a.I}o=a.H(a.P);f._=e+a.F|0;if(o){return a.I}}b=a.L;if(b<0){return 0}}return-1};function h(d,m,p){var b;var g;var e;var n;var f;var k;var l;var i;var h;var c;var a;var j;var o;b=0;g=p;e=d._;n=d.E;f=0;k=0;l=false;while(true){i=b+(g-b>>1);h=0;c=f=0;j--){if(e-c===n){h=-1;break}h=d.D.charCodeAt(e-1-c)-a.K.charCodeAt(j);if(h!==0){break}c++}if(h<0){g=i;k=c}else{b=i;f=c}if(g-b<=1){if(b>0){break}if(g===b){break}if(l){break}l=true}}while(true){a=m[b];if(f>=a.F){d._=e-a.F|0;if(a.H==null){return a.I}o=a.H(d);d._=e-a.F|0;if(o){return a.I}}b=a.L;if(b<0){return 0}}return-1};function u(a,b,d,e){var c;c=e.length-(d-b);a.D=a.D.slice(0,b)+e+a.D.slice(d);a.A+=c|0;if(a._>=d){a._+=c|0}else if(a._>b){a._=b}return c|0};function b(a,f){var b;var c;var d;var e;b=false;if((c=a.C)<0||c>(d=a.B)||d>(e=a.A)||e>a.D.length?false:true){u(a,a.C,a.B,f);b=true}return b};g.prototype.J=function(){return false};g.prototype.Z=function(b){var a;var c;var d;var e;a=this.G['.'+b];if(a==null){c=this.D=b;d=this._=0;e=this.A=c.length;this.E=0;this.C=d;this.B=e;this.J();a=this.D;this.G['.'+b]=a}return a};g.prototype.stemWord=g.prototype.Z;g.prototype.a=function(e){var d;var b;var c;var a;var f;var g;var h;d=[];for(b=0;b=this.A){break a}this._++;break}continue b}this._=n;break b}t=this._=m;o=t;f=true;a:while(f===true){f=false;this.C=this._;if(!k(this,1,'y')){this._=o;break a}this.B=this._;if(!b(this,'Y')){return false}}a:while(true){p=this._;g=true;d:while(g===true){g=false;e:while(true){d=this._;h=true;b:while(h===true){h=false;if(!i(this,a.g_v,97,232)){break b}this.C=this._;j=true;f:while(j===true){j=false;s=this._;l=true;c:while(l===true){l=false;if(!k(this,1,'i')){break c}this.B=this._;if(!i(this,a.g_v,97,232)){break c}if(!b(this,'I')){return false}break f}this._=s;if(!k(this,1,'y')){break b}this.B=this._;if(!b(this,'Y')){return false}}this._=d;break e}r=this._=d;if(r>=this.A){break d}this._++}continue a}this._=p;break a}return true};a.prototype.r_prelude=a.prototype.W;function F(c){var d;var s;var t;var o;var p;var e;var n;var f;var g;var h;var j;var l;var m;var u;var r;s=c._;b:while(true){t=c._;f=true;a:while(f===true){f=false;c.C=c._;d=q(c,a.a_0,11);if(d===0){break a}c.B=c._;switch(d){case 0:break a;case 1:if(!b(c,'a')){return false}break;case 2:if(!b(c,'e')){return false}break;case 3:if(!b(c,'i')){return false}break;case 4:if(!b(c,'o')){return false}break;case 5:if(!b(c,'u')){return false}break;case 6:if(c._>=c.A){break a}c._++;break}continue b}c._=t;break b}u=c._=s;o=u;g=true;a:while(g===true){g=false;c.C=c._;if(!k(c,1,'y')){c._=o;break a}c.B=c._;if(!b(c,'Y')){return false}}a:while(true){p=c._;h=true;d:while(h===true){h=false;e:while(true){e=c._;j=true;b:while(j===true){j=false;if(!i(c,a.g_v,97,232)){break b}c.C=c._;l=true;f:while(l===true){l=false;n=c._;m=true;c:while(m===true){m=false;if(!k(c,1,'i')){break c}c.B=c._;if(!i(c,a.g_v,97,232)){break c}if(!b(c,'I')){return false}break f}c._=n;if(!k(c,1,'y')){break b}c.B=c._;if(!b(c,'Y')){return false}}c._=e;break e}r=c._=e;if(r>=c.A){break d}c._++}continue a}c._=p;break a}return true};a.prototype.U=function(){var b;var c;var d;var e;var f;var g;this.I_p1=g=this.A;this.I_p2=g;a:while(true){b=true;b:while(b===true){b=false;if(!i(this,a.g_v,97,232)){break b}break a}if(this._>=this.A){return false}this._++}a:while(true){c=true;b:while(c===true){c=false;if(!r(this,a.g_v,97,232)){break b}break a}if(this._>=this.A){return false}this._++}this.I_p1=this._;d=true;a:while(d===true){d=false;if(!(this.I_p1<3)){break a}this.I_p1=3}a:while(true){e=true;b:while(e===true){e=false;if(!i(this,a.g_v,97,232)){break b}break a}if(this._>=this.A){return false}this._++}a:while(true){f=true;b:while(f===true){f=false;if(!r(this,a.g_v,97,232)){break b}break a}if(this._>=this.A){return false}this._++}this.I_p2=this._;return true};a.prototype.r_mark_regions=a.prototype.U;function G(b){var c;var d;var e;var f;var g;var h;b.I_p1=h=b.A;b.I_p2=h;a:while(true){c=true;b:while(c===true){c=false;if(!i(b,a.g_v,97,232)){break b}break a}if(b._>=b.A){return false}b._++}a:while(true){d=true;b:while(d===true){d=false;if(!r(b,a.g_v,97,232)){break b}break a}if(b._>=b.A){return false}b._++}b.I_p1=b._;e=true;a:while(e===true){e=false;if(!(b.I_p1<3)){break a}b.I_p1=3}a:while(true){f=true;b:while(f===true){f=false;if(!i(b,a.g_v,97,232)){break b}break a}if(b._>=b.A){return false}b._++}a:while(true){g=true;b:while(g===true){g=false;if(!r(b,a.g_v,97,232)){break b}break a}if(b._>=b.A){return false}b._++}b.I_p2=b._;return true};a.prototype.V=function(){var c;var e;var d;b:while(true){e=this._;d=true;a:while(d===true){d=false;this.C=this._;c=q(this,a.a_1,3);if(c===0){break a}this.B=this._;switch(c){case 0:break a;case 1:if(!b(this,'y')){return false}break;case 2:if(!b(this,'i')){return false}break;case 3:if(this._>=this.A){break a}this._++;break}continue b}this._=e;break b}return true};a.prototype.r_postlude=a.prototype.V;function H(c){var d;var f;var e;b:while(true){f=c._;e=true;a:while(e===true){e=false;c.C=c._;d=q(c,a.a_1,3);if(d===0){break a}c.B=c._;switch(d){case 0:break a;case 1:if(!b(c,'y')){return false}break;case 2:if(!b(c,'i')){return false}break;case 3:if(c._>=c.A){break a}c._++;break}continue b}c._=f;break b}return true};a.prototype.Q=function(){return!(this.I_p1<=this._)?false:true};a.prototype.r_R1=a.prototype.Q;a.prototype.R=function(){return!(this.I_p2<=this._)?false:true};a.prototype.r_R2=a.prototype.R;a.prototype.Y=function(){var d;var c;d=this.A-this._;if(h(this,a.a_2,3)===0){return false}c=this._=this.A-d;this.B=c;if(c<=this.E){return false}this._--;this.C=this._;return!b(this,'')?false:true};a.prototype.r_undouble=a.prototype.Y;function j(c){var e;var d;e=c.A-c._;if(h(c,a.a_2,3)===0){return false}d=c._=c.A-e;c.B=d;if(d<=c.E){return false}c._--;c.C=c._;return!b(c,'')?false:true};a.prototype.S=function(){var c;var e;this.B_e_found=false;this.B=this._;if(!d(this,1,'e')){return false}this.C=e=this._;if(!(!(this.I_p1<=e)?false:true)){return false}c=this.A-this._;if(!f(this,a.g_v,97,232)){return false}this._=this.A-c;if(!b(this,'')){return false}this.B_e_found=true;return!j(this)?false:true};a.prototype.r_e_ending=a.prototype.S;function o(c){var e;var g;c.B_e_found=false;c.B=c._;if(!d(c,1,'e')){return false}c.C=g=c._;if(!(!(c.I_p1<=g)?false:true)){return false}e=c.A-c._;if(!f(c,a.g_v,97,232)){return false}c._=c.A-e;if(!b(c,'')){return false}c.B_e_found=true;return!j(c)?false:true};a.prototype.T=function(){var e;var g;var c;var h;var i;if(!(!(this.I_p1<=this._)?false:true)){return false}e=this.A-this._;if(!f(this,a.g_v,97,232)){return false}i=this._=(h=this.A)-e;g=h-i;c=true;a:while(c===true){c=false;if(!d(this,3,'gem')){break a}return false}this._=this.A-g;return!b(this,'')?false:!j(this)?false:true};a.prototype.r_en_ending=a.prototype.T;function p(c){var g;var h;var e;var i;var k;if(!(!(c.I_p1<=c._)?false:true)){return false}g=c.A-c._;if(!f(c,a.g_v,97,232)){return false}k=c._=(i=c.A)-g;h=i-k;e=true;a:while(e===true){e=false;if(!d(c,3,'gem')){break a}return false}c._=c.A-h;return!b(c,'')?false:!j(c)?false:true};a.prototype.X=function(){var c;var v;var w;var x;var y;var z;var A;var B;var C;var D;var M;var m;var g;var i;var k;var l;var e;var n;var q;var r;var s;var E;var F;var G;var H;var I;var J;var K;var L;var t;var N;var u;v=this.A-this._;m=true;a:while(m===true){m=false;this.B=this._;c=h(this,a.a_3,5);if(c===0){break a}this.C=this._;switch(c){case 0:break a;case 1:if(!(!(this.I_p1<=this._)?false:true)){break a}if(!b(this,'heid')){return false}break;case 2:if(!p(this)){break a}break;case 3:if(!(!(this.I_p1<=this._)?false:true)){break a}if(!f(this,a.g_v_j,97,232)){break a}if(!b(this,'')){return false}break}}F=this._=(E=this.A)-v;w=E-F;g=true;a:while(g===true){g=false;if(!o(this)){break a}}I=this._=(H=this.A)-w;x=H-I;i=true;a:while(i===true){i=false;this.B=this._;if(!d(this,4,'heid')){break a}this.C=G=this._;if(!(!(this.I_p2<=G)?false:true)){break a}y=this.A-this._;k=true;b:while(k===true){k=false;if(!d(this,1,'c')){break b}break a}this._=this.A-y;if(!b(this,'')){return false}this.B=this._;if(!d(this,2,'en')){break a}this.C=this._;if(!p(this)){break a}}L=this._=(K=this.A)-x;z=K-L;l=true;a:while(l===true){l=false;this.B=this._;c=h(this,a.a_4,6);if(c===0){break a}this.C=this._;switch(c){case 0:break a;case 1:if(!(!(this.I_p2<=this._)?false:true)){break a}if(!b(this,'')){return false}e=true;c:while(e===true){e=false;A=this.A-this._;n=true;b:while(n===true){n=false;this.B=this._;if(!d(this,2,'ig')){break b}this.C=J=this._;if(!(!(this.I_p2<=J)?false:true)){break b}B=this.A-this._;q=true;d:while(q===true){q=false;if(!d(this,1,'e')){break d}break b}this._=this.A-B;if(!b(this,'')){return false}break c}this._=this.A-A;if(!j(this)){break a}}break;case 2:if(!(!(this.I_p2<=this._)?false:true)){break a}C=this.A-this._;r=true;b:while(r===true){r=false;if(!d(this,1,'e')){break b}break a}this._=this.A-C;if(!b(this,'')){return false}break;case 3:if(!(!(this.I_p2<=this._)?false:true)){break a}if(!b(this,'')){return false}if(!o(this)){break a}break;case 4:if(!(!(this.I_p2<=this._)?false:true)){break a}if(!b(this,'')){return false}break;case 5:if(!(!(this.I_p2<=this._)?false:true)){break a}if(!this.B_e_found){break a}if(!b(this,'')){return false}break}}u=this._=(N=this.A)-z;D=N-u;s=true;a:while(s===true){s=false;if(!f(this,a.g_v_I,73,232)){break a}M=this.A-this._;if(h(this,a.a_5,4)===0){break a}if(!f(this,a.g_v,97,232)){break a}t=this._=this.A-M;this.B=t;if(t<=this.E){break a}this._--;this.C=this._;if(!b(this,'')){return false}}this._=this.A-D;return true};a.prototype.r_standard_suffix=a.prototype.X;function J(c){var e;var w;var x;var y;var z;var A;var B;var C;var D;var E;var N;var g;var i;var k;var l;var m;var n;var q;var r;var s;var t;var F;var G;var H;var I;var J;var K;var L;var M;var u;var O;var v;w=c.A-c._;g=true;a:while(g===true){g=false;c.B=c._;e=h(c,a.a_3,5);if(e===0){break a}c.C=c._;switch(e){case 0:break a;case 1:if(!(!(c.I_p1<=c._)?false:true)){break a}if(!b(c,'heid')){return false}break;case 2:if(!p(c)){break a}break;case 3:if(!(!(c.I_p1<=c._)?false:true)){break a}if(!f(c,a.g_v_j,97,232)){break a}if(!b(c,'')){return false}break}}G=c._=(F=c.A)-w;x=F-G;i=true;a:while(i===true){i=false;if(!o(c)){break a}}J=c._=(I=c.A)-x;y=I-J;k=true;a:while(k===true){k=false;c.B=c._;if(!d(c,4,'heid')){break a}c.C=H=c._;if(!(!(c.I_p2<=H)?false:true)){break a}z=c.A-c._;l=true;b:while(l===true){l=false;if(!d(c,1,'c')){break b}break a}c._=c.A-z;if(!b(c,'')){return false}c.B=c._;if(!d(c,2,'en')){break a}c.C=c._;if(!p(c)){break a}}M=c._=(L=c.A)-y;A=L-M;m=true;a:while(m===true){m=false;c.B=c._;e=h(c,a.a_4,6);if(e===0){break a}c.C=c._;switch(e){case 0:break a;case 1:if(!(!(c.I_p2<=c._)?false:true)){break a}if(!b(c,'')){return false}n=true;c:while(n===true){n=false;B=c.A-c._;q=true;b:while(q===true){q=false;c.B=c._;if(!d(c,2,'ig')){break b}c.C=K=c._;if(!(!(c.I_p2<=K)?false:true)){break b}C=c.A-c._;r=true;d:while(r===true){r=false;if(!d(c,1,'e')){break d}break b}c._=c.A-C;if(!b(c,'')){return false}break c}c._=c.A-B;if(!j(c)){break a}}break;case 2:if(!(!(c.I_p2<=c._)?false:true)){break a}D=c.A-c._;s=true;b:while(s===true){s=false;if(!d(c,1,'e')){break b}break a}c._=c.A-D;if(!b(c,'')){return false}break;case 3:if(!(!(c.I_p2<=c._)?false:true)){break a}if(!b(c,'')){return false}if(!o(c)){break a}break;case 4:if(!(!(c.I_p2<=c._)?false:true)){break a}if(!b(c,'')){return false}break;case 5:if(!(!(c.I_p2<=c._)?false:true)){break a}if(!c.B_e_found){break a}if(!b(c,'')){return false}break}}v=c._=(O=c.A)-A;E=O-v;t=true;a:while(t===true){t=false;if(!f(c,a.g_v_I,73,232)){break a}N=c.A-c._;if(h(c,a.a_5,4)===0){break a}if(!f(c,a.g_v,97,232)){break a}u=c._=c.A-N;c.B=u;if(u<=c.E){break a}c._--;c.C=c._;if(!b(c,'')){return false}}c._=c.A-E;return true};a.prototype.J=function(){var f;var g;var h;var b;var a;var c;var d;var i;var j;var e;f=this._;b=true;a:while(b===true){b=false;if(!F(this)){break a}}i=this._=f;g=i;a=true;a:while(a===true){a=false;if(!G(this)){break a}}j=this._=g;this.E=j;this._=this.A;c=true;a:while(c===true){c=false;if(!J(this)){break a}}e=this._=this.E;h=e;d=true;a:while(d===true){d=false;if(!H(this)){break a}}this._=h;return true};a.prototype.stem=a.prototype.J;a.prototype.N=function(b){return b instanceof a};a.prototype.equals=a.prototype.N;a.prototype.O=function(){var c;var a;var b;var d;c='DutchStemmer';a=0;for(b=0;b None: diff --git a/sphinx/search/no.py b/sphinx/search/no.py index c78bb698162..db79452316e 100644 --- a/sphinx/search/no.py +++ b/sphinx/search/no.py @@ -194,17 +194,11 @@ vart | became * ''') -js_stemmer = """ -var JSX={};(function(g){function i(b,e){var a=function(){};a.prototype=e.prototype;var c=new a;for(var d in b){b[d].prototype=c}}function G(c,b){for(var a in b.prototype)if(b.prototype.hasOwnProperty(a))c.prototype[a]=b.prototype[a]}function e(a,b,d){function c(a,b,c){delete a[b];a[b]=c;return c}Object.defineProperty(a,b,{get:function(){return c(a,b,d())},set:function(d){c(a,b,d)},enumerable:true,configurable:true})}function H(a,b,c){return a[b]=a[b]/c|0}var B=parseInt;var q=parseFloat;function I(a){return a!==a}var y=isFinite;var x=encodeURIComponent;var w=decodeURIComponent;var u=encodeURI;var t=decodeURI;var s=Object.prototype.toString;var r=Object.prototype.hasOwnProperty;function h(){}g.require=function(b){var a=m[b];return a!==undefined?a:null};g.profilerIsRunning=function(){return h.getResults!=null};g.getProfileResults=function(){return(h.getResults||function(){return{}})()};g.postProfileResults=function(a,b){if(h.postResults==null)throw new Error('profiler has not been turned on');return h.postResults(a,b)};g.resetProfileResults=function(){if(h.resetResults==null)throw new Error('profiler has not been turned on');return h.resetResults()};g.DEBUG=false;function A(){};i([A],Error);function b(a,b,c){this.G=a.length;this.R=a;this.U=b;this.J=c;this.I=null;this.V=null};i([b],Object);function j(){};i([j],Object);function d(){var a;var b;var c;this.F={};a=this.C='';b=this._=0;c=this.A=a.length;this.B=0;this.D=b;this.E=c};i([d],j);function v(a,b){a.C=b.C;a._=b._;a.A=b.A;a.B=b.B;a.D=b.D;a.E=b.E};function l(b,d,c,e){var a;if(b._>=b.A){return false}a=b.C.charCodeAt(b._);if(a>e||a>>3]&1<<(a&7))===0){return false}b._++;return true};function k(b,d,c,e){var a;if(b._<=b.B){return false}a=b.C.charCodeAt(b._-1);if(a>e||a>>3]&1<<(a&7))===0){return false}b._--;return true};function p(a,d,c,e){var b;if(a._>=a.A){return false}b=a.C.charCodeAt(a._);if(b>e||b>>3]&1<<(b&7))===0){a._++;return true}return false};function o(a,d,c,e){var b;if(a._<=a.B){return false}b=a.C.charCodeAt(a._-1);if(b>e||b>>3]&1<<(b&7))===0){a._--;return true}return false};function n(a,b,d){var c;if(a._-a.B>1);h=0;c=f=0;j--){if(e-c===n){h=-1;break}h=d.C.charCodeAt(e-1-c)-a.R.charCodeAt(j);if(h!==0){break}c++}if(h<0){g=i;k=c}else{b=i;f=c}if(g-b<=1){if(b>0){break}if(g===b){break}if(l){break}l=true}}while(true){a=m[b];if(f>=a.G){d._=e-a.G|0;if(a.I==null){return a.J}o=a.I(d);d._=e-a.G|0;if(o){return a.J}}b=a.U;if(b<0){return 0}}return-1};function C(a,b,d,e){var c;c=e.length-(d-b);a.C=a.C.slice(0,b)+e+a.C.slice(d);a.A+=c|0;if(a._>=d){a._+=c|0}else if(a._>b){a._=b}return c|0};function c(a,f){var b;var c;var d;var e;b=false;if((c=a.D)<0||c>(d=a.E)||d>(e=a.A)||e>a.C.length?false:true){C(a,a.D,a.E,f);b=true}return b};d.prototype.H=function(){return false};d.prototype.S=function(b){var a;var c;var d;var e;a=this.F['.'+b];if(a==null){c=this.C=b;d=this._=0;e=this.A=c.length;this.B=0;this.D=d;this.E=e;this.H();a=this.C;this.F['.'+b]=a}return a};d.prototype.stemWord=d.prototype.S;d.prototype.T=function(e){var d;var b;var c;var a;var f;var g;var h;d=[];for(b=0;bb||b>j){return false}h=this._=b;this.I_x=h;this._=g;a:while(true){d=this._;e=true;b:while(e===true){e=false;if(!l(this,a.g_v,97,248)){break b}this._=d;break a}k=this._=d;if(k>=this.A){return false}this._++}a:while(true){c=true;b:while(c===true){c=false;if(!p(this,a.g_v,97,248)){break b}break a}if(this._>=this.A){return false}this._++}this.I_p1=this._;f=true;a:while(f===true){f=false;if(!(this.I_p1c||c>k){return false}i=b._=c;b.I_x=i;b._=h;a:while(true){e=b._;f=true;b:while(f===true){f=false;if(!l(b,a.g_v,97,248)){break b}b._=e;break a}m=b._=e;if(m>=b.A){return false}b._++}a:while(true){d=true;b:while(d===true){d=false;if(!p(b,a.g_v,97,248)){break b}break a}if(b._>=b.A){return false}b._++}b.I_p1=b._;g=true;a:while(g===true){g=false;if(!(b.I_p1 None: diff --git a/sphinx/search/non-minified-js/base-stemmer.js b/sphinx/search/non-minified-js/base-stemmer.js new file mode 100644 index 00000000000..ca6cca156a3 --- /dev/null +++ b/sphinx/search/non-minified-js/base-stemmer.js @@ -0,0 +1,294 @@ +/**@constructor*/ +BaseStemmer = function() { + this.setCurrent = function(value) { + this.current = value; + this.cursor = 0; + this.limit = this.current.length; + this.limit_backward = 0; + this.bra = this.cursor; + this.ket = this.limit; + }; + + this.getCurrent = function() { + return this.current; + }; + + this.copy_from = function(other) { + this.current = other.current; + this.cursor = other.cursor; + this.limit = other.limit; + this.limit_backward = other.limit_backward; + this.bra = other.bra; + this.ket = other.ket; + }; + + this.in_grouping = function(s, min, max) { + if (this.cursor >= this.limit) return false; + var ch = this.current.charCodeAt(this.cursor); + if (ch > max || ch < min) return false; + ch -= min; + if ((s[ch >>> 3] & (0x1 << (ch & 0x7))) == 0) return false; + this.cursor++; + return true; + }; + + this.in_grouping_b = function(s, min, max) { + if (this.cursor <= this.limit_backward) return false; + var ch = this.current.charCodeAt(this.cursor - 1); + if (ch > max || ch < min) return false; + ch -= min; + if ((s[ch >>> 3] & (0x1 << (ch & 0x7))) == 0) return false; + this.cursor--; + return true; + }; + + this.out_grouping = function(s, min, max) { + if (this.cursor >= this.limit) return false; + var ch = this.current.charCodeAt(this.cursor); + if (ch > max || ch < min) { + this.cursor++; + return true; + } + ch -= min; + if ((s[ch >>> 3] & (0X1 << (ch & 0x7))) == 0) { + this.cursor++; + return true; + } + return false; + }; + + this.out_grouping_b = function(s, min, max) { + if (this.cursor <= this.limit_backward) return false; + var ch = this.current.charCodeAt(this.cursor - 1); + if (ch > max || ch < min) { + this.cursor--; + return true; + } + ch -= min; + if ((s[ch >>> 3] & (0x1 << (ch & 0x7))) == 0) { + this.cursor--; + return true; + } + return false; + }; + + this.eq_s = function(s) + { + if (this.limit - this.cursor < s.length) return false; + if (this.current.slice(this.cursor, this.cursor + s.length) != s) + { + return false; + } + this.cursor += s.length; + return true; + }; + + this.eq_s_b = function(s) + { + if (this.cursor - this.limit_backward < s.length) return false; + if (this.current.slice(this.cursor - s.length, this.cursor) != s) + { + return false; + } + this.cursor -= s.length; + return true; + }; + + /** @return {number} */ this.find_among = function(v) + { + var i = 0; + var j = v.length; + + var c = this.cursor; + var l = this.limit; + + var common_i = 0; + var common_j = 0; + + var first_key_inspected = false; + + while (true) + { + var k = i + ((j - i) >>> 1); + var diff = 0; + var common = common_i < common_j ? common_i : common_j; // smaller + // w[0]: string, w[1]: substring_i, w[2]: result, w[3]: function (optional) + var w = v[k]; + var i2; + for (i2 = common; i2 < w[0].length; i2++) + { + if (c + common == l) + { + diff = -1; + break; + } + diff = this.current.charCodeAt(c + common) - w[0].charCodeAt(i2); + if (diff != 0) break; + common++; + } + if (diff < 0) + { + j = k; + common_j = common; + } + else + { + i = k; + common_i = common; + } + if (j - i <= 1) + { + if (i > 0) break; // v->s has been inspected + if (j == i) break; // only one item in v + + // - but now we need to go round once more to get + // v->s inspected. This looks messy, but is actually + // the optimal approach. + + if (first_key_inspected) break; + first_key_inspected = true; + } + } + do { + var w = v[i]; + if (common_i >= w[0].length) + { + this.cursor = c + w[0].length; + if (w.length < 4) return w[2]; + var res = w[3](this); + this.cursor = c + w[0].length; + if (res) return w[2]; + } + i = w[1]; + } while (i >= 0); + return 0; + }; + + // find_among_b is for backwards processing. Same comments apply + this.find_among_b = function(v) + { + var i = 0; + var j = v.length + + var c = this.cursor; + var lb = this.limit_backward; + + var common_i = 0; + var common_j = 0; + + var first_key_inspected = false; + + while (true) + { + var k = i + ((j - i) >> 1); + var diff = 0; + var common = common_i < common_j ? common_i : common_j; + var w = v[k]; + var i2; + for (i2 = w[0].length - 1 - common; i2 >= 0; i2--) + { + if (c - common == lb) + { + diff = -1; + break; + } + diff = this.current.charCodeAt(c - 1 - common) - w[0].charCodeAt(i2); + if (diff != 0) break; + common++; + } + if (diff < 0) + { + j = k; + common_j = common; + } + else + { + i = k; + common_i = common; + } + if (j - i <= 1) + { + if (i > 0) break; + if (j == i) break; + if (first_key_inspected) break; + first_key_inspected = true; + } + } + do { + var w = v[i]; + if (common_i >= w[0].length) + { + this.cursor = c - w[0].length; + if (w.length < 4) return w[2]; + var res = w[3](this); + this.cursor = c - w[0].length; + if (res) return w[2]; + } + i = w[1]; + } while (i >= 0); + return 0; + }; + + /* to replace chars between c_bra and c_ket in this.current by the + * chars in s. + */ + this.replace_s = function(c_bra, c_ket, s) + { + var adjustment = s.length - (c_ket - c_bra); + this.current = this.current.slice(0, c_bra) + s + this.current.slice(c_ket); + this.limit += adjustment; + if (this.cursor >= c_ket) this.cursor += adjustment; + else if (this.cursor > c_bra) this.cursor = c_bra; + return adjustment; + }; + + this.slice_check = function() + { + if (this.bra < 0 || + this.bra > this.ket || + this.ket > this.limit || + this.limit > this.current.length) + { + return false; + } + return true; + }; + + this.slice_from = function(s) + { + var result = false; + if (this.slice_check()) + { + this.replace_s(this.bra, this.ket, s); + result = true; + } + return result; + }; + + this.slice_del = function() + { + return this.slice_from(""); + }; + + this.insert = function(c_bra, c_ket, s) + { + var adjustment = this.replace_s(c_bra, c_ket, s); + if (c_bra <= this.bra) this.bra += adjustment; + if (c_bra <= this.ket) this.ket += adjustment; + }; + + this.slice_to = function() + { + var result = ''; + if (this.slice_check()) + { + result = this.current.slice(this.bra, this.ket); + } + return result; + }; + + this.assign_to = function() + { + return this.current.slice(0, this.limit); + }; +}; diff --git a/sphinx/search/non-minified-js/danish-stemmer.js b/sphinx/search/non-minified-js/danish-stemmer.js index 36943d22ae8..46b5d55b0e1 100644 --- a/sphinx/search/non-minified-js/danish-stemmer.js +++ b/sphinx/search/non-minified-js/danish-stemmer.js @@ -1,1873 +1,310 @@ -// generatedy by JSX compiler 0.9.89 (2014-05-20 06:01:03 +0900; 8e8c6105f36f3dfe440ea026a3c93a3444977102) -var JSX = {}; -(function (JSX) { -/** - * extends the class - */ -function $__jsx_extend(derivations, base) { - var ctor = function () {}; - ctor.prototype = base.prototype; - var proto = new ctor(); - for (var i in derivations) { - derivations[i].prototype = proto; - } -} - -/** - * copies the implementations from source interface to target - */ -function $__jsx_merge_interface(target, source) { - for (var k in source.prototype) - if (source.prototype.hasOwnProperty(k)) - target.prototype[k] = source.prototype[k]; -} - -/** - * defers the initialization of the property - */ -function $__jsx_lazy_init(obj, prop, func) { - function reset(obj, prop, value) { - delete obj[prop]; - obj[prop] = value; - return value; - } - - Object.defineProperty(obj, prop, { - get: function () { - return reset(obj, prop, func()); - }, - set: function (v) { - reset(obj, prop, v); - }, - enumerable: true, - configurable: true - }); -} - -var $__jsx_imul = Math.imul; -if (typeof $__jsx_imul === "undefined") { - $__jsx_imul = function (a, b) { - var ah = (a >>> 16) & 0xffff; - var al = a & 0xffff; - var bh = (b >>> 16) & 0xffff; - var bl = b & 0xffff; - return ((al * bl) + (((ah * bl + al * bh) << 16) >>> 0)|0); - }; -} - -/** - * fused int-ops with side-effects - */ -function $__jsx_ipadd(o, p, r) { - return o[p] = (o[p] + r) | 0; -} -function $__jsx_ipsub(o, p, r) { - return o[p] = (o[p] - r) | 0; -} -function $__jsx_ipmul(o, p, r) { - return o[p] = $__jsx_imul(o[p], r); -} -function $__jsx_ipdiv(o, p, r) { - return o[p] = (o[p] / r) | 0; -} -function $__jsx_ipmod(o, p, r) { - return o[p] = (o[p] % r) | 0; -} -function $__jsx_ippostinc(o, p) { - var v = o[p]; - o[p] = (v + 1) | 0; - return v; -} -function $__jsx_ippostdec(o, p) { - var v = o[p]; - o[p] = (v - 1) | 0; - return v; -} - -/** - * non-inlined version of Array#each - */ -function $__jsx_forEach(o, f) { - var l = o.length; - for (var i = 0; i < l; ++i) - f(o[i]); -} - -/* - * global functions, renamed to avoid conflict with local variable names - */ -var $__jsx_parseInt = parseInt; -var $__jsx_parseFloat = parseFloat; -function $__jsx_isNaN(n) { return n !== n; } -var $__jsx_isFinite = isFinite; - -var $__jsx_encodeURIComponent = encodeURIComponent; -var $__jsx_decodeURIComponent = decodeURIComponent; -var $__jsx_encodeURI = encodeURI; -var $__jsx_decodeURI = decodeURI; - -var $__jsx_ObjectToString = Object.prototype.toString; -var $__jsx_ObjectHasOwnProperty = Object.prototype.hasOwnProperty; - -/* - * profiler object, initialized afterwards - */ -function $__jsx_profiler() { -} - -/* - * public interface to JSX code - */ -JSX.require = function (path) { - var m = $__jsx_classMap[path]; - return m !== undefined ? m : null; -}; - -JSX.profilerIsRunning = function () { - return $__jsx_profiler.getResults != null; -}; - -JSX.getProfileResults = function () { - return ($__jsx_profiler.getResults || function () { return {}; })(); -}; - -JSX.postProfileResults = function (url, cb) { - if ($__jsx_profiler.postResults == null) - throw new Error("profiler has not been turned on"); - return $__jsx_profiler.postResults(url, cb); -}; - -JSX.resetProfileResults = function () { - if ($__jsx_profiler.resetResults == null) - throw new Error("profiler has not been turned on"); - return $__jsx_profiler.resetResults(); -}; -JSX.DEBUG = false; -var GeneratorFunction$0 = -(function () { - try { - return Function('import {GeneratorFunction} from "std:iteration"; return GeneratorFunction')(); - } catch (e) { - return function GeneratorFunction () {}; - } -})(); -var __jsx_generator_object$0 = -(function () { - function __jsx_generator_object() { - this.__next = 0; - this.__loop = null; - this.__seed = null; - this.__value = undefined; - this.__status = 0; // SUSPENDED: 0, ACTIVE: 1, DEAD: 2 - } - - __jsx_generator_object.prototype.next = function (seed) { - switch (this.__status) { - case 0: - this.__status = 1; - this.__seed = seed; - - // go next! - this.__loop(this.__next); - - var done = false; - if (this.__next != -1) { - this.__status = 0; - } else { - this.__status = 2; - done = true; - } - return { value: this.__value, done: done }; - case 1: - throw new Error("Generator is already running"); - case 2: - throw new Error("Generator is already finished"); - default: - throw new Error("Unexpected generator internal state"); - } - }; - - return __jsx_generator_object; -}()); -function Among(s, substring_i, result) { - this.s_size = s.length; - this.s = s; - this.substring_i = substring_i; - this.result = result; - this.method = null; - this.instance = null; -}; - -function Among$0(s, substring_i, result, method, instance) { - this.s_size = s.length; - this.s = s; - this.substring_i = substring_i; - this.result = result; - this.method = method; - this.instance = instance; -}; - -$__jsx_extend([Among, Among$0], Object); -function Stemmer() { -}; - -$__jsx_extend([Stemmer], Object); -function BaseStemmer() { - var current$0; - var cursor$0; - var limit$0; - this.cache = ({ }); - current$0 = this.current = ""; - cursor$0 = this.cursor = 0; - limit$0 = this.limit = current$0.length; - this.limit_backward = 0; - this.bra = cursor$0; - this.ket = limit$0; -}; - -$__jsx_extend([BaseStemmer], Stemmer); -BaseStemmer.prototype.setCurrent$S = function (value) { - var current$0; - var cursor$0; - var limit$0; - current$0 = this.current = value; - cursor$0 = this.cursor = 0; - limit$0 = this.limit = current$0.length; - this.limit_backward = 0; - this.bra = cursor$0; - this.ket = limit$0; -}; - - -function BaseStemmer$setCurrent$LBaseStemmer$S($this, value) { - var current$0; - var cursor$0; - var limit$0; - current$0 = $this.current = value; - cursor$0 = $this.cursor = 0; - limit$0 = $this.limit = current$0.length; - $this.limit_backward = 0; - $this.bra = cursor$0; - $this.ket = limit$0; -}; - -BaseStemmer.setCurrent$LBaseStemmer$S = BaseStemmer$setCurrent$LBaseStemmer$S; - -BaseStemmer.prototype.getCurrent$ = function () { - return this.current; -}; - - -function BaseStemmer$getCurrent$LBaseStemmer$($this) { - return $this.current; -}; - -BaseStemmer.getCurrent$LBaseStemmer$ = BaseStemmer$getCurrent$LBaseStemmer$; - -BaseStemmer.prototype.copy_from$LBaseStemmer$ = function (other) { - this.current = other.current; - this.cursor = other.cursor; - this.limit = other.limit; - this.limit_backward = other.limit_backward; - this.bra = other.bra; - this.ket = other.ket; -}; - - -function BaseStemmer$copy_from$LBaseStemmer$LBaseStemmer$($this, other) { - $this.current = other.current; - $this.cursor = other.cursor; - $this.limit = other.limit; - $this.limit_backward = other.limit_backward; - $this.bra = other.bra; - $this.ket = other.ket; -}; - -BaseStemmer.copy_from$LBaseStemmer$LBaseStemmer$ = BaseStemmer$copy_from$LBaseStemmer$LBaseStemmer$; - -BaseStemmer.prototype.in_grouping$AIII = function (s, min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor >= this.limit) { - return false; - } - ch = this.current.charCodeAt(this.cursor); - if (ch > max || ch < min) { - return false; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$in_grouping$LBaseStemmer$AIII($this, s, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor >= $this.limit) { - return false; - } - ch = $this.current.charCodeAt($this.cursor); - if (ch > max || ch < min) { - return false; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.in_grouping$LBaseStemmer$AIII = BaseStemmer$in_grouping$LBaseStemmer$AIII; - -BaseStemmer.prototype.in_grouping_b$AIII = function (s, min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor <= this.limit_backward) { - return false; - } - ch = this.current.charCodeAt(this.cursor - 1); - if (ch > max || ch < min) { - return false; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$in_grouping_b$LBaseStemmer$AIII($this, s, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor <= $this.limit_backward) { - return false; - } - ch = $this.current.charCodeAt($this.cursor - 1); - if (ch > max || ch < min) { - return false; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.in_grouping_b$LBaseStemmer$AIII = BaseStemmer$in_grouping_b$LBaseStemmer$AIII; - -BaseStemmer.prototype.out_grouping$AIII = function (s, min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor >= this.limit) { - return false; - } - ch = this.current.charCodeAt(this.cursor); - if (ch > max || ch < min) { - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; - } - ch -= min; - if ((s[ch >>> 3] & 0X1 << (ch & 0x7)) === 0) { - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; - } - return false; -}; - - -function BaseStemmer$out_grouping$LBaseStemmer$AIII($this, s, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor >= $this.limit) { - return false; - } - ch = $this.current.charCodeAt($this.cursor); - if (ch > max || ch < min) { - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; - } - ch -= min; - if ((s[ch >>> 3] & 0X1 << (ch & 0x7)) === 0) { - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; - } - return false; -}; - -BaseStemmer.out_grouping$LBaseStemmer$AIII = BaseStemmer$out_grouping$LBaseStemmer$AIII; - -BaseStemmer.prototype.out_grouping_b$AIII = function (s, min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor <= this.limit_backward) { - return false; - } - ch = this.current.charCodeAt(this.cursor - 1); - if (ch > max || ch < min) { - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; - } - return false; -}; - - -function BaseStemmer$out_grouping_b$LBaseStemmer$AIII($this, s, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor <= $this.limit_backward) { - return false; - } - ch = $this.current.charCodeAt($this.cursor - 1); - if (ch > max || ch < min) { - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; - } - return false; -}; - -BaseStemmer.out_grouping_b$LBaseStemmer$AIII = BaseStemmer$out_grouping_b$LBaseStemmer$AIII; - -BaseStemmer.prototype.in_range$II = function (min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor >= this.limit) { - return false; - } - ch = this.current.charCodeAt(this.cursor); - if (ch > max || ch < min) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$in_range$LBaseStemmer$II($this, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor >= $this.limit) { - return false; - } - ch = $this.current.charCodeAt($this.cursor); - if (ch > max || ch < min) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.in_range$LBaseStemmer$II = BaseStemmer$in_range$LBaseStemmer$II; - -BaseStemmer.prototype.in_range_b$II = function (min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor <= this.limit_backward) { - return false; - } - ch = this.current.charCodeAt(this.cursor - 1); - if (ch > max || ch < min) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$in_range_b$LBaseStemmer$II($this, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor <= $this.limit_backward) { - return false; - } - ch = $this.current.charCodeAt($this.cursor - 1); - if (ch > max || ch < min) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.in_range_b$LBaseStemmer$II = BaseStemmer$in_range_b$LBaseStemmer$II; - -BaseStemmer.prototype.out_range$II = function (min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor >= this.limit) { - return false; - } - ch = this.current.charCodeAt(this.cursor); - if (! (ch > max || ch < min)) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$out_range$LBaseStemmer$II($this, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor >= $this.limit) { - return false; - } - ch = $this.current.charCodeAt($this.cursor); - if (! (ch > max || ch < min)) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.out_range$LBaseStemmer$II = BaseStemmer$out_range$LBaseStemmer$II; - -BaseStemmer.prototype.out_range_b$II = function (min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor <= this.limit_backward) { - return false; - } - ch = this.current.charCodeAt(this.cursor - 1); - if (! (ch > max || ch < min)) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$out_range_b$LBaseStemmer$II($this, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor <= $this.limit_backward) { - return false; - } - ch = $this.current.charCodeAt($this.cursor - 1); - if (! (ch > max || ch < min)) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.out_range_b$LBaseStemmer$II = BaseStemmer$out_range_b$LBaseStemmer$II; - -BaseStemmer.prototype.eq_s$IS = function (s_size, s) { - var cursor$0; - if (((this.limit - this.cursor) | 0) < s_size) { - return false; - } - if (this.current.slice(cursor$0 = this.cursor, ((cursor$0 + s_size) | 0)) !== s) { - return false; - } - this.cursor = (this.cursor + s_size) | 0; - return true; -}; - - -function BaseStemmer$eq_s$LBaseStemmer$IS($this, s_size, s) { - var cursor$0; - if ((($this.limit - $this.cursor) | 0) < s_size) { - return false; - } - if ($this.current.slice(cursor$0 = $this.cursor, ((cursor$0 + s_size) | 0)) !== s) { - return false; - } - $this.cursor = ($this.cursor + s_size) | 0; - return true; -}; - -BaseStemmer.eq_s$LBaseStemmer$IS = BaseStemmer$eq_s$LBaseStemmer$IS; - -BaseStemmer.prototype.eq_s_b$IS = function (s_size, s) { - var cursor$0; - if (((this.cursor - this.limit_backward) | 0) < s_size) { - return false; - } - if (this.current.slice((((cursor$0 = this.cursor) - s_size) | 0), cursor$0) !== s) { - return false; - } - this.cursor = (this.cursor - s_size) | 0; - return true; -}; - - -function BaseStemmer$eq_s_b$LBaseStemmer$IS($this, s_size, s) { - var cursor$0; - if ((($this.cursor - $this.limit_backward) | 0) < s_size) { - return false; - } - if ($this.current.slice((((cursor$0 = $this.cursor) - s_size) | 0), cursor$0) !== s) { - return false; - } - $this.cursor = ($this.cursor - s_size) | 0; - return true; -}; - -BaseStemmer.eq_s_b$LBaseStemmer$IS = BaseStemmer$eq_s_b$LBaseStemmer$IS; - -BaseStemmer.prototype.eq_v$S = function (s) { - return BaseStemmer$eq_s$LBaseStemmer$IS(this, s.length, s); -}; - - -function BaseStemmer$eq_v$LBaseStemmer$S($this, s) { - return BaseStemmer$eq_s$LBaseStemmer$IS($this, s.length, s); +// Generated by Snowball 2.1.0 - https://snowballstem.org/ + +/**@constructor*/ +DanishStemmer = function() { + var base = new BaseStemmer(); + /** @const */ var a_0 = [ + ["hed", -1, 1], + ["ethed", 0, 1], + ["ered", -1, 1], + ["e", -1, 1], + ["erede", 3, 1], + ["ende", 3, 1], + ["erende", 5, 1], + ["ene", 3, 1], + ["erne", 3, 1], + ["ere", 3, 1], + ["en", -1, 1], + ["heden", 10, 1], + ["eren", 10, 1], + ["er", -1, 1], + ["heder", 13, 1], + ["erer", 13, 1], + ["s", -1, 2], + ["heds", 16, 1], + ["es", 16, 1], + ["endes", 18, 1], + ["erendes", 19, 1], + ["enes", 18, 1], + ["ernes", 18, 1], + ["eres", 18, 1], + ["ens", 16, 1], + ["hedens", 24, 1], + ["erens", 24, 1], + ["ers", 16, 1], + ["ets", 16, 1], + ["erets", 28, 1], + ["et", -1, 1], + ["eret", 30, 1] + ]; + + /** @const */ var a_1 = [ + ["gd", -1, -1], + ["dt", -1, -1], + ["gt", -1, -1], + ["kt", -1, -1] + ]; + + /** @const */ var a_2 = [ + ["ig", -1, 1], + ["lig", 0, 1], + ["elig", 1, 1], + ["els", -1, 1], + ["l\u00F8st", -1, 2] + ]; + + /** @const */ var /** Array */ g_c = [119, 223, 119, 1]; + + /** @const */ var /** Array */ g_v = [17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 128]; + + /** @const */ var /** Array */ g_s_ending = [239, 254, 42, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16]; + + var /** number */ I_x = 0; + var /** number */ I_p1 = 0; + var /** string */ S_ch = ''; + + + /** @return {boolean} */ + function r_mark_regions() { + I_p1 = base.limit; + var /** number */ v_1 = base.cursor; + { + var /** number */ c1 = base.cursor + 3; + if (c1 > base.limit) + { + return false; + } + base.cursor = c1; + } + I_x = base.cursor; + base.cursor = v_1; + golab0: while(true) + { + var /** number */ v_2 = base.cursor; + lab1: { + if (!(base.in_grouping(g_v, 97, 248))) + { + break lab1; + } + base.cursor = v_2; + break golab0; + } + base.cursor = v_2; + if (base.cursor >= base.limit) + { + return false; + } + base.cursor++; + } + golab2: while(true) + { + lab3: { + if (!(base.out_grouping(g_v, 97, 248))) + { + break lab3; + } + break golab2; + } + if (base.cursor >= base.limit) + { + return false; + } + base.cursor++; + } + I_p1 = base.cursor; + lab4: { + if (!(I_p1 < I_x)) + { + break lab4; + } + I_p1 = I_x; + } + return true; + }; + + /** @return {boolean} */ + function r_main_suffix() { + var /** number */ among_var; + if (base.cursor < I_p1) + { + return false; + } + var /** number */ v_2 = base.limit_backward; + base.limit_backward = I_p1; + base.ket = base.cursor; + among_var = base.find_among_b(a_0); + if (among_var == 0) + { + base.limit_backward = v_2; + return false; + } + base.bra = base.cursor; + base.limit_backward = v_2; + switch (among_var) { + case 1: + if (!base.slice_del()) + { + return false; + } + break; + case 2: + if (!(base.in_grouping_b(g_s_ending, 97, 229))) + { + return false; + } + if (!base.slice_del()) + { + return false; + } + break; + } + return true; + }; + + /** @return {boolean} */ + function r_consonant_pair() { + var /** number */ v_1 = base.limit - base.cursor; + if (base.cursor < I_p1) + { + return false; + } + var /** number */ v_3 = base.limit_backward; + base.limit_backward = I_p1; + base.ket = base.cursor; + if (base.find_among_b(a_1) == 0) + { + base.limit_backward = v_3; + return false; + } + base.bra = base.cursor; + base.limit_backward = v_3; + base.cursor = base.limit - v_1; + if (base.cursor <= base.limit_backward) + { + return false; + } + base.cursor--; + base.bra = base.cursor; + if (!base.slice_del()) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_other_suffix() { + var /** number */ among_var; + var /** number */ v_1 = base.limit - base.cursor; + lab0: { + base.ket = base.cursor; + if (!(base.eq_s_b("st"))) + { + break lab0; + } + base.bra = base.cursor; + if (!(base.eq_s_b("ig"))) + { + break lab0; + } + if (!base.slice_del()) + { + return false; + } + } + base.cursor = base.limit - v_1; + if (base.cursor < I_p1) + { + return false; + } + var /** number */ v_3 = base.limit_backward; + base.limit_backward = I_p1; + base.ket = base.cursor; + among_var = base.find_among_b(a_2); + if (among_var == 0) + { + base.limit_backward = v_3; + return false; + } + base.bra = base.cursor; + base.limit_backward = v_3; + switch (among_var) { + case 1: + if (!base.slice_del()) + { + return false; + } + var /** number */ v_4 = base.limit - base.cursor; + r_consonant_pair(); + base.cursor = base.limit - v_4; + break; + case 2: + if (!base.slice_from("l\u00F8s")) + { + return false; + } + break; + } + return true; + }; + + /** @return {boolean} */ + function r_undouble() { + if (base.cursor < I_p1) + { + return false; + } + var /** number */ v_2 = base.limit_backward; + base.limit_backward = I_p1; + base.ket = base.cursor; + if (!(base.in_grouping_b(g_c, 98, 122))) + { + base.limit_backward = v_2; + return false; + } + base.bra = base.cursor; + S_ch = base.slice_to(); + if (S_ch == '') + { + return false; + } + base.limit_backward = v_2; + if (!(base.eq_s_b(S_ch))) + { + return false; + } + if (!base.slice_del()) + { + return false; + } + return true; + }; + + this.stem = /** @return {boolean} */ function() { + var /** number */ v_1 = base.cursor; + r_mark_regions(); + base.cursor = v_1; + base.limit_backward = base.cursor; base.cursor = base.limit; + var /** number */ v_2 = base.limit - base.cursor; + r_main_suffix(); + base.cursor = base.limit - v_2; + var /** number */ v_3 = base.limit - base.cursor; + r_consonant_pair(); + base.cursor = base.limit - v_3; + var /** number */ v_4 = base.limit - base.cursor; + r_other_suffix(); + base.cursor = base.limit - v_4; + var /** number */ v_5 = base.limit - base.cursor; + r_undouble(); + base.cursor = base.limit - v_5; + base.cursor = base.limit_backward; + return true; + }; + + /**@return{string}*/ + this['stemWord'] = function(/**string*/word) { + base.setCurrent(word); + this.stem(); + return base.getCurrent(); + }; }; - -BaseStemmer.eq_v$LBaseStemmer$S = BaseStemmer$eq_v$LBaseStemmer$S; - -BaseStemmer.prototype.eq_v_b$S = function (s) { - return BaseStemmer$eq_s_b$LBaseStemmer$IS(this, s.length, s); -}; - - -function BaseStemmer$eq_v_b$LBaseStemmer$S($this, s) { - return BaseStemmer$eq_s_b$LBaseStemmer$IS($this, s.length, s); -}; - -BaseStemmer.eq_v_b$LBaseStemmer$S = BaseStemmer$eq_v_b$LBaseStemmer$S; - -BaseStemmer.prototype.find_among$ALAmong$I = function (v, v_size) { - var i; - var j; - var c; - var l; - var common_i; - var common_j; - var first_key_inspected; - var k; - var diff; - var common; - var w; - var i2; - var res; - i = 0; - j = v_size; - c = this.cursor; - l = this.limit; - common_i = 0; - common_j = 0; - first_key_inspected = false; - while (true) { - k = i + (j - i >>> 1); - diff = 0; - common = (common_i < common_j ? common_i : common_j); - w = v[k]; - for (i2 = common; i2 < w.s_size; i2++) { - if (c + common === l) { - diff = -1; - break; - } - diff = this.current.charCodeAt(c + common) - w.s.charCodeAt(i2); - if (diff !== 0) { - break; - } - common++; - } - if (diff < 0) { - j = k; - common_j = common; - } else { - i = k; - common_i = common; - } - if (j - i <= 1) { - if (i > 0) { - break; - } - if (j === i) { - break; - } - if (first_key_inspected) { - break; - } - first_key_inspected = true; - } - } - while (true) { - w = v[i]; - if (common_i >= w.s_size) { - this.cursor = (c + w.s_size | 0); - if (w.method == null) { - return w.result; - } - res = w.method(w.instance); - this.cursor = (c + w.s_size | 0); - if (res) { - return w.result; - } - } - i = w.substring_i; - if (i < 0) { - return 0; - } - } - return -1; -}; - - -function BaseStemmer$find_among$LBaseStemmer$ALAmong$I($this, v, v_size) { - var i; - var j; - var c; - var l; - var common_i; - var common_j; - var first_key_inspected; - var k; - var diff; - var common; - var w; - var i2; - var res; - i = 0; - j = v_size; - c = $this.cursor; - l = $this.limit; - common_i = 0; - common_j = 0; - first_key_inspected = false; - while (true) { - k = i + (j - i >>> 1); - diff = 0; - common = (common_i < common_j ? common_i : common_j); - w = v[k]; - for (i2 = common; i2 < w.s_size; i2++) { - if (c + common === l) { - diff = -1; - break; - } - diff = $this.current.charCodeAt(c + common) - w.s.charCodeAt(i2); - if (diff !== 0) { - break; - } - common++; - } - if (diff < 0) { - j = k; - common_j = common; - } else { - i = k; - common_i = common; - } - if (j - i <= 1) { - if (i > 0) { - break; - } - if (j === i) { - break; - } - if (first_key_inspected) { - break; - } - first_key_inspected = true; - } - } - while (true) { - w = v[i]; - if (common_i >= w.s_size) { - $this.cursor = (c + w.s_size | 0); - if (w.method == null) { - return w.result; - } - res = w.method(w.instance); - $this.cursor = (c + w.s_size | 0); - if (res) { - return w.result; - } - } - i = w.substring_i; - if (i < 0) { - return 0; - } - } - return -1; -}; - -BaseStemmer.find_among$LBaseStemmer$ALAmong$I = BaseStemmer$find_among$LBaseStemmer$ALAmong$I; - -BaseStemmer.prototype.find_among_b$ALAmong$I = function (v, v_size) { - var i; - var j; - var c; - var lb; - var common_i; - var common_j; - var first_key_inspected; - var k; - var diff; - var common; - var w; - var i2; - var res; - i = 0; - j = v_size; - c = this.cursor; - lb = this.limit_backward; - common_i = 0; - common_j = 0; - first_key_inspected = false; - while (true) { - k = i + (j - i >> 1); - diff = 0; - common = (common_i < common_j ? common_i : common_j); - w = v[k]; - for (i2 = w.s_size - 1 - common; i2 >= 0; i2--) { - if (c - common === lb) { - diff = -1; - break; - } - diff = this.current.charCodeAt(c - 1 - common) - w.s.charCodeAt(i2); - if (diff !== 0) { - break; - } - common++; - } - if (diff < 0) { - j = k; - common_j = common; - } else { - i = k; - common_i = common; - } - if (j - i <= 1) { - if (i > 0) { - break; - } - if (j === i) { - break; - } - if (first_key_inspected) { - break; - } - first_key_inspected = true; - } - } - while (true) { - w = v[i]; - if (common_i >= w.s_size) { - this.cursor = (c - w.s_size | 0); - if (w.method == null) { - return w.result; - } - res = w.method(this); - this.cursor = (c - w.s_size | 0); - if (res) { - return w.result; - } - } - i = w.substring_i; - if (i < 0) { - return 0; - } - } - return -1; -}; - - -function BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, v, v_size) { - var i; - var j; - var c; - var lb; - var common_i; - var common_j; - var first_key_inspected; - var k; - var diff; - var common; - var w; - var i2; - var res; - i = 0; - j = v_size; - c = $this.cursor; - lb = $this.limit_backward; - common_i = 0; - common_j = 0; - first_key_inspected = false; - while (true) { - k = i + (j - i >> 1); - diff = 0; - common = (common_i < common_j ? common_i : common_j); - w = v[k]; - for (i2 = w.s_size - 1 - common; i2 >= 0; i2--) { - if (c - common === lb) { - diff = -1; - break; - } - diff = $this.current.charCodeAt(c - 1 - common) - w.s.charCodeAt(i2); - if (diff !== 0) { - break; - } - common++; - } - if (diff < 0) { - j = k; - common_j = common; - } else { - i = k; - common_i = common; - } - if (j - i <= 1) { - if (i > 0) { - break; - } - if (j === i) { - break; - } - if (first_key_inspected) { - break; - } - first_key_inspected = true; - } - } - while (true) { - w = v[i]; - if (common_i >= w.s_size) { - $this.cursor = (c - w.s_size | 0); - if (w.method == null) { - return w.result; - } - res = w.method($this); - $this.cursor = (c - w.s_size | 0); - if (res) { - return w.result; - } - } - i = w.substring_i; - if (i < 0) { - return 0; - } - } - return -1; -}; - -BaseStemmer.find_among_b$LBaseStemmer$ALAmong$I = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I; - -BaseStemmer.prototype.replace_s$IIS = function (c_bra, c_ket, s) { - var adjustment; - adjustment = ((s.length - (((c_ket - c_bra) | 0))) | 0); - this.current = this.current.slice(0, c_bra) + s + this.current.slice(c_ket); - this.limit = (this.limit + adjustment) | 0; - if (this.cursor >= c_ket) { - this.cursor = (this.cursor + adjustment) | 0; - } else if (this.cursor > c_bra) { - this.cursor = c_bra; - } - return (adjustment | 0); -}; - - -function BaseStemmer$replace_s$LBaseStemmer$IIS($this, c_bra, c_ket, s) { - var adjustment; - adjustment = ((s.length - (((c_ket - c_bra) | 0))) | 0); - $this.current = $this.current.slice(0, c_bra) + s + $this.current.slice(c_ket); - $this.limit = ($this.limit + adjustment) | 0; - if ($this.cursor >= c_ket) { - $this.cursor = ($this.cursor + adjustment) | 0; - } else if ($this.cursor > c_bra) { - $this.cursor = c_bra; - } - return (adjustment | 0); -}; - -BaseStemmer.replace_s$LBaseStemmer$IIS = BaseStemmer$replace_s$LBaseStemmer$IIS; - -BaseStemmer.prototype.slice_check$ = function () { - var bra$0; - var ket$0; - var limit$0; - return ((bra$0 = this.bra) < 0 || bra$0 > (ket$0 = this.ket) || ket$0 > (limit$0 = this.limit) || limit$0 > this.current.length ? false : true); -}; - - -function BaseStemmer$slice_check$LBaseStemmer$($this) { - var bra$0; - var ket$0; - var limit$0; - return ((bra$0 = $this.bra) < 0 || bra$0 > (ket$0 = $this.ket) || ket$0 > (limit$0 = $this.limit) || limit$0 > $this.current.length ? false : true); -}; - -BaseStemmer.slice_check$LBaseStemmer$ = BaseStemmer$slice_check$LBaseStemmer$; - -BaseStemmer.prototype.slice_from$S = function (s) { - var result; - var bra$0; - var ket$0; - var limit$0; - result = false; - if ((bra$0 = this.bra) < 0 || bra$0 > (ket$0 = this.ket) || ket$0 > (limit$0 = this.limit) || limit$0 > this.current.length ? false : true) { - BaseStemmer$replace_s$LBaseStemmer$IIS(this, this.bra, this.ket, s); - result = true; - } - return result; -}; - - -function BaseStemmer$slice_from$LBaseStemmer$S($this, s) { - var result; - var bra$0; - var ket$0; - var limit$0; - result = false; - if ((bra$0 = $this.bra) < 0 || bra$0 > (ket$0 = $this.ket) || ket$0 > (limit$0 = $this.limit) || limit$0 > $this.current.length ? false : true) { - BaseStemmer$replace_s$LBaseStemmer$IIS($this, $this.bra, $this.ket, s); - result = true; - } - return result; -}; - -BaseStemmer.slice_from$LBaseStemmer$S = BaseStemmer$slice_from$LBaseStemmer$S; - -BaseStemmer.prototype.slice_del$ = function () { - return BaseStemmer$slice_from$LBaseStemmer$S(this, ""); -}; - - -function BaseStemmer$slice_del$LBaseStemmer$($this) { - return BaseStemmer$slice_from$LBaseStemmer$S($this, ""); -}; - -BaseStemmer.slice_del$LBaseStemmer$ = BaseStemmer$slice_del$LBaseStemmer$; - -BaseStemmer.prototype.insert$IIS = function (c_bra, c_ket, s) { - var adjustment; - adjustment = BaseStemmer$replace_s$LBaseStemmer$IIS(this, c_bra, c_ket, s); - if (c_bra <= this.bra) { - this.bra = (this.bra + adjustment) | 0; - } - if (c_bra <= this.ket) { - this.ket = (this.ket + adjustment) | 0; - } -}; - - -function BaseStemmer$insert$LBaseStemmer$IIS($this, c_bra, c_ket, s) { - var adjustment; - adjustment = BaseStemmer$replace_s$LBaseStemmer$IIS($this, c_bra, c_ket, s); - if (c_bra <= $this.bra) { - $this.bra = ($this.bra + adjustment) | 0; - } - if (c_bra <= $this.ket) { - $this.ket = ($this.ket + adjustment) | 0; - } -}; - -BaseStemmer.insert$LBaseStemmer$IIS = BaseStemmer$insert$LBaseStemmer$IIS; - -BaseStemmer.prototype.slice_to$S = function (s) { - var result; - var bra$0; - var ket$0; - var limit$0; - result = ''; - if ((bra$0 = this.bra) < 0 || bra$0 > (ket$0 = this.ket) || ket$0 > (limit$0 = this.limit) || limit$0 > this.current.length ? false : true) { - result = this.current.slice(this.bra, this.ket); - } - return result; -}; - - -function BaseStemmer$slice_to$LBaseStemmer$S($this, s) { - var result; - var bra$0; - var ket$0; - var limit$0; - result = ''; - if ((bra$0 = $this.bra) < 0 || bra$0 > (ket$0 = $this.ket) || ket$0 > (limit$0 = $this.limit) || limit$0 > $this.current.length ? false : true) { - result = $this.current.slice($this.bra, $this.ket); - } - return result; -}; - -BaseStemmer.slice_to$LBaseStemmer$S = BaseStemmer$slice_to$LBaseStemmer$S; - -BaseStemmer.prototype.assign_to$S = function (s) { - return this.current.slice(0, this.limit); -}; - - -function BaseStemmer$assign_to$LBaseStemmer$S($this, s) { - return $this.current.slice(0, $this.limit); -}; - -BaseStemmer.assign_to$LBaseStemmer$S = BaseStemmer$assign_to$LBaseStemmer$S; - -BaseStemmer.prototype.stem$ = function () { - return false; -}; - - -BaseStemmer.prototype.stemWord$S = function (word) { - var result; - var current$0; - var cursor$0; - var limit$0; - result = this.cache['.' + word]; - if (result == null) { - current$0 = this.current = word; - cursor$0 = this.cursor = 0; - limit$0 = this.limit = current$0.length; - this.limit_backward = 0; - this.bra = cursor$0; - this.ket = limit$0; - this.stem$(); - result = this.current; - this.cache['.' + word] = result; - } - return result; -}; - -BaseStemmer.prototype.stemWord = BaseStemmer.prototype.stemWord$S; - -BaseStemmer.prototype.stemWords$AS = function (words) { - var results; - var i; - var word; - var result; - var current$0; - var cursor$0; - var limit$0; - results = [ ]; - for (i = 0; i < words.length; i++) { - word = words[i]; - result = this.cache['.' + word]; - if (result == null) { - current$0 = this.current = word; - cursor$0 = this.cursor = 0; - limit$0 = this.limit = current$0.length; - this.limit_backward = 0; - this.bra = cursor$0; - this.ket = limit$0; - this.stem$(); - result = this.current; - this.cache['.' + word] = result; - } - results.push(result); - } - return results; -}; - -BaseStemmer.prototype.stemWords = BaseStemmer.prototype.stemWords$AS; - -function DanishStemmer() { - BaseStemmer.call(this); - this.I_x = 0; - this.I_p1 = 0; - this.S_ch = ""; -}; - -$__jsx_extend([DanishStemmer], BaseStemmer); -DanishStemmer.prototype.copy_from$LDanishStemmer$ = function (other) { - this.I_x = other.I_x; - this.I_p1 = other.I_p1; - this.S_ch = other.S_ch; - BaseStemmer$copy_from$LBaseStemmer$LBaseStemmer$(this, other); -}; - -DanishStemmer.prototype.copy_from = DanishStemmer.prototype.copy_from$LDanishStemmer$; - -DanishStemmer.prototype.r_mark_regions$ = function () { - var v_1; - var v_2; - var c; - var lab1; - var lab3; - var lab4; - var cursor$0; - var limit$0; - var cursor$1; - var cursor$2; - var $__jsx_postinc_t; - this.I_p1 = limit$0 = this.limit; - v_1 = cursor$0 = this.cursor; - c = (cursor$0 + 3 | 0); - if (0 > c || c > limit$0) { - return false; - } - cursor$2 = this.cursor = c; - this.I_x = cursor$2; - this.cursor = v_1; -golab0: - while (true) { - v_2 = this.cursor; - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, DanishStemmer.g_v, 97, 248)) { - break lab1; - } - this.cursor = v_2; - break golab0; - } - cursor$1 = this.cursor = v_2; - if (cursor$1 >= this.limit) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } -golab2: - while (true) { - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII(this, DanishStemmer.g_v, 97, 248)) { - break lab3; - } - break golab2; - } - if (this.cursor >= this.limit) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - this.I_p1 = this.cursor; - lab4 = true; -lab4: - while (lab4 === true) { - lab4 = false; - if (! (this.I_p1 < this.I_x)) { - break lab4; - } - this.I_p1 = this.I_x; - } - return true; -}; - -DanishStemmer.prototype.r_mark_regions = DanishStemmer.prototype.r_mark_regions$; - -function DanishStemmer$r_mark_regions$LDanishStemmer$($this) { - var v_1; - var v_2; - var c; - var lab1; - var lab3; - var lab4; - var cursor$0; - var limit$0; - var cursor$1; - var cursor$2; - var $__jsx_postinc_t; - $this.I_p1 = limit$0 = $this.limit; - v_1 = cursor$0 = $this.cursor; - c = (cursor$0 + 3 | 0); - if (0 > c || c > limit$0) { - return false; - } - cursor$2 = $this.cursor = c; - $this.I_x = cursor$2; - $this.cursor = v_1; -golab0: - while (true) { - v_2 = $this.cursor; - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII($this, DanishStemmer.g_v, 97, 248)) { - break lab1; - } - $this.cursor = v_2; - break golab0; - } - cursor$1 = $this.cursor = v_2; - if (cursor$1 >= $this.limit) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } -golab2: - while (true) { - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII($this, DanishStemmer.g_v, 97, 248)) { - break lab3; - } - break golab2; - } - if ($this.cursor >= $this.limit) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - $this.I_p1 = $this.cursor; - lab4 = true; -lab4: - while (lab4 === true) { - lab4 = false; - if (! ($this.I_p1 < $this.I_x)) { - break lab4; - } - $this.I_p1 = $this.I_x; - } - return true; -}; - -DanishStemmer.r_mark_regions$LDanishStemmer$ = DanishStemmer$r_mark_regions$LDanishStemmer$; - -DanishStemmer.prototype.r_main_suffix$ = function () { - var among_var; - var v_1; - var v_2; - var cursor$0; - var cursor$1; - var cursor$2; - v_1 = ((this.limit - (cursor$0 = this.cursor)) | 0); - if (cursor$0 < this.I_p1) { - return false; - } - cursor$1 = this.cursor = this.I_p1; - v_2 = this.limit_backward; - this.limit_backward = cursor$1; - cursor$2 = this.cursor = ((this.limit - v_1) | 0); - this.ket = cursor$2; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, DanishStemmer.a_0, 32); - if (among_var === 0) { - this.limit_backward = v_2; - return false; - } - this.bra = this.cursor; - this.limit_backward = v_2; - switch (among_var) { - case 0: - return false; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 2: - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII(this, DanishStemmer.g_s_ending, 97, 229)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - } - return true; -}; - -DanishStemmer.prototype.r_main_suffix = DanishStemmer.prototype.r_main_suffix$; - -function DanishStemmer$r_main_suffix$LDanishStemmer$($this) { - var among_var; - var v_1; - var v_2; - var cursor$0; - var cursor$1; - var cursor$2; - v_1 = (($this.limit - (cursor$0 = $this.cursor)) | 0); - if (cursor$0 < $this.I_p1) { - return false; - } - cursor$1 = $this.cursor = $this.I_p1; - v_2 = $this.limit_backward; - $this.limit_backward = cursor$1; - cursor$2 = $this.cursor = (($this.limit - v_1) | 0); - $this.ket = cursor$2; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, DanishStemmer.a_0, 32); - if (among_var === 0) { - $this.limit_backward = v_2; - return false; - } - $this.bra = $this.cursor; - $this.limit_backward = v_2; - switch (among_var) { - case 0: - return false; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 2: - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII($this, DanishStemmer.g_s_ending, 97, 229)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - } - return true; -}; - -DanishStemmer.r_main_suffix$LDanishStemmer$ = DanishStemmer$r_main_suffix$LDanishStemmer$; - -DanishStemmer.prototype.r_consonant_pair$ = function () { - var v_1; - var v_2; - var v_3; - var limit$0; - var cursor$0; - var cursor$1; - var cursor$2; - var cursor$3; - var limit_backward$0; - var $__jsx_postinc_t; - v_1 = (((limit$0 = this.limit) - (cursor$0 = this.cursor)) | 0); - v_2 = ((limit$0 - cursor$0) | 0); - if (cursor$0 < this.I_p1) { - return false; - } - cursor$1 = this.cursor = this.I_p1; - v_3 = this.limit_backward; - this.limit_backward = cursor$1; - cursor$2 = this.cursor = ((this.limit - v_2) | 0); - this.ket = cursor$2; - if (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, DanishStemmer.a_1, 4) === 0) { - this.limit_backward = v_3; - return false; - } - this.bra = this.cursor; - limit_backward$0 = this.limit_backward = v_3; - cursor$3 = this.cursor = ((this.limit - v_1) | 0); - if (cursor$3 <= limit_backward$0) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - this.bra = this.cursor; - return (! BaseStemmer$slice_from$LBaseStemmer$S(this, "") ? false : true); -}; - -DanishStemmer.prototype.r_consonant_pair = DanishStemmer.prototype.r_consonant_pair$; - -function DanishStemmer$r_consonant_pair$LDanishStemmer$($this) { - var v_1; - var v_2; - var v_3; - var limit$0; - var cursor$0; - var cursor$1; - var cursor$2; - var cursor$3; - var limit_backward$0; - var $__jsx_postinc_t; - v_1 = (((limit$0 = $this.limit) - (cursor$0 = $this.cursor)) | 0); - v_2 = ((limit$0 - cursor$0) | 0); - if (cursor$0 < $this.I_p1) { - return false; - } - cursor$1 = $this.cursor = $this.I_p1; - v_3 = $this.limit_backward; - $this.limit_backward = cursor$1; - cursor$2 = $this.cursor = (($this.limit - v_2) | 0); - $this.ket = cursor$2; - if (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, DanishStemmer.a_1, 4) === 0) { - $this.limit_backward = v_3; - return false; - } - $this.bra = $this.cursor; - limit_backward$0 = $this.limit_backward = v_3; - cursor$3 = $this.cursor = (($this.limit - v_1) | 0); - if (cursor$3 <= limit_backward$0) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - $this.bra = $this.cursor; - return (! BaseStemmer$slice_from$LBaseStemmer$S($this, "") ? false : true); -}; - -DanishStemmer.r_consonant_pair$LDanishStemmer$ = DanishStemmer$r_consonant_pair$LDanishStemmer$; - -DanishStemmer.prototype.r_other_suffix$ = function () { - var among_var; - var v_1; - var v_2; - var v_3; - var v_4; - var lab0; - var lab1; - var limit$0; - var cursor$0; - var cursor$1; - var cursor$2; - v_1 = ((this.limit - this.cursor) | 0); - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - this.ket = this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 2, "st")) { - break lab0; - } - this.bra = this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 2, "ig")) { - break lab0; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - } - cursor$0 = this.cursor = (((limit$0 = this.limit) - v_1) | 0); - v_2 = ((limit$0 - cursor$0) | 0); - if (cursor$0 < this.I_p1) { - return false; - } - cursor$1 = this.cursor = this.I_p1; - v_3 = this.limit_backward; - this.limit_backward = cursor$1; - cursor$2 = this.cursor = ((this.limit - v_2) | 0); - this.ket = cursor$2; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, DanishStemmer.a_2, 5); - if (among_var === 0) { - this.limit_backward = v_3; - return false; - } - this.bra = this.cursor; - this.limit_backward = v_3; - switch (among_var) { - case 0: - return false; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - v_4 = ((this.limit - this.cursor) | 0); - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - if (! DanishStemmer$r_consonant_pair$LDanishStemmer$(this)) { - break lab1; - } - } - this.cursor = ((this.limit - v_4) | 0); - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "l\u00F8s")) { - return false; - } - break; - } - return true; -}; - -DanishStemmer.prototype.r_other_suffix = DanishStemmer.prototype.r_other_suffix$; - -function DanishStemmer$r_other_suffix$LDanishStemmer$($this) { - var among_var; - var v_1; - var v_2; - var v_3; - var v_4; - var lab0; - var lab1; - var limit$0; - var cursor$0; - var cursor$1; - var cursor$2; - v_1 = (($this.limit - $this.cursor) | 0); - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - $this.ket = $this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 2, "st")) { - break lab0; - } - $this.bra = $this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 2, "ig")) { - break lab0; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - } - cursor$0 = $this.cursor = (((limit$0 = $this.limit) - v_1) | 0); - v_2 = ((limit$0 - cursor$0) | 0); - if (cursor$0 < $this.I_p1) { - return false; - } - cursor$1 = $this.cursor = $this.I_p1; - v_3 = $this.limit_backward; - $this.limit_backward = cursor$1; - cursor$2 = $this.cursor = (($this.limit - v_2) | 0); - $this.ket = cursor$2; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, DanishStemmer.a_2, 5); - if (among_var === 0) { - $this.limit_backward = v_3; - return false; - } - $this.bra = $this.cursor; - $this.limit_backward = v_3; - switch (among_var) { - case 0: - return false; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - v_4 = (($this.limit - $this.cursor) | 0); - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - if (! DanishStemmer$r_consonant_pair$LDanishStemmer$($this)) { - break lab1; - } - } - $this.cursor = (($this.limit - v_4) | 0); - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "l\u00F8s")) { - return false; - } - break; - } - return true; -}; - -DanishStemmer.r_other_suffix$LDanishStemmer$ = DanishStemmer$r_other_suffix$LDanishStemmer$; - -DanishStemmer.prototype.r_undouble$ = function () { - var v_1; - var v_2; - var s$0; - var cursor$0; - var cursor$1; - var cursor$2; - var S_ch$0; - v_1 = ((this.limit - (cursor$0 = this.cursor)) | 0); - if (cursor$0 < this.I_p1) { - return false; - } - cursor$1 = this.cursor = this.I_p1; - v_2 = this.limit_backward; - this.limit_backward = cursor$1; - cursor$2 = this.cursor = ((this.limit - v_1) | 0); - this.ket = cursor$2; - if (! BaseStemmer$out_grouping_b$LBaseStemmer$AIII(this, DanishStemmer.g_v, 97, 248)) { - this.limit_backward = v_2; - return false; - } - this.bra = this.cursor; - S_ch$0 = this.S_ch = BaseStemmer$slice_to$LBaseStemmer$S(this, this.S_ch); - if (S_ch$0 === '') { - return false; - } - this.limit_backward = v_2; - return (! (s$0 = this.S_ch, BaseStemmer$eq_s_b$LBaseStemmer$IS(this, s$0.length, s$0)) ? false : ! BaseStemmer$slice_from$LBaseStemmer$S(this, "") ? false : true); -}; - -DanishStemmer.prototype.r_undouble = DanishStemmer.prototype.r_undouble$; - -function DanishStemmer$r_undouble$LDanishStemmer$($this) { - var v_1; - var v_2; - var s$0; - var cursor$0; - var cursor$1; - var cursor$2; - var S_ch$0; - v_1 = (($this.limit - (cursor$0 = $this.cursor)) | 0); - if (cursor$0 < $this.I_p1) { - return false; - } - cursor$1 = $this.cursor = $this.I_p1; - v_2 = $this.limit_backward; - $this.limit_backward = cursor$1; - cursor$2 = $this.cursor = (($this.limit - v_1) | 0); - $this.ket = cursor$2; - if (! BaseStemmer$out_grouping_b$LBaseStemmer$AIII($this, DanishStemmer.g_v, 97, 248)) { - $this.limit_backward = v_2; - return false; - } - $this.bra = $this.cursor; - S_ch$0 = $this.S_ch = BaseStemmer$slice_to$LBaseStemmer$S($this, $this.S_ch); - if (S_ch$0 === '') { - return false; - } - $this.limit_backward = v_2; - return (! (s$0 = $this.S_ch, BaseStemmer$eq_s_b$LBaseStemmer$IS($this, s$0.length, s$0)) ? false : ! BaseStemmer$slice_from$LBaseStemmer$S($this, "") ? false : true); -}; - -DanishStemmer.r_undouble$LDanishStemmer$ = DanishStemmer$r_undouble$LDanishStemmer$; - -DanishStemmer.prototype.stem$ = function () { - var v_1; - var v_2; - var v_3; - var v_4; - var lab0; - var lab1; - var lab2; - var lab3; - var lab4; - var cursor$0; - var limit$0; - var cursor$1; - var limit$1; - var cursor$2; - var limit$2; - var cursor$3; - v_1 = this.cursor; - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - if (! DanishStemmer$r_mark_regions$LDanishStemmer$(this)) { - break lab0; - } - } - cursor$0 = this.cursor = v_1; - this.limit_backward = cursor$0; - cursor$1 = this.cursor = limit$0 = this.limit; - v_2 = ((limit$0 - cursor$1) | 0); - lab1 = true; -lab1: - while (lab1 === true) { - lab1 = false; - if (! DanishStemmer$r_main_suffix$LDanishStemmer$(this)) { - break lab1; - } - } - cursor$2 = this.cursor = (((limit$1 = this.limit) - v_2) | 0); - v_3 = ((limit$1 - cursor$2) | 0); - lab2 = true; -lab2: - while (lab2 === true) { - lab2 = false; - if (! DanishStemmer$r_consonant_pair$LDanishStemmer$(this)) { - break lab2; - } - } - cursor$3 = this.cursor = (((limit$2 = this.limit) - v_3) | 0); - v_4 = ((limit$2 - cursor$3) | 0); - lab3 = true; -lab3: - while (lab3 === true) { - lab3 = false; - if (! DanishStemmer$r_other_suffix$LDanishStemmer$(this)) { - break lab3; - } - } - this.cursor = ((this.limit - v_4) | 0); - lab4 = true; -lab4: - while (lab4 === true) { - lab4 = false; - if (! DanishStemmer$r_undouble$LDanishStemmer$(this)) { - break lab4; - } - } - this.cursor = this.limit_backward; - return true; -}; - -DanishStemmer.prototype.stem = DanishStemmer.prototype.stem$; - -DanishStemmer.prototype.equals$X = function (o) { - return o instanceof DanishStemmer; -}; - -DanishStemmer.prototype.equals = DanishStemmer.prototype.equals$X; - -function DanishStemmer$equals$LDanishStemmer$X($this, o) { - return o instanceof DanishStemmer; -}; - -DanishStemmer.equals$LDanishStemmer$X = DanishStemmer$equals$LDanishStemmer$X; - -DanishStemmer.prototype.hashCode$ = function () { - var classname; - var hash; - var i; - var char; - classname = "DanishStemmer"; - hash = 0; - for (i = 0; i < classname.length; i++) { - char = classname.charCodeAt(i); - hash = (hash << 5) - hash + char; - hash = hash & hash; - } - return (hash | 0); -}; - -DanishStemmer.prototype.hashCode = DanishStemmer.prototype.hashCode$; - -function DanishStemmer$hashCode$LDanishStemmer$($this) { - var classname; - var hash; - var i; - var char; - classname = "DanishStemmer"; - hash = 0; - for (i = 0; i < classname.length; i++) { - char = classname.charCodeAt(i); - hash = (hash << 5) - hash + char; - hash = hash & hash; - } - return (hash | 0); -}; - -DanishStemmer.hashCode$LDanishStemmer$ = DanishStemmer$hashCode$LDanishStemmer$; - -DanishStemmer.serialVersionUID = 1; -$__jsx_lazy_init(DanishStemmer, "methodObject", function () { - return new DanishStemmer(); -}); -$__jsx_lazy_init(DanishStemmer, "a_0", function () { - return [ new Among("hed", -1, 1), new Among("ethed", 0, 1), new Among("ered", -1, 1), new Among("e", -1, 1), new Among("erede", 3, 1), new Among("ende", 3, 1), new Among("erende", 5, 1), new Among("ene", 3, 1), new Among("erne", 3, 1), new Among("ere", 3, 1), new Among("en", -1, 1), new Among("heden", 10, 1), new Among("eren", 10, 1), new Among("er", -1, 1), new Among("heder", 13, 1), new Among("erer", 13, 1), new Among("s", -1, 2), new Among("heds", 16, 1), new Among("es", 16, 1), new Among("endes", 18, 1), new Among("erendes", 19, 1), new Among("enes", 18, 1), new Among("ernes", 18, 1), new Among("eres", 18, 1), new Among("ens", 16, 1), new Among("hedens", 24, 1), new Among("erens", 24, 1), new Among("ers", 16, 1), new Among("ets", 16, 1), new Among("erets", 28, 1), new Among("et", -1, 1), new Among("eret", 30, 1) ]; -}); -$__jsx_lazy_init(DanishStemmer, "a_1", function () { - return [ new Among("gd", -1, -1), new Among("dt", -1, -1), new Among("gt", -1, -1), new Among("kt", -1, -1) ]; -}); -$__jsx_lazy_init(DanishStemmer, "a_2", function () { - return [ new Among("ig", -1, 1), new Among("lig", 0, 1), new Among("elig", 1, 1), new Among("els", -1, 1), new Among("l\u00F8st", -1, 2) ]; -}); -DanishStemmer.g_v = [ 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 128 ]; -DanishStemmer.g_s_ending = [ 239, 254, 42, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16 ]; - -var $__jsx_classMap = { - "src/among.jsx": { - Among: Among, - Among$SII: Among, - Among$SIIF$LBaseStemmer$B$LBaseStemmer$: Among$0 - }, - "src/stemmer.jsx": { - Stemmer: Stemmer, - Stemmer$: Stemmer - }, - "src/base-stemmer.jsx": { - BaseStemmer: BaseStemmer, - BaseStemmer$: BaseStemmer - }, - "src/danish-stemmer.jsx": { - DanishStemmer: DanishStemmer, - DanishStemmer$: DanishStemmer - } -}; - - -})(JSX); - -var Among = JSX.require("src/among.jsx").Among; -var Among$SII = JSX.require("src/among.jsx").Among$SII; -var Stemmer = JSX.require("src/stemmer.jsx").Stemmer; -var BaseStemmer = JSX.require("src/base-stemmer.jsx").BaseStemmer; -var DanishStemmer = JSX.require("src/danish-stemmer.jsx").DanishStemmer; diff --git a/sphinx/search/non-minified-js/dutch-stemmer.js b/sphinx/search/non-minified-js/dutch-stemmer.js index 997f1467bfe..0ad11e212cc 100644 --- a/sphinx/search/non-minified-js/dutch-stemmer.js +++ b/sphinx/search/non-minified-js/dutch-stemmer.js @@ -1,2637 +1,685 @@ -// generatedy by JSX compiler 0.9.89 (2014-05-20 06:01:03 +0900; 8e8c6105f36f3dfe440ea026a3c93a3444977102) -var JSX = {}; -(function (JSX) { -/** - * extends the class - */ -function $__jsx_extend(derivations, base) { - var ctor = function () {}; - ctor.prototype = base.prototype; - var proto = new ctor(); - for (var i in derivations) { - derivations[i].prototype = proto; - } -} - -/** - * copies the implementations from source interface to target - */ -function $__jsx_merge_interface(target, source) { - for (var k in source.prototype) - if (source.prototype.hasOwnProperty(k)) - target.prototype[k] = source.prototype[k]; -} - -/** - * defers the initialization of the property - */ -function $__jsx_lazy_init(obj, prop, func) { - function reset(obj, prop, value) { - delete obj[prop]; - obj[prop] = value; - return value; - } - - Object.defineProperty(obj, prop, { - get: function () { - return reset(obj, prop, func()); - }, - set: function (v) { - reset(obj, prop, v); - }, - enumerable: true, - configurable: true - }); -} - -var $__jsx_imul = Math.imul; -if (typeof $__jsx_imul === "undefined") { - $__jsx_imul = function (a, b) { - var ah = (a >>> 16) & 0xffff; - var al = a & 0xffff; - var bh = (b >>> 16) & 0xffff; - var bl = b & 0xffff; - return ((al * bl) + (((ah * bl + al * bh) << 16) >>> 0)|0); - }; -} - -/** - * fused int-ops with side-effects - */ -function $__jsx_ipadd(o, p, r) { - return o[p] = (o[p] + r) | 0; -} -function $__jsx_ipsub(o, p, r) { - return o[p] = (o[p] - r) | 0; -} -function $__jsx_ipmul(o, p, r) { - return o[p] = $__jsx_imul(o[p], r); -} -function $__jsx_ipdiv(o, p, r) { - return o[p] = (o[p] / r) | 0; -} -function $__jsx_ipmod(o, p, r) { - return o[p] = (o[p] % r) | 0; -} -function $__jsx_ippostinc(o, p) { - var v = o[p]; - o[p] = (v + 1) | 0; - return v; -} -function $__jsx_ippostdec(o, p) { - var v = o[p]; - o[p] = (v - 1) | 0; - return v; -} - -/** - * non-inlined version of Array#each - */ -function $__jsx_forEach(o, f) { - var l = o.length; - for (var i = 0; i < l; ++i) - f(o[i]); -} - -/* - * global functions, renamed to avoid conflict with local variable names - */ -var $__jsx_parseInt = parseInt; -var $__jsx_parseFloat = parseFloat; -function $__jsx_isNaN(n) { return n !== n; } -var $__jsx_isFinite = isFinite; - -var $__jsx_encodeURIComponent = encodeURIComponent; -var $__jsx_decodeURIComponent = decodeURIComponent; -var $__jsx_encodeURI = encodeURI; -var $__jsx_decodeURI = decodeURI; - -var $__jsx_ObjectToString = Object.prototype.toString; -var $__jsx_ObjectHasOwnProperty = Object.prototype.hasOwnProperty; - -/* - * profiler object, initialized afterwards - */ -function $__jsx_profiler() { -} - -/* - * public interface to JSX code - */ -JSX.require = function (path) { - var m = $__jsx_classMap[path]; - return m !== undefined ? m : null; -}; - -JSX.profilerIsRunning = function () { - return $__jsx_profiler.getResults != null; -}; - -JSX.getProfileResults = function () { - return ($__jsx_profiler.getResults || function () { return {}; })(); -}; - -JSX.postProfileResults = function (url, cb) { - if ($__jsx_profiler.postResults == null) - throw new Error("profiler has not been turned on"); - return $__jsx_profiler.postResults(url, cb); -}; - -JSX.resetProfileResults = function () { - if ($__jsx_profiler.resetResults == null) - throw new Error("profiler has not been turned on"); - return $__jsx_profiler.resetResults(); -}; -JSX.DEBUG = false; -var GeneratorFunction$0 = -(function () { - try { - return Function('import {GeneratorFunction} from "std:iteration"; return GeneratorFunction')(); - } catch (e) { - return function GeneratorFunction () {}; - } -})(); -var __jsx_generator_object$0 = -(function () { - function __jsx_generator_object() { - this.__next = 0; - this.__loop = null; - this.__seed = null; - this.__value = undefined; - this.__status = 0; // SUSPENDED: 0, ACTIVE: 1, DEAD: 2 - } - - __jsx_generator_object.prototype.next = function (seed) { - switch (this.__status) { - case 0: - this.__status = 1; - this.__seed = seed; - - // go next! - this.__loop(this.__next); - - var done = false; - if (this.__next != -1) { - this.__status = 0; - } else { - this.__status = 2; - done = true; - } - return { value: this.__value, done: done }; - case 1: - throw new Error("Generator is already running"); - case 2: - throw new Error("Generator is already finished"); - default: - throw new Error("Unexpected generator internal state"); - } - }; - - return __jsx_generator_object; -}()); -function Among(s, substring_i, result) { - this.s_size = s.length; - this.s = s; - this.substring_i = substring_i; - this.result = result; - this.method = null; - this.instance = null; -}; - -function Among$0(s, substring_i, result, method, instance) { - this.s_size = s.length; - this.s = s; - this.substring_i = substring_i; - this.result = result; - this.method = method; - this.instance = instance; -}; - -$__jsx_extend([Among, Among$0], Object); -function Stemmer() { -}; - -$__jsx_extend([Stemmer], Object); -function BaseStemmer() { - var current$0; - var cursor$0; - var limit$0; - this.cache = ({ }); - current$0 = this.current = ""; - cursor$0 = this.cursor = 0; - limit$0 = this.limit = current$0.length; - this.limit_backward = 0; - this.bra = cursor$0; - this.ket = limit$0; -}; - -$__jsx_extend([BaseStemmer], Stemmer); -BaseStemmer.prototype.setCurrent$S = function (value) { - var current$0; - var cursor$0; - var limit$0; - current$0 = this.current = value; - cursor$0 = this.cursor = 0; - limit$0 = this.limit = current$0.length; - this.limit_backward = 0; - this.bra = cursor$0; - this.ket = limit$0; -}; - - -function BaseStemmer$setCurrent$LBaseStemmer$S($this, value) { - var current$0; - var cursor$0; - var limit$0; - current$0 = $this.current = value; - cursor$0 = $this.cursor = 0; - limit$0 = $this.limit = current$0.length; - $this.limit_backward = 0; - $this.bra = cursor$0; - $this.ket = limit$0; -}; - -BaseStemmer.setCurrent$LBaseStemmer$S = BaseStemmer$setCurrent$LBaseStemmer$S; - -BaseStemmer.prototype.getCurrent$ = function () { - return this.current; -}; - - -function BaseStemmer$getCurrent$LBaseStemmer$($this) { - return $this.current; -}; - -BaseStemmer.getCurrent$LBaseStemmer$ = BaseStemmer$getCurrent$LBaseStemmer$; - -BaseStemmer.prototype.copy_from$LBaseStemmer$ = function (other) { - this.current = other.current; - this.cursor = other.cursor; - this.limit = other.limit; - this.limit_backward = other.limit_backward; - this.bra = other.bra; - this.ket = other.ket; -}; - - -function BaseStemmer$copy_from$LBaseStemmer$LBaseStemmer$($this, other) { - $this.current = other.current; - $this.cursor = other.cursor; - $this.limit = other.limit; - $this.limit_backward = other.limit_backward; - $this.bra = other.bra; - $this.ket = other.ket; -}; - -BaseStemmer.copy_from$LBaseStemmer$LBaseStemmer$ = BaseStemmer$copy_from$LBaseStemmer$LBaseStemmer$; - -BaseStemmer.prototype.in_grouping$AIII = function (s, min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor >= this.limit) { - return false; - } - ch = this.current.charCodeAt(this.cursor); - if (ch > max || ch < min) { - return false; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$in_grouping$LBaseStemmer$AIII($this, s, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor >= $this.limit) { - return false; - } - ch = $this.current.charCodeAt($this.cursor); - if (ch > max || ch < min) { - return false; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.in_grouping$LBaseStemmer$AIII = BaseStemmer$in_grouping$LBaseStemmer$AIII; - -BaseStemmer.prototype.in_grouping_b$AIII = function (s, min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor <= this.limit_backward) { - return false; - } - ch = this.current.charCodeAt(this.cursor - 1); - if (ch > max || ch < min) { - return false; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$in_grouping_b$LBaseStemmer$AIII($this, s, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor <= $this.limit_backward) { - return false; - } - ch = $this.current.charCodeAt($this.cursor - 1); - if (ch > max || ch < min) { - return false; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.in_grouping_b$LBaseStemmer$AIII = BaseStemmer$in_grouping_b$LBaseStemmer$AIII; - -BaseStemmer.prototype.out_grouping$AIII = function (s, min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor >= this.limit) { - return false; - } - ch = this.current.charCodeAt(this.cursor); - if (ch > max || ch < min) { - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; - } - ch -= min; - if ((s[ch >>> 3] & 0X1 << (ch & 0x7)) === 0) { - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; - } - return false; -}; - - -function BaseStemmer$out_grouping$LBaseStemmer$AIII($this, s, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor >= $this.limit) { - return false; - } - ch = $this.current.charCodeAt($this.cursor); - if (ch > max || ch < min) { - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; - } - ch -= min; - if ((s[ch >>> 3] & 0X1 << (ch & 0x7)) === 0) { - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; - } - return false; -}; - -BaseStemmer.out_grouping$LBaseStemmer$AIII = BaseStemmer$out_grouping$LBaseStemmer$AIII; - -BaseStemmer.prototype.out_grouping_b$AIII = function (s, min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor <= this.limit_backward) { - return false; - } - ch = this.current.charCodeAt(this.cursor - 1); - if (ch > max || ch < min) { - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; - } - return false; -}; - - -function BaseStemmer$out_grouping_b$LBaseStemmer$AIII($this, s, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor <= $this.limit_backward) { - return false; - } - ch = $this.current.charCodeAt($this.cursor - 1); - if (ch > max || ch < min) { - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; - } - return false; -}; - -BaseStemmer.out_grouping_b$LBaseStemmer$AIII = BaseStemmer$out_grouping_b$LBaseStemmer$AIII; - -BaseStemmer.prototype.in_range$II = function (min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor >= this.limit) { - return false; - } - ch = this.current.charCodeAt(this.cursor); - if (ch > max || ch < min) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$in_range$LBaseStemmer$II($this, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor >= $this.limit) { - return false; - } - ch = $this.current.charCodeAt($this.cursor); - if (ch > max || ch < min) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.in_range$LBaseStemmer$II = BaseStemmer$in_range$LBaseStemmer$II; - -BaseStemmer.prototype.in_range_b$II = function (min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor <= this.limit_backward) { - return false; - } - ch = this.current.charCodeAt(this.cursor - 1); - if (ch > max || ch < min) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$in_range_b$LBaseStemmer$II($this, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor <= $this.limit_backward) { - return false; - } - ch = $this.current.charCodeAt($this.cursor - 1); - if (ch > max || ch < min) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.in_range_b$LBaseStemmer$II = BaseStemmer$in_range_b$LBaseStemmer$II; - -BaseStemmer.prototype.out_range$II = function (min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor >= this.limit) { - return false; - } - ch = this.current.charCodeAt(this.cursor); - if (! (ch > max || ch < min)) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$out_range$LBaseStemmer$II($this, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor >= $this.limit) { - return false; - } - ch = $this.current.charCodeAt($this.cursor); - if (! (ch > max || ch < min)) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.out_range$LBaseStemmer$II = BaseStemmer$out_range$LBaseStemmer$II; - -BaseStemmer.prototype.out_range_b$II = function (min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor <= this.limit_backward) { - return false; - } - ch = this.current.charCodeAt(this.cursor - 1); - if (! (ch > max || ch < min)) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$out_range_b$LBaseStemmer$II($this, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor <= $this.limit_backward) { - return false; - } - ch = $this.current.charCodeAt($this.cursor - 1); - if (! (ch > max || ch < min)) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.out_range_b$LBaseStemmer$II = BaseStemmer$out_range_b$LBaseStemmer$II; - -BaseStemmer.prototype.eq_s$IS = function (s_size, s) { - var cursor$0; - if (((this.limit - this.cursor) | 0) < s_size) { - return false; - } - if (this.current.slice(cursor$0 = this.cursor, ((cursor$0 + s_size) | 0)) !== s) { - return false; - } - this.cursor = (this.cursor + s_size) | 0; - return true; -}; - - -function BaseStemmer$eq_s$LBaseStemmer$IS($this, s_size, s) { - var cursor$0; - if ((($this.limit - $this.cursor) | 0) < s_size) { - return false; - } - if ($this.current.slice(cursor$0 = $this.cursor, ((cursor$0 + s_size) | 0)) !== s) { - return false; - } - $this.cursor = ($this.cursor + s_size) | 0; - return true; -}; - -BaseStemmer.eq_s$LBaseStemmer$IS = BaseStemmer$eq_s$LBaseStemmer$IS; - -BaseStemmer.prototype.eq_s_b$IS = function (s_size, s) { - var cursor$0; - if (((this.cursor - this.limit_backward) | 0) < s_size) { - return false; - } - if (this.current.slice((((cursor$0 = this.cursor) - s_size) | 0), cursor$0) !== s) { - return false; - } - this.cursor = (this.cursor - s_size) | 0; - return true; -}; - - -function BaseStemmer$eq_s_b$LBaseStemmer$IS($this, s_size, s) { - var cursor$0; - if ((($this.cursor - $this.limit_backward) | 0) < s_size) { - return false; - } - if ($this.current.slice((((cursor$0 = $this.cursor) - s_size) | 0), cursor$0) !== s) { - return false; - } - $this.cursor = ($this.cursor - s_size) | 0; - return true; -}; - -BaseStemmer.eq_s_b$LBaseStemmer$IS = BaseStemmer$eq_s_b$LBaseStemmer$IS; - -BaseStemmer.prototype.eq_v$S = function (s) { - return BaseStemmer$eq_s$LBaseStemmer$IS(this, s.length, s); -}; - - -function BaseStemmer$eq_v$LBaseStemmer$S($this, s) { - return BaseStemmer$eq_s$LBaseStemmer$IS($this, s.length, s); -}; - -BaseStemmer.eq_v$LBaseStemmer$S = BaseStemmer$eq_v$LBaseStemmer$S; - -BaseStemmer.prototype.eq_v_b$S = function (s) { - return BaseStemmer$eq_s_b$LBaseStemmer$IS(this, s.length, s); +// Generated by Snowball 2.1.0 - https://snowballstem.org/ + +/**@constructor*/ +DutchStemmer = function() { + var base = new BaseStemmer(); + /** @const */ var a_0 = [ + ["", -1, 6], + ["\u00E1", 0, 1], + ["\u00E4", 0, 1], + ["\u00E9", 0, 2], + ["\u00EB", 0, 2], + ["\u00ED", 0, 3], + ["\u00EF", 0, 3], + ["\u00F3", 0, 4], + ["\u00F6", 0, 4], + ["\u00FA", 0, 5], + ["\u00FC", 0, 5] + ]; + + /** @const */ var a_1 = [ + ["", -1, 3], + ["I", 0, 2], + ["Y", 0, 1] + ]; + + /** @const */ var a_2 = [ + ["dd", -1, -1], + ["kk", -1, -1], + ["tt", -1, -1] + ]; + + /** @const */ var a_3 = [ + ["ene", -1, 2], + ["se", -1, 3], + ["en", -1, 2], + ["heden", 2, 1], + ["s", -1, 3] + ]; + + /** @const */ var a_4 = [ + ["end", -1, 1], + ["ig", -1, 2], + ["ing", -1, 1], + ["lijk", -1, 3], + ["baar", -1, 4], + ["bar", -1, 5] + ]; + + /** @const */ var a_5 = [ + ["aa", -1, -1], + ["ee", -1, -1], + ["oo", -1, -1], + ["uu", -1, -1] + ]; + + /** @const */ var /** Array */ g_v = [17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128]; + + /** @const */ var /** Array */ g_v_I = [1, 0, 0, 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128]; + + /** @const */ var /** Array */ g_v_j = [17, 67, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128]; + + var /** number */ I_p2 = 0; + var /** number */ I_p1 = 0; + var /** boolean */ B_e_found = false; + + + /** @return {boolean} */ + function r_prelude() { + var /** number */ among_var; + var /** number */ v_1 = base.cursor; + while(true) + { + var /** number */ v_2 = base.cursor; + lab0: { + base.bra = base.cursor; + among_var = base.find_among(a_0); + if (among_var == 0) + { + break lab0; + } + base.ket = base.cursor; + switch (among_var) { + case 1: + if (!base.slice_from("a")) + { + return false; + } + break; + case 2: + if (!base.slice_from("e")) + { + return false; + } + break; + case 3: + if (!base.slice_from("i")) + { + return false; + } + break; + case 4: + if (!base.slice_from("o")) + { + return false; + } + break; + case 5: + if (!base.slice_from("u")) + { + return false; + } + break; + case 6: + if (base.cursor >= base.limit) + { + break lab0; + } + base.cursor++; + break; + } + continue; + } + base.cursor = v_2; + break; + } + base.cursor = v_1; + var /** number */ v_3 = base.cursor; + lab1: { + base.bra = base.cursor; + if (!(base.eq_s("y"))) + { + base.cursor = v_3; + break lab1; + } + base.ket = base.cursor; + if (!base.slice_from("Y")) + { + return false; + } + } + while(true) + { + var /** number */ v_4 = base.cursor; + lab2: { + golab3: while(true) + { + var /** number */ v_5 = base.cursor; + lab4: { + if (!(base.in_grouping(g_v, 97, 232))) + { + break lab4; + } + base.bra = base.cursor; + lab5: { + var /** number */ v_6 = base.cursor; + lab6: { + if (!(base.eq_s("i"))) + { + break lab6; + } + base.ket = base.cursor; + if (!(base.in_grouping(g_v, 97, 232))) + { + break lab6; + } + if (!base.slice_from("I")) + { + return false; + } + break lab5; + } + base.cursor = v_6; + if (!(base.eq_s("y"))) + { + break lab4; + } + base.ket = base.cursor; + if (!base.slice_from("Y")) + { + return false; + } + } + base.cursor = v_5; + break golab3; + } + base.cursor = v_5; + if (base.cursor >= base.limit) + { + break lab2; + } + base.cursor++; + } + continue; + } + base.cursor = v_4; + break; + } + return true; + }; + + /** @return {boolean} */ + function r_mark_regions() { + I_p1 = base.limit; + I_p2 = base.limit; + golab0: while(true) + { + lab1: { + if (!(base.in_grouping(g_v, 97, 232))) + { + break lab1; + } + break golab0; + } + if (base.cursor >= base.limit) + { + return false; + } + base.cursor++; + } + golab2: while(true) + { + lab3: { + if (!(base.out_grouping(g_v, 97, 232))) + { + break lab3; + } + break golab2; + } + if (base.cursor >= base.limit) + { + return false; + } + base.cursor++; + } + I_p1 = base.cursor; + lab4: { + if (!(I_p1 < 3)) + { + break lab4; + } + I_p1 = 3; + } + golab5: while(true) + { + lab6: { + if (!(base.in_grouping(g_v, 97, 232))) + { + break lab6; + } + break golab5; + } + if (base.cursor >= base.limit) + { + return false; + } + base.cursor++; + } + golab7: while(true) + { + lab8: { + if (!(base.out_grouping(g_v, 97, 232))) + { + break lab8; + } + break golab7; + } + if (base.cursor >= base.limit) + { + return false; + } + base.cursor++; + } + I_p2 = base.cursor; + return true; + }; + + /** @return {boolean} */ + function r_postlude() { + var /** number */ among_var; + while(true) + { + var /** number */ v_1 = base.cursor; + lab0: { + base.bra = base.cursor; + among_var = base.find_among(a_1); + if (among_var == 0) + { + break lab0; + } + base.ket = base.cursor; + switch (among_var) { + case 1: + if (!base.slice_from("y")) + { + return false; + } + break; + case 2: + if (!base.slice_from("i")) + { + return false; + } + break; + case 3: + if (base.cursor >= base.limit) + { + break lab0; + } + base.cursor++; + break; + } + continue; + } + base.cursor = v_1; + break; + } + return true; + }; + + /** @return {boolean} */ + function r_R1() { + if (!(I_p1 <= base.cursor)) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_R2() { + if (!(I_p2 <= base.cursor)) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_undouble() { + var /** number */ v_1 = base.limit - base.cursor; + if (base.find_among_b(a_2) == 0) + { + return false; + } + base.cursor = base.limit - v_1; + base.ket = base.cursor; + if (base.cursor <= base.limit_backward) + { + return false; + } + base.cursor--; + base.bra = base.cursor; + if (!base.slice_del()) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_e_ending() { + B_e_found = false; + base.ket = base.cursor; + if (!(base.eq_s_b("e"))) + { + return false; + } + base.bra = base.cursor; + if (!r_R1()) + { + return false; + } + var /** number */ v_1 = base.limit - base.cursor; + if (!(base.out_grouping_b(g_v, 97, 232))) + { + return false; + } + base.cursor = base.limit - v_1; + if (!base.slice_del()) + { + return false; + } + B_e_found = true; + if (!r_undouble()) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_en_ending() { + if (!r_R1()) + { + return false; + } + var /** number */ v_1 = base.limit - base.cursor; + if (!(base.out_grouping_b(g_v, 97, 232))) + { + return false; + } + base.cursor = base.limit - v_1; + { + var /** number */ v_2 = base.limit - base.cursor; + lab0: { + if (!(base.eq_s_b("gem"))) + { + break lab0; + } + return false; + } + base.cursor = base.limit - v_2; + } + if (!base.slice_del()) + { + return false; + } + if (!r_undouble()) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_standard_suffix() { + var /** number */ among_var; + var /** number */ v_1 = base.limit - base.cursor; + lab0: { + base.ket = base.cursor; + among_var = base.find_among_b(a_3); + if (among_var == 0) + { + break lab0; + } + base.bra = base.cursor; + switch (among_var) { + case 1: + if (!r_R1()) + { + break lab0; + } + if (!base.slice_from("heid")) + { + return false; + } + break; + case 2: + if (!r_en_ending()) + { + break lab0; + } + break; + case 3: + if (!r_R1()) + { + break lab0; + } + if (!(base.out_grouping_b(g_v_j, 97, 232))) + { + break lab0; + } + if (!base.slice_del()) + { + return false; + } + break; + } + } + base.cursor = base.limit - v_1; + var /** number */ v_2 = base.limit - base.cursor; + r_e_ending(); + base.cursor = base.limit - v_2; + var /** number */ v_3 = base.limit - base.cursor; + lab1: { + base.ket = base.cursor; + if (!(base.eq_s_b("heid"))) + { + break lab1; + } + base.bra = base.cursor; + if (!r_R2()) + { + break lab1; + } + { + var /** number */ v_4 = base.limit - base.cursor; + lab2: { + if (!(base.eq_s_b("c"))) + { + break lab2; + } + break lab1; + } + base.cursor = base.limit - v_4; + } + if (!base.slice_del()) + { + return false; + } + base.ket = base.cursor; + if (!(base.eq_s_b("en"))) + { + break lab1; + } + base.bra = base.cursor; + if (!r_en_ending()) + { + break lab1; + } + } + base.cursor = base.limit - v_3; + var /** number */ v_5 = base.limit - base.cursor; + lab3: { + base.ket = base.cursor; + among_var = base.find_among_b(a_4); + if (among_var == 0) + { + break lab3; + } + base.bra = base.cursor; + switch (among_var) { + case 1: + if (!r_R2()) + { + break lab3; + } + if (!base.slice_del()) + { + return false; + } + lab4: { + var /** number */ v_6 = base.limit - base.cursor; + lab5: { + base.ket = base.cursor; + if (!(base.eq_s_b("ig"))) + { + break lab5; + } + base.bra = base.cursor; + if (!r_R2()) + { + break lab5; + } + { + var /** number */ v_7 = base.limit - base.cursor; + lab6: { + if (!(base.eq_s_b("e"))) + { + break lab6; + } + break lab5; + } + base.cursor = base.limit - v_7; + } + if (!base.slice_del()) + { + return false; + } + break lab4; + } + base.cursor = base.limit - v_6; + if (!r_undouble()) + { + break lab3; + } + } + break; + case 2: + if (!r_R2()) + { + break lab3; + } + { + var /** number */ v_8 = base.limit - base.cursor; + lab7: { + if (!(base.eq_s_b("e"))) + { + break lab7; + } + break lab3; + } + base.cursor = base.limit - v_8; + } + if (!base.slice_del()) + { + return false; + } + break; + case 3: + if (!r_R2()) + { + break lab3; + } + if (!base.slice_del()) + { + return false; + } + if (!r_e_ending()) + { + break lab3; + } + break; + case 4: + if (!r_R2()) + { + break lab3; + } + if (!base.slice_del()) + { + return false; + } + break; + case 5: + if (!r_R2()) + { + break lab3; + } + if (!B_e_found) + { + break lab3; + } + if (!base.slice_del()) + { + return false; + } + break; + } + } + base.cursor = base.limit - v_5; + var /** number */ v_9 = base.limit - base.cursor; + lab8: { + if (!(base.out_grouping_b(g_v_I, 73, 232))) + { + break lab8; + } + var /** number */ v_10 = base.limit - base.cursor; + if (base.find_among_b(a_5) == 0) + { + break lab8; + } + if (!(base.out_grouping_b(g_v, 97, 232))) + { + break lab8; + } + base.cursor = base.limit - v_10; + base.ket = base.cursor; + if (base.cursor <= base.limit_backward) + { + break lab8; + } + base.cursor--; + base.bra = base.cursor; + if (!base.slice_del()) + { + return false; + } + } + base.cursor = base.limit - v_9; + return true; + }; + + this.stem = /** @return {boolean} */ function() { + var /** number */ v_1 = base.cursor; + r_prelude(); + base.cursor = v_1; + var /** number */ v_2 = base.cursor; + r_mark_regions(); + base.cursor = v_2; + base.limit_backward = base.cursor; base.cursor = base.limit; + r_standard_suffix(); + base.cursor = base.limit_backward; + var /** number */ v_4 = base.cursor; + r_postlude(); + base.cursor = v_4; + return true; + }; + + /**@return{string}*/ + this['stemWord'] = function(/**string*/word) { + base.setCurrent(word); + this.stem(); + return base.getCurrent(); + }; }; - - -function BaseStemmer$eq_v_b$LBaseStemmer$S($this, s) { - return BaseStemmer$eq_s_b$LBaseStemmer$IS($this, s.length, s); -}; - -BaseStemmer.eq_v_b$LBaseStemmer$S = BaseStemmer$eq_v_b$LBaseStemmer$S; - -BaseStemmer.prototype.find_among$ALAmong$I = function (v, v_size) { - var i; - var j; - var c; - var l; - var common_i; - var common_j; - var first_key_inspected; - var k; - var diff; - var common; - var w; - var i2; - var res; - i = 0; - j = v_size; - c = this.cursor; - l = this.limit; - common_i = 0; - common_j = 0; - first_key_inspected = false; - while (true) { - k = i + (j - i >>> 1); - diff = 0; - common = (common_i < common_j ? common_i : common_j); - w = v[k]; - for (i2 = common; i2 < w.s_size; i2++) { - if (c + common === l) { - diff = -1; - break; - } - diff = this.current.charCodeAt(c + common) - w.s.charCodeAt(i2); - if (diff !== 0) { - break; - } - common++; - } - if (diff < 0) { - j = k; - common_j = common; - } else { - i = k; - common_i = common; - } - if (j - i <= 1) { - if (i > 0) { - break; - } - if (j === i) { - break; - } - if (first_key_inspected) { - break; - } - first_key_inspected = true; - } - } - while (true) { - w = v[i]; - if (common_i >= w.s_size) { - this.cursor = (c + w.s_size | 0); - if (w.method == null) { - return w.result; - } - res = w.method(w.instance); - this.cursor = (c + w.s_size | 0); - if (res) { - return w.result; - } - } - i = w.substring_i; - if (i < 0) { - return 0; - } - } - return -1; -}; - - -function BaseStemmer$find_among$LBaseStemmer$ALAmong$I($this, v, v_size) { - var i; - var j; - var c; - var l; - var common_i; - var common_j; - var first_key_inspected; - var k; - var diff; - var common; - var w; - var i2; - var res; - i = 0; - j = v_size; - c = $this.cursor; - l = $this.limit; - common_i = 0; - common_j = 0; - first_key_inspected = false; - while (true) { - k = i + (j - i >>> 1); - diff = 0; - common = (common_i < common_j ? common_i : common_j); - w = v[k]; - for (i2 = common; i2 < w.s_size; i2++) { - if (c + common === l) { - diff = -1; - break; - } - diff = $this.current.charCodeAt(c + common) - w.s.charCodeAt(i2); - if (diff !== 0) { - break; - } - common++; - } - if (diff < 0) { - j = k; - common_j = common; - } else { - i = k; - common_i = common; - } - if (j - i <= 1) { - if (i > 0) { - break; - } - if (j === i) { - break; - } - if (first_key_inspected) { - break; - } - first_key_inspected = true; - } - } - while (true) { - w = v[i]; - if (common_i >= w.s_size) { - $this.cursor = (c + w.s_size | 0); - if (w.method == null) { - return w.result; - } - res = w.method(w.instance); - $this.cursor = (c + w.s_size | 0); - if (res) { - return w.result; - } - } - i = w.substring_i; - if (i < 0) { - return 0; - } - } - return -1; -}; - -BaseStemmer.find_among$LBaseStemmer$ALAmong$I = BaseStemmer$find_among$LBaseStemmer$ALAmong$I; - -BaseStemmer.prototype.find_among_b$ALAmong$I = function (v, v_size) { - var i; - var j; - var c; - var lb; - var common_i; - var common_j; - var first_key_inspected; - var k; - var diff; - var common; - var w; - var i2; - var res; - i = 0; - j = v_size; - c = this.cursor; - lb = this.limit_backward; - common_i = 0; - common_j = 0; - first_key_inspected = false; - while (true) { - k = i + (j - i >> 1); - diff = 0; - common = (common_i < common_j ? common_i : common_j); - w = v[k]; - for (i2 = w.s_size - 1 - common; i2 >= 0; i2--) { - if (c - common === lb) { - diff = -1; - break; - } - diff = this.current.charCodeAt(c - 1 - common) - w.s.charCodeAt(i2); - if (diff !== 0) { - break; - } - common++; - } - if (diff < 0) { - j = k; - common_j = common; - } else { - i = k; - common_i = common; - } - if (j - i <= 1) { - if (i > 0) { - break; - } - if (j === i) { - break; - } - if (first_key_inspected) { - break; - } - first_key_inspected = true; - } - } - while (true) { - w = v[i]; - if (common_i >= w.s_size) { - this.cursor = (c - w.s_size | 0); - if (w.method == null) { - return w.result; - } - res = w.method(this); - this.cursor = (c - w.s_size | 0); - if (res) { - return w.result; - } - } - i = w.substring_i; - if (i < 0) { - return 0; - } - } - return -1; -}; - - -function BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, v, v_size) { - var i; - var j; - var c; - var lb; - var common_i; - var common_j; - var first_key_inspected; - var k; - var diff; - var common; - var w; - var i2; - var res; - i = 0; - j = v_size; - c = $this.cursor; - lb = $this.limit_backward; - common_i = 0; - common_j = 0; - first_key_inspected = false; - while (true) { - k = i + (j - i >> 1); - diff = 0; - common = (common_i < common_j ? common_i : common_j); - w = v[k]; - for (i2 = w.s_size - 1 - common; i2 >= 0; i2--) { - if (c - common === lb) { - diff = -1; - break; - } - diff = $this.current.charCodeAt(c - 1 - common) - w.s.charCodeAt(i2); - if (diff !== 0) { - break; - } - common++; - } - if (diff < 0) { - j = k; - common_j = common; - } else { - i = k; - common_i = common; - } - if (j - i <= 1) { - if (i > 0) { - break; - } - if (j === i) { - break; - } - if (first_key_inspected) { - break; - } - first_key_inspected = true; - } - } - while (true) { - w = v[i]; - if (common_i >= w.s_size) { - $this.cursor = (c - w.s_size | 0); - if (w.method == null) { - return w.result; - } - res = w.method($this); - $this.cursor = (c - w.s_size | 0); - if (res) { - return w.result; - } - } - i = w.substring_i; - if (i < 0) { - return 0; - } - } - return -1; -}; - -BaseStemmer.find_among_b$LBaseStemmer$ALAmong$I = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I; - -BaseStemmer.prototype.replace_s$IIS = function (c_bra, c_ket, s) { - var adjustment; - adjustment = ((s.length - (((c_ket - c_bra) | 0))) | 0); - this.current = this.current.slice(0, c_bra) + s + this.current.slice(c_ket); - this.limit = (this.limit + adjustment) | 0; - if (this.cursor >= c_ket) { - this.cursor = (this.cursor + adjustment) | 0; - } else if (this.cursor > c_bra) { - this.cursor = c_bra; - } - return (adjustment | 0); -}; - - -function BaseStemmer$replace_s$LBaseStemmer$IIS($this, c_bra, c_ket, s) { - var adjustment; - adjustment = ((s.length - (((c_ket - c_bra) | 0))) | 0); - $this.current = $this.current.slice(0, c_bra) + s + $this.current.slice(c_ket); - $this.limit = ($this.limit + adjustment) | 0; - if ($this.cursor >= c_ket) { - $this.cursor = ($this.cursor + adjustment) | 0; - } else if ($this.cursor > c_bra) { - $this.cursor = c_bra; - } - return (adjustment | 0); -}; - -BaseStemmer.replace_s$LBaseStemmer$IIS = BaseStemmer$replace_s$LBaseStemmer$IIS; - -BaseStemmer.prototype.slice_check$ = function () { - var bra$0; - var ket$0; - var limit$0; - return ((bra$0 = this.bra) < 0 || bra$0 > (ket$0 = this.ket) || ket$0 > (limit$0 = this.limit) || limit$0 > this.current.length ? false : true); -}; - - -function BaseStemmer$slice_check$LBaseStemmer$($this) { - var bra$0; - var ket$0; - var limit$0; - return ((bra$0 = $this.bra) < 0 || bra$0 > (ket$0 = $this.ket) || ket$0 > (limit$0 = $this.limit) || limit$0 > $this.current.length ? false : true); -}; - -BaseStemmer.slice_check$LBaseStemmer$ = BaseStemmer$slice_check$LBaseStemmer$; - -BaseStemmer.prototype.slice_from$S = function (s) { - var result; - var bra$0; - var ket$0; - var limit$0; - result = false; - if ((bra$0 = this.bra) < 0 || bra$0 > (ket$0 = this.ket) || ket$0 > (limit$0 = this.limit) || limit$0 > this.current.length ? false : true) { - BaseStemmer$replace_s$LBaseStemmer$IIS(this, this.bra, this.ket, s); - result = true; - } - return result; -}; - - -function BaseStemmer$slice_from$LBaseStemmer$S($this, s) { - var result; - var bra$0; - var ket$0; - var limit$0; - result = false; - if ((bra$0 = $this.bra) < 0 || bra$0 > (ket$0 = $this.ket) || ket$0 > (limit$0 = $this.limit) || limit$0 > $this.current.length ? false : true) { - BaseStemmer$replace_s$LBaseStemmer$IIS($this, $this.bra, $this.ket, s); - result = true; - } - return result; -}; - -BaseStemmer.slice_from$LBaseStemmer$S = BaseStemmer$slice_from$LBaseStemmer$S; - -BaseStemmer.prototype.slice_del$ = function () { - return BaseStemmer$slice_from$LBaseStemmer$S(this, ""); -}; - - -function BaseStemmer$slice_del$LBaseStemmer$($this) { - return BaseStemmer$slice_from$LBaseStemmer$S($this, ""); -}; - -BaseStemmer.slice_del$LBaseStemmer$ = BaseStemmer$slice_del$LBaseStemmer$; - -BaseStemmer.prototype.insert$IIS = function (c_bra, c_ket, s) { - var adjustment; - adjustment = BaseStemmer$replace_s$LBaseStemmer$IIS(this, c_bra, c_ket, s); - if (c_bra <= this.bra) { - this.bra = (this.bra + adjustment) | 0; - } - if (c_bra <= this.ket) { - this.ket = (this.ket + adjustment) | 0; - } -}; - - -function BaseStemmer$insert$LBaseStemmer$IIS($this, c_bra, c_ket, s) { - var adjustment; - adjustment = BaseStemmer$replace_s$LBaseStemmer$IIS($this, c_bra, c_ket, s); - if (c_bra <= $this.bra) { - $this.bra = ($this.bra + adjustment) | 0; - } - if (c_bra <= $this.ket) { - $this.ket = ($this.ket + adjustment) | 0; - } -}; - -BaseStemmer.insert$LBaseStemmer$IIS = BaseStemmer$insert$LBaseStemmer$IIS; - -BaseStemmer.prototype.slice_to$S = function (s) { - var result; - var bra$0; - var ket$0; - var limit$0; - result = ''; - if ((bra$0 = this.bra) < 0 || bra$0 > (ket$0 = this.ket) || ket$0 > (limit$0 = this.limit) || limit$0 > this.current.length ? false : true) { - result = this.current.slice(this.bra, this.ket); - } - return result; -}; - - -function BaseStemmer$slice_to$LBaseStemmer$S($this, s) { - var result; - var bra$0; - var ket$0; - var limit$0; - result = ''; - if ((bra$0 = $this.bra) < 0 || bra$0 > (ket$0 = $this.ket) || ket$0 > (limit$0 = $this.limit) || limit$0 > $this.current.length ? false : true) { - result = $this.current.slice($this.bra, $this.ket); - } - return result; -}; - -BaseStemmer.slice_to$LBaseStemmer$S = BaseStemmer$slice_to$LBaseStemmer$S; - -BaseStemmer.prototype.assign_to$S = function (s) { - return this.current.slice(0, this.limit); -}; - - -function BaseStemmer$assign_to$LBaseStemmer$S($this, s) { - return $this.current.slice(0, $this.limit); -}; - -BaseStemmer.assign_to$LBaseStemmer$S = BaseStemmer$assign_to$LBaseStemmer$S; - -BaseStemmer.prototype.stem$ = function () { - return false; -}; - - -BaseStemmer.prototype.stemWord$S = function (word) { - var result; - var current$0; - var cursor$0; - var limit$0; - result = this.cache['.' + word]; - if (result == null) { - current$0 = this.current = word; - cursor$0 = this.cursor = 0; - limit$0 = this.limit = current$0.length; - this.limit_backward = 0; - this.bra = cursor$0; - this.ket = limit$0; - this.stem$(); - result = this.current; - this.cache['.' + word] = result; - } - return result; -}; - -BaseStemmer.prototype.stemWord = BaseStemmer.prototype.stemWord$S; - -BaseStemmer.prototype.stemWords$AS = function (words) { - var results; - var i; - var word; - var result; - var current$0; - var cursor$0; - var limit$0; - results = [ ]; - for (i = 0; i < words.length; i++) { - word = words[i]; - result = this.cache['.' + word]; - if (result == null) { - current$0 = this.current = word; - cursor$0 = this.cursor = 0; - limit$0 = this.limit = current$0.length; - this.limit_backward = 0; - this.bra = cursor$0; - this.ket = limit$0; - this.stem$(); - result = this.current; - this.cache['.' + word] = result; - } - results.push(result); - } - return results; -}; - -BaseStemmer.prototype.stemWords = BaseStemmer.prototype.stemWords$AS; - -function DutchStemmer() { - BaseStemmer.call(this); - this.I_p2 = 0; - this.I_p1 = 0; - this.B_e_found = false; -}; - -$__jsx_extend([DutchStemmer], BaseStemmer); -DutchStemmer.prototype.copy_from$LDutchStemmer$ = function (other) { - this.I_p2 = other.I_p2; - this.I_p1 = other.I_p1; - this.B_e_found = other.B_e_found; - BaseStemmer$copy_from$LBaseStemmer$LBaseStemmer$(this, other); -}; - -DutchStemmer.prototype.copy_from = DutchStemmer.prototype.copy_from$LDutchStemmer$; - -DutchStemmer.prototype.r_prelude$ = function () { - var among_var; - var v_1; - var v_2; - var v_3; - var v_4; - var v_5; - var v_6; - var lab1; - var lab2; - var lab4; - var lab6; - var lab7; - var lab8; - var cursor$0; - var cursor$1; - var $__jsx_postinc_t; - v_1 = this.cursor; -replab0: - while (true) { - v_2 = this.cursor; - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - this.bra = this.cursor; - among_var = BaseStemmer$find_among$LBaseStemmer$ALAmong$I(this, DutchStemmer.a_0, 11); - if (among_var === 0) { - break lab1; - } - this.ket = this.cursor; - switch (among_var) { - case 0: - break lab1; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "a")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "e")) { - return false; - } - break; - case 3: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "i")) { - return false; - } - break; - case 4: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "o")) { - return false; - } - break; - case 5: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "u")) { - return false; - } - break; - case 6: - if (this.cursor >= this.limit) { - break lab1; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - break; - } - continue replab0; - } - this.cursor = v_2; - break replab0; - } - cursor$0 = this.cursor = v_1; - v_3 = cursor$0; - lab2 = true; -lab2: - while (lab2 === true) { - lab2 = false; - this.bra = this.cursor; - if (! BaseStemmer$eq_s$LBaseStemmer$IS(this, 1, "y")) { - this.cursor = v_3; - break lab2; - } - this.ket = this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "Y")) { - return false; - } - } -replab3: - while (true) { - v_4 = this.cursor; - lab4 = true; - lab4: - while (lab4 === true) { - lab4 = false; - golab5: - while (true) { - v_5 = this.cursor; - lab6 = true; - lab6: - while (lab6 === true) { - lab6 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, DutchStemmer.g_v, 97, 232)) { - break lab6; - } - this.bra = this.cursor; - lab7 = true; - lab7: - while (lab7 === true) { - lab7 = false; - v_6 = this.cursor; - lab8 = true; - lab8: - while (lab8 === true) { - lab8 = false; - if (! BaseStemmer$eq_s$LBaseStemmer$IS(this, 1, "i")) { - break lab8; - } - this.ket = this.cursor; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, DutchStemmer.g_v, 97, 232)) { - break lab8; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "I")) { - return false; - } - break lab7; - } - this.cursor = v_6; - if (! BaseStemmer$eq_s$LBaseStemmer$IS(this, 1, "y")) { - break lab6; - } - this.ket = this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "Y")) { - return false; - } - } - this.cursor = v_5; - break golab5; - } - cursor$1 = this.cursor = v_5; - if (cursor$1 >= this.limit) { - break lab4; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - continue replab3; - } - this.cursor = v_4; - break replab3; - } - return true; -}; - -DutchStemmer.prototype.r_prelude = DutchStemmer.prototype.r_prelude$; - -function DutchStemmer$r_prelude$LDutchStemmer$($this) { - var among_var; - var v_1; - var v_2; - var v_3; - var v_4; - var v_5; - var v_6; - var lab1; - var lab2; - var lab4; - var lab6; - var lab7; - var lab8; - var cursor$0; - var cursor$1; - var $__jsx_postinc_t; - v_1 = $this.cursor; -replab0: - while (true) { - v_2 = $this.cursor; - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - $this.bra = $this.cursor; - among_var = BaseStemmer$find_among$LBaseStemmer$ALAmong$I($this, DutchStemmer.a_0, 11); - if (among_var === 0) { - break lab1; - } - $this.ket = $this.cursor; - switch (among_var) { - case 0: - break lab1; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "a")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "e")) { - return false; - } - break; - case 3: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "i")) { - return false; - } - break; - case 4: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "o")) { - return false; - } - break; - case 5: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "u")) { - return false; - } - break; - case 6: - if ($this.cursor >= $this.limit) { - break lab1; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - break; - } - continue replab0; - } - $this.cursor = v_2; - break replab0; - } - cursor$0 = $this.cursor = v_1; - v_3 = cursor$0; - lab2 = true; -lab2: - while (lab2 === true) { - lab2 = false; - $this.bra = $this.cursor; - if (! BaseStemmer$eq_s$LBaseStemmer$IS($this, 1, "y")) { - $this.cursor = v_3; - break lab2; - } - $this.ket = $this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "Y")) { - return false; - } - } -replab3: - while (true) { - v_4 = $this.cursor; - lab4 = true; - lab4: - while (lab4 === true) { - lab4 = false; - golab5: - while (true) { - v_5 = $this.cursor; - lab6 = true; - lab6: - while (lab6 === true) { - lab6 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII($this, DutchStemmer.g_v, 97, 232)) { - break lab6; - } - $this.bra = $this.cursor; - lab7 = true; - lab7: - while (lab7 === true) { - lab7 = false; - v_6 = $this.cursor; - lab8 = true; - lab8: - while (lab8 === true) { - lab8 = false; - if (! BaseStemmer$eq_s$LBaseStemmer$IS($this, 1, "i")) { - break lab8; - } - $this.ket = $this.cursor; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII($this, DutchStemmer.g_v, 97, 232)) { - break lab8; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "I")) { - return false; - } - break lab7; - } - $this.cursor = v_6; - if (! BaseStemmer$eq_s$LBaseStemmer$IS($this, 1, "y")) { - break lab6; - } - $this.ket = $this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "Y")) { - return false; - } - } - $this.cursor = v_5; - break golab5; - } - cursor$1 = $this.cursor = v_5; - if (cursor$1 >= $this.limit) { - break lab4; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - continue replab3; - } - $this.cursor = v_4; - break replab3; - } - return true; -}; - -DutchStemmer.r_prelude$LDutchStemmer$ = DutchStemmer$r_prelude$LDutchStemmer$; - -DutchStemmer.prototype.r_mark_regions$ = function () { - var lab1; - var lab3; - var lab4; - var lab6; - var lab8; - var limit$0; - var $__jsx_postinc_t; - this.I_p1 = limit$0 = this.limit; - this.I_p2 = limit$0; -golab0: - while (true) { - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, DutchStemmer.g_v, 97, 232)) { - break lab1; - } - break golab0; - } - if (this.cursor >= this.limit) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } -golab2: - while (true) { - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII(this, DutchStemmer.g_v, 97, 232)) { - break lab3; - } - break golab2; - } - if (this.cursor >= this.limit) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - this.I_p1 = this.cursor; - lab4 = true; -lab4: - while (lab4 === true) { - lab4 = false; - if (! (this.I_p1 < 3)) { - break lab4; - } - this.I_p1 = 3; - } -golab5: - while (true) { - lab6 = true; - lab6: - while (lab6 === true) { - lab6 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, DutchStemmer.g_v, 97, 232)) { - break lab6; - } - break golab5; - } - if (this.cursor >= this.limit) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } -golab7: - while (true) { - lab8 = true; - lab8: - while (lab8 === true) { - lab8 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII(this, DutchStemmer.g_v, 97, 232)) { - break lab8; - } - break golab7; - } - if (this.cursor >= this.limit) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - this.I_p2 = this.cursor; - return true; -}; - -DutchStemmer.prototype.r_mark_regions = DutchStemmer.prototype.r_mark_regions$; - -function DutchStemmer$r_mark_regions$LDutchStemmer$($this) { - var lab1; - var lab3; - var lab4; - var lab6; - var lab8; - var limit$0; - var $__jsx_postinc_t; - $this.I_p1 = limit$0 = $this.limit; - $this.I_p2 = limit$0; -golab0: - while (true) { - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII($this, DutchStemmer.g_v, 97, 232)) { - break lab1; - } - break golab0; - } - if ($this.cursor >= $this.limit) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } -golab2: - while (true) { - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII($this, DutchStemmer.g_v, 97, 232)) { - break lab3; - } - break golab2; - } - if ($this.cursor >= $this.limit) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - $this.I_p1 = $this.cursor; - lab4 = true; -lab4: - while (lab4 === true) { - lab4 = false; - if (! ($this.I_p1 < 3)) { - break lab4; - } - $this.I_p1 = 3; - } -golab5: - while (true) { - lab6 = true; - lab6: - while (lab6 === true) { - lab6 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII($this, DutchStemmer.g_v, 97, 232)) { - break lab6; - } - break golab5; - } - if ($this.cursor >= $this.limit) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } -golab7: - while (true) { - lab8 = true; - lab8: - while (lab8 === true) { - lab8 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII($this, DutchStemmer.g_v, 97, 232)) { - break lab8; - } - break golab7; - } - if ($this.cursor >= $this.limit) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - $this.I_p2 = $this.cursor; - return true; -}; - -DutchStemmer.r_mark_regions$LDutchStemmer$ = DutchStemmer$r_mark_regions$LDutchStemmer$; - -DutchStemmer.prototype.r_postlude$ = function () { - var among_var; - var v_1; - var lab1; - var $__jsx_postinc_t; -replab0: - while (true) { - v_1 = this.cursor; - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - this.bra = this.cursor; - among_var = BaseStemmer$find_among$LBaseStemmer$ALAmong$I(this, DutchStemmer.a_1, 3); - if (among_var === 0) { - break lab1; - } - this.ket = this.cursor; - switch (among_var) { - case 0: - break lab1; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "y")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "i")) { - return false; - } - break; - case 3: - if (this.cursor >= this.limit) { - break lab1; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - break; - } - continue replab0; - } - this.cursor = v_1; - break replab0; - } - return true; -}; - -DutchStemmer.prototype.r_postlude = DutchStemmer.prototype.r_postlude$; - -function DutchStemmer$r_postlude$LDutchStemmer$($this) { - var among_var; - var v_1; - var lab1; - var $__jsx_postinc_t; -replab0: - while (true) { - v_1 = $this.cursor; - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - $this.bra = $this.cursor; - among_var = BaseStemmer$find_among$LBaseStemmer$ALAmong$I($this, DutchStemmer.a_1, 3); - if (among_var === 0) { - break lab1; - } - $this.ket = $this.cursor; - switch (among_var) { - case 0: - break lab1; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "y")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "i")) { - return false; - } - break; - case 3: - if ($this.cursor >= $this.limit) { - break lab1; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - break; - } - continue replab0; - } - $this.cursor = v_1; - break replab0; - } - return true; -}; - -DutchStemmer.r_postlude$LDutchStemmer$ = DutchStemmer$r_postlude$LDutchStemmer$; - -DutchStemmer.prototype.r_R1$ = function () { - return (! (this.I_p1 <= this.cursor) ? false : true); -}; - -DutchStemmer.prototype.r_R1 = DutchStemmer.prototype.r_R1$; - -function DutchStemmer$r_R1$LDutchStemmer$($this) { - return (! ($this.I_p1 <= $this.cursor) ? false : true); -}; - -DutchStemmer.r_R1$LDutchStemmer$ = DutchStemmer$r_R1$LDutchStemmer$; - -DutchStemmer.prototype.r_R2$ = function () { - return (! (this.I_p2 <= this.cursor) ? false : true); -}; - -DutchStemmer.prototype.r_R2 = DutchStemmer.prototype.r_R2$; - -function DutchStemmer$r_R2$LDutchStemmer$($this) { - return (! ($this.I_p2 <= $this.cursor) ? false : true); -}; - -DutchStemmer.r_R2$LDutchStemmer$ = DutchStemmer$r_R2$LDutchStemmer$; - -DutchStemmer.prototype.r_undouble$ = function () { - var v_1; - var cursor$0; - var $__jsx_postinc_t; - v_1 = ((this.limit - this.cursor) | 0); - if (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, DutchStemmer.a_2, 3) === 0) { - return false; - } - cursor$0 = this.cursor = ((this.limit - v_1) | 0); - this.ket = cursor$0; - if (cursor$0 <= this.limit_backward) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - this.bra = this.cursor; - return (! BaseStemmer$slice_from$LBaseStemmer$S(this, "") ? false : true); -}; - -DutchStemmer.prototype.r_undouble = DutchStemmer.prototype.r_undouble$; - -function DutchStemmer$r_undouble$LDutchStemmer$($this) { - var v_1; - var cursor$0; - var $__jsx_postinc_t; - v_1 = (($this.limit - $this.cursor) | 0); - if (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, DutchStemmer.a_2, 3) === 0) { - return false; - } - cursor$0 = $this.cursor = (($this.limit - v_1) | 0); - $this.ket = cursor$0; - if (cursor$0 <= $this.limit_backward) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - $this.bra = $this.cursor; - return (! BaseStemmer$slice_from$LBaseStemmer$S($this, "") ? false : true); -}; - -DutchStemmer.r_undouble$LDutchStemmer$ = DutchStemmer$r_undouble$LDutchStemmer$; - -DutchStemmer.prototype.r_e_ending$ = function () { - var v_1; - var cursor$0; - this.B_e_found = false; - this.ket = this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "e")) { - return false; - } - this.bra = cursor$0 = this.cursor; - if (! (! (this.I_p1 <= cursor$0) ? false : true)) { - return false; - } - v_1 = ((this.limit - this.cursor) | 0); - if (! BaseStemmer$out_grouping_b$LBaseStemmer$AIII(this, DutchStemmer.g_v, 97, 232)) { - return false; - } - this.cursor = ((this.limit - v_1) | 0); - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - this.B_e_found = true; - return (! DutchStemmer$r_undouble$LDutchStemmer$(this) ? false : true); -}; - -DutchStemmer.prototype.r_e_ending = DutchStemmer.prototype.r_e_ending$; - -function DutchStemmer$r_e_ending$LDutchStemmer$($this) { - var v_1; - var cursor$0; - $this.B_e_found = false; - $this.ket = $this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "e")) { - return false; - } - $this.bra = cursor$0 = $this.cursor; - if (! (! ($this.I_p1 <= cursor$0) ? false : true)) { - return false; - } - v_1 = (($this.limit - $this.cursor) | 0); - if (! BaseStemmer$out_grouping_b$LBaseStemmer$AIII($this, DutchStemmer.g_v, 97, 232)) { - return false; - } - $this.cursor = (($this.limit - v_1) | 0); - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - $this.B_e_found = true; - return (! DutchStemmer$r_undouble$LDutchStemmer$($this) ? false : true); -}; - -DutchStemmer.r_e_ending$LDutchStemmer$ = DutchStemmer$r_e_ending$LDutchStemmer$; - -DutchStemmer.prototype.r_en_ending$ = function () { - var v_1; - var v_2; - var lab0; - var limit$0; - var cursor$0; - if (! (! (this.I_p1 <= this.cursor) ? false : true)) { - return false; - } - v_1 = ((this.limit - this.cursor) | 0); - if (! BaseStemmer$out_grouping_b$LBaseStemmer$AIII(this, DutchStemmer.g_v, 97, 232)) { - return false; - } - cursor$0 = this.cursor = (((limit$0 = this.limit) - v_1) | 0); - v_2 = ((limit$0 - cursor$0) | 0); - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 3, "gem")) { - break lab0; - } - return false; - } - this.cursor = ((this.limit - v_2) | 0); - return (! BaseStemmer$slice_from$LBaseStemmer$S(this, "") ? false : ! DutchStemmer$r_undouble$LDutchStemmer$(this) ? false : true); -}; - -DutchStemmer.prototype.r_en_ending = DutchStemmer.prototype.r_en_ending$; - -function DutchStemmer$r_en_ending$LDutchStemmer$($this) { - var v_1; - var v_2; - var lab0; - var limit$0; - var cursor$0; - if (! (! ($this.I_p1 <= $this.cursor) ? false : true)) { - return false; - } - v_1 = (($this.limit - $this.cursor) | 0); - if (! BaseStemmer$out_grouping_b$LBaseStemmer$AIII($this, DutchStemmer.g_v, 97, 232)) { - return false; - } - cursor$0 = $this.cursor = (((limit$0 = $this.limit) - v_1) | 0); - v_2 = ((limit$0 - cursor$0) | 0); - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 3, "gem")) { - break lab0; - } - return false; - } - $this.cursor = (($this.limit - v_2) | 0); - return (! BaseStemmer$slice_from$LBaseStemmer$S($this, "") ? false : ! DutchStemmer$r_undouble$LDutchStemmer$($this) ? false : true); -}; - -DutchStemmer.r_en_ending$LDutchStemmer$ = DutchStemmer$r_en_ending$LDutchStemmer$; - -DutchStemmer.prototype.r_standard_suffix$ = function () { - var among_var; - var v_1; - var v_2; - var v_3; - var v_4; - var v_5; - var v_6; - var v_7; - var v_8; - var v_9; - var v_10; - var lab0; - var lab1; - var lab2; - var lab3; - var lab4; - var lab5; - var lab6; - var lab7; - var lab8; - var lab9; - var limit$0; - var cursor$0; - var cursor$1; - var limit$1; - var cursor$2; - var cursor$3; - var limit$2; - var cursor$4; - var cursor$5; - var limit$3; - var cursor$6; - var $__jsx_postinc_t; - v_1 = ((this.limit - this.cursor) | 0); - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - this.ket = this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, DutchStemmer.a_3, 5); - if (among_var === 0) { - break lab0; - } - this.bra = this.cursor; - switch (among_var) { - case 0: - break lab0; - case 1: - if (! (! (this.I_p1 <= this.cursor) ? false : true)) { - break lab0; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "heid")) { - return false; - } - break; - case 2: - if (! DutchStemmer$r_en_ending$LDutchStemmer$(this)) { - break lab0; - } - break; - case 3: - if (! (! (this.I_p1 <= this.cursor) ? false : true)) { - break lab0; - } - if (! BaseStemmer$out_grouping_b$LBaseStemmer$AIII(this, DutchStemmer.g_v_j, 97, 232)) { - break lab0; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - } - } - cursor$0 = this.cursor = (((limit$0 = this.limit) - v_1) | 0); - v_2 = ((limit$0 - cursor$0) | 0); - lab1 = true; -lab1: - while (lab1 === true) { - lab1 = false; - if (! DutchStemmer$r_e_ending$LDutchStemmer$(this)) { - break lab1; - } - } - cursor$2 = this.cursor = (((limit$1 = this.limit) - v_2) | 0); - v_3 = ((limit$1 - cursor$2) | 0); - lab2 = true; -lab2: - while (lab2 === true) { - lab2 = false; - this.ket = this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 4, "heid")) { - break lab2; - } - this.bra = cursor$1 = this.cursor; - if (! (! (this.I_p2 <= cursor$1) ? false : true)) { - break lab2; - } - v_4 = ((this.limit - this.cursor) | 0); - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "c")) { - break lab3; - } - break lab2; - } - this.cursor = ((this.limit - v_4) | 0); - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - this.ket = this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 2, "en")) { - break lab2; - } - this.bra = this.cursor; - if (! DutchStemmer$r_en_ending$LDutchStemmer$(this)) { - break lab2; - } - } - cursor$4 = this.cursor = (((limit$2 = this.limit) - v_3) | 0); - v_5 = ((limit$2 - cursor$4) | 0); - lab4 = true; -lab4: - while (lab4 === true) { - lab4 = false; - this.ket = this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, DutchStemmer.a_4, 6); - if (among_var === 0) { - break lab4; - } - this.bra = this.cursor; - switch (among_var) { - case 0: - break lab4; - case 1: - if (! (! (this.I_p2 <= this.cursor) ? false : true)) { - break lab4; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - lab5 = true; - lab5: - while (lab5 === true) { - lab5 = false; - v_6 = ((this.limit - this.cursor) | 0); - lab6 = true; - lab6: - while (lab6 === true) { - lab6 = false; - this.ket = this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 2, "ig")) { - break lab6; - } - this.bra = cursor$3 = this.cursor; - if (! (! (this.I_p2 <= cursor$3) ? false : true)) { - break lab6; - } - v_7 = ((this.limit - this.cursor) | 0); - lab7 = true; - lab7: - while (lab7 === true) { - lab7 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "e")) { - break lab7; - } - break lab6; - } - this.cursor = ((this.limit - v_7) | 0); - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break lab5; - } - this.cursor = ((this.limit - v_6) | 0); - if (! DutchStemmer$r_undouble$LDutchStemmer$(this)) { - break lab4; - } - } - break; - case 2: - if (! (! (this.I_p2 <= this.cursor) ? false : true)) { - break lab4; - } - v_8 = ((this.limit - this.cursor) | 0); - lab8 = true; - lab8: - while (lab8 === true) { - lab8 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "e")) { - break lab8; - } - break lab4; - } - this.cursor = ((this.limit - v_8) | 0); - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 3: - if (! (! (this.I_p2 <= this.cursor) ? false : true)) { - break lab4; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - if (! DutchStemmer$r_e_ending$LDutchStemmer$(this)) { - break lab4; - } - break; - case 4: - if (! (! (this.I_p2 <= this.cursor) ? false : true)) { - break lab4; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 5: - if (! (! (this.I_p2 <= this.cursor) ? false : true)) { - break lab4; - } - if (! this.B_e_found) { - break lab4; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - } - } - cursor$6 = this.cursor = (((limit$3 = this.limit) - v_5) | 0); - v_9 = ((limit$3 - cursor$6) | 0); - lab9 = true; -lab9: - while (lab9 === true) { - lab9 = false; - if (! BaseStemmer$out_grouping_b$LBaseStemmer$AIII(this, DutchStemmer.g_v_I, 73, 232)) { - break lab9; - } - v_10 = ((this.limit - this.cursor) | 0); - if (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, DutchStemmer.a_5, 4) === 0) { - break lab9; - } - if (! BaseStemmer$out_grouping_b$LBaseStemmer$AIII(this, DutchStemmer.g_v, 97, 232)) { - break lab9; - } - cursor$5 = this.cursor = ((this.limit - v_10) | 0); - this.ket = cursor$5; - if (cursor$5 <= this.limit_backward) { - break lab9; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - this.bra = this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - } - this.cursor = ((this.limit - v_9) | 0); - return true; -}; - -DutchStemmer.prototype.r_standard_suffix = DutchStemmer.prototype.r_standard_suffix$; - -function DutchStemmer$r_standard_suffix$LDutchStemmer$($this) { - var among_var; - var v_1; - var v_2; - var v_3; - var v_4; - var v_5; - var v_6; - var v_7; - var v_8; - var v_9; - var v_10; - var lab0; - var lab1; - var lab2; - var lab3; - var lab4; - var lab5; - var lab6; - var lab7; - var lab8; - var lab9; - var limit$0; - var cursor$0; - var cursor$1; - var limit$1; - var cursor$2; - var cursor$3; - var limit$2; - var cursor$4; - var cursor$5; - var limit$3; - var cursor$6; - var $__jsx_postinc_t; - v_1 = (($this.limit - $this.cursor) | 0); - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - $this.ket = $this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, DutchStemmer.a_3, 5); - if (among_var === 0) { - break lab0; - } - $this.bra = $this.cursor; - switch (among_var) { - case 0: - break lab0; - case 1: - if (! (! ($this.I_p1 <= $this.cursor) ? false : true)) { - break lab0; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "heid")) { - return false; - } - break; - case 2: - if (! DutchStemmer$r_en_ending$LDutchStemmer$($this)) { - break lab0; - } - break; - case 3: - if (! (! ($this.I_p1 <= $this.cursor) ? false : true)) { - break lab0; - } - if (! BaseStemmer$out_grouping_b$LBaseStemmer$AIII($this, DutchStemmer.g_v_j, 97, 232)) { - break lab0; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - } - } - cursor$0 = $this.cursor = (((limit$0 = $this.limit) - v_1) | 0); - v_2 = ((limit$0 - cursor$0) | 0); - lab1 = true; -lab1: - while (lab1 === true) { - lab1 = false; - if (! DutchStemmer$r_e_ending$LDutchStemmer$($this)) { - break lab1; - } - } - cursor$2 = $this.cursor = (((limit$1 = $this.limit) - v_2) | 0); - v_3 = ((limit$1 - cursor$2) | 0); - lab2 = true; -lab2: - while (lab2 === true) { - lab2 = false; - $this.ket = $this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 4, "heid")) { - break lab2; - } - $this.bra = cursor$1 = $this.cursor; - if (! (! ($this.I_p2 <= cursor$1) ? false : true)) { - break lab2; - } - v_4 = (($this.limit - $this.cursor) | 0); - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "c")) { - break lab3; - } - break lab2; - } - $this.cursor = (($this.limit - v_4) | 0); - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - $this.ket = $this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 2, "en")) { - break lab2; - } - $this.bra = $this.cursor; - if (! DutchStemmer$r_en_ending$LDutchStemmer$($this)) { - break lab2; - } - } - cursor$4 = $this.cursor = (((limit$2 = $this.limit) - v_3) | 0); - v_5 = ((limit$2 - cursor$4) | 0); - lab4 = true; -lab4: - while (lab4 === true) { - lab4 = false; - $this.ket = $this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, DutchStemmer.a_4, 6); - if (among_var === 0) { - break lab4; - } - $this.bra = $this.cursor; - switch (among_var) { - case 0: - break lab4; - case 1: - if (! (! ($this.I_p2 <= $this.cursor) ? false : true)) { - break lab4; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - lab5 = true; - lab5: - while (lab5 === true) { - lab5 = false; - v_6 = (($this.limit - $this.cursor) | 0); - lab6 = true; - lab6: - while (lab6 === true) { - lab6 = false; - $this.ket = $this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 2, "ig")) { - break lab6; - } - $this.bra = cursor$3 = $this.cursor; - if (! (! ($this.I_p2 <= cursor$3) ? false : true)) { - break lab6; - } - v_7 = (($this.limit - $this.cursor) | 0); - lab7 = true; - lab7: - while (lab7 === true) { - lab7 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "e")) { - break lab7; - } - break lab6; - } - $this.cursor = (($this.limit - v_7) | 0); - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break lab5; - } - $this.cursor = (($this.limit - v_6) | 0); - if (! DutchStemmer$r_undouble$LDutchStemmer$($this)) { - break lab4; - } - } - break; - case 2: - if (! (! ($this.I_p2 <= $this.cursor) ? false : true)) { - break lab4; - } - v_8 = (($this.limit - $this.cursor) | 0); - lab8 = true; - lab8: - while (lab8 === true) { - lab8 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "e")) { - break lab8; - } - break lab4; - } - $this.cursor = (($this.limit - v_8) | 0); - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 3: - if (! (! ($this.I_p2 <= $this.cursor) ? false : true)) { - break lab4; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - if (! DutchStemmer$r_e_ending$LDutchStemmer$($this)) { - break lab4; - } - break; - case 4: - if (! (! ($this.I_p2 <= $this.cursor) ? false : true)) { - break lab4; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 5: - if (! (! ($this.I_p2 <= $this.cursor) ? false : true)) { - break lab4; - } - if (! $this.B_e_found) { - break lab4; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - } - } - cursor$6 = $this.cursor = (((limit$3 = $this.limit) - v_5) | 0); - v_9 = ((limit$3 - cursor$6) | 0); - lab9 = true; -lab9: - while (lab9 === true) { - lab9 = false; - if (! BaseStemmer$out_grouping_b$LBaseStemmer$AIII($this, DutchStemmer.g_v_I, 73, 232)) { - break lab9; - } - v_10 = (($this.limit - $this.cursor) | 0); - if (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, DutchStemmer.a_5, 4) === 0) { - break lab9; - } - if (! BaseStemmer$out_grouping_b$LBaseStemmer$AIII($this, DutchStemmer.g_v, 97, 232)) { - break lab9; - } - cursor$5 = $this.cursor = (($this.limit - v_10) | 0); - $this.ket = cursor$5; - if (cursor$5 <= $this.limit_backward) { - break lab9; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - $this.bra = $this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - } - $this.cursor = (($this.limit - v_9) | 0); - return true; -}; - -DutchStemmer.r_standard_suffix$LDutchStemmer$ = DutchStemmer$r_standard_suffix$LDutchStemmer$; - -DutchStemmer.prototype.stem$ = function () { - var v_1; - var v_2; - var v_4; - var lab0; - var lab1; - var lab2; - var lab3; - var cursor$0; - var cursor$1; - var cursor$2; - v_1 = this.cursor; - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - if (! DutchStemmer$r_prelude$LDutchStemmer$(this)) { - break lab0; - } - } - cursor$0 = this.cursor = v_1; - v_2 = cursor$0; - lab1 = true; -lab1: - while (lab1 === true) { - lab1 = false; - if (! DutchStemmer$r_mark_regions$LDutchStemmer$(this)) { - break lab1; - } - } - cursor$1 = this.cursor = v_2; - this.limit_backward = cursor$1; - this.cursor = this.limit; - lab2 = true; -lab2: - while (lab2 === true) { - lab2 = false; - if (! DutchStemmer$r_standard_suffix$LDutchStemmer$(this)) { - break lab2; - } - } - cursor$2 = this.cursor = this.limit_backward; - v_4 = cursor$2; - lab3 = true; -lab3: - while (lab3 === true) { - lab3 = false; - if (! DutchStemmer$r_postlude$LDutchStemmer$(this)) { - break lab3; - } - } - this.cursor = v_4; - return true; -}; - -DutchStemmer.prototype.stem = DutchStemmer.prototype.stem$; - -DutchStemmer.prototype.equals$X = function (o) { - return o instanceof DutchStemmer; -}; - -DutchStemmer.prototype.equals = DutchStemmer.prototype.equals$X; - -function DutchStemmer$equals$LDutchStemmer$X($this, o) { - return o instanceof DutchStemmer; -}; - -DutchStemmer.equals$LDutchStemmer$X = DutchStemmer$equals$LDutchStemmer$X; - -DutchStemmer.prototype.hashCode$ = function () { - var classname; - var hash; - var i; - var char; - classname = "DutchStemmer"; - hash = 0; - for (i = 0; i < classname.length; i++) { - char = classname.charCodeAt(i); - hash = (hash << 5) - hash + char; - hash = hash & hash; - } - return (hash | 0); -}; - -DutchStemmer.prototype.hashCode = DutchStemmer.prototype.hashCode$; - -function DutchStemmer$hashCode$LDutchStemmer$($this) { - var classname; - var hash; - var i; - var char; - classname = "DutchStemmer"; - hash = 0; - for (i = 0; i < classname.length; i++) { - char = classname.charCodeAt(i); - hash = (hash << 5) - hash + char; - hash = hash & hash; - } - return (hash | 0); -}; - -DutchStemmer.hashCode$LDutchStemmer$ = DutchStemmer$hashCode$LDutchStemmer$; - -DutchStemmer.serialVersionUID = 1; -$__jsx_lazy_init(DutchStemmer, "methodObject", function () { - return new DutchStemmer(); -}); -$__jsx_lazy_init(DutchStemmer, "a_0", function () { - return [ new Among("", -1, 6), new Among("\u00E1", 0, 1), new Among("\u00E4", 0, 1), new Among("\u00E9", 0, 2), new Among("\u00EB", 0, 2), new Among("\u00ED", 0, 3), new Among("\u00EF", 0, 3), new Among("\u00F3", 0, 4), new Among("\u00F6", 0, 4), new Among("\u00FA", 0, 5), new Among("\u00FC", 0, 5) ]; -}); -$__jsx_lazy_init(DutchStemmer, "a_1", function () { - return [ new Among("", -1, 3), new Among("I", 0, 2), new Among("Y", 0, 1) ]; -}); -$__jsx_lazy_init(DutchStemmer, "a_2", function () { - return [ new Among("dd", -1, -1), new Among("kk", -1, -1), new Among("tt", -1, -1) ]; -}); -$__jsx_lazy_init(DutchStemmer, "a_3", function () { - return [ new Among("ene", -1, 2), new Among("se", -1, 3), new Among("en", -1, 2), new Among("heden", 2, 1), new Among("s", -1, 3) ]; -}); -$__jsx_lazy_init(DutchStemmer, "a_4", function () { - return [ new Among("end", -1, 1), new Among("ig", -1, 2), new Among("ing", -1, 1), new Among("lijk", -1, 3), new Among("baar", -1, 4), new Among("bar", -1, 5) ]; -}); -$__jsx_lazy_init(DutchStemmer, "a_5", function () { - return [ new Among("aa", -1, -1), new Among("ee", -1, -1), new Among("oo", -1, -1), new Among("uu", -1, -1) ]; -}); -DutchStemmer.g_v = [ 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128 ]; -DutchStemmer.g_v_I = [ 1, 0, 0, 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128 ]; -DutchStemmer.g_v_j = [ 17, 67, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128 ]; - -var $__jsx_classMap = { - "src/among.jsx": { - Among: Among, - Among$SII: Among, - Among$SIIF$LBaseStemmer$B$LBaseStemmer$: Among$0 - }, - "src/stemmer.jsx": { - Stemmer: Stemmer, - Stemmer$: Stemmer - }, - "src/base-stemmer.jsx": { - BaseStemmer: BaseStemmer, - BaseStemmer$: BaseStemmer - }, - "src/dutch-stemmer.jsx": { - DutchStemmer: DutchStemmer, - DutchStemmer$: DutchStemmer - } -}; - - -})(JSX); - -var Among = JSX.require("src/among.jsx").Among; -var Among$SII = JSX.require("src/among.jsx").Among$SII; -var Stemmer = JSX.require("src/stemmer.jsx").Stemmer; -var BaseStemmer = JSX.require("src/base-stemmer.jsx").BaseStemmer; -var DutchStemmer = JSX.require("src/dutch-stemmer.jsx").DutchStemmer; diff --git a/sphinx/search/non-minified-js/finnish-stemmer.js b/sphinx/search/non-minified-js/finnish-stemmer.js index 5b520c00f58..c907c4a70b4 100644 --- a/sphinx/search/non-minified-js/finnish-stemmer.js +++ b/sphinx/search/non-minified-js/finnish-stemmer.js @@ -1,2812 +1,790 @@ -// generatedy by JSX compiler 0.9.89 (2014-05-20 06:01:03 +0900; 8e8c6105f36f3dfe440ea026a3c93a3444977102) -var JSX = {}; -(function (JSX) { -/** - * extends the class - */ -function $__jsx_extend(derivations, base) { - var ctor = function () {}; - ctor.prototype = base.prototype; - var proto = new ctor(); - for (var i in derivations) { - derivations[i].prototype = proto; - } -} - -/** - * copies the implementations from source interface to target - */ -function $__jsx_merge_interface(target, source) { - for (var k in source.prototype) - if (source.prototype.hasOwnProperty(k)) - target.prototype[k] = source.prototype[k]; -} - -/** - * defers the initialization of the property - */ -function $__jsx_lazy_init(obj, prop, func) { - function reset(obj, prop, value) { - delete obj[prop]; - obj[prop] = value; - return value; - } - - Object.defineProperty(obj, prop, { - get: function () { - return reset(obj, prop, func()); - }, - set: function (v) { - reset(obj, prop, v); - }, - enumerable: true, - configurable: true - }); -} - -var $__jsx_imul = Math.imul; -if (typeof $__jsx_imul === "undefined") { - $__jsx_imul = function (a, b) { - var ah = (a >>> 16) & 0xffff; - var al = a & 0xffff; - var bh = (b >>> 16) & 0xffff; - var bl = b & 0xffff; - return ((al * bl) + (((ah * bl + al * bh) << 16) >>> 0)|0); - }; -} - -/** - * fused int-ops with side-effects - */ -function $__jsx_ipadd(o, p, r) { - return o[p] = (o[p] + r) | 0; -} -function $__jsx_ipsub(o, p, r) { - return o[p] = (o[p] - r) | 0; -} -function $__jsx_ipmul(o, p, r) { - return o[p] = $__jsx_imul(o[p], r); -} -function $__jsx_ipdiv(o, p, r) { - return o[p] = (o[p] / r) | 0; -} -function $__jsx_ipmod(o, p, r) { - return o[p] = (o[p] % r) | 0; -} -function $__jsx_ippostinc(o, p) { - var v = o[p]; - o[p] = (v + 1) | 0; - return v; -} -function $__jsx_ippostdec(o, p) { - var v = o[p]; - o[p] = (v - 1) | 0; - return v; -} - -/** - * non-inlined version of Array#each - */ -function $__jsx_forEach(o, f) { - var l = o.length; - for (var i = 0; i < l; ++i) - f(o[i]); -} - -/* - * global functions, renamed to avoid conflict with local variable names - */ -var $__jsx_parseInt = parseInt; -var $__jsx_parseFloat = parseFloat; -function $__jsx_isNaN(n) { return n !== n; } -var $__jsx_isFinite = isFinite; - -var $__jsx_encodeURIComponent = encodeURIComponent; -var $__jsx_decodeURIComponent = decodeURIComponent; -var $__jsx_encodeURI = encodeURI; -var $__jsx_decodeURI = decodeURI; - -var $__jsx_ObjectToString = Object.prototype.toString; -var $__jsx_ObjectHasOwnProperty = Object.prototype.hasOwnProperty; - -/* - * profiler object, initialized afterwards - */ -function $__jsx_profiler() { -} - -/* - * public interface to JSX code - */ -JSX.require = function (path) { - var m = $__jsx_classMap[path]; - return m !== undefined ? m : null; -}; - -JSX.profilerIsRunning = function () { - return $__jsx_profiler.getResults != null; -}; - -JSX.getProfileResults = function () { - return ($__jsx_profiler.getResults || function () { return {}; })(); -}; - -JSX.postProfileResults = function (url, cb) { - if ($__jsx_profiler.postResults == null) - throw new Error("profiler has not been turned on"); - return $__jsx_profiler.postResults(url, cb); -}; - -JSX.resetProfileResults = function () { - if ($__jsx_profiler.resetResults == null) - throw new Error("profiler has not been turned on"); - return $__jsx_profiler.resetResults(); -}; -JSX.DEBUG = false; -var GeneratorFunction$0 = -(function () { - try { - return Function('import {GeneratorFunction} from "std:iteration"; return GeneratorFunction')(); - } catch (e) { - return function GeneratorFunction () {}; - } -})(); -var __jsx_generator_object$0 = -(function () { - function __jsx_generator_object() { - this.__next = 0; - this.__loop = null; - this.__seed = null; - this.__value = undefined; - this.__status = 0; // SUSPENDED: 0, ACTIVE: 1, DEAD: 2 - } - - __jsx_generator_object.prototype.next = function (seed) { - switch (this.__status) { - case 0: - this.__status = 1; - this.__seed = seed; - - // go next! - this.__loop(this.__next); - - var done = false; - if (this.__next != -1) { - this.__status = 0; - } else { - this.__status = 2; - done = true; - } - return { value: this.__value, done: done }; - case 1: - throw new Error("Generator is already running"); - case 2: - throw new Error("Generator is already finished"); - default: - throw new Error("Unexpected generator internal state"); - } - }; - - return __jsx_generator_object; -}()); -function Among(s, substring_i, result) { - this.s_size = s.length; - this.s = s; - this.substring_i = substring_i; - this.result = result; - this.method = null; - this.instance = null; -}; - -function Among$0(s, substring_i, result, method, instance) { - this.s_size = s.length; - this.s = s; - this.substring_i = substring_i; - this.result = result; - this.method = method; - this.instance = instance; -}; - -$__jsx_extend([Among, Among$0], Object); -function Stemmer() { -}; - -$__jsx_extend([Stemmer], Object); -function BaseStemmer() { - var current$0; - var cursor$0; - var limit$0; - this.cache = ({ }); - current$0 = this.current = ""; - cursor$0 = this.cursor = 0; - limit$0 = this.limit = current$0.length; - this.limit_backward = 0; - this.bra = cursor$0; - this.ket = limit$0; -}; - -$__jsx_extend([BaseStemmer], Stemmer); -BaseStemmer.prototype.setCurrent$S = function (value) { - var current$0; - var cursor$0; - var limit$0; - current$0 = this.current = value; - cursor$0 = this.cursor = 0; - limit$0 = this.limit = current$0.length; - this.limit_backward = 0; - this.bra = cursor$0; - this.ket = limit$0; -}; - - -function BaseStemmer$setCurrent$LBaseStemmer$S($this, value) { - var current$0; - var cursor$0; - var limit$0; - current$0 = $this.current = value; - cursor$0 = $this.cursor = 0; - limit$0 = $this.limit = current$0.length; - $this.limit_backward = 0; - $this.bra = cursor$0; - $this.ket = limit$0; -}; - -BaseStemmer.setCurrent$LBaseStemmer$S = BaseStemmer$setCurrent$LBaseStemmer$S; - -BaseStemmer.prototype.getCurrent$ = function () { - return this.current; -}; - - -function BaseStemmer$getCurrent$LBaseStemmer$($this) { - return $this.current; -}; - -BaseStemmer.getCurrent$LBaseStemmer$ = BaseStemmer$getCurrent$LBaseStemmer$; - -BaseStemmer.prototype.copy_from$LBaseStemmer$ = function (other) { - this.current = other.current; - this.cursor = other.cursor; - this.limit = other.limit; - this.limit_backward = other.limit_backward; - this.bra = other.bra; - this.ket = other.ket; -}; - - -function BaseStemmer$copy_from$LBaseStemmer$LBaseStemmer$($this, other) { - $this.current = other.current; - $this.cursor = other.cursor; - $this.limit = other.limit; - $this.limit_backward = other.limit_backward; - $this.bra = other.bra; - $this.ket = other.ket; -}; - -BaseStemmer.copy_from$LBaseStemmer$LBaseStemmer$ = BaseStemmer$copy_from$LBaseStemmer$LBaseStemmer$; - -BaseStemmer.prototype.in_grouping$AIII = function (s, min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor >= this.limit) { - return false; - } - ch = this.current.charCodeAt(this.cursor); - if (ch > max || ch < min) { - return false; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$in_grouping$LBaseStemmer$AIII($this, s, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor >= $this.limit) { - return false; - } - ch = $this.current.charCodeAt($this.cursor); - if (ch > max || ch < min) { - return false; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.in_grouping$LBaseStemmer$AIII = BaseStemmer$in_grouping$LBaseStemmer$AIII; - -BaseStemmer.prototype.in_grouping_b$AIII = function (s, min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor <= this.limit_backward) { - return false; - } - ch = this.current.charCodeAt(this.cursor - 1); - if (ch > max || ch < min) { - return false; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$in_grouping_b$LBaseStemmer$AIII($this, s, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor <= $this.limit_backward) { - return false; - } - ch = $this.current.charCodeAt($this.cursor - 1); - if (ch > max || ch < min) { - return false; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.in_grouping_b$LBaseStemmer$AIII = BaseStemmer$in_grouping_b$LBaseStemmer$AIII; - -BaseStemmer.prototype.out_grouping$AIII = function (s, min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor >= this.limit) { - return false; - } - ch = this.current.charCodeAt(this.cursor); - if (ch > max || ch < min) { - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; - } - ch -= min; - if ((s[ch >>> 3] & 0X1 << (ch & 0x7)) === 0) { - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; - } - return false; -}; - - -function BaseStemmer$out_grouping$LBaseStemmer$AIII($this, s, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor >= $this.limit) { - return false; - } - ch = $this.current.charCodeAt($this.cursor); - if (ch > max || ch < min) { - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; - } - ch -= min; - if ((s[ch >>> 3] & 0X1 << (ch & 0x7)) === 0) { - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; - } - return false; -}; - -BaseStemmer.out_grouping$LBaseStemmer$AIII = BaseStemmer$out_grouping$LBaseStemmer$AIII; - -BaseStemmer.prototype.out_grouping_b$AIII = function (s, min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor <= this.limit_backward) { - return false; - } - ch = this.current.charCodeAt(this.cursor - 1); - if (ch > max || ch < min) { - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; - } - return false; -}; - - -function BaseStemmer$out_grouping_b$LBaseStemmer$AIII($this, s, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor <= $this.limit_backward) { - return false; - } - ch = $this.current.charCodeAt($this.cursor - 1); - if (ch > max || ch < min) { - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; - } - return false; -}; - -BaseStemmer.out_grouping_b$LBaseStemmer$AIII = BaseStemmer$out_grouping_b$LBaseStemmer$AIII; - -BaseStemmer.prototype.in_range$II = function (min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor >= this.limit) { - return false; - } - ch = this.current.charCodeAt(this.cursor); - if (ch > max || ch < min) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$in_range$LBaseStemmer$II($this, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor >= $this.limit) { - return false; - } - ch = $this.current.charCodeAt($this.cursor); - if (ch > max || ch < min) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.in_range$LBaseStemmer$II = BaseStemmer$in_range$LBaseStemmer$II; - -BaseStemmer.prototype.in_range_b$II = function (min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor <= this.limit_backward) { - return false; - } - ch = this.current.charCodeAt(this.cursor - 1); - if (ch > max || ch < min) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$in_range_b$LBaseStemmer$II($this, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor <= $this.limit_backward) { - return false; - } - ch = $this.current.charCodeAt($this.cursor - 1); - if (ch > max || ch < min) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.in_range_b$LBaseStemmer$II = BaseStemmer$in_range_b$LBaseStemmer$II; - -BaseStemmer.prototype.out_range$II = function (min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor >= this.limit) { - return false; - } - ch = this.current.charCodeAt(this.cursor); - if (! (ch > max || ch < min)) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$out_range$LBaseStemmer$II($this, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor >= $this.limit) { - return false; - } - ch = $this.current.charCodeAt($this.cursor); - if (! (ch > max || ch < min)) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.out_range$LBaseStemmer$II = BaseStemmer$out_range$LBaseStemmer$II; - -BaseStemmer.prototype.out_range_b$II = function (min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor <= this.limit_backward) { - return false; - } - ch = this.current.charCodeAt(this.cursor - 1); - if (! (ch > max || ch < min)) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$out_range_b$LBaseStemmer$II($this, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor <= $this.limit_backward) { - return false; - } - ch = $this.current.charCodeAt($this.cursor - 1); - if (! (ch > max || ch < min)) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.out_range_b$LBaseStemmer$II = BaseStemmer$out_range_b$LBaseStemmer$II; - -BaseStemmer.prototype.eq_s$IS = function (s_size, s) { - var cursor$0; - if (((this.limit - this.cursor) | 0) < s_size) { - return false; - } - if (this.current.slice(cursor$0 = this.cursor, ((cursor$0 + s_size) | 0)) !== s) { - return false; - } - this.cursor = (this.cursor + s_size) | 0; - return true; -}; - - -function BaseStemmer$eq_s$LBaseStemmer$IS($this, s_size, s) { - var cursor$0; - if ((($this.limit - $this.cursor) | 0) < s_size) { - return false; - } - if ($this.current.slice(cursor$0 = $this.cursor, ((cursor$0 + s_size) | 0)) !== s) { - return false; - } - $this.cursor = ($this.cursor + s_size) | 0; - return true; -}; - -BaseStemmer.eq_s$LBaseStemmer$IS = BaseStemmer$eq_s$LBaseStemmer$IS; - -BaseStemmer.prototype.eq_s_b$IS = function (s_size, s) { - var cursor$0; - if (((this.cursor - this.limit_backward) | 0) < s_size) { - return false; - } - if (this.current.slice((((cursor$0 = this.cursor) - s_size) | 0), cursor$0) !== s) { - return false; - } - this.cursor = (this.cursor - s_size) | 0; - return true; +// Generated by Snowball 2.1.0 - https://snowballstem.org/ + +/**@constructor*/ +FinnishStemmer = function() { + var base = new BaseStemmer(); + /** @const */ var a_0 = [ + ["pa", -1, 1], + ["sti", -1, 2], + ["kaan", -1, 1], + ["han", -1, 1], + ["kin", -1, 1], + ["h\u00E4n", -1, 1], + ["k\u00E4\u00E4n", -1, 1], + ["ko", -1, 1], + ["p\u00E4", -1, 1], + ["k\u00F6", -1, 1] + ]; + + /** @const */ var a_1 = [ + ["lla", -1, -1], + ["na", -1, -1], + ["ssa", -1, -1], + ["ta", -1, -1], + ["lta", 3, -1], + ["sta", 3, -1] + ]; + + /** @const */ var a_2 = [ + ["ll\u00E4", -1, -1], + ["n\u00E4", -1, -1], + ["ss\u00E4", -1, -1], + ["t\u00E4", -1, -1], + ["lt\u00E4", 3, -1], + ["st\u00E4", 3, -1] + ]; + + /** @const */ var a_3 = [ + ["lle", -1, -1], + ["ine", -1, -1] + ]; + + /** @const */ var a_4 = [ + ["nsa", -1, 3], + ["mme", -1, 3], + ["nne", -1, 3], + ["ni", -1, 2], + ["si", -1, 1], + ["an", -1, 4], + ["en", -1, 6], + ["\u00E4n", -1, 5], + ["ns\u00E4", -1, 3] + ]; + + /** @const */ var a_5 = [ + ["aa", -1, -1], + ["ee", -1, -1], + ["ii", -1, -1], + ["oo", -1, -1], + ["uu", -1, -1], + ["\u00E4\u00E4", -1, -1], + ["\u00F6\u00F6", -1, -1] + ]; + + /** @const */ var a_6 = [ + ["a", -1, 8], + ["lla", 0, -1], + ["na", 0, -1], + ["ssa", 0, -1], + ["ta", 0, -1], + ["lta", 4, -1], + ["sta", 4, -1], + ["tta", 4, 2], + ["lle", -1, -1], + ["ine", -1, -1], + ["ksi", -1, -1], + ["n", -1, 7], + ["han", 11, 1], + ["den", 11, -1, r_VI], + ["seen", 11, -1, r_LONG], + ["hen", 11, 2], + ["tten", 11, -1, r_VI], + ["hin", 11, 3], + ["siin", 11, -1, r_VI], + ["hon", 11, 4], + ["h\u00E4n", 11, 5], + ["h\u00F6n", 11, 6], + ["\u00E4", -1, 8], + ["ll\u00E4", 22, -1], + ["n\u00E4", 22, -1], + ["ss\u00E4", 22, -1], + ["t\u00E4", 22, -1], + ["lt\u00E4", 26, -1], + ["st\u00E4", 26, -1], + ["tt\u00E4", 26, 2] + ]; + + /** @const */ var a_7 = [ + ["eja", -1, -1], + ["mma", -1, 1], + ["imma", 1, -1], + ["mpa", -1, 1], + ["impa", 3, -1], + ["mmi", -1, 1], + ["immi", 5, -1], + ["mpi", -1, 1], + ["impi", 7, -1], + ["ej\u00E4", -1, -1], + ["mm\u00E4", -1, 1], + ["imm\u00E4", 10, -1], + ["mp\u00E4", -1, 1], + ["imp\u00E4", 12, -1] + ]; + + /** @const */ var a_8 = [ + ["i", -1, -1], + ["j", -1, -1] + ]; + + /** @const */ var a_9 = [ + ["mma", -1, 1], + ["imma", 0, -1] + ]; + + /** @const */ var /** Array */ g_AEI = [17, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8]; + + /** @const */ var /** Array */ g_C = [119, 223, 119, 1]; + + /** @const */ var /** Array */ g_V1 = [17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 32]; + + /** @const */ var /** Array */ g_V2 = [17, 65, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 32]; + + /** @const */ var /** Array */ g_particle_end = [17, 97, 24, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 32]; + + var /** boolean */ B_ending_removed = false; + var /** string */ S_x = ''; + var /** number */ I_p2 = 0; + var /** number */ I_p1 = 0; + + + /** @return {boolean} */ + function r_mark_regions() { + I_p1 = base.limit; + I_p2 = base.limit; + golab0: while(true) + { + var /** number */ v_1 = base.cursor; + lab1: { + if (!(base.in_grouping(g_V1, 97, 246))) + { + break lab1; + } + base.cursor = v_1; + break golab0; + } + base.cursor = v_1; + if (base.cursor >= base.limit) + { + return false; + } + base.cursor++; + } + golab2: while(true) + { + lab3: { + if (!(base.out_grouping(g_V1, 97, 246))) + { + break lab3; + } + break golab2; + } + if (base.cursor >= base.limit) + { + return false; + } + base.cursor++; + } + I_p1 = base.cursor; + golab4: while(true) + { + var /** number */ v_3 = base.cursor; + lab5: { + if (!(base.in_grouping(g_V1, 97, 246))) + { + break lab5; + } + base.cursor = v_3; + break golab4; + } + base.cursor = v_3; + if (base.cursor >= base.limit) + { + return false; + } + base.cursor++; + } + golab6: while(true) + { + lab7: { + if (!(base.out_grouping(g_V1, 97, 246))) + { + break lab7; + } + break golab6; + } + if (base.cursor >= base.limit) + { + return false; + } + base.cursor++; + } + I_p2 = base.cursor; + return true; + }; + + /** @return {boolean} */ + function r_R2() { + if (!(I_p2 <= base.cursor)) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_particle_etc() { + var /** number */ among_var; + if (base.cursor < I_p1) + { + return false; + } + var /** number */ v_2 = base.limit_backward; + base.limit_backward = I_p1; + base.ket = base.cursor; + among_var = base.find_among_b(a_0); + if (among_var == 0) + { + base.limit_backward = v_2; + return false; + } + base.bra = base.cursor; + base.limit_backward = v_2; + switch (among_var) { + case 1: + if (!(base.in_grouping_b(g_particle_end, 97, 246))) + { + return false; + } + break; + case 2: + if (!r_R2()) + { + return false; + } + break; + } + if (!base.slice_del()) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_possessive() { + var /** number */ among_var; + if (base.cursor < I_p1) + { + return false; + } + var /** number */ v_2 = base.limit_backward; + base.limit_backward = I_p1; + base.ket = base.cursor; + among_var = base.find_among_b(a_4); + if (among_var == 0) + { + base.limit_backward = v_2; + return false; + } + base.bra = base.cursor; + base.limit_backward = v_2; + switch (among_var) { + case 1: + { + var /** number */ v_3 = base.limit - base.cursor; + lab0: { + if (!(base.eq_s_b("k"))) + { + break lab0; + } + return false; + } + base.cursor = base.limit - v_3; + } + if (!base.slice_del()) + { + return false; + } + break; + case 2: + if (!base.slice_del()) + { + return false; + } + base.ket = base.cursor; + if (!(base.eq_s_b("kse"))) + { + return false; + } + base.bra = base.cursor; + if (!base.slice_from("ksi")) + { + return false; + } + break; + case 3: + if (!base.slice_del()) + { + return false; + } + break; + case 4: + if (base.find_among_b(a_1) == 0) + { + return false; + } + if (!base.slice_del()) + { + return false; + } + break; + case 5: + if (base.find_among_b(a_2) == 0) + { + return false; + } + if (!base.slice_del()) + { + return false; + } + break; + case 6: + if (base.find_among_b(a_3) == 0) + { + return false; + } + if (!base.slice_del()) + { + return false; + } + break; + } + return true; + }; + + /** @return {boolean} */ + function r_LONG() { + if (base.find_among_b(a_5) == 0) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_VI() { + if (!(base.eq_s_b("i"))) + { + return false; + } + if (!(base.in_grouping_b(g_V2, 97, 246))) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_case_ending() { + var /** number */ among_var; + if (base.cursor < I_p1) + { + return false; + } + var /** number */ v_2 = base.limit_backward; + base.limit_backward = I_p1; + base.ket = base.cursor; + among_var = base.find_among_b(a_6); + if (among_var == 0) + { + base.limit_backward = v_2; + return false; + } + base.bra = base.cursor; + base.limit_backward = v_2; + switch (among_var) { + case 1: + if (!(base.eq_s_b("a"))) + { + return false; + } + break; + case 2: + if (!(base.eq_s_b("e"))) + { + return false; + } + break; + case 3: + if (!(base.eq_s_b("i"))) + { + return false; + } + break; + case 4: + if (!(base.eq_s_b("o"))) + { + return false; + } + break; + case 5: + if (!(base.eq_s_b("\u00E4"))) + { + return false; + } + break; + case 6: + if (!(base.eq_s_b("\u00F6"))) + { + return false; + } + break; + case 7: + var /** number */ v_3 = base.limit - base.cursor; + lab0: { + var /** number */ v_4 = base.limit - base.cursor; + lab1: { + var /** number */ v_5 = base.limit - base.cursor; + lab2: { + if (!r_LONG()) + { + break lab2; + } + break lab1; + } + base.cursor = base.limit - v_5; + if (!(base.eq_s_b("ie"))) + { + base.cursor = base.limit - v_3; + break lab0; + } + } + base.cursor = base.limit - v_4; + if (base.cursor <= base.limit_backward) + { + base.cursor = base.limit - v_3; + break lab0; + } + base.cursor--; + base.bra = base.cursor; + } + break; + case 8: + if (!(base.in_grouping_b(g_V1, 97, 246))) + { + return false; + } + if (!(base.in_grouping_b(g_C, 98, 122))) + { + return false; + } + break; + } + if (!base.slice_del()) + { + return false; + } + B_ending_removed = true; + return true; + }; + + /** @return {boolean} */ + function r_other_endings() { + var /** number */ among_var; + if (base.cursor < I_p2) + { + return false; + } + var /** number */ v_2 = base.limit_backward; + base.limit_backward = I_p2; + base.ket = base.cursor; + among_var = base.find_among_b(a_7); + if (among_var == 0) + { + base.limit_backward = v_2; + return false; + } + base.bra = base.cursor; + base.limit_backward = v_2; + switch (among_var) { + case 1: + { + var /** number */ v_3 = base.limit - base.cursor; + lab0: { + if (!(base.eq_s_b("po"))) + { + break lab0; + } + return false; + } + base.cursor = base.limit - v_3; + } + break; + } + if (!base.slice_del()) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_i_plural() { + if (base.cursor < I_p1) + { + return false; + } + var /** number */ v_2 = base.limit_backward; + base.limit_backward = I_p1; + base.ket = base.cursor; + if (base.find_among_b(a_8) == 0) + { + base.limit_backward = v_2; + return false; + } + base.bra = base.cursor; + base.limit_backward = v_2; + if (!base.slice_del()) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_t_plural() { + var /** number */ among_var; + if (base.cursor < I_p1) + { + return false; + } + var /** number */ v_2 = base.limit_backward; + base.limit_backward = I_p1; + base.ket = base.cursor; + if (!(base.eq_s_b("t"))) + { + base.limit_backward = v_2; + return false; + } + base.bra = base.cursor; + var /** number */ v_3 = base.limit - base.cursor; + if (!(base.in_grouping_b(g_V1, 97, 246))) + { + base.limit_backward = v_2; + return false; + } + base.cursor = base.limit - v_3; + if (!base.slice_del()) + { + return false; + } + base.limit_backward = v_2; + if (base.cursor < I_p2) + { + return false; + } + var /** number */ v_5 = base.limit_backward; + base.limit_backward = I_p2; + base.ket = base.cursor; + among_var = base.find_among_b(a_9); + if (among_var == 0) + { + base.limit_backward = v_5; + return false; + } + base.bra = base.cursor; + base.limit_backward = v_5; + switch (among_var) { + case 1: + { + var /** number */ v_6 = base.limit - base.cursor; + lab0: { + if (!(base.eq_s_b("po"))) + { + break lab0; + } + return false; + } + base.cursor = base.limit - v_6; + } + break; + } + if (!base.slice_del()) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_tidy() { + if (base.cursor < I_p1) + { + return false; + } + var /** number */ v_2 = base.limit_backward; + base.limit_backward = I_p1; + var /** number */ v_3 = base.limit - base.cursor; + lab0: { + var /** number */ v_4 = base.limit - base.cursor; + if (!r_LONG()) + { + break lab0; + } + base.cursor = base.limit - v_4; + base.ket = base.cursor; + if (base.cursor <= base.limit_backward) + { + break lab0; + } + base.cursor--; + base.bra = base.cursor; + if (!base.slice_del()) + { + return false; + } + } + base.cursor = base.limit - v_3; + var /** number */ v_5 = base.limit - base.cursor; + lab1: { + base.ket = base.cursor; + if (!(base.in_grouping_b(g_AEI, 97, 228))) + { + break lab1; + } + base.bra = base.cursor; + if (!(base.in_grouping_b(g_C, 98, 122))) + { + break lab1; + } + if (!base.slice_del()) + { + return false; + } + } + base.cursor = base.limit - v_5; + var /** number */ v_6 = base.limit - base.cursor; + lab2: { + base.ket = base.cursor; + if (!(base.eq_s_b("j"))) + { + break lab2; + } + base.bra = base.cursor; + lab3: { + var /** number */ v_7 = base.limit - base.cursor; + lab4: { + if (!(base.eq_s_b("o"))) + { + break lab4; + } + break lab3; + } + base.cursor = base.limit - v_7; + if (!(base.eq_s_b("u"))) + { + break lab2; + } + } + if (!base.slice_del()) + { + return false; + } + } + base.cursor = base.limit - v_6; + var /** number */ v_8 = base.limit - base.cursor; + lab5: { + base.ket = base.cursor; + if (!(base.eq_s_b("o"))) + { + break lab5; + } + base.bra = base.cursor; + if (!(base.eq_s_b("j"))) + { + break lab5; + } + if (!base.slice_del()) + { + return false; + } + } + base.cursor = base.limit - v_8; + base.limit_backward = v_2; + golab6: while(true) + { + var /** number */ v_9 = base.limit - base.cursor; + lab7: { + if (!(base.out_grouping_b(g_V1, 97, 246))) + { + break lab7; + } + base.cursor = base.limit - v_9; + break golab6; + } + base.cursor = base.limit - v_9; + if (base.cursor <= base.limit_backward) + { + return false; + } + base.cursor--; + } + base.ket = base.cursor; + if (!(base.in_grouping_b(g_C, 98, 122))) + { + return false; + } + base.bra = base.cursor; + S_x = base.slice_to(); + if (S_x == '') + { + return false; + } + if (!(base.eq_s_b(S_x))) + { + return false; + } + if (!base.slice_del()) + { + return false; + } + return true; + }; + + this.stem = /** @return {boolean} */ function() { + var /** number */ v_1 = base.cursor; + r_mark_regions(); + base.cursor = v_1; + B_ending_removed = false; + base.limit_backward = base.cursor; base.cursor = base.limit; + var /** number */ v_2 = base.limit - base.cursor; + r_particle_etc(); + base.cursor = base.limit - v_2; + var /** number */ v_3 = base.limit - base.cursor; + r_possessive(); + base.cursor = base.limit - v_3; + var /** number */ v_4 = base.limit - base.cursor; + r_case_ending(); + base.cursor = base.limit - v_4; + var /** number */ v_5 = base.limit - base.cursor; + r_other_endings(); + base.cursor = base.limit - v_5; + lab0: { + lab1: { + if (!B_ending_removed) + { + break lab1; + } + var /** number */ v_7 = base.limit - base.cursor; + r_i_plural(); + base.cursor = base.limit - v_7; + break lab0; + } + var /** number */ v_8 = base.limit - base.cursor; + r_t_plural(); + base.cursor = base.limit - v_8; + } + var /** number */ v_9 = base.limit - base.cursor; + r_tidy(); + base.cursor = base.limit - v_9; + base.cursor = base.limit_backward; + return true; + }; + + /**@return{string}*/ + this['stemWord'] = function(/**string*/word) { + base.setCurrent(word); + this.stem(); + return base.getCurrent(); + }; }; - - -function BaseStemmer$eq_s_b$LBaseStemmer$IS($this, s_size, s) { - var cursor$0; - if ((($this.cursor - $this.limit_backward) | 0) < s_size) { - return false; - } - if ($this.current.slice((((cursor$0 = $this.cursor) - s_size) | 0), cursor$0) !== s) { - return false; - } - $this.cursor = ($this.cursor - s_size) | 0; - return true; -}; - -BaseStemmer.eq_s_b$LBaseStemmer$IS = BaseStemmer$eq_s_b$LBaseStemmer$IS; - -BaseStemmer.prototype.eq_v$S = function (s) { - return BaseStemmer$eq_s$LBaseStemmer$IS(this, s.length, s); -}; - - -function BaseStemmer$eq_v$LBaseStemmer$S($this, s) { - return BaseStemmer$eq_s$LBaseStemmer$IS($this, s.length, s); -}; - -BaseStemmer.eq_v$LBaseStemmer$S = BaseStemmer$eq_v$LBaseStemmer$S; - -BaseStemmer.prototype.eq_v_b$S = function (s) { - return BaseStemmer$eq_s_b$LBaseStemmer$IS(this, s.length, s); -}; - - -function BaseStemmer$eq_v_b$LBaseStemmer$S($this, s) { - return BaseStemmer$eq_s_b$LBaseStemmer$IS($this, s.length, s); -}; - -BaseStemmer.eq_v_b$LBaseStemmer$S = BaseStemmer$eq_v_b$LBaseStemmer$S; - -BaseStemmer.prototype.find_among$ALAmong$I = function (v, v_size) { - var i; - var j; - var c; - var l; - var common_i; - var common_j; - var first_key_inspected; - var k; - var diff; - var common; - var w; - var i2; - var res; - i = 0; - j = v_size; - c = this.cursor; - l = this.limit; - common_i = 0; - common_j = 0; - first_key_inspected = false; - while (true) { - k = i + (j - i >>> 1); - diff = 0; - common = (common_i < common_j ? common_i : common_j); - w = v[k]; - for (i2 = common; i2 < w.s_size; i2++) { - if (c + common === l) { - diff = -1; - break; - } - diff = this.current.charCodeAt(c + common) - w.s.charCodeAt(i2); - if (diff !== 0) { - break; - } - common++; - } - if (diff < 0) { - j = k; - common_j = common; - } else { - i = k; - common_i = common; - } - if (j - i <= 1) { - if (i > 0) { - break; - } - if (j === i) { - break; - } - if (first_key_inspected) { - break; - } - first_key_inspected = true; - } - } - while (true) { - w = v[i]; - if (common_i >= w.s_size) { - this.cursor = (c + w.s_size | 0); - if (w.method == null) { - return w.result; - } - res = w.method(w.instance); - this.cursor = (c + w.s_size | 0); - if (res) { - return w.result; - } - } - i = w.substring_i; - if (i < 0) { - return 0; - } - } - return -1; -}; - - -function BaseStemmer$find_among$LBaseStemmer$ALAmong$I($this, v, v_size) { - var i; - var j; - var c; - var l; - var common_i; - var common_j; - var first_key_inspected; - var k; - var diff; - var common; - var w; - var i2; - var res; - i = 0; - j = v_size; - c = $this.cursor; - l = $this.limit; - common_i = 0; - common_j = 0; - first_key_inspected = false; - while (true) { - k = i + (j - i >>> 1); - diff = 0; - common = (common_i < common_j ? common_i : common_j); - w = v[k]; - for (i2 = common; i2 < w.s_size; i2++) { - if (c + common === l) { - diff = -1; - break; - } - diff = $this.current.charCodeAt(c + common) - w.s.charCodeAt(i2); - if (diff !== 0) { - break; - } - common++; - } - if (diff < 0) { - j = k; - common_j = common; - } else { - i = k; - common_i = common; - } - if (j - i <= 1) { - if (i > 0) { - break; - } - if (j === i) { - break; - } - if (first_key_inspected) { - break; - } - first_key_inspected = true; - } - } - while (true) { - w = v[i]; - if (common_i >= w.s_size) { - $this.cursor = (c + w.s_size | 0); - if (w.method == null) { - return w.result; - } - res = w.method(w.instance); - $this.cursor = (c + w.s_size | 0); - if (res) { - return w.result; - } - } - i = w.substring_i; - if (i < 0) { - return 0; - } - } - return -1; -}; - -BaseStemmer.find_among$LBaseStemmer$ALAmong$I = BaseStemmer$find_among$LBaseStemmer$ALAmong$I; - -BaseStemmer.prototype.find_among_b$ALAmong$I = function (v, v_size) { - var i; - var j; - var c; - var lb; - var common_i; - var common_j; - var first_key_inspected; - var k; - var diff; - var common; - var w; - var i2; - var res; - i = 0; - j = v_size; - c = this.cursor; - lb = this.limit_backward; - common_i = 0; - common_j = 0; - first_key_inspected = false; - while (true) { - k = i + (j - i >> 1); - diff = 0; - common = (common_i < common_j ? common_i : common_j); - w = v[k]; - for (i2 = w.s_size - 1 - common; i2 >= 0; i2--) { - if (c - common === lb) { - diff = -1; - break; - } - diff = this.current.charCodeAt(c - 1 - common) - w.s.charCodeAt(i2); - if (diff !== 0) { - break; - } - common++; - } - if (diff < 0) { - j = k; - common_j = common; - } else { - i = k; - common_i = common; - } - if (j - i <= 1) { - if (i > 0) { - break; - } - if (j === i) { - break; - } - if (first_key_inspected) { - break; - } - first_key_inspected = true; - } - } - while (true) { - w = v[i]; - if (common_i >= w.s_size) { - this.cursor = (c - w.s_size | 0); - if (w.method == null) { - return w.result; - } - res = w.method(this); - this.cursor = (c - w.s_size | 0); - if (res) { - return w.result; - } - } - i = w.substring_i; - if (i < 0) { - return 0; - } - } - return -1; -}; - - -function BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, v, v_size) { - var i; - var j; - var c; - var lb; - var common_i; - var common_j; - var first_key_inspected; - var k; - var diff; - var common; - var w; - var i2; - var res; - i = 0; - j = v_size; - c = $this.cursor; - lb = $this.limit_backward; - common_i = 0; - common_j = 0; - first_key_inspected = false; - while (true) { - k = i + (j - i >> 1); - diff = 0; - common = (common_i < common_j ? common_i : common_j); - w = v[k]; - for (i2 = w.s_size - 1 - common; i2 >= 0; i2--) { - if (c - common === lb) { - diff = -1; - break; - } - diff = $this.current.charCodeAt(c - 1 - common) - w.s.charCodeAt(i2); - if (diff !== 0) { - break; - } - common++; - } - if (diff < 0) { - j = k; - common_j = common; - } else { - i = k; - common_i = common; - } - if (j - i <= 1) { - if (i > 0) { - break; - } - if (j === i) { - break; - } - if (first_key_inspected) { - break; - } - first_key_inspected = true; - } - } - while (true) { - w = v[i]; - if (common_i >= w.s_size) { - $this.cursor = (c - w.s_size | 0); - if (w.method == null) { - return w.result; - } - res = w.method($this); - $this.cursor = (c - w.s_size | 0); - if (res) { - return w.result; - } - } - i = w.substring_i; - if (i < 0) { - return 0; - } - } - return -1; -}; - -BaseStemmer.find_among_b$LBaseStemmer$ALAmong$I = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I; - -BaseStemmer.prototype.replace_s$IIS = function (c_bra, c_ket, s) { - var adjustment; - adjustment = ((s.length - (((c_ket - c_bra) | 0))) | 0); - this.current = this.current.slice(0, c_bra) + s + this.current.slice(c_ket); - this.limit = (this.limit + adjustment) | 0; - if (this.cursor >= c_ket) { - this.cursor = (this.cursor + adjustment) | 0; - } else if (this.cursor > c_bra) { - this.cursor = c_bra; - } - return (adjustment | 0); -}; - - -function BaseStemmer$replace_s$LBaseStemmer$IIS($this, c_bra, c_ket, s) { - var adjustment; - adjustment = ((s.length - (((c_ket - c_bra) | 0))) | 0); - $this.current = $this.current.slice(0, c_bra) + s + $this.current.slice(c_ket); - $this.limit = ($this.limit + adjustment) | 0; - if ($this.cursor >= c_ket) { - $this.cursor = ($this.cursor + adjustment) | 0; - } else if ($this.cursor > c_bra) { - $this.cursor = c_bra; - } - return (adjustment | 0); -}; - -BaseStemmer.replace_s$LBaseStemmer$IIS = BaseStemmer$replace_s$LBaseStemmer$IIS; - -BaseStemmer.prototype.slice_check$ = function () { - var bra$0; - var ket$0; - var limit$0; - return ((bra$0 = this.bra) < 0 || bra$0 > (ket$0 = this.ket) || ket$0 > (limit$0 = this.limit) || limit$0 > this.current.length ? false : true); -}; - - -function BaseStemmer$slice_check$LBaseStemmer$($this) { - var bra$0; - var ket$0; - var limit$0; - return ((bra$0 = $this.bra) < 0 || bra$0 > (ket$0 = $this.ket) || ket$0 > (limit$0 = $this.limit) || limit$0 > $this.current.length ? false : true); -}; - -BaseStemmer.slice_check$LBaseStemmer$ = BaseStemmer$slice_check$LBaseStemmer$; - -BaseStemmer.prototype.slice_from$S = function (s) { - var result; - var bra$0; - var ket$0; - var limit$0; - result = false; - if ((bra$0 = this.bra) < 0 || bra$0 > (ket$0 = this.ket) || ket$0 > (limit$0 = this.limit) || limit$0 > this.current.length ? false : true) { - BaseStemmer$replace_s$LBaseStemmer$IIS(this, this.bra, this.ket, s); - result = true; - } - return result; -}; - - -function BaseStemmer$slice_from$LBaseStemmer$S($this, s) { - var result; - var bra$0; - var ket$0; - var limit$0; - result = false; - if ((bra$0 = $this.bra) < 0 || bra$0 > (ket$0 = $this.ket) || ket$0 > (limit$0 = $this.limit) || limit$0 > $this.current.length ? false : true) { - BaseStemmer$replace_s$LBaseStemmer$IIS($this, $this.bra, $this.ket, s); - result = true; - } - return result; -}; - -BaseStemmer.slice_from$LBaseStemmer$S = BaseStemmer$slice_from$LBaseStemmer$S; - -BaseStemmer.prototype.slice_del$ = function () { - return BaseStemmer$slice_from$LBaseStemmer$S(this, ""); -}; - - -function BaseStemmer$slice_del$LBaseStemmer$($this) { - return BaseStemmer$slice_from$LBaseStemmer$S($this, ""); -}; - -BaseStemmer.slice_del$LBaseStemmer$ = BaseStemmer$slice_del$LBaseStemmer$; - -BaseStemmer.prototype.insert$IIS = function (c_bra, c_ket, s) { - var adjustment; - adjustment = BaseStemmer$replace_s$LBaseStemmer$IIS(this, c_bra, c_ket, s); - if (c_bra <= this.bra) { - this.bra = (this.bra + adjustment) | 0; - } - if (c_bra <= this.ket) { - this.ket = (this.ket + adjustment) | 0; - } -}; - - -function BaseStemmer$insert$LBaseStemmer$IIS($this, c_bra, c_ket, s) { - var adjustment; - adjustment = BaseStemmer$replace_s$LBaseStemmer$IIS($this, c_bra, c_ket, s); - if (c_bra <= $this.bra) { - $this.bra = ($this.bra + adjustment) | 0; - } - if (c_bra <= $this.ket) { - $this.ket = ($this.ket + adjustment) | 0; - } -}; - -BaseStemmer.insert$LBaseStemmer$IIS = BaseStemmer$insert$LBaseStemmer$IIS; - -BaseStemmer.prototype.slice_to$S = function (s) { - var result; - var bra$0; - var ket$0; - var limit$0; - result = ''; - if ((bra$0 = this.bra) < 0 || bra$0 > (ket$0 = this.ket) || ket$0 > (limit$0 = this.limit) || limit$0 > this.current.length ? false : true) { - result = this.current.slice(this.bra, this.ket); - } - return result; -}; - - -function BaseStemmer$slice_to$LBaseStemmer$S($this, s) { - var result; - var bra$0; - var ket$0; - var limit$0; - result = ''; - if ((bra$0 = $this.bra) < 0 || bra$0 > (ket$0 = $this.ket) || ket$0 > (limit$0 = $this.limit) || limit$0 > $this.current.length ? false : true) { - result = $this.current.slice($this.bra, $this.ket); - } - return result; -}; - -BaseStemmer.slice_to$LBaseStemmer$S = BaseStemmer$slice_to$LBaseStemmer$S; - -BaseStemmer.prototype.assign_to$S = function (s) { - return this.current.slice(0, this.limit); -}; - - -function BaseStemmer$assign_to$LBaseStemmer$S($this, s) { - return $this.current.slice(0, $this.limit); -}; - -BaseStemmer.assign_to$LBaseStemmer$S = BaseStemmer$assign_to$LBaseStemmer$S; - -BaseStemmer.prototype.stem$ = function () { - return false; -}; - - -BaseStemmer.prototype.stemWord$S = function (word) { - var result; - var current$0; - var cursor$0; - var limit$0; - result = this.cache['.' + word]; - if (result == null) { - current$0 = this.current = word; - cursor$0 = this.cursor = 0; - limit$0 = this.limit = current$0.length; - this.limit_backward = 0; - this.bra = cursor$0; - this.ket = limit$0; - this.stem$(); - result = this.current; - this.cache['.' + word] = result; - } - return result; -}; - -BaseStemmer.prototype.stemWord = BaseStemmer.prototype.stemWord$S; - -BaseStemmer.prototype.stemWords$AS = function (words) { - var results; - var i; - var word; - var result; - var current$0; - var cursor$0; - var limit$0; - results = [ ]; - for (i = 0; i < words.length; i++) { - word = words[i]; - result = this.cache['.' + word]; - if (result == null) { - current$0 = this.current = word; - cursor$0 = this.cursor = 0; - limit$0 = this.limit = current$0.length; - this.limit_backward = 0; - this.bra = cursor$0; - this.ket = limit$0; - this.stem$(); - result = this.current; - this.cache['.' + word] = result; - } - results.push(result); - } - return results; -}; - -BaseStemmer.prototype.stemWords = BaseStemmer.prototype.stemWords$AS; - -function FinnishStemmer() { - BaseStemmer.call(this); - this.B_ending_removed = false; - this.S_x = ""; - this.I_p2 = 0; - this.I_p1 = 0; -}; - -$__jsx_extend([FinnishStemmer], BaseStemmer); -FinnishStemmer.prototype.copy_from$LFinnishStemmer$ = function (other) { - this.B_ending_removed = other.B_ending_removed; - this.S_x = other.S_x; - this.I_p2 = other.I_p2; - this.I_p1 = other.I_p1; - BaseStemmer$copy_from$LBaseStemmer$LBaseStemmer$(this, other); -}; - -FinnishStemmer.prototype.copy_from = FinnishStemmer.prototype.copy_from$LFinnishStemmer$; - -FinnishStemmer.prototype.r_mark_regions$ = function () { - var v_1; - var v_3; - var lab1; - var lab3; - var lab5; - var lab7; - var cursor$0; - var limit$0; - var cursor$1; - var $__jsx_postinc_t; - this.I_p1 = limit$0 = this.limit; - this.I_p2 = limit$0; -golab0: - while (true) { - v_1 = this.cursor; - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, FinnishStemmer.g_V1, 97, 246)) { - break lab1; - } - this.cursor = v_1; - break golab0; - } - cursor$0 = this.cursor = v_1; - if (cursor$0 >= this.limit) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } -golab2: - while (true) { - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII(this, FinnishStemmer.g_V1, 97, 246)) { - break lab3; - } - break golab2; - } - if (this.cursor >= this.limit) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - this.I_p1 = this.cursor; -golab4: - while (true) { - v_3 = this.cursor; - lab5 = true; - lab5: - while (lab5 === true) { - lab5 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, FinnishStemmer.g_V1, 97, 246)) { - break lab5; - } - this.cursor = v_3; - break golab4; - } - cursor$1 = this.cursor = v_3; - if (cursor$1 >= this.limit) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } -golab6: - while (true) { - lab7 = true; - lab7: - while (lab7 === true) { - lab7 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII(this, FinnishStemmer.g_V1, 97, 246)) { - break lab7; - } - break golab6; - } - if (this.cursor >= this.limit) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - this.I_p2 = this.cursor; - return true; -}; - -FinnishStemmer.prototype.r_mark_regions = FinnishStemmer.prototype.r_mark_regions$; - -function FinnishStemmer$r_mark_regions$LFinnishStemmer$($this) { - var v_1; - var v_3; - var lab1; - var lab3; - var lab5; - var lab7; - var cursor$0; - var limit$0; - var cursor$1; - var $__jsx_postinc_t; - $this.I_p1 = limit$0 = $this.limit; - $this.I_p2 = limit$0; -golab0: - while (true) { - v_1 = $this.cursor; - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII($this, FinnishStemmer.g_V1, 97, 246)) { - break lab1; - } - $this.cursor = v_1; - break golab0; - } - cursor$0 = $this.cursor = v_1; - if (cursor$0 >= $this.limit) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } -golab2: - while (true) { - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII($this, FinnishStemmer.g_V1, 97, 246)) { - break lab3; - } - break golab2; - } - if ($this.cursor >= $this.limit) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - $this.I_p1 = $this.cursor; -golab4: - while (true) { - v_3 = $this.cursor; - lab5 = true; - lab5: - while (lab5 === true) { - lab5 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII($this, FinnishStemmer.g_V1, 97, 246)) { - break lab5; - } - $this.cursor = v_3; - break golab4; - } - cursor$1 = $this.cursor = v_3; - if (cursor$1 >= $this.limit) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } -golab6: - while (true) { - lab7 = true; - lab7: - while (lab7 === true) { - lab7 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII($this, FinnishStemmer.g_V1, 97, 246)) { - break lab7; - } - break golab6; - } - if ($this.cursor >= $this.limit) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - $this.I_p2 = $this.cursor; - return true; -}; - -FinnishStemmer.r_mark_regions$LFinnishStemmer$ = FinnishStemmer$r_mark_regions$LFinnishStemmer$; - -FinnishStemmer.prototype.r_R2$ = function () { - return (! (this.I_p2 <= this.cursor) ? false : true); -}; - -FinnishStemmer.prototype.r_R2 = FinnishStemmer.prototype.r_R2$; - -function FinnishStemmer$r_R2$LFinnishStemmer$($this) { - return (! ($this.I_p2 <= $this.cursor) ? false : true); -}; - -FinnishStemmer.r_R2$LFinnishStemmer$ = FinnishStemmer$r_R2$LFinnishStemmer$; - -FinnishStemmer.prototype.r_particle_etc$ = function () { - var among_var; - var v_1; - var v_2; - var cursor$0; - var cursor$1; - var cursor$2; - v_1 = ((this.limit - (cursor$0 = this.cursor)) | 0); - if (cursor$0 < this.I_p1) { - return false; - } - cursor$1 = this.cursor = this.I_p1; - v_2 = this.limit_backward; - this.limit_backward = cursor$1; - cursor$2 = this.cursor = ((this.limit - v_1) | 0); - this.ket = cursor$2; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, FinnishStemmer.a_0, 10); - if (among_var === 0) { - this.limit_backward = v_2; - return false; - } - this.bra = this.cursor; - this.limit_backward = v_2; - switch (among_var) { - case 0: - return false; - case 1: - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII(this, FinnishStemmer.g_particle_end, 97, 246)) { - return false; - } - break; - case 2: - if (! (! (this.I_p2 <= this.cursor) ? false : true)) { - return false; - } - break; - } - return (! BaseStemmer$slice_from$LBaseStemmer$S(this, "") ? false : true); -}; - -FinnishStemmer.prototype.r_particle_etc = FinnishStemmer.prototype.r_particle_etc$; - -function FinnishStemmer$r_particle_etc$LFinnishStemmer$($this) { - var among_var; - var v_1; - var v_2; - var cursor$0; - var cursor$1; - var cursor$2; - v_1 = (($this.limit - (cursor$0 = $this.cursor)) | 0); - if (cursor$0 < $this.I_p1) { - return false; - } - cursor$1 = $this.cursor = $this.I_p1; - v_2 = $this.limit_backward; - $this.limit_backward = cursor$1; - cursor$2 = $this.cursor = (($this.limit - v_1) | 0); - $this.ket = cursor$2; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, FinnishStemmer.a_0, 10); - if (among_var === 0) { - $this.limit_backward = v_2; - return false; - } - $this.bra = $this.cursor; - $this.limit_backward = v_2; - switch (among_var) { - case 0: - return false; - case 1: - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII($this, FinnishStemmer.g_particle_end, 97, 246)) { - return false; - } - break; - case 2: - if (! (! ($this.I_p2 <= $this.cursor) ? false : true)) { - return false; - } - break; - } - return (! BaseStemmer$slice_from$LBaseStemmer$S($this, "") ? false : true); -}; - -FinnishStemmer.r_particle_etc$LFinnishStemmer$ = FinnishStemmer$r_particle_etc$LFinnishStemmer$; - -FinnishStemmer.prototype.r_possessive$ = function () { - var among_var; - var v_1; - var v_2; - var v_3; - var lab0; - var cursor$0; - var cursor$1; - var cursor$2; - v_1 = ((this.limit - (cursor$0 = this.cursor)) | 0); - if (cursor$0 < this.I_p1) { - return false; - } - cursor$1 = this.cursor = this.I_p1; - v_2 = this.limit_backward; - this.limit_backward = cursor$1; - cursor$2 = this.cursor = ((this.limit - v_1) | 0); - this.ket = cursor$2; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, FinnishStemmer.a_4, 9); - if (among_var === 0) { - this.limit_backward = v_2; - return false; - } - this.bra = this.cursor; - this.limit_backward = v_2; - switch (among_var) { - case 0: - return false; - case 1: - v_3 = ((this.limit - this.cursor) | 0); - lab0 = true; - lab0: - while (lab0 === true) { - lab0 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "k")) { - break lab0; - } - return false; - } - this.cursor = ((this.limit - v_3) | 0); - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - this.ket = this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 3, "kse")) { - return false; - } - this.bra = this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "ksi")) { - return false; - } - break; - case 3: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 4: - if (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, FinnishStemmer.a_1, 6) === 0) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 5: - if (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, FinnishStemmer.a_2, 6) === 0) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 6: - if (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, FinnishStemmer.a_3, 2) === 0) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - } - return true; -}; - -FinnishStemmer.prototype.r_possessive = FinnishStemmer.prototype.r_possessive$; - -function FinnishStemmer$r_possessive$LFinnishStemmer$($this) { - var among_var; - var v_1; - var v_2; - var v_3; - var lab0; - var cursor$0; - var cursor$1; - var cursor$2; - v_1 = (($this.limit - (cursor$0 = $this.cursor)) | 0); - if (cursor$0 < $this.I_p1) { - return false; - } - cursor$1 = $this.cursor = $this.I_p1; - v_2 = $this.limit_backward; - $this.limit_backward = cursor$1; - cursor$2 = $this.cursor = (($this.limit - v_1) | 0); - $this.ket = cursor$2; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, FinnishStemmer.a_4, 9); - if (among_var === 0) { - $this.limit_backward = v_2; - return false; - } - $this.bra = $this.cursor; - $this.limit_backward = v_2; - switch (among_var) { - case 0: - return false; - case 1: - v_3 = (($this.limit - $this.cursor) | 0); - lab0 = true; - lab0: - while (lab0 === true) { - lab0 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "k")) { - break lab0; - } - return false; - } - $this.cursor = (($this.limit - v_3) | 0); - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - $this.ket = $this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 3, "kse")) { - return false; - } - $this.bra = $this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "ksi")) { - return false; - } - break; - case 3: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 4: - if (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, FinnishStemmer.a_1, 6) === 0) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 5: - if (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, FinnishStemmer.a_2, 6) === 0) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 6: - if (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, FinnishStemmer.a_3, 2) === 0) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - } - return true; -}; - -FinnishStemmer.r_possessive$LFinnishStemmer$ = FinnishStemmer$r_possessive$LFinnishStemmer$; - -FinnishStemmer.prototype.r_LONG$ = function () { - return (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, FinnishStemmer.a_5, 7) === 0 ? false : true); -}; - -FinnishStemmer.prototype.r_LONG = FinnishStemmer.prototype.r_LONG$; - -function FinnishStemmer$r_LONG$LFinnishStemmer$($this) { - return (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, FinnishStemmer.a_5, 7) === 0 ? false : true); -}; - -FinnishStemmer.r_LONG$LFinnishStemmer$ = FinnishStemmer$r_LONG$LFinnishStemmer$; - -FinnishStemmer.prototype.r_VI$ = function () { - return (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "i") ? false : ! BaseStemmer$in_grouping_b$LBaseStemmer$AIII(this, FinnishStemmer.g_V2, 97, 246) ? false : true); -}; - -FinnishStemmer.prototype.r_VI = FinnishStemmer.prototype.r_VI$; - -function FinnishStemmer$r_VI$LFinnishStemmer$($this) { - return (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "i") ? false : ! BaseStemmer$in_grouping_b$LBaseStemmer$AIII($this, FinnishStemmer.g_V2, 97, 246) ? false : true); -}; - -FinnishStemmer.r_VI$LFinnishStemmer$ = FinnishStemmer$r_VI$LFinnishStemmer$; - -FinnishStemmer.prototype.r_case_ending$ = function () { - var among_var; - var v_1; - var v_2; - var v_3; - var v_4; - var v_5; - var lab0; - var lab1; - var lab2; - var cursor$0; - var cursor$1; - var cursor$2; - var cursor$3; - var $__jsx_postinc_t; - v_1 = ((this.limit - (cursor$0 = this.cursor)) | 0); - if (cursor$0 < this.I_p1) { - return false; - } - cursor$1 = this.cursor = this.I_p1; - v_2 = this.limit_backward; - this.limit_backward = cursor$1; - cursor$2 = this.cursor = ((this.limit - v_1) | 0); - this.ket = cursor$2; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, FinnishStemmer.a_6, 30); - if (among_var === 0) { - this.limit_backward = v_2; - return false; - } - this.bra = this.cursor; - this.limit_backward = v_2; - switch (among_var) { - case 0: - return false; - case 1: - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "a")) { - return false; - } - break; - case 2: - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "e")) { - return false; - } - break; - case 3: - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "i")) { - return false; - } - break; - case 4: - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "o")) { - return false; - } - break; - case 5: - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "\u00E4")) { - return false; - } - break; - case 6: - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "\u00F6")) { - return false; - } - break; - case 7: - v_3 = ((this.limit - this.cursor) | 0); - lab0 = true; - lab0: - while (lab0 === true) { - lab0 = false; - v_4 = ((this.limit - this.cursor) | 0); - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - v_5 = ((this.limit - this.cursor) | 0); - lab2 = true; - lab2: - while (lab2 === true) { - lab2 = false; - if (! (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, FinnishStemmer.a_5, 7) === 0 ? false : true)) { - break lab2; - } - break lab1; - } - this.cursor = ((this.limit - v_5) | 0); - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 2, "ie")) { - this.cursor = ((this.limit - v_3) | 0); - break lab0; - } - } - cursor$3 = this.cursor = ((this.limit - v_4) | 0); - if (cursor$3 <= this.limit_backward) { - this.cursor = ((this.limit - v_3) | 0); - break lab0; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - this.bra = this.cursor; - } - break; - case 8: - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII(this, FinnishStemmer.g_V1, 97, 246)) { - return false; - } - if (! BaseStemmer$out_grouping_b$LBaseStemmer$AIII(this, FinnishStemmer.g_V1, 97, 246)) { - return false; - } - break; - case 9: - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "e")) { - return false; - } - break; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - this.B_ending_removed = true; - return true; -}; - -FinnishStemmer.prototype.r_case_ending = FinnishStemmer.prototype.r_case_ending$; - -function FinnishStemmer$r_case_ending$LFinnishStemmer$($this) { - var among_var; - var v_1; - var v_2; - var v_3; - var v_4; - var v_5; - var lab0; - var lab1; - var lab2; - var cursor$0; - var cursor$1; - var cursor$2; - var cursor$3; - var $__jsx_postinc_t; - v_1 = (($this.limit - (cursor$0 = $this.cursor)) | 0); - if (cursor$0 < $this.I_p1) { - return false; - } - cursor$1 = $this.cursor = $this.I_p1; - v_2 = $this.limit_backward; - $this.limit_backward = cursor$1; - cursor$2 = $this.cursor = (($this.limit - v_1) | 0); - $this.ket = cursor$2; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, FinnishStemmer.a_6, 30); - if (among_var === 0) { - $this.limit_backward = v_2; - return false; - } - $this.bra = $this.cursor; - $this.limit_backward = v_2; - switch (among_var) { - case 0: - return false; - case 1: - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "a")) { - return false; - } - break; - case 2: - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "e")) { - return false; - } - break; - case 3: - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "i")) { - return false; - } - break; - case 4: - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "o")) { - return false; - } - break; - case 5: - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "\u00E4")) { - return false; - } - break; - case 6: - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "\u00F6")) { - return false; - } - break; - case 7: - v_3 = (($this.limit - $this.cursor) | 0); - lab0 = true; - lab0: - while (lab0 === true) { - lab0 = false; - v_4 = (($this.limit - $this.cursor) | 0); - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - v_5 = (($this.limit - $this.cursor) | 0); - lab2 = true; - lab2: - while (lab2 === true) { - lab2 = false; - if (! (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, FinnishStemmer.a_5, 7) === 0 ? false : true)) { - break lab2; - } - break lab1; - } - $this.cursor = (($this.limit - v_5) | 0); - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 2, "ie")) { - $this.cursor = (($this.limit - v_3) | 0); - break lab0; - } - } - cursor$3 = $this.cursor = (($this.limit - v_4) | 0); - if (cursor$3 <= $this.limit_backward) { - $this.cursor = (($this.limit - v_3) | 0); - break lab0; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - $this.bra = $this.cursor; - } - break; - case 8: - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII($this, FinnishStemmer.g_V1, 97, 246)) { - return false; - } - if (! BaseStemmer$out_grouping_b$LBaseStemmer$AIII($this, FinnishStemmer.g_V1, 97, 246)) { - return false; - } - break; - case 9: - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "e")) { - return false; - } - break; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - $this.B_ending_removed = true; - return true; -}; - -FinnishStemmer.r_case_ending$LFinnishStemmer$ = FinnishStemmer$r_case_ending$LFinnishStemmer$; - -FinnishStemmer.prototype.r_other_endings$ = function () { - var among_var; - var v_1; - var v_2; - var v_3; - var lab0; - var cursor$0; - var cursor$1; - var cursor$2; - v_1 = ((this.limit - (cursor$0 = this.cursor)) | 0); - if (cursor$0 < this.I_p2) { - return false; - } - cursor$1 = this.cursor = this.I_p2; - v_2 = this.limit_backward; - this.limit_backward = cursor$1; - cursor$2 = this.cursor = ((this.limit - v_1) | 0); - this.ket = cursor$2; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, FinnishStemmer.a_7, 14); - if (among_var === 0) { - this.limit_backward = v_2; - return false; - } - this.bra = this.cursor; - this.limit_backward = v_2; - switch (among_var) { - case 0: - return false; - case 1: - v_3 = ((this.limit - this.cursor) | 0); - lab0 = true; - lab0: - while (lab0 === true) { - lab0 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 2, "po")) { - break lab0; - } - return false; - } - this.cursor = ((this.limit - v_3) | 0); - break; - } - return (! BaseStemmer$slice_from$LBaseStemmer$S(this, "") ? false : true); -}; - -FinnishStemmer.prototype.r_other_endings = FinnishStemmer.prototype.r_other_endings$; - -function FinnishStemmer$r_other_endings$LFinnishStemmer$($this) { - var among_var; - var v_1; - var v_2; - var v_3; - var lab0; - var cursor$0; - var cursor$1; - var cursor$2; - v_1 = (($this.limit - (cursor$0 = $this.cursor)) | 0); - if (cursor$0 < $this.I_p2) { - return false; - } - cursor$1 = $this.cursor = $this.I_p2; - v_2 = $this.limit_backward; - $this.limit_backward = cursor$1; - cursor$2 = $this.cursor = (($this.limit - v_1) | 0); - $this.ket = cursor$2; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, FinnishStemmer.a_7, 14); - if (among_var === 0) { - $this.limit_backward = v_2; - return false; - } - $this.bra = $this.cursor; - $this.limit_backward = v_2; - switch (among_var) { - case 0: - return false; - case 1: - v_3 = (($this.limit - $this.cursor) | 0); - lab0 = true; - lab0: - while (lab0 === true) { - lab0 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 2, "po")) { - break lab0; - } - return false; - } - $this.cursor = (($this.limit - v_3) | 0); - break; - } - return (! BaseStemmer$slice_from$LBaseStemmer$S($this, "") ? false : true); -}; - -FinnishStemmer.r_other_endings$LFinnishStemmer$ = FinnishStemmer$r_other_endings$LFinnishStemmer$; - -FinnishStemmer.prototype.r_i_plural$ = function () { - var v_1; - var v_2; - var cursor$0; - var cursor$1; - var cursor$2; - v_1 = ((this.limit - (cursor$0 = this.cursor)) | 0); - if (cursor$0 < this.I_p1) { - return false; - } - cursor$1 = this.cursor = this.I_p1; - v_2 = this.limit_backward; - this.limit_backward = cursor$1; - cursor$2 = this.cursor = ((this.limit - v_1) | 0); - this.ket = cursor$2; - if (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, FinnishStemmer.a_8, 2) === 0) { - this.limit_backward = v_2; - return false; - } - this.bra = this.cursor; - this.limit_backward = v_2; - return (! BaseStemmer$slice_from$LBaseStemmer$S(this, "") ? false : true); -}; - -FinnishStemmer.prototype.r_i_plural = FinnishStemmer.prototype.r_i_plural$; - -function FinnishStemmer$r_i_plural$LFinnishStemmer$($this) { - var v_1; - var v_2; - var cursor$0; - var cursor$1; - var cursor$2; - v_1 = (($this.limit - (cursor$0 = $this.cursor)) | 0); - if (cursor$0 < $this.I_p1) { - return false; - } - cursor$1 = $this.cursor = $this.I_p1; - v_2 = $this.limit_backward; - $this.limit_backward = cursor$1; - cursor$2 = $this.cursor = (($this.limit - v_1) | 0); - $this.ket = cursor$2; - if (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, FinnishStemmer.a_8, 2) === 0) { - $this.limit_backward = v_2; - return false; - } - $this.bra = $this.cursor; - $this.limit_backward = v_2; - return (! BaseStemmer$slice_from$LBaseStemmer$S($this, "") ? false : true); -}; - -FinnishStemmer.r_i_plural$LFinnishStemmer$ = FinnishStemmer$r_i_plural$LFinnishStemmer$; - -FinnishStemmer.prototype.r_t_plural$ = function () { - var among_var; - var v_1; - var v_2; - var v_3; - var v_4; - var v_5; - var v_6; - var lab0; - var cursor$0; - var cursor$1; - var cursor$2; - var cursor$3; - var cursor$4; - var cursor$5; - var cursor$6; - v_1 = ((this.limit - (cursor$0 = this.cursor)) | 0); - if (cursor$0 < this.I_p1) { - return false; - } - cursor$1 = this.cursor = this.I_p1; - v_2 = this.limit_backward; - this.limit_backward = cursor$1; - cursor$2 = this.cursor = ((this.limit - v_1) | 0); - this.ket = cursor$2; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "t")) { - this.limit_backward = v_2; - return false; - } - this.bra = cursor$3 = this.cursor; - v_3 = ((this.limit - cursor$3) | 0); - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII(this, FinnishStemmer.g_V1, 97, 246)) { - this.limit_backward = v_2; - return false; - } - this.cursor = ((this.limit - v_3) | 0); - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - this.limit_backward = v_2; - v_4 = ((this.limit - (cursor$4 = this.cursor)) | 0); - if (cursor$4 < this.I_p2) { - return false; - } - cursor$5 = this.cursor = this.I_p2; - v_5 = this.limit_backward; - this.limit_backward = cursor$5; - cursor$6 = this.cursor = ((this.limit - v_4) | 0); - this.ket = cursor$6; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, FinnishStemmer.a_9, 2); - if (among_var === 0) { - this.limit_backward = v_5; - return false; - } - this.bra = this.cursor; - this.limit_backward = v_5; - switch (among_var) { - case 0: - return false; - case 1: - v_6 = ((this.limit - this.cursor) | 0); - lab0 = true; - lab0: - while (lab0 === true) { - lab0 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 2, "po")) { - break lab0; - } - return false; - } - this.cursor = ((this.limit - v_6) | 0); - break; - } - return (! BaseStemmer$slice_from$LBaseStemmer$S(this, "") ? false : true); -}; - -FinnishStemmer.prototype.r_t_plural = FinnishStemmer.prototype.r_t_plural$; - -function FinnishStemmer$r_t_plural$LFinnishStemmer$($this) { - var among_var; - var v_1; - var v_2; - var v_3; - var v_4; - var v_5; - var v_6; - var lab0; - var cursor$0; - var cursor$1; - var cursor$2; - var cursor$3; - var cursor$4; - var cursor$5; - var cursor$6; - v_1 = (($this.limit - (cursor$0 = $this.cursor)) | 0); - if (cursor$0 < $this.I_p1) { - return false; - } - cursor$1 = $this.cursor = $this.I_p1; - v_2 = $this.limit_backward; - $this.limit_backward = cursor$1; - cursor$2 = $this.cursor = (($this.limit - v_1) | 0); - $this.ket = cursor$2; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "t")) { - $this.limit_backward = v_2; - return false; - } - $this.bra = cursor$3 = $this.cursor; - v_3 = (($this.limit - cursor$3) | 0); - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII($this, FinnishStemmer.g_V1, 97, 246)) { - $this.limit_backward = v_2; - return false; - } - $this.cursor = (($this.limit - v_3) | 0); - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - $this.limit_backward = v_2; - v_4 = (($this.limit - (cursor$4 = $this.cursor)) | 0); - if (cursor$4 < $this.I_p2) { - return false; - } - cursor$5 = $this.cursor = $this.I_p2; - v_5 = $this.limit_backward; - $this.limit_backward = cursor$5; - cursor$6 = $this.cursor = (($this.limit - v_4) | 0); - $this.ket = cursor$6; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, FinnishStemmer.a_9, 2); - if (among_var === 0) { - $this.limit_backward = v_5; - return false; - } - $this.bra = $this.cursor; - $this.limit_backward = v_5; - switch (among_var) { - case 0: - return false; - case 1: - v_6 = (($this.limit - $this.cursor) | 0); - lab0 = true; - lab0: - while (lab0 === true) { - lab0 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 2, "po")) { - break lab0; - } - return false; - } - $this.cursor = (($this.limit - v_6) | 0); - break; - } - return (! BaseStemmer$slice_from$LBaseStemmer$S($this, "") ? false : true); -}; - -FinnishStemmer.r_t_plural$LFinnishStemmer$ = FinnishStemmer$r_t_plural$LFinnishStemmer$; - -FinnishStemmer.prototype.r_tidy$ = function () { - var v_1; - var v_2; - var v_3; - var v_4; - var v_5; - var v_6; - var v_7; - var v_8; - var v_9; - var lab0; - var lab1; - var lab2; - var lab3; - var lab4; - var lab5; - var lab7; - var s$0; - var cursor$0; - var cursor$1; - var cursor$2; - var limit$0; - var cursor$3; - var limit$1; - var cursor$4; - var limit$2; - var cursor$5; - var limit$3; - var cursor$6; - var cursor$7; - var cursor$8; - var S_x$0; - var $__jsx_postinc_t; - v_1 = ((this.limit - (cursor$0 = this.cursor)) | 0); - if (cursor$0 < this.I_p1) { - return false; - } - cursor$2 = this.cursor = this.I_p1; - v_2 = this.limit_backward; - this.limit_backward = cursor$2; - cursor$3 = this.cursor = (((limit$0 = this.limit) - v_1) | 0); - v_3 = ((limit$0 - cursor$3) | 0); - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - v_4 = ((this.limit - this.cursor) | 0); - if (! (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, FinnishStemmer.a_5, 7) === 0 ? false : true)) { - break lab0; - } - cursor$1 = this.cursor = ((this.limit - v_4) | 0); - this.ket = cursor$1; - if (cursor$1 <= this.limit_backward) { - break lab0; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - this.bra = this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - } - cursor$4 = this.cursor = (((limit$1 = this.limit) - v_3) | 0); - v_5 = ((limit$1 - cursor$4) | 0); - lab1 = true; -lab1: - while (lab1 === true) { - lab1 = false; - this.ket = this.cursor; - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII(this, FinnishStemmer.g_AEI, 97, 228)) { - break lab1; - } - this.bra = this.cursor; - if (! BaseStemmer$out_grouping_b$LBaseStemmer$AIII(this, FinnishStemmer.g_V1, 97, 246)) { - break lab1; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - } - cursor$5 = this.cursor = (((limit$2 = this.limit) - v_5) | 0); - v_6 = ((limit$2 - cursor$5) | 0); - lab2 = true; -lab2: - while (lab2 === true) { - lab2 = false; - this.ket = this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "j")) { - break lab2; - } - this.bra = this.cursor; - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - v_7 = ((this.limit - this.cursor) | 0); - lab4 = true; - lab4: - while (lab4 === true) { - lab4 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "o")) { - break lab4; - } - break lab3; - } - this.cursor = ((this.limit - v_7) | 0); - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "u")) { - break lab2; - } - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - } - cursor$6 = this.cursor = (((limit$3 = this.limit) - v_6) | 0); - v_8 = ((limit$3 - cursor$6) | 0); - lab5 = true; -lab5: - while (lab5 === true) { - lab5 = false; - this.ket = this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "o")) { - break lab5; - } - this.bra = this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "j")) { - break lab5; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - } - this.cursor = ((this.limit - v_8) | 0); - this.limit_backward = v_2; -golab6: - while (true) { - v_9 = ((this.limit - this.cursor) | 0); - lab7 = true; - lab7: - while (lab7 === true) { - lab7 = false; - if (! BaseStemmer$out_grouping_b$LBaseStemmer$AIII(this, FinnishStemmer.g_V1, 97, 246)) { - break lab7; - } - this.cursor = ((this.limit - v_9) | 0); - break golab6; - } - cursor$7 = this.cursor = ((this.limit - v_9) | 0); - if (cursor$7 <= this.limit_backward) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - } - this.ket = cursor$8 = this.cursor; - if (cursor$8 <= this.limit_backward) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - this.bra = this.cursor; - S_x$0 = this.S_x = BaseStemmer$slice_to$LBaseStemmer$S(this, this.S_x); - return (S_x$0 === '' ? false : ! (s$0 = this.S_x, BaseStemmer$eq_s_b$LBaseStemmer$IS(this, s$0.length, s$0)) ? false : ! BaseStemmer$slice_from$LBaseStemmer$S(this, "") ? false : true); -}; - -FinnishStemmer.prototype.r_tidy = FinnishStemmer.prototype.r_tidy$; - -function FinnishStemmer$r_tidy$LFinnishStemmer$($this) { - var v_1; - var v_2; - var v_3; - var v_4; - var v_5; - var v_6; - var v_7; - var v_8; - var v_9; - var lab0; - var lab1; - var lab2; - var lab3; - var lab4; - var lab5; - var lab7; - var s$0; - var cursor$0; - var cursor$1; - var cursor$2; - var limit$0; - var cursor$3; - var limit$1; - var cursor$4; - var limit$2; - var cursor$5; - var limit$3; - var cursor$6; - var cursor$7; - var cursor$8; - var S_x$0; - var $__jsx_postinc_t; - v_1 = (($this.limit - (cursor$0 = $this.cursor)) | 0); - if (cursor$0 < $this.I_p1) { - return false; - } - cursor$2 = $this.cursor = $this.I_p1; - v_2 = $this.limit_backward; - $this.limit_backward = cursor$2; - cursor$3 = $this.cursor = (((limit$0 = $this.limit) - v_1) | 0); - v_3 = ((limit$0 - cursor$3) | 0); - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - v_4 = (($this.limit - $this.cursor) | 0); - if (! (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, FinnishStemmer.a_5, 7) === 0 ? false : true)) { - break lab0; - } - cursor$1 = $this.cursor = (($this.limit - v_4) | 0); - $this.ket = cursor$1; - if (cursor$1 <= $this.limit_backward) { - break lab0; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - $this.bra = $this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - } - cursor$4 = $this.cursor = (((limit$1 = $this.limit) - v_3) | 0); - v_5 = ((limit$1 - cursor$4) | 0); - lab1 = true; -lab1: - while (lab1 === true) { - lab1 = false; - $this.ket = $this.cursor; - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII($this, FinnishStemmer.g_AEI, 97, 228)) { - break lab1; - } - $this.bra = $this.cursor; - if (! BaseStemmer$out_grouping_b$LBaseStemmer$AIII($this, FinnishStemmer.g_V1, 97, 246)) { - break lab1; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - } - cursor$5 = $this.cursor = (((limit$2 = $this.limit) - v_5) | 0); - v_6 = ((limit$2 - cursor$5) | 0); - lab2 = true; -lab2: - while (lab2 === true) { - lab2 = false; - $this.ket = $this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "j")) { - break lab2; - } - $this.bra = $this.cursor; - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - v_7 = (($this.limit - $this.cursor) | 0); - lab4 = true; - lab4: - while (lab4 === true) { - lab4 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "o")) { - break lab4; - } - break lab3; - } - $this.cursor = (($this.limit - v_7) | 0); - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "u")) { - break lab2; - } - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - } - cursor$6 = $this.cursor = (((limit$3 = $this.limit) - v_6) | 0); - v_8 = ((limit$3 - cursor$6) | 0); - lab5 = true; -lab5: - while (lab5 === true) { - lab5 = false; - $this.ket = $this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "o")) { - break lab5; - } - $this.bra = $this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "j")) { - break lab5; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - } - $this.cursor = (($this.limit - v_8) | 0); - $this.limit_backward = v_2; -golab6: - while (true) { - v_9 = (($this.limit - $this.cursor) | 0); - lab7 = true; - lab7: - while (lab7 === true) { - lab7 = false; - if (! BaseStemmer$out_grouping_b$LBaseStemmer$AIII($this, FinnishStemmer.g_V1, 97, 246)) { - break lab7; - } - $this.cursor = (($this.limit - v_9) | 0); - break golab6; - } - cursor$7 = $this.cursor = (($this.limit - v_9) | 0); - if (cursor$7 <= $this.limit_backward) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - } - $this.ket = cursor$8 = $this.cursor; - if (cursor$8 <= $this.limit_backward) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - $this.bra = $this.cursor; - S_x$0 = $this.S_x = BaseStemmer$slice_to$LBaseStemmer$S($this, $this.S_x); - return (S_x$0 === '' ? false : ! (s$0 = $this.S_x, BaseStemmer$eq_s_b$LBaseStemmer$IS($this, s$0.length, s$0)) ? false : ! BaseStemmer$slice_from$LBaseStemmer$S($this, "") ? false : true); -}; - -FinnishStemmer.r_tidy$LFinnishStemmer$ = FinnishStemmer$r_tidy$LFinnishStemmer$; - -FinnishStemmer.prototype.stem$ = function () { - var v_1; - var v_2; - var v_3; - var v_4; - var v_5; - var v_6; - var v_7; - var v_8; - var lab0; - var lab1; - var lab2; - var lab3; - var lab4; - var lab5; - var lab6; - var lab7; - var lab8; - var lab9; - var cursor$0; - var limit$0; - var cursor$1; - var limit$1; - var cursor$2; - var limit$2; - var cursor$3; - var limit$3; - var cursor$4; - var limit$4; - var cursor$5; - v_1 = this.cursor; - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - if (! FinnishStemmer$r_mark_regions$LFinnishStemmer$(this)) { - break lab0; - } - } - cursor$0 = this.cursor = v_1; - this.B_ending_removed = false; - this.limit_backward = cursor$0; - cursor$1 = this.cursor = limit$0 = this.limit; - v_2 = ((limit$0 - cursor$1) | 0); - lab1 = true; -lab1: - while (lab1 === true) { - lab1 = false; - if (! FinnishStemmer$r_particle_etc$LFinnishStemmer$(this)) { - break lab1; - } - } - cursor$2 = this.cursor = (((limit$1 = this.limit) - v_2) | 0); - v_3 = ((limit$1 - cursor$2) | 0); - lab2 = true; -lab2: - while (lab2 === true) { - lab2 = false; - if (! FinnishStemmer$r_possessive$LFinnishStemmer$(this)) { - break lab2; - } - } - cursor$3 = this.cursor = (((limit$2 = this.limit) - v_3) | 0); - v_4 = ((limit$2 - cursor$3) | 0); - lab3 = true; -lab3: - while (lab3 === true) { - lab3 = false; - if (! FinnishStemmer$r_case_ending$LFinnishStemmer$(this)) { - break lab3; - } - } - cursor$4 = this.cursor = (((limit$3 = this.limit) - v_4) | 0); - v_5 = ((limit$3 - cursor$4) | 0); - lab4 = true; -lab4: - while (lab4 === true) { - lab4 = false; - if (! FinnishStemmer$r_other_endings$LFinnishStemmer$(this)) { - break lab4; - } - } - this.cursor = ((this.limit - v_5) | 0); - lab5 = true; -lab5: - while (lab5 === true) { - lab5 = false; - v_6 = ((this.limit - this.cursor) | 0); - lab6 = true; - lab6: - while (lab6 === true) { - lab6 = false; - if (! this.B_ending_removed) { - break lab6; - } - v_7 = ((this.limit - this.cursor) | 0); - lab7 = true; - lab7: - while (lab7 === true) { - lab7 = false; - if (! FinnishStemmer$r_i_plural$LFinnishStemmer$(this)) { - break lab7; - } - } - this.cursor = ((this.limit - v_7) | 0); - break lab5; - } - cursor$5 = this.cursor = (((limit$4 = this.limit) - v_6) | 0); - v_8 = ((limit$4 - cursor$5) | 0); - lab8 = true; - lab8: - while (lab8 === true) { - lab8 = false; - if (! FinnishStemmer$r_t_plural$LFinnishStemmer$(this)) { - break lab8; - } - } - this.cursor = ((this.limit - v_8) | 0); - } - lab9 = true; -lab9: - while (lab9 === true) { - lab9 = false; - if (! FinnishStemmer$r_tidy$LFinnishStemmer$(this)) { - break lab9; - } - } - this.cursor = this.limit_backward; - return true; -}; - -FinnishStemmer.prototype.stem = FinnishStemmer.prototype.stem$; - -FinnishStemmer.prototype.equals$X = function (o) { - return o instanceof FinnishStemmer; -}; - -FinnishStemmer.prototype.equals = FinnishStemmer.prototype.equals$X; - -function FinnishStemmer$equals$LFinnishStemmer$X($this, o) { - return o instanceof FinnishStemmer; -}; - -FinnishStemmer.equals$LFinnishStemmer$X = FinnishStemmer$equals$LFinnishStemmer$X; - -FinnishStemmer.prototype.hashCode$ = function () { - var classname; - var hash; - var i; - var char; - classname = "FinnishStemmer"; - hash = 0; - for (i = 0; i < classname.length; i++) { - char = classname.charCodeAt(i); - hash = (hash << 5) - hash + char; - hash = hash & hash; - } - return (hash | 0); -}; - -FinnishStemmer.prototype.hashCode = FinnishStemmer.prototype.hashCode$; - -function FinnishStemmer$hashCode$LFinnishStemmer$($this) { - var classname; - var hash; - var i; - var char; - classname = "FinnishStemmer"; - hash = 0; - for (i = 0; i < classname.length; i++) { - char = classname.charCodeAt(i); - hash = (hash << 5) - hash + char; - hash = hash & hash; - } - return (hash | 0); -}; - -FinnishStemmer.hashCode$LFinnishStemmer$ = FinnishStemmer$hashCode$LFinnishStemmer$; - -FinnishStemmer.serialVersionUID = 1; -$__jsx_lazy_init(FinnishStemmer, "methodObject", function () { - return new FinnishStemmer(); -}); -$__jsx_lazy_init(FinnishStemmer, "a_0", function () { - return [ new Among("pa", -1, 1), new Among("sti", -1, 2), new Among("kaan", -1, 1), new Among("han", -1, 1), new Among("kin", -1, 1), new Among("h\u00E4n", -1, 1), new Among("k\u00E4\u00E4n", -1, 1), new Among("ko", -1, 1), new Among("p\u00E4", -1, 1), new Among("k\u00F6", -1, 1) ]; -}); -$__jsx_lazy_init(FinnishStemmer, "a_1", function () { - return [ new Among("lla", -1, -1), new Among("na", -1, -1), new Among("ssa", -1, -1), new Among("ta", -1, -1), new Among("lta", 3, -1), new Among("sta", 3, -1) ]; -}); -$__jsx_lazy_init(FinnishStemmer, "a_2", function () { - return [ new Among("ll\u00E4", -1, -1), new Among("n\u00E4", -1, -1), new Among("ss\u00E4", -1, -1), new Among("t\u00E4", -1, -1), new Among("lt\u00E4", 3, -1), new Among("st\u00E4", 3, -1) ]; -}); -$__jsx_lazy_init(FinnishStemmer, "a_3", function () { - return [ new Among("lle", -1, -1), new Among("ine", -1, -1) ]; -}); -$__jsx_lazy_init(FinnishStemmer, "a_4", function () { - return [ new Among("nsa", -1, 3), new Among("mme", -1, 3), new Among("nne", -1, 3), new Among("ni", -1, 2), new Among("si", -1, 1), new Among("an", -1, 4), new Among("en", -1, 6), new Among("\u00E4n", -1, 5), new Among("ns\u00E4", -1, 3) ]; -}); -$__jsx_lazy_init(FinnishStemmer, "a_5", function () { - return [ new Among("aa", -1, -1), new Among("ee", -1, -1), new Among("ii", -1, -1), new Among("oo", -1, -1), new Among("uu", -1, -1), new Among("\u00E4\u00E4", -1, -1), new Among("\u00F6\u00F6", -1, -1) ]; -}); -$__jsx_lazy_init(FinnishStemmer, "a_6", function () { - return [ new Among("a", -1, 8), new Among("lla", 0, -1), new Among("na", 0, -1), new Among("ssa", 0, -1), new Among("ta", 0, -1), new Among("lta", 4, -1), new Among("sta", 4, -1), new Among("tta", 4, 9), new Among("lle", -1, -1), new Among("ine", -1, -1), new Among("ksi", -1, -1), new Among("n", -1, 7), new Among("han", 11, 1), new Among$0("den", 11, -1, (function (instance) { - var this$0; - this$0 = instance; - return (! this$0.eq_s_b$IS(1, "i") ? false : ! this$0.in_grouping_b$AIII(FinnishStemmer.g_V2, 97, 246) ? false : true); - }), FinnishStemmer.methodObject), new Among$0("seen", 11, -1, (function (instance) { - var this$0; - this$0 = instance; - return (this$0.find_among_b$ALAmong$I(FinnishStemmer.a_5, 7) === 0 ? false : true); - }), FinnishStemmer.methodObject), new Among("hen", 11, 2), new Among$0("tten", 11, -1, (function (instance) { - var this$0; - this$0 = instance; - return (! this$0.eq_s_b$IS(1, "i") ? false : ! this$0.in_grouping_b$AIII(FinnishStemmer.g_V2, 97, 246) ? false : true); - }), FinnishStemmer.methodObject), new Among("hin", 11, 3), new Among$0("siin", 11, -1, (function (instance) { - var this$0; - this$0 = instance; - return (! this$0.eq_s_b$IS(1, "i") ? false : ! this$0.in_grouping_b$AIII(FinnishStemmer.g_V2, 97, 246) ? false : true); - }), FinnishStemmer.methodObject), new Among("hon", 11, 4), new Among("h\u00E4n", 11, 5), new Among("h\u00F6n", 11, 6), new Among("\u00E4", -1, 8), new Among("ll\u00E4", 22, -1), new Among("n\u00E4", 22, -1), new Among("ss\u00E4", 22, -1), new Among("t\u00E4", 22, -1), new Among("lt\u00E4", 26, -1), new Among("st\u00E4", 26, -1), new Among("tt\u00E4", 26, 9) ]; -}); -$__jsx_lazy_init(FinnishStemmer, "a_7", function () { - return [ new Among("eja", -1, -1), new Among("mma", -1, 1), new Among("imma", 1, -1), new Among("mpa", -1, 1), new Among("impa", 3, -1), new Among("mmi", -1, 1), new Among("immi", 5, -1), new Among("mpi", -1, 1), new Among("impi", 7, -1), new Among("ej\u00E4", -1, -1), new Among("mm\u00E4", -1, 1), new Among("imm\u00E4", 10, -1), new Among("mp\u00E4", -1, 1), new Among("imp\u00E4", 12, -1) ]; -}); -$__jsx_lazy_init(FinnishStemmer, "a_8", function () { - return [ new Among("i", -1, -1), new Among("j", -1, -1) ]; -}); -$__jsx_lazy_init(FinnishStemmer, "a_9", function () { - return [ new Among("mma", -1, 1), new Among("imma", 0, -1) ]; -}); -FinnishStemmer.g_AEI = [ 17, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8 ]; -FinnishStemmer.g_V1 = [ 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 32 ]; -FinnishStemmer.g_V2 = [ 17, 65, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 32 ]; -FinnishStemmer.g_particle_end = [ 17, 97, 24, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 32 ]; - -var $__jsx_classMap = { - "src/among.jsx": { - Among: Among, - Among$SII: Among, - Among$SIIF$LBaseStemmer$B$LBaseStemmer$: Among$0 - }, - "src/stemmer.jsx": { - Stemmer: Stemmer, - Stemmer$: Stemmer - }, - "src/base-stemmer.jsx": { - BaseStemmer: BaseStemmer, - BaseStemmer$: BaseStemmer - }, - "src/finnish-stemmer.jsx": { - FinnishStemmer: FinnishStemmer, - FinnishStemmer$: FinnishStemmer - } -}; - - -})(JSX); - -var Among = JSX.require("src/among.jsx").Among; -var Among$SII = JSX.require("src/among.jsx").Among$SII; -var Stemmer = JSX.require("src/stemmer.jsx").Stemmer; -var BaseStemmer = JSX.require("src/base-stemmer.jsx").BaseStemmer; -var FinnishStemmer = JSX.require("src/finnish-stemmer.jsx").FinnishStemmer; diff --git a/sphinx/search/non-minified-js/french-stemmer.js b/sphinx/search/non-minified-js/french-stemmer.js index 75255a03d91..c9708312a8f 100644 --- a/sphinx/search/non-minified-js/french-stemmer.js +++ b/sphinx/search/non-minified-js/french-stemmer.js @@ -1,3667 +1,1325 @@ -// generatedy by JSX compiler 0.9.89 (2014-05-20 06:01:03 +0900; 8e8c6105f36f3dfe440ea026a3c93a3444977102) -var JSX = {}; -(function (JSX) { -/** - * extends the class - */ -function $__jsx_extend(derivations, base) { - var ctor = function () {}; - ctor.prototype = base.prototype; - var proto = new ctor(); - for (var i in derivations) { - derivations[i].prototype = proto; - } -} - -/** - * copies the implementations from source interface to target - */ -function $__jsx_merge_interface(target, source) { - for (var k in source.prototype) - if (source.prototype.hasOwnProperty(k)) - target.prototype[k] = source.prototype[k]; -} - -/** - * defers the initialization of the property - */ -function $__jsx_lazy_init(obj, prop, func) { - function reset(obj, prop, value) { - delete obj[prop]; - obj[prop] = value; - return value; - } - - Object.defineProperty(obj, prop, { - get: function () { - return reset(obj, prop, func()); - }, - set: function (v) { - reset(obj, prop, v); - }, - enumerable: true, - configurable: true - }); -} - -var $__jsx_imul = Math.imul; -if (typeof $__jsx_imul === "undefined") { - $__jsx_imul = function (a, b) { - var ah = (a >>> 16) & 0xffff; - var al = a & 0xffff; - var bh = (b >>> 16) & 0xffff; - var bl = b & 0xffff; - return ((al * bl) + (((ah * bl + al * bh) << 16) >>> 0)|0); - }; -} - -/** - * fused int-ops with side-effects - */ -function $__jsx_ipadd(o, p, r) { - return o[p] = (o[p] + r) | 0; -} -function $__jsx_ipsub(o, p, r) { - return o[p] = (o[p] - r) | 0; -} -function $__jsx_ipmul(o, p, r) { - return o[p] = $__jsx_imul(o[p], r); -} -function $__jsx_ipdiv(o, p, r) { - return o[p] = (o[p] / r) | 0; -} -function $__jsx_ipmod(o, p, r) { - return o[p] = (o[p] % r) | 0; -} -function $__jsx_ippostinc(o, p) { - var v = o[p]; - o[p] = (v + 1) | 0; - return v; -} -function $__jsx_ippostdec(o, p) { - var v = o[p]; - o[p] = (v - 1) | 0; - return v; -} - -/** - * non-inlined version of Array#each - */ -function $__jsx_forEach(o, f) { - var l = o.length; - for (var i = 0; i < l; ++i) - f(o[i]); -} - -/* - * global functions, renamed to avoid conflict with local variable names - */ -var $__jsx_parseInt = parseInt; -var $__jsx_parseFloat = parseFloat; -function $__jsx_isNaN(n) { return n !== n; } -var $__jsx_isFinite = isFinite; - -var $__jsx_encodeURIComponent = encodeURIComponent; -var $__jsx_decodeURIComponent = decodeURIComponent; -var $__jsx_encodeURI = encodeURI; -var $__jsx_decodeURI = decodeURI; - -var $__jsx_ObjectToString = Object.prototype.toString; -var $__jsx_ObjectHasOwnProperty = Object.prototype.hasOwnProperty; - -/* - * profiler object, initialized afterwards - */ -function $__jsx_profiler() { -} - -/* - * public interface to JSX code - */ -JSX.require = function (path) { - var m = $__jsx_classMap[path]; - return m !== undefined ? m : null; -}; - -JSX.profilerIsRunning = function () { - return $__jsx_profiler.getResults != null; -}; - -JSX.getProfileResults = function () { - return ($__jsx_profiler.getResults || function () { return {}; })(); -}; - -JSX.postProfileResults = function (url, cb) { - if ($__jsx_profiler.postResults == null) - throw new Error("profiler has not been turned on"); - return $__jsx_profiler.postResults(url, cb); -}; - -JSX.resetProfileResults = function () { - if ($__jsx_profiler.resetResults == null) - throw new Error("profiler has not been turned on"); - return $__jsx_profiler.resetResults(); -}; -JSX.DEBUG = false; -var GeneratorFunction$0 = -(function () { - try { - return Function('import {GeneratorFunction} from "std:iteration"; return GeneratorFunction')(); - } catch (e) { - return function GeneratorFunction () {}; - } -})(); -var __jsx_generator_object$0 = -(function () { - function __jsx_generator_object() { - this.__next = 0; - this.__loop = null; - this.__seed = null; - this.__value = undefined; - this.__status = 0; // SUSPENDED: 0, ACTIVE: 1, DEAD: 2 - } - - __jsx_generator_object.prototype.next = function (seed) { - switch (this.__status) { - case 0: - this.__status = 1; - this.__seed = seed; - - // go next! - this.__loop(this.__next); - - var done = false; - if (this.__next != -1) { - this.__status = 0; - } else { - this.__status = 2; - done = true; - } - return { value: this.__value, done: done }; - case 1: - throw new Error("Generator is already running"); - case 2: - throw new Error("Generator is already finished"); - default: - throw new Error("Unexpected generator internal state"); - } - }; - - return __jsx_generator_object; -}()); -function Among(s, substring_i, result) { - this.s_size = s.length; - this.s = s; - this.substring_i = substring_i; - this.result = result; - this.method = null; - this.instance = null; -}; - -function Among$0(s, substring_i, result, method, instance) { - this.s_size = s.length; - this.s = s; - this.substring_i = substring_i; - this.result = result; - this.method = method; - this.instance = instance; -}; - -$__jsx_extend([Among, Among$0], Object); -function Stemmer() { -}; - -$__jsx_extend([Stemmer], Object); -function BaseStemmer() { - var current$0; - var cursor$0; - var limit$0; - this.cache = ({ }); - current$0 = this.current = ""; - cursor$0 = this.cursor = 0; - limit$0 = this.limit = current$0.length; - this.limit_backward = 0; - this.bra = cursor$0; - this.ket = limit$0; -}; - -$__jsx_extend([BaseStemmer], Stemmer); -BaseStemmer.prototype.setCurrent$S = function (value) { - var current$0; - var cursor$0; - var limit$0; - current$0 = this.current = value; - cursor$0 = this.cursor = 0; - limit$0 = this.limit = current$0.length; - this.limit_backward = 0; - this.bra = cursor$0; - this.ket = limit$0; -}; - - -function BaseStemmer$setCurrent$LBaseStemmer$S($this, value) { - var current$0; - var cursor$0; - var limit$0; - current$0 = $this.current = value; - cursor$0 = $this.cursor = 0; - limit$0 = $this.limit = current$0.length; - $this.limit_backward = 0; - $this.bra = cursor$0; - $this.ket = limit$0; -}; - -BaseStemmer.setCurrent$LBaseStemmer$S = BaseStemmer$setCurrent$LBaseStemmer$S; - -BaseStemmer.prototype.getCurrent$ = function () { - return this.current; -}; - - -function BaseStemmer$getCurrent$LBaseStemmer$($this) { - return $this.current; -}; - -BaseStemmer.getCurrent$LBaseStemmer$ = BaseStemmer$getCurrent$LBaseStemmer$; - -BaseStemmer.prototype.copy_from$LBaseStemmer$ = function (other) { - this.current = other.current; - this.cursor = other.cursor; - this.limit = other.limit; - this.limit_backward = other.limit_backward; - this.bra = other.bra; - this.ket = other.ket; -}; - - -function BaseStemmer$copy_from$LBaseStemmer$LBaseStemmer$($this, other) { - $this.current = other.current; - $this.cursor = other.cursor; - $this.limit = other.limit; - $this.limit_backward = other.limit_backward; - $this.bra = other.bra; - $this.ket = other.ket; -}; - -BaseStemmer.copy_from$LBaseStemmer$LBaseStemmer$ = BaseStemmer$copy_from$LBaseStemmer$LBaseStemmer$; - -BaseStemmer.prototype.in_grouping$AIII = function (s, min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor >= this.limit) { - return false; - } - ch = this.current.charCodeAt(this.cursor); - if (ch > max || ch < min) { - return false; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$in_grouping$LBaseStemmer$AIII($this, s, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor >= $this.limit) { - return false; - } - ch = $this.current.charCodeAt($this.cursor); - if (ch > max || ch < min) { - return false; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.in_grouping$LBaseStemmer$AIII = BaseStemmer$in_grouping$LBaseStemmer$AIII; - -BaseStemmer.prototype.in_grouping_b$AIII = function (s, min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor <= this.limit_backward) { - return false; - } - ch = this.current.charCodeAt(this.cursor - 1); - if (ch > max || ch < min) { - return false; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$in_grouping_b$LBaseStemmer$AIII($this, s, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor <= $this.limit_backward) { - return false; - } - ch = $this.current.charCodeAt($this.cursor - 1); - if (ch > max || ch < min) { - return false; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.in_grouping_b$LBaseStemmer$AIII = BaseStemmer$in_grouping_b$LBaseStemmer$AIII; - -BaseStemmer.prototype.out_grouping$AIII = function (s, min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor >= this.limit) { - return false; - } - ch = this.current.charCodeAt(this.cursor); - if (ch > max || ch < min) { - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; - } - ch -= min; - if ((s[ch >>> 3] & 0X1 << (ch & 0x7)) === 0) { - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; - } - return false; -}; - - -function BaseStemmer$out_grouping$LBaseStemmer$AIII($this, s, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor >= $this.limit) { - return false; - } - ch = $this.current.charCodeAt($this.cursor); - if (ch > max || ch < min) { - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; - } - ch -= min; - if ((s[ch >>> 3] & 0X1 << (ch & 0x7)) === 0) { - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; - } - return false; -}; - -BaseStemmer.out_grouping$LBaseStemmer$AIII = BaseStemmer$out_grouping$LBaseStemmer$AIII; - -BaseStemmer.prototype.out_grouping_b$AIII = function (s, min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor <= this.limit_backward) { - return false; - } - ch = this.current.charCodeAt(this.cursor - 1); - if (ch > max || ch < min) { - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; - } - return false; -}; - - -function BaseStemmer$out_grouping_b$LBaseStemmer$AIII($this, s, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor <= $this.limit_backward) { - return false; - } - ch = $this.current.charCodeAt($this.cursor - 1); - if (ch > max || ch < min) { - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; - } - return false; +// Generated by Snowball 2.1.0 - https://snowballstem.org/ + +/**@constructor*/ +FrenchStemmer = function() { + var base = new BaseStemmer(); + /** @const */ var a_0 = [ + ["col", -1, -1], + ["par", -1, -1], + ["tap", -1, -1] + ]; + + /** @const */ var a_1 = [ + ["", -1, 7], + ["H", 0, 6], + ["He", 1, 4], + ["Hi", 1, 5], + ["I", 0, 1], + ["U", 0, 2], + ["Y", 0, 3] + ]; + + /** @const */ var a_2 = [ + ["iqU", -1, 3], + ["abl", -1, 3], + ["I\u00E8r", -1, 4], + ["i\u00E8r", -1, 4], + ["eus", -1, 2], + ["iv", -1, 1] + ]; + + /** @const */ var a_3 = [ + ["ic", -1, 2], + ["abil", -1, 1], + ["iv", -1, 3] + ]; + + /** @const */ var a_4 = [ + ["iqUe", -1, 1], + ["atrice", -1, 2], + ["ance", -1, 1], + ["ence", -1, 5], + ["logie", -1, 3], + ["able", -1, 1], + ["isme", -1, 1], + ["euse", -1, 11], + ["iste", -1, 1], + ["ive", -1, 8], + ["if", -1, 8], + ["usion", -1, 4], + ["ation", -1, 2], + ["ution", -1, 4], + ["ateur", -1, 2], + ["iqUes", -1, 1], + ["atrices", -1, 2], + ["ances", -1, 1], + ["ences", -1, 5], + ["logies", -1, 3], + ["ables", -1, 1], + ["ismes", -1, 1], + ["euses", -1, 11], + ["istes", -1, 1], + ["ives", -1, 8], + ["ifs", -1, 8], + ["usions", -1, 4], + ["ations", -1, 2], + ["utions", -1, 4], + ["ateurs", -1, 2], + ["ments", -1, 15], + ["ements", 30, 6], + ["issements", 31, 12], + ["it\u00E9s", -1, 7], + ["ment", -1, 15], + ["ement", 34, 6], + ["issement", 35, 12], + ["amment", 34, 13], + ["emment", 34, 14], + ["aux", -1, 10], + ["eaux", 39, 9], + ["eux", -1, 1], + ["it\u00E9", -1, 7] + ]; + + /** @const */ var a_5 = [ + ["ira", -1, 1], + ["ie", -1, 1], + ["isse", -1, 1], + ["issante", -1, 1], + ["i", -1, 1], + ["irai", 4, 1], + ["ir", -1, 1], + ["iras", -1, 1], + ["ies", -1, 1], + ["\u00EEmes", -1, 1], + ["isses", -1, 1], + ["issantes", -1, 1], + ["\u00EEtes", -1, 1], + ["is", -1, 1], + ["irais", 13, 1], + ["issais", 13, 1], + ["irions", -1, 1], + ["issions", -1, 1], + ["irons", -1, 1], + ["issons", -1, 1], + ["issants", -1, 1], + ["it", -1, 1], + ["irait", 21, 1], + ["issait", 21, 1], + ["issant", -1, 1], + ["iraIent", -1, 1], + ["issaIent", -1, 1], + ["irent", -1, 1], + ["issent", -1, 1], + ["iront", -1, 1], + ["\u00EEt", -1, 1], + ["iriez", -1, 1], + ["issiez", -1, 1], + ["irez", -1, 1], + ["issez", -1, 1] + ]; + + /** @const */ var a_6 = [ + ["a", -1, 3], + ["era", 0, 2], + ["asse", -1, 3], + ["ante", -1, 3], + ["\u00E9e", -1, 2], + ["ai", -1, 3], + ["erai", 5, 2], + ["er", -1, 2], + ["as", -1, 3], + ["eras", 8, 2], + ["\u00E2mes", -1, 3], + ["asses", -1, 3], + ["antes", -1, 3], + ["\u00E2tes", -1, 3], + ["\u00E9es", -1, 2], + ["ais", -1, 3], + ["erais", 15, 2], + ["ions", -1, 1], + ["erions", 17, 2], + ["assions", 17, 3], + ["erons", -1, 2], + ["ants", -1, 3], + ["\u00E9s", -1, 2], + ["ait", -1, 3], + ["erait", 23, 2], + ["ant", -1, 3], + ["aIent", -1, 3], + ["eraIent", 26, 2], + ["\u00E8rent", -1, 2], + ["assent", -1, 3], + ["eront", -1, 2], + ["\u00E2t", -1, 3], + ["ez", -1, 2], + ["iez", 32, 2], + ["eriez", 33, 2], + ["assiez", 33, 3], + ["erez", 32, 2], + ["\u00E9", -1, 2] + ]; + + /** @const */ var a_7 = [ + ["e", -1, 3], + ["I\u00E8re", 0, 2], + ["i\u00E8re", 0, 2], + ["ion", -1, 1], + ["Ier", -1, 2], + ["ier", -1, 2] + ]; + + /** @const */ var a_8 = [ + ["ell", -1, -1], + ["eill", -1, -1], + ["enn", -1, -1], + ["onn", -1, -1], + ["ett", -1, -1] + ]; + + /** @const */ var /** Array */ g_v = [17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 130, 103, 8, 5]; + + /** @const */ var /** Array */ g_keep_with_s = [1, 65, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128]; + + var /** number */ I_p2 = 0; + var /** number */ I_p1 = 0; + var /** number */ I_pV = 0; + + + /** @return {boolean} */ + function r_prelude() { + while(true) + { + var /** number */ v_1 = base.cursor; + lab0: { + golab1: while(true) + { + var /** number */ v_2 = base.cursor; + lab2: { + lab3: { + var /** number */ v_3 = base.cursor; + lab4: { + if (!(base.in_grouping(g_v, 97, 251))) + { + break lab4; + } + base.bra = base.cursor; + lab5: { + var /** number */ v_4 = base.cursor; + lab6: { + if (!(base.eq_s("u"))) + { + break lab6; + } + base.ket = base.cursor; + if (!(base.in_grouping(g_v, 97, 251))) + { + break lab6; + } + if (!base.slice_from("U")) + { + return false; + } + break lab5; + } + base.cursor = v_4; + lab7: { + if (!(base.eq_s("i"))) + { + break lab7; + } + base.ket = base.cursor; + if (!(base.in_grouping(g_v, 97, 251))) + { + break lab7; + } + if (!base.slice_from("I")) + { + return false; + } + break lab5; + } + base.cursor = v_4; + if (!(base.eq_s("y"))) + { + break lab4; + } + base.ket = base.cursor; + if (!base.slice_from("Y")) + { + return false; + } + } + break lab3; + } + base.cursor = v_3; + lab8: { + base.bra = base.cursor; + if (!(base.eq_s("\u00EB"))) + { + break lab8; + } + base.ket = base.cursor; + if (!base.slice_from("He")) + { + return false; + } + break lab3; + } + base.cursor = v_3; + lab9: { + base.bra = base.cursor; + if (!(base.eq_s("\u00EF"))) + { + break lab9; + } + base.ket = base.cursor; + if (!base.slice_from("Hi")) + { + return false; + } + break lab3; + } + base.cursor = v_3; + lab10: { + base.bra = base.cursor; + if (!(base.eq_s("y"))) + { + break lab10; + } + base.ket = base.cursor; + if (!(base.in_grouping(g_v, 97, 251))) + { + break lab10; + } + if (!base.slice_from("Y")) + { + return false; + } + break lab3; + } + base.cursor = v_3; + if (!(base.eq_s("q"))) + { + break lab2; + } + base.bra = base.cursor; + if (!(base.eq_s("u"))) + { + break lab2; + } + base.ket = base.cursor; + if (!base.slice_from("U")) + { + return false; + } + } + base.cursor = v_2; + break golab1; + } + base.cursor = v_2; + if (base.cursor >= base.limit) + { + break lab0; + } + base.cursor++; + } + continue; + } + base.cursor = v_1; + break; + } + return true; + }; + + /** @return {boolean} */ + function r_mark_regions() { + I_pV = base.limit; + I_p1 = base.limit; + I_p2 = base.limit; + var /** number */ v_1 = base.cursor; + lab0: { + lab1: { + var /** number */ v_2 = base.cursor; + lab2: { + if (!(base.in_grouping(g_v, 97, 251))) + { + break lab2; + } + if (!(base.in_grouping(g_v, 97, 251))) + { + break lab2; + } + if (base.cursor >= base.limit) + { + break lab2; + } + base.cursor++; + break lab1; + } + base.cursor = v_2; + lab3: { + if (base.find_among(a_0) == 0) + { + break lab3; + } + break lab1; + } + base.cursor = v_2; + if (base.cursor >= base.limit) + { + break lab0; + } + base.cursor++; + golab4: while(true) + { + lab5: { + if (!(base.in_grouping(g_v, 97, 251))) + { + break lab5; + } + break golab4; + } + if (base.cursor >= base.limit) + { + break lab0; + } + base.cursor++; + } + } + I_pV = base.cursor; + } + base.cursor = v_1; + var /** number */ v_4 = base.cursor; + lab6: { + golab7: while(true) + { + lab8: { + if (!(base.in_grouping(g_v, 97, 251))) + { + break lab8; + } + break golab7; + } + if (base.cursor >= base.limit) + { + break lab6; + } + base.cursor++; + } + golab9: while(true) + { + lab10: { + if (!(base.out_grouping(g_v, 97, 251))) + { + break lab10; + } + break golab9; + } + if (base.cursor >= base.limit) + { + break lab6; + } + base.cursor++; + } + I_p1 = base.cursor; + golab11: while(true) + { + lab12: { + if (!(base.in_grouping(g_v, 97, 251))) + { + break lab12; + } + break golab11; + } + if (base.cursor >= base.limit) + { + break lab6; + } + base.cursor++; + } + golab13: while(true) + { + lab14: { + if (!(base.out_grouping(g_v, 97, 251))) + { + break lab14; + } + break golab13; + } + if (base.cursor >= base.limit) + { + break lab6; + } + base.cursor++; + } + I_p2 = base.cursor; + } + base.cursor = v_4; + return true; + }; + + /** @return {boolean} */ + function r_postlude() { + var /** number */ among_var; + while(true) + { + var /** number */ v_1 = base.cursor; + lab0: { + base.bra = base.cursor; + among_var = base.find_among(a_1); + if (among_var == 0) + { + break lab0; + } + base.ket = base.cursor; + switch (among_var) { + case 1: + if (!base.slice_from("i")) + { + return false; + } + break; + case 2: + if (!base.slice_from("u")) + { + return false; + } + break; + case 3: + if (!base.slice_from("y")) + { + return false; + } + break; + case 4: + if (!base.slice_from("\u00EB")) + { + return false; + } + break; + case 5: + if (!base.slice_from("\u00EF")) + { + return false; + } + break; + case 6: + if (!base.slice_del()) + { + return false; + } + break; + case 7: + if (base.cursor >= base.limit) + { + break lab0; + } + base.cursor++; + break; + } + continue; + } + base.cursor = v_1; + break; + } + return true; + }; + + /** @return {boolean} */ + function r_RV() { + if (!(I_pV <= base.cursor)) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_R1() { + if (!(I_p1 <= base.cursor)) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_R2() { + if (!(I_p2 <= base.cursor)) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_standard_suffix() { + var /** number */ among_var; + base.ket = base.cursor; + among_var = base.find_among_b(a_4); + if (among_var == 0) + { + return false; + } + base.bra = base.cursor; + switch (among_var) { + case 1: + if (!r_R2()) + { + return false; + } + if (!base.slice_del()) + { + return false; + } + break; + case 2: + if (!r_R2()) + { + return false; + } + if (!base.slice_del()) + { + return false; + } + var /** number */ v_1 = base.limit - base.cursor; + lab0: { + base.ket = base.cursor; + if (!(base.eq_s_b("ic"))) + { + base.cursor = base.limit - v_1; + break lab0; + } + base.bra = base.cursor; + lab1: { + var /** number */ v_2 = base.limit - base.cursor; + lab2: { + if (!r_R2()) + { + break lab2; + } + if (!base.slice_del()) + { + return false; + } + break lab1; + } + base.cursor = base.limit - v_2; + if (!base.slice_from("iqU")) + { + return false; + } + } + } + break; + case 3: + if (!r_R2()) + { + return false; + } + if (!base.slice_from("log")) + { + return false; + } + break; + case 4: + if (!r_R2()) + { + return false; + } + if (!base.slice_from("u")) + { + return false; + } + break; + case 5: + if (!r_R2()) + { + return false; + } + if (!base.slice_from("ent")) + { + return false; + } + break; + case 6: + if (!r_RV()) + { + return false; + } + if (!base.slice_del()) + { + return false; + } + var /** number */ v_3 = base.limit - base.cursor; + lab3: { + base.ket = base.cursor; + among_var = base.find_among_b(a_2); + if (among_var == 0) + { + base.cursor = base.limit - v_3; + break lab3; + } + base.bra = base.cursor; + switch (among_var) { + case 1: + if (!r_R2()) + { + base.cursor = base.limit - v_3; + break lab3; + } + if (!base.slice_del()) + { + return false; + } + base.ket = base.cursor; + if (!(base.eq_s_b("at"))) + { + base.cursor = base.limit - v_3; + break lab3; + } + base.bra = base.cursor; + if (!r_R2()) + { + base.cursor = base.limit - v_3; + break lab3; + } + if (!base.slice_del()) + { + return false; + } + break; + case 2: + lab4: { + var /** number */ v_4 = base.limit - base.cursor; + lab5: { + if (!r_R2()) + { + break lab5; + } + if (!base.slice_del()) + { + return false; + } + break lab4; + } + base.cursor = base.limit - v_4; + if (!r_R1()) + { + base.cursor = base.limit - v_3; + break lab3; + } + if (!base.slice_from("eux")) + { + return false; + } + } + break; + case 3: + if (!r_R2()) + { + base.cursor = base.limit - v_3; + break lab3; + } + if (!base.slice_del()) + { + return false; + } + break; + case 4: + if (!r_RV()) + { + base.cursor = base.limit - v_3; + break lab3; + } + if (!base.slice_from("i")) + { + return false; + } + break; + } + } + break; + case 7: + if (!r_R2()) + { + return false; + } + if (!base.slice_del()) + { + return false; + } + var /** number */ v_5 = base.limit - base.cursor; + lab6: { + base.ket = base.cursor; + among_var = base.find_among_b(a_3); + if (among_var == 0) + { + base.cursor = base.limit - v_5; + break lab6; + } + base.bra = base.cursor; + switch (among_var) { + case 1: + lab7: { + var /** number */ v_6 = base.limit - base.cursor; + lab8: { + if (!r_R2()) + { + break lab8; + } + if (!base.slice_del()) + { + return false; + } + break lab7; + } + base.cursor = base.limit - v_6; + if (!base.slice_from("abl")) + { + return false; + } + } + break; + case 2: + lab9: { + var /** number */ v_7 = base.limit - base.cursor; + lab10: { + if (!r_R2()) + { + break lab10; + } + if (!base.slice_del()) + { + return false; + } + break lab9; + } + base.cursor = base.limit - v_7; + if (!base.slice_from("iqU")) + { + return false; + } + } + break; + case 3: + if (!r_R2()) + { + base.cursor = base.limit - v_5; + break lab6; + } + if (!base.slice_del()) + { + return false; + } + break; + } + } + break; + case 8: + if (!r_R2()) + { + return false; + } + if (!base.slice_del()) + { + return false; + } + var /** number */ v_8 = base.limit - base.cursor; + lab11: { + base.ket = base.cursor; + if (!(base.eq_s_b("at"))) + { + base.cursor = base.limit - v_8; + break lab11; + } + base.bra = base.cursor; + if (!r_R2()) + { + base.cursor = base.limit - v_8; + break lab11; + } + if (!base.slice_del()) + { + return false; + } + base.ket = base.cursor; + if (!(base.eq_s_b("ic"))) + { + base.cursor = base.limit - v_8; + break lab11; + } + base.bra = base.cursor; + lab12: { + var /** number */ v_9 = base.limit - base.cursor; + lab13: { + if (!r_R2()) + { + break lab13; + } + if (!base.slice_del()) + { + return false; + } + break lab12; + } + base.cursor = base.limit - v_9; + if (!base.slice_from("iqU")) + { + return false; + } + } + } + break; + case 9: + if (!base.slice_from("eau")) + { + return false; + } + break; + case 10: + if (!r_R1()) + { + return false; + } + if (!base.slice_from("al")) + { + return false; + } + break; + case 11: + lab14: { + var /** number */ v_10 = base.limit - base.cursor; + lab15: { + if (!r_R2()) + { + break lab15; + } + if (!base.slice_del()) + { + return false; + } + break lab14; + } + base.cursor = base.limit - v_10; + if (!r_R1()) + { + return false; + } + if (!base.slice_from("eux")) + { + return false; + } + } + break; + case 12: + if (!r_R1()) + { + return false; + } + if (!(base.out_grouping_b(g_v, 97, 251))) + { + return false; + } + if (!base.slice_del()) + { + return false; + } + break; + case 13: + if (!r_RV()) + { + return false; + } + if (!base.slice_from("ant")) + { + return false; + } + return false; + case 14: + if (!r_RV()) + { + return false; + } + if (!base.slice_from("ent")) + { + return false; + } + return false; + case 15: + var /** number */ v_11 = base.limit - base.cursor; + if (!(base.in_grouping_b(g_v, 97, 251))) + { + return false; + } + if (!r_RV()) + { + return false; + } + base.cursor = base.limit - v_11; + if (!base.slice_del()) + { + return false; + } + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_i_verb_suffix() { + if (base.cursor < I_pV) + { + return false; + } + var /** number */ v_2 = base.limit_backward; + base.limit_backward = I_pV; + base.ket = base.cursor; + if (base.find_among_b(a_5) == 0) + { + base.limit_backward = v_2; + return false; + } + base.bra = base.cursor; + { + var /** number */ v_3 = base.limit - base.cursor; + lab0: { + if (!(base.eq_s_b("H"))) + { + break lab0; + } + base.limit_backward = v_2; + return false; + } + base.cursor = base.limit - v_3; + } + if (!(base.out_grouping_b(g_v, 97, 251))) + { + base.limit_backward = v_2; + return false; + } + if (!base.slice_del()) + { + return false; + } + base.limit_backward = v_2; + return true; + }; + + /** @return {boolean} */ + function r_verb_suffix() { + var /** number */ among_var; + if (base.cursor < I_pV) + { + return false; + } + var /** number */ v_2 = base.limit_backward; + base.limit_backward = I_pV; + base.ket = base.cursor; + among_var = base.find_among_b(a_6); + if (among_var == 0) + { + base.limit_backward = v_2; + return false; + } + base.bra = base.cursor; + switch (among_var) { + case 1: + if (!r_R2()) + { + base.limit_backward = v_2; + return false; + } + if (!base.slice_del()) + { + return false; + } + break; + case 2: + if (!base.slice_del()) + { + return false; + } + break; + case 3: + if (!base.slice_del()) + { + return false; + } + var /** number */ v_3 = base.limit - base.cursor; + lab0: { + base.ket = base.cursor; + if (!(base.eq_s_b("e"))) + { + base.cursor = base.limit - v_3; + break lab0; + } + base.bra = base.cursor; + if (!base.slice_del()) + { + return false; + } + } + break; + } + base.limit_backward = v_2; + return true; + }; + + /** @return {boolean} */ + function r_residual_suffix() { + var /** number */ among_var; + var /** number */ v_1 = base.limit - base.cursor; + lab0: { + base.ket = base.cursor; + if (!(base.eq_s_b("s"))) + { + base.cursor = base.limit - v_1; + break lab0; + } + base.bra = base.cursor; + var /** number */ v_2 = base.limit - base.cursor; + lab1: { + var /** number */ v_3 = base.limit - base.cursor; + lab2: { + if (!(base.eq_s_b("Hi"))) + { + break lab2; + } + break lab1; + } + base.cursor = base.limit - v_3; + if (!(base.out_grouping_b(g_keep_with_s, 97, 232))) + { + base.cursor = base.limit - v_1; + break lab0; + } + } + base.cursor = base.limit - v_2; + if (!base.slice_del()) + { + return false; + } + } + if (base.cursor < I_pV) + { + return false; + } + var /** number */ v_5 = base.limit_backward; + base.limit_backward = I_pV; + base.ket = base.cursor; + among_var = base.find_among_b(a_7); + if (among_var == 0) + { + base.limit_backward = v_5; + return false; + } + base.bra = base.cursor; + switch (among_var) { + case 1: + if (!r_R2()) + { + base.limit_backward = v_5; + return false; + } + lab3: { + var /** number */ v_6 = base.limit - base.cursor; + lab4: { + if (!(base.eq_s_b("s"))) + { + break lab4; + } + break lab3; + } + base.cursor = base.limit - v_6; + if (!(base.eq_s_b("t"))) + { + base.limit_backward = v_5; + return false; + } + } + if (!base.slice_del()) + { + return false; + } + break; + case 2: + if (!base.slice_from("i")) + { + return false; + } + break; + case 3: + if (!base.slice_del()) + { + return false; + } + break; + } + base.limit_backward = v_5; + return true; + }; + + /** @return {boolean} */ + function r_un_double() { + var /** number */ v_1 = base.limit - base.cursor; + if (base.find_among_b(a_8) == 0) + { + return false; + } + base.cursor = base.limit - v_1; + base.ket = base.cursor; + if (base.cursor <= base.limit_backward) + { + return false; + } + base.cursor--; + base.bra = base.cursor; + if (!base.slice_del()) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_un_accent() { + { + var v_1 = 1; + while(true) + { + lab0: { + if (!(base.out_grouping_b(g_v, 97, 251))) + { + break lab0; + } + v_1--; + continue; + } + break; + } + if (v_1 > 0) + { + return false; + } + } + base.ket = base.cursor; + lab1: { + var /** number */ v_3 = base.limit - base.cursor; + lab2: { + if (!(base.eq_s_b("\u00E9"))) + { + break lab2; + } + break lab1; + } + base.cursor = base.limit - v_3; + if (!(base.eq_s_b("\u00E8"))) + { + return false; + } + } + base.bra = base.cursor; + if (!base.slice_from("e")) + { + return false; + } + return true; + }; + + this.stem = /** @return {boolean} */ function() { + var /** number */ v_1 = base.cursor; + r_prelude(); + base.cursor = v_1; + r_mark_regions(); + base.limit_backward = base.cursor; base.cursor = base.limit; + var /** number */ v_3 = base.limit - base.cursor; + lab0: { + lab1: { + var /** number */ v_4 = base.limit - base.cursor; + lab2: { + var /** number */ v_5 = base.limit - base.cursor; + lab3: { + var /** number */ v_6 = base.limit - base.cursor; + lab4: { + if (!r_standard_suffix()) + { + break lab4; + } + break lab3; + } + base.cursor = base.limit - v_6; + lab5: { + if (!r_i_verb_suffix()) + { + break lab5; + } + break lab3; + } + base.cursor = base.limit - v_6; + if (!r_verb_suffix()) + { + break lab2; + } + } + base.cursor = base.limit - v_5; + var /** number */ v_7 = base.limit - base.cursor; + lab6: { + base.ket = base.cursor; + lab7: { + var /** number */ v_8 = base.limit - base.cursor; + lab8: { + if (!(base.eq_s_b("Y"))) + { + break lab8; + } + base.bra = base.cursor; + if (!base.slice_from("i")) + { + return false; + } + break lab7; + } + base.cursor = base.limit - v_8; + if (!(base.eq_s_b("\u00E7"))) + { + base.cursor = base.limit - v_7; + break lab6; + } + base.bra = base.cursor; + if (!base.slice_from("c")) + { + return false; + } + } + } + break lab1; + } + base.cursor = base.limit - v_4; + if (!r_residual_suffix()) + { + break lab0; + } + } + } + base.cursor = base.limit - v_3; + var /** number */ v_9 = base.limit - base.cursor; + r_un_double(); + base.cursor = base.limit - v_9; + var /** number */ v_10 = base.limit - base.cursor; + r_un_accent(); + base.cursor = base.limit - v_10; + base.cursor = base.limit_backward; + var /** number */ v_11 = base.cursor; + r_postlude(); + base.cursor = v_11; + return true; + }; + + /**@return{string}*/ + this['stemWord'] = function(/**string*/word) { + base.setCurrent(word); + this.stem(); + return base.getCurrent(); + }; }; - -BaseStemmer.out_grouping_b$LBaseStemmer$AIII = BaseStemmer$out_grouping_b$LBaseStemmer$AIII; - -BaseStemmer.prototype.in_range$II = function (min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor >= this.limit) { - return false; - } - ch = this.current.charCodeAt(this.cursor); - if (ch > max || ch < min) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$in_range$LBaseStemmer$II($this, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor >= $this.limit) { - return false; - } - ch = $this.current.charCodeAt($this.cursor); - if (ch > max || ch < min) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.in_range$LBaseStemmer$II = BaseStemmer$in_range$LBaseStemmer$II; - -BaseStemmer.prototype.in_range_b$II = function (min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor <= this.limit_backward) { - return false; - } - ch = this.current.charCodeAt(this.cursor - 1); - if (ch > max || ch < min) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$in_range_b$LBaseStemmer$II($this, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor <= $this.limit_backward) { - return false; - } - ch = $this.current.charCodeAt($this.cursor - 1); - if (ch > max || ch < min) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.in_range_b$LBaseStemmer$II = BaseStemmer$in_range_b$LBaseStemmer$II; - -BaseStemmer.prototype.out_range$II = function (min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor >= this.limit) { - return false; - } - ch = this.current.charCodeAt(this.cursor); - if (! (ch > max || ch < min)) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$out_range$LBaseStemmer$II($this, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor >= $this.limit) { - return false; - } - ch = $this.current.charCodeAt($this.cursor); - if (! (ch > max || ch < min)) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.out_range$LBaseStemmer$II = BaseStemmer$out_range$LBaseStemmer$II; - -BaseStemmer.prototype.out_range_b$II = function (min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor <= this.limit_backward) { - return false; - } - ch = this.current.charCodeAt(this.cursor - 1); - if (! (ch > max || ch < min)) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$out_range_b$LBaseStemmer$II($this, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor <= $this.limit_backward) { - return false; - } - ch = $this.current.charCodeAt($this.cursor - 1); - if (! (ch > max || ch < min)) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.out_range_b$LBaseStemmer$II = BaseStemmer$out_range_b$LBaseStemmer$II; - -BaseStemmer.prototype.eq_s$IS = function (s_size, s) { - var cursor$0; - if (((this.limit - this.cursor) | 0) < s_size) { - return false; - } - if (this.current.slice(cursor$0 = this.cursor, ((cursor$0 + s_size) | 0)) !== s) { - return false; - } - this.cursor = (this.cursor + s_size) | 0; - return true; -}; - - -function BaseStemmer$eq_s$LBaseStemmer$IS($this, s_size, s) { - var cursor$0; - if ((($this.limit - $this.cursor) | 0) < s_size) { - return false; - } - if ($this.current.slice(cursor$0 = $this.cursor, ((cursor$0 + s_size) | 0)) !== s) { - return false; - } - $this.cursor = ($this.cursor + s_size) | 0; - return true; -}; - -BaseStemmer.eq_s$LBaseStemmer$IS = BaseStemmer$eq_s$LBaseStemmer$IS; - -BaseStemmer.prototype.eq_s_b$IS = function (s_size, s) { - var cursor$0; - if (((this.cursor - this.limit_backward) | 0) < s_size) { - return false; - } - if (this.current.slice((((cursor$0 = this.cursor) - s_size) | 0), cursor$0) !== s) { - return false; - } - this.cursor = (this.cursor - s_size) | 0; - return true; -}; - - -function BaseStemmer$eq_s_b$LBaseStemmer$IS($this, s_size, s) { - var cursor$0; - if ((($this.cursor - $this.limit_backward) | 0) < s_size) { - return false; - } - if ($this.current.slice((((cursor$0 = $this.cursor) - s_size) | 0), cursor$0) !== s) { - return false; - } - $this.cursor = ($this.cursor - s_size) | 0; - return true; -}; - -BaseStemmer.eq_s_b$LBaseStemmer$IS = BaseStemmer$eq_s_b$LBaseStemmer$IS; - -BaseStemmer.prototype.eq_v$S = function (s) { - return BaseStemmer$eq_s$LBaseStemmer$IS(this, s.length, s); -}; - - -function BaseStemmer$eq_v$LBaseStemmer$S($this, s) { - return BaseStemmer$eq_s$LBaseStemmer$IS($this, s.length, s); -}; - -BaseStemmer.eq_v$LBaseStemmer$S = BaseStemmer$eq_v$LBaseStemmer$S; - -BaseStemmer.prototype.eq_v_b$S = function (s) { - return BaseStemmer$eq_s_b$LBaseStemmer$IS(this, s.length, s); -}; - - -function BaseStemmer$eq_v_b$LBaseStemmer$S($this, s) { - return BaseStemmer$eq_s_b$LBaseStemmer$IS($this, s.length, s); -}; - -BaseStemmer.eq_v_b$LBaseStemmer$S = BaseStemmer$eq_v_b$LBaseStemmer$S; - -BaseStemmer.prototype.find_among$ALAmong$I = function (v, v_size) { - var i; - var j; - var c; - var l; - var common_i; - var common_j; - var first_key_inspected; - var k; - var diff; - var common; - var w; - var i2; - var res; - i = 0; - j = v_size; - c = this.cursor; - l = this.limit; - common_i = 0; - common_j = 0; - first_key_inspected = false; - while (true) { - k = i + (j - i >>> 1); - diff = 0; - common = (common_i < common_j ? common_i : common_j); - w = v[k]; - for (i2 = common; i2 < w.s_size; i2++) { - if (c + common === l) { - diff = -1; - break; - } - diff = this.current.charCodeAt(c + common) - w.s.charCodeAt(i2); - if (diff !== 0) { - break; - } - common++; - } - if (diff < 0) { - j = k; - common_j = common; - } else { - i = k; - common_i = common; - } - if (j - i <= 1) { - if (i > 0) { - break; - } - if (j === i) { - break; - } - if (first_key_inspected) { - break; - } - first_key_inspected = true; - } - } - while (true) { - w = v[i]; - if (common_i >= w.s_size) { - this.cursor = (c + w.s_size | 0); - if (w.method == null) { - return w.result; - } - res = w.method(w.instance); - this.cursor = (c + w.s_size | 0); - if (res) { - return w.result; - } - } - i = w.substring_i; - if (i < 0) { - return 0; - } - } - return -1; -}; - - -function BaseStemmer$find_among$LBaseStemmer$ALAmong$I($this, v, v_size) { - var i; - var j; - var c; - var l; - var common_i; - var common_j; - var first_key_inspected; - var k; - var diff; - var common; - var w; - var i2; - var res; - i = 0; - j = v_size; - c = $this.cursor; - l = $this.limit; - common_i = 0; - common_j = 0; - first_key_inspected = false; - while (true) { - k = i + (j - i >>> 1); - diff = 0; - common = (common_i < common_j ? common_i : common_j); - w = v[k]; - for (i2 = common; i2 < w.s_size; i2++) { - if (c + common === l) { - diff = -1; - break; - } - diff = $this.current.charCodeAt(c + common) - w.s.charCodeAt(i2); - if (diff !== 0) { - break; - } - common++; - } - if (diff < 0) { - j = k; - common_j = common; - } else { - i = k; - common_i = common; - } - if (j - i <= 1) { - if (i > 0) { - break; - } - if (j === i) { - break; - } - if (first_key_inspected) { - break; - } - first_key_inspected = true; - } - } - while (true) { - w = v[i]; - if (common_i >= w.s_size) { - $this.cursor = (c + w.s_size | 0); - if (w.method == null) { - return w.result; - } - res = w.method(w.instance); - $this.cursor = (c + w.s_size | 0); - if (res) { - return w.result; - } - } - i = w.substring_i; - if (i < 0) { - return 0; - } - } - return -1; -}; - -BaseStemmer.find_among$LBaseStemmer$ALAmong$I = BaseStemmer$find_among$LBaseStemmer$ALAmong$I; - -BaseStemmer.prototype.find_among_b$ALAmong$I = function (v, v_size) { - var i; - var j; - var c; - var lb; - var common_i; - var common_j; - var first_key_inspected; - var k; - var diff; - var common; - var w; - var i2; - var res; - i = 0; - j = v_size; - c = this.cursor; - lb = this.limit_backward; - common_i = 0; - common_j = 0; - first_key_inspected = false; - while (true) { - k = i + (j - i >> 1); - diff = 0; - common = (common_i < common_j ? common_i : common_j); - w = v[k]; - for (i2 = w.s_size - 1 - common; i2 >= 0; i2--) { - if (c - common === lb) { - diff = -1; - break; - } - diff = this.current.charCodeAt(c - 1 - common) - w.s.charCodeAt(i2); - if (diff !== 0) { - break; - } - common++; - } - if (diff < 0) { - j = k; - common_j = common; - } else { - i = k; - common_i = common; - } - if (j - i <= 1) { - if (i > 0) { - break; - } - if (j === i) { - break; - } - if (first_key_inspected) { - break; - } - first_key_inspected = true; - } - } - while (true) { - w = v[i]; - if (common_i >= w.s_size) { - this.cursor = (c - w.s_size | 0); - if (w.method == null) { - return w.result; - } - res = w.method(this); - this.cursor = (c - w.s_size | 0); - if (res) { - return w.result; - } - } - i = w.substring_i; - if (i < 0) { - return 0; - } - } - return -1; -}; - - -function BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, v, v_size) { - var i; - var j; - var c; - var lb; - var common_i; - var common_j; - var first_key_inspected; - var k; - var diff; - var common; - var w; - var i2; - var res; - i = 0; - j = v_size; - c = $this.cursor; - lb = $this.limit_backward; - common_i = 0; - common_j = 0; - first_key_inspected = false; - while (true) { - k = i + (j - i >> 1); - diff = 0; - common = (common_i < common_j ? common_i : common_j); - w = v[k]; - for (i2 = w.s_size - 1 - common; i2 >= 0; i2--) { - if (c - common === lb) { - diff = -1; - break; - } - diff = $this.current.charCodeAt(c - 1 - common) - w.s.charCodeAt(i2); - if (diff !== 0) { - break; - } - common++; - } - if (diff < 0) { - j = k; - common_j = common; - } else { - i = k; - common_i = common; - } - if (j - i <= 1) { - if (i > 0) { - break; - } - if (j === i) { - break; - } - if (first_key_inspected) { - break; - } - first_key_inspected = true; - } - } - while (true) { - w = v[i]; - if (common_i >= w.s_size) { - $this.cursor = (c - w.s_size | 0); - if (w.method == null) { - return w.result; - } - res = w.method($this); - $this.cursor = (c - w.s_size | 0); - if (res) { - return w.result; - } - } - i = w.substring_i; - if (i < 0) { - return 0; - } - } - return -1; -}; - -BaseStemmer.find_among_b$LBaseStemmer$ALAmong$I = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I; - -BaseStemmer.prototype.replace_s$IIS = function (c_bra, c_ket, s) { - var adjustment; - adjustment = ((s.length - (((c_ket - c_bra) | 0))) | 0); - this.current = this.current.slice(0, c_bra) + s + this.current.slice(c_ket); - this.limit = (this.limit + adjustment) | 0; - if (this.cursor >= c_ket) { - this.cursor = (this.cursor + adjustment) | 0; - } else if (this.cursor > c_bra) { - this.cursor = c_bra; - } - return (adjustment | 0); -}; - - -function BaseStemmer$replace_s$LBaseStemmer$IIS($this, c_bra, c_ket, s) { - var adjustment; - adjustment = ((s.length - (((c_ket - c_bra) | 0))) | 0); - $this.current = $this.current.slice(0, c_bra) + s + $this.current.slice(c_ket); - $this.limit = ($this.limit + adjustment) | 0; - if ($this.cursor >= c_ket) { - $this.cursor = ($this.cursor + adjustment) | 0; - } else if ($this.cursor > c_bra) { - $this.cursor = c_bra; - } - return (adjustment | 0); -}; - -BaseStemmer.replace_s$LBaseStemmer$IIS = BaseStemmer$replace_s$LBaseStemmer$IIS; - -BaseStemmer.prototype.slice_check$ = function () { - var bra$0; - var ket$0; - var limit$0; - return ((bra$0 = this.bra) < 0 || bra$0 > (ket$0 = this.ket) || ket$0 > (limit$0 = this.limit) || limit$0 > this.current.length ? false : true); -}; - - -function BaseStemmer$slice_check$LBaseStemmer$($this) { - var bra$0; - var ket$0; - var limit$0; - return ((bra$0 = $this.bra) < 0 || bra$0 > (ket$0 = $this.ket) || ket$0 > (limit$0 = $this.limit) || limit$0 > $this.current.length ? false : true); -}; - -BaseStemmer.slice_check$LBaseStemmer$ = BaseStemmer$slice_check$LBaseStemmer$; - -BaseStemmer.prototype.slice_from$S = function (s) { - var result; - var bra$0; - var ket$0; - var limit$0; - result = false; - if ((bra$0 = this.bra) < 0 || bra$0 > (ket$0 = this.ket) || ket$0 > (limit$0 = this.limit) || limit$0 > this.current.length ? false : true) { - BaseStemmer$replace_s$LBaseStemmer$IIS(this, this.bra, this.ket, s); - result = true; - } - return result; -}; - - -function BaseStemmer$slice_from$LBaseStemmer$S($this, s) { - var result; - var bra$0; - var ket$0; - var limit$0; - result = false; - if ((bra$0 = $this.bra) < 0 || bra$0 > (ket$0 = $this.ket) || ket$0 > (limit$0 = $this.limit) || limit$0 > $this.current.length ? false : true) { - BaseStemmer$replace_s$LBaseStemmer$IIS($this, $this.bra, $this.ket, s); - result = true; - } - return result; -}; - -BaseStemmer.slice_from$LBaseStemmer$S = BaseStemmer$slice_from$LBaseStemmer$S; - -BaseStemmer.prototype.slice_del$ = function () { - return BaseStemmer$slice_from$LBaseStemmer$S(this, ""); -}; - - -function BaseStemmer$slice_del$LBaseStemmer$($this) { - return BaseStemmer$slice_from$LBaseStemmer$S($this, ""); -}; - -BaseStemmer.slice_del$LBaseStemmer$ = BaseStemmer$slice_del$LBaseStemmer$; - -BaseStemmer.prototype.insert$IIS = function (c_bra, c_ket, s) { - var adjustment; - adjustment = BaseStemmer$replace_s$LBaseStemmer$IIS(this, c_bra, c_ket, s); - if (c_bra <= this.bra) { - this.bra = (this.bra + adjustment) | 0; - } - if (c_bra <= this.ket) { - this.ket = (this.ket + adjustment) | 0; - } -}; - - -function BaseStemmer$insert$LBaseStemmer$IIS($this, c_bra, c_ket, s) { - var adjustment; - adjustment = BaseStemmer$replace_s$LBaseStemmer$IIS($this, c_bra, c_ket, s); - if (c_bra <= $this.bra) { - $this.bra = ($this.bra + adjustment) | 0; - } - if (c_bra <= $this.ket) { - $this.ket = ($this.ket + adjustment) | 0; - } -}; - -BaseStemmer.insert$LBaseStemmer$IIS = BaseStemmer$insert$LBaseStemmer$IIS; - -BaseStemmer.prototype.slice_to$S = function (s) { - var result; - var bra$0; - var ket$0; - var limit$0; - result = ''; - if ((bra$0 = this.bra) < 0 || bra$0 > (ket$0 = this.ket) || ket$0 > (limit$0 = this.limit) || limit$0 > this.current.length ? false : true) { - result = this.current.slice(this.bra, this.ket); - } - return result; -}; - - -function BaseStemmer$slice_to$LBaseStemmer$S($this, s) { - var result; - var bra$0; - var ket$0; - var limit$0; - result = ''; - if ((bra$0 = $this.bra) < 0 || bra$0 > (ket$0 = $this.ket) || ket$0 > (limit$0 = $this.limit) || limit$0 > $this.current.length ? false : true) { - result = $this.current.slice($this.bra, $this.ket); - } - return result; -}; - -BaseStemmer.slice_to$LBaseStemmer$S = BaseStemmer$slice_to$LBaseStemmer$S; - -BaseStemmer.prototype.assign_to$S = function (s) { - return this.current.slice(0, this.limit); -}; - - -function BaseStemmer$assign_to$LBaseStemmer$S($this, s) { - return $this.current.slice(0, $this.limit); -}; - -BaseStemmer.assign_to$LBaseStemmer$S = BaseStemmer$assign_to$LBaseStemmer$S; - -BaseStemmer.prototype.stem$ = function () { - return false; -}; - - -BaseStemmer.prototype.stemWord$S = function (word) { - var result; - var current$0; - var cursor$0; - var limit$0; - result = this.cache['.' + word]; - if (result == null) { - current$0 = this.current = word; - cursor$0 = this.cursor = 0; - limit$0 = this.limit = current$0.length; - this.limit_backward = 0; - this.bra = cursor$0; - this.ket = limit$0; - this.stem$(); - result = this.current; - this.cache['.' + word] = result; - } - return result; -}; - -BaseStemmer.prototype.stemWord = BaseStemmer.prototype.stemWord$S; - -BaseStemmer.prototype.stemWords$AS = function (words) { - var results; - var i; - var word; - var result; - var current$0; - var cursor$0; - var limit$0; - results = [ ]; - for (i = 0; i < words.length; i++) { - word = words[i]; - result = this.cache['.' + word]; - if (result == null) { - current$0 = this.current = word; - cursor$0 = this.cursor = 0; - limit$0 = this.limit = current$0.length; - this.limit_backward = 0; - this.bra = cursor$0; - this.ket = limit$0; - this.stem$(); - result = this.current; - this.cache['.' + word] = result; - } - results.push(result); - } - return results; -}; - -BaseStemmer.prototype.stemWords = BaseStemmer.prototype.stemWords$AS; - -function FrenchStemmer() { - BaseStemmer.call(this); - this.I_p2 = 0; - this.I_p1 = 0; - this.I_pV = 0; -}; - -$__jsx_extend([FrenchStemmer], BaseStemmer); -FrenchStemmer.prototype.copy_from$LFrenchStemmer$ = function (other) { - this.I_p2 = other.I_p2; - this.I_p1 = other.I_p1; - this.I_pV = other.I_pV; - BaseStemmer$copy_from$LBaseStemmer$LBaseStemmer$(this, other); -}; - -FrenchStemmer.prototype.copy_from = FrenchStemmer.prototype.copy_from$LFrenchStemmer$; - -FrenchStemmer.prototype.r_prelude$ = function () { - var v_1; - var v_2; - var v_3; - var v_4; - var lab1; - var lab3; - var lab4; - var lab5; - var lab6; - var lab7; - var lab8; - var lab9; - var cursor$0; - var $__jsx_postinc_t; -replab0: - while (true) { - v_1 = this.cursor; - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - golab2: - while (true) { - v_2 = this.cursor; - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - lab4 = true; - lab4: - while (lab4 === true) { - lab4 = false; - v_3 = this.cursor; - lab5 = true; - lab5: - while (lab5 === true) { - lab5 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, FrenchStemmer.g_v, 97, 251)) { - break lab5; - } - this.bra = this.cursor; - lab6 = true; - lab6: - while (lab6 === true) { - lab6 = false; - v_4 = this.cursor; - lab7 = true; - lab7: - while (lab7 === true) { - lab7 = false; - if (! BaseStemmer$eq_s$LBaseStemmer$IS(this, 1, "u")) { - break lab7; - } - this.ket = this.cursor; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, FrenchStemmer.g_v, 97, 251)) { - break lab7; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "U")) { - return false; - } - break lab6; - } - this.cursor = v_4; - lab8 = true; - lab8: - while (lab8 === true) { - lab8 = false; - if (! BaseStemmer$eq_s$LBaseStemmer$IS(this, 1, "i")) { - break lab8; - } - this.ket = this.cursor; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, FrenchStemmer.g_v, 97, 251)) { - break lab8; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "I")) { - return false; - } - break lab6; - } - this.cursor = v_4; - if (! BaseStemmer$eq_s$LBaseStemmer$IS(this, 1, "y")) { - break lab5; - } - this.ket = this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "Y")) { - return false; - } - } - break lab4; - } - this.cursor = v_3; - lab9 = true; - lab9: - while (lab9 === true) { - lab9 = false; - this.bra = this.cursor; - if (! BaseStemmer$eq_s$LBaseStemmer$IS(this, 1, "y")) { - break lab9; - } - this.ket = this.cursor; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, FrenchStemmer.g_v, 97, 251)) { - break lab9; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "Y")) { - return false; - } - break lab4; - } - this.cursor = v_3; - if (! BaseStemmer$eq_s$LBaseStemmer$IS(this, 1, "q")) { - break lab3; - } - this.bra = this.cursor; - if (! BaseStemmer$eq_s$LBaseStemmer$IS(this, 1, "u")) { - break lab3; - } - this.ket = this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "U")) { - return false; - } - } - this.cursor = v_2; - break golab2; - } - cursor$0 = this.cursor = v_2; - if (cursor$0 >= this.limit) { - break lab1; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - continue replab0; - } - this.cursor = v_1; - break replab0; - } - return true; -}; - -FrenchStemmer.prototype.r_prelude = FrenchStemmer.prototype.r_prelude$; - -function FrenchStemmer$r_prelude$LFrenchStemmer$($this) { - var v_1; - var v_2; - var v_3; - var v_4; - var lab1; - var lab3; - var lab4; - var lab5; - var lab6; - var lab7; - var lab8; - var lab9; - var cursor$0; - var $__jsx_postinc_t; -replab0: - while (true) { - v_1 = $this.cursor; - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - golab2: - while (true) { - v_2 = $this.cursor; - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - lab4 = true; - lab4: - while (lab4 === true) { - lab4 = false; - v_3 = $this.cursor; - lab5 = true; - lab5: - while (lab5 === true) { - lab5 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII($this, FrenchStemmer.g_v, 97, 251)) { - break lab5; - } - $this.bra = $this.cursor; - lab6 = true; - lab6: - while (lab6 === true) { - lab6 = false; - v_4 = $this.cursor; - lab7 = true; - lab7: - while (lab7 === true) { - lab7 = false; - if (! BaseStemmer$eq_s$LBaseStemmer$IS($this, 1, "u")) { - break lab7; - } - $this.ket = $this.cursor; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII($this, FrenchStemmer.g_v, 97, 251)) { - break lab7; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "U")) { - return false; - } - break lab6; - } - $this.cursor = v_4; - lab8 = true; - lab8: - while (lab8 === true) { - lab8 = false; - if (! BaseStemmer$eq_s$LBaseStemmer$IS($this, 1, "i")) { - break lab8; - } - $this.ket = $this.cursor; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII($this, FrenchStemmer.g_v, 97, 251)) { - break lab8; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "I")) { - return false; - } - break lab6; - } - $this.cursor = v_4; - if (! BaseStemmer$eq_s$LBaseStemmer$IS($this, 1, "y")) { - break lab5; - } - $this.ket = $this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "Y")) { - return false; - } - } - break lab4; - } - $this.cursor = v_3; - lab9 = true; - lab9: - while (lab9 === true) { - lab9 = false; - $this.bra = $this.cursor; - if (! BaseStemmer$eq_s$LBaseStemmer$IS($this, 1, "y")) { - break lab9; - } - $this.ket = $this.cursor; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII($this, FrenchStemmer.g_v, 97, 251)) { - break lab9; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "Y")) { - return false; - } - break lab4; - } - $this.cursor = v_3; - if (! BaseStemmer$eq_s$LBaseStemmer$IS($this, 1, "q")) { - break lab3; - } - $this.bra = $this.cursor; - if (! BaseStemmer$eq_s$LBaseStemmer$IS($this, 1, "u")) { - break lab3; - } - $this.ket = $this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "U")) { - return false; - } - } - $this.cursor = v_2; - break golab2; - } - cursor$0 = $this.cursor = v_2; - if (cursor$0 >= $this.limit) { - break lab1; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - continue replab0; - } - $this.cursor = v_1; - break replab0; - } - return true; -}; - -FrenchStemmer.r_prelude$LFrenchStemmer$ = FrenchStemmer$r_prelude$LFrenchStemmer$; - -FrenchStemmer.prototype.r_mark_regions$ = function () { - var v_1; - var v_2; - var v_4; - var lab0; - var lab1; - var lab2; - var lab3; - var lab5; - var lab6; - var lab8; - var lab10; - var lab12; - var lab14; - var cursor$0; - var limit$0; - var cursor$1; - var $__jsx_postinc_t; - this.I_pV = limit$0 = this.limit; - this.I_p1 = limit$0; - this.I_p2 = limit$0; - v_1 = this.cursor; - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - v_2 = this.cursor; - lab2 = true; - lab2: - while (lab2 === true) { - lab2 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, FrenchStemmer.g_v, 97, 251)) { - break lab2; - } - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, FrenchStemmer.g_v, 97, 251)) { - break lab2; - } - if (this.cursor >= this.limit) { - break lab2; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - break lab1; - } - this.cursor = v_2; - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - if (BaseStemmer$find_among$LBaseStemmer$ALAmong$I(this, FrenchStemmer.a_0, 3) === 0) { - break lab3; - } - break lab1; - } - cursor$0 = this.cursor = v_2; - if (cursor$0 >= this.limit) { - break lab0; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - golab4: - while (true) { - lab5 = true; - lab5: - while (lab5 === true) { - lab5 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, FrenchStemmer.g_v, 97, 251)) { - break lab5; - } - break golab4; - } - if (this.cursor >= this.limit) { - break lab0; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - } - this.I_pV = this.cursor; - } - cursor$1 = this.cursor = v_1; - v_4 = cursor$1; - lab6 = true; -lab6: - while (lab6 === true) { - lab6 = false; - golab7: - while (true) { - lab8 = true; - lab8: - while (lab8 === true) { - lab8 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, FrenchStemmer.g_v, 97, 251)) { - break lab8; - } - break golab7; - } - if (this.cursor >= this.limit) { - break lab6; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - golab9: - while (true) { - lab10 = true; - lab10: - while (lab10 === true) { - lab10 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII(this, FrenchStemmer.g_v, 97, 251)) { - break lab10; - } - break golab9; - } - if (this.cursor >= this.limit) { - break lab6; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - this.I_p1 = this.cursor; - golab11: - while (true) { - lab12 = true; - lab12: - while (lab12 === true) { - lab12 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, FrenchStemmer.g_v, 97, 251)) { - break lab12; - } - break golab11; - } - if (this.cursor >= this.limit) { - break lab6; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - golab13: - while (true) { - lab14 = true; - lab14: - while (lab14 === true) { - lab14 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII(this, FrenchStemmer.g_v, 97, 251)) { - break lab14; - } - break golab13; - } - if (this.cursor >= this.limit) { - break lab6; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - this.I_p2 = this.cursor; - } - this.cursor = v_4; - return true; -}; - -FrenchStemmer.prototype.r_mark_regions = FrenchStemmer.prototype.r_mark_regions$; - -function FrenchStemmer$r_mark_regions$LFrenchStemmer$($this) { - var v_1; - var v_2; - var v_4; - var lab0; - var lab1; - var lab2; - var lab3; - var lab5; - var lab6; - var lab8; - var lab10; - var lab12; - var lab14; - var cursor$0; - var limit$0; - var cursor$1; - var $__jsx_postinc_t; - $this.I_pV = limit$0 = $this.limit; - $this.I_p1 = limit$0; - $this.I_p2 = limit$0; - v_1 = $this.cursor; - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - v_2 = $this.cursor; - lab2 = true; - lab2: - while (lab2 === true) { - lab2 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII($this, FrenchStemmer.g_v, 97, 251)) { - break lab2; - } - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII($this, FrenchStemmer.g_v, 97, 251)) { - break lab2; - } - if ($this.cursor >= $this.limit) { - break lab2; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - break lab1; - } - $this.cursor = v_2; - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - if (BaseStemmer$find_among$LBaseStemmer$ALAmong$I($this, FrenchStemmer.a_0, 3) === 0) { - break lab3; - } - break lab1; - } - cursor$0 = $this.cursor = v_2; - if (cursor$0 >= $this.limit) { - break lab0; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - golab4: - while (true) { - lab5 = true; - lab5: - while (lab5 === true) { - lab5 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII($this, FrenchStemmer.g_v, 97, 251)) { - break lab5; - } - break golab4; - } - if ($this.cursor >= $this.limit) { - break lab0; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - } - $this.I_pV = $this.cursor; - } - cursor$1 = $this.cursor = v_1; - v_4 = cursor$1; - lab6 = true; -lab6: - while (lab6 === true) { - lab6 = false; - golab7: - while (true) { - lab8 = true; - lab8: - while (lab8 === true) { - lab8 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII($this, FrenchStemmer.g_v, 97, 251)) { - break lab8; - } - break golab7; - } - if ($this.cursor >= $this.limit) { - break lab6; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - golab9: - while (true) { - lab10 = true; - lab10: - while (lab10 === true) { - lab10 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII($this, FrenchStemmer.g_v, 97, 251)) { - break lab10; - } - break golab9; - } - if ($this.cursor >= $this.limit) { - break lab6; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - $this.I_p1 = $this.cursor; - golab11: - while (true) { - lab12 = true; - lab12: - while (lab12 === true) { - lab12 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII($this, FrenchStemmer.g_v, 97, 251)) { - break lab12; - } - break golab11; - } - if ($this.cursor >= $this.limit) { - break lab6; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - golab13: - while (true) { - lab14 = true; - lab14: - while (lab14 === true) { - lab14 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII($this, FrenchStemmer.g_v, 97, 251)) { - break lab14; - } - break golab13; - } - if ($this.cursor >= $this.limit) { - break lab6; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - $this.I_p2 = $this.cursor; - } - $this.cursor = v_4; - return true; -}; - -FrenchStemmer.r_mark_regions$LFrenchStemmer$ = FrenchStemmer$r_mark_regions$LFrenchStemmer$; - -FrenchStemmer.prototype.r_postlude$ = function () { - var among_var; - var v_1; - var lab1; - var $__jsx_postinc_t; -replab0: - while (true) { - v_1 = this.cursor; - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - this.bra = this.cursor; - among_var = BaseStemmer$find_among$LBaseStemmer$ALAmong$I(this, FrenchStemmer.a_1, 4); - if (among_var === 0) { - break lab1; - } - this.ket = this.cursor; - switch (among_var) { - case 0: - break lab1; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "i")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "u")) { - return false; - } - break; - case 3: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "y")) { - return false; - } - break; - case 4: - if (this.cursor >= this.limit) { - break lab1; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - break; - } - continue replab0; - } - this.cursor = v_1; - break replab0; - } - return true; -}; - -FrenchStemmer.prototype.r_postlude = FrenchStemmer.prototype.r_postlude$; - -function FrenchStemmer$r_postlude$LFrenchStemmer$($this) { - var among_var; - var v_1; - var lab1; - var $__jsx_postinc_t; -replab0: - while (true) { - v_1 = $this.cursor; - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - $this.bra = $this.cursor; - among_var = BaseStemmer$find_among$LBaseStemmer$ALAmong$I($this, FrenchStemmer.a_1, 4); - if (among_var === 0) { - break lab1; - } - $this.ket = $this.cursor; - switch (among_var) { - case 0: - break lab1; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "i")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "u")) { - return false; - } - break; - case 3: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "y")) { - return false; - } - break; - case 4: - if ($this.cursor >= $this.limit) { - break lab1; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - break; - } - continue replab0; - } - $this.cursor = v_1; - break replab0; - } - return true; -}; - -FrenchStemmer.r_postlude$LFrenchStemmer$ = FrenchStemmer$r_postlude$LFrenchStemmer$; - -FrenchStemmer.prototype.r_RV$ = function () { - return (! (this.I_pV <= this.cursor) ? false : true); -}; - -FrenchStemmer.prototype.r_RV = FrenchStemmer.prototype.r_RV$; - -function FrenchStemmer$r_RV$LFrenchStemmer$($this) { - return (! ($this.I_pV <= $this.cursor) ? false : true); -}; - -FrenchStemmer.r_RV$LFrenchStemmer$ = FrenchStemmer$r_RV$LFrenchStemmer$; - -FrenchStemmer.prototype.r_R1$ = function () { - return (! (this.I_p1 <= this.cursor) ? false : true); -}; - -FrenchStemmer.prototype.r_R1 = FrenchStemmer.prototype.r_R1$; - -function FrenchStemmer$r_R1$LFrenchStemmer$($this) { - return (! ($this.I_p1 <= $this.cursor) ? false : true); -}; - -FrenchStemmer.r_R1$LFrenchStemmer$ = FrenchStemmer$r_R1$LFrenchStemmer$; - -FrenchStemmer.prototype.r_R2$ = function () { - return (! (this.I_p2 <= this.cursor) ? false : true); -}; - -FrenchStemmer.prototype.r_R2 = FrenchStemmer.prototype.r_R2$; - -function FrenchStemmer$r_R2$LFrenchStemmer$($this) { - return (! ($this.I_p2 <= $this.cursor) ? false : true); -}; - -FrenchStemmer.r_R2$LFrenchStemmer$ = FrenchStemmer$r_R2$LFrenchStemmer$; - -FrenchStemmer.prototype.r_standard_suffix$ = function () { - var among_var; - var v_1; - var v_2; - var v_3; - var v_4; - var v_5; - var v_6; - var v_7; - var v_8; - var v_9; - var v_10; - var v_11; - var lab0; - var lab1; - var lab2; - var lab3; - var lab4; - var lab5; - var lab6; - var lab7; - var lab8; - var lab9; - var lab10; - var lab11; - var lab12; - var lab13; - var lab14; - var lab15; - var cursor$0; - var cursor$1; - var cursor$2; - var cursor$3; - this.ket = this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, FrenchStemmer.a_4, 43); - if (among_var === 0) { - return false; - } - this.bra = this.cursor; - switch (among_var) { - case 0: - return false; - case 1: - if (! (! (this.I_p2 <= this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 2: - if (! (! (this.I_p2 <= this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - v_1 = ((this.limit - this.cursor) | 0); - lab0 = true; - lab0: - while (lab0 === true) { - lab0 = false; - this.ket = this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 2, "ic")) { - this.cursor = ((this.limit - v_1) | 0); - break lab0; - } - this.bra = this.cursor; - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - v_2 = ((this.limit - this.cursor) | 0); - lab2 = true; - lab2: - while (lab2 === true) { - lab2 = false; - if (! (! (this.I_p2 <= this.cursor) ? false : true)) { - break lab2; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break lab1; - } - this.cursor = ((this.limit - v_2) | 0); - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "iqU")) { - return false; - } - } - } - break; - case 3: - if (! (! (this.I_p2 <= this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "log")) { - return false; - } - break; - case 4: - if (! (! (this.I_p2 <= this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "u")) { - return false; - } - break; - case 5: - if (! (! (this.I_p2 <= this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "ent")) { - return false; - } - break; - case 6: - if (! (! (this.I_pV <= this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - v_3 = ((this.limit - this.cursor) | 0); - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - this.ket = this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, FrenchStemmer.a_2, 6); - if (among_var === 0) { - this.cursor = ((this.limit - v_3) | 0); - break lab3; - } - this.bra = this.cursor; - switch (among_var) { - case 0: - this.cursor = ((this.limit - v_3) | 0); - break lab3; - case 1: - if (! (! (this.I_p2 <= this.cursor) ? false : true)) { - this.cursor = ((this.limit - v_3) | 0); - break lab3; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - this.ket = this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 2, "at")) { - this.cursor = ((this.limit - v_3) | 0); - break lab3; - } - this.bra = cursor$0 = this.cursor; - if (! (! (this.I_p2 <= cursor$0) ? false : true)) { - this.cursor = ((this.limit - v_3) | 0); - break lab3; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 2: - lab4 = true; - lab4: - while (lab4 === true) { - lab4 = false; - v_4 = ((this.limit - this.cursor) | 0); - lab5 = true; - lab5: - while (lab5 === true) { - lab5 = false; - if (! (! (this.I_p2 <= this.cursor) ? false : true)) { - break lab5; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break lab4; - } - cursor$1 = this.cursor = ((this.limit - v_4) | 0); - if (! (! (this.I_p1 <= cursor$1) ? false : true)) { - this.cursor = ((this.limit - v_3) | 0); - break lab3; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "eux")) { - return false; - } - } - break; - case 3: - if (! (! (this.I_p2 <= this.cursor) ? false : true)) { - this.cursor = ((this.limit - v_3) | 0); - break lab3; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 4: - if (! (! (this.I_pV <= this.cursor) ? false : true)) { - this.cursor = ((this.limit - v_3) | 0); - break lab3; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "i")) { - return false; - } - break; - } - } - break; - case 7: - if (! (! (this.I_p2 <= this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - v_5 = ((this.limit - this.cursor) | 0); - lab6 = true; - lab6: - while (lab6 === true) { - lab6 = false; - this.ket = this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, FrenchStemmer.a_3, 3); - if (among_var === 0) { - this.cursor = ((this.limit - v_5) | 0); - break lab6; - } - this.bra = this.cursor; - switch (among_var) { - case 0: - this.cursor = ((this.limit - v_5) | 0); - break lab6; - case 1: - lab7 = true; - lab7: - while (lab7 === true) { - lab7 = false; - v_6 = ((this.limit - this.cursor) | 0); - lab8 = true; - lab8: - while (lab8 === true) { - lab8 = false; - if (! (! (this.I_p2 <= this.cursor) ? false : true)) { - break lab8; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break lab7; - } - this.cursor = ((this.limit - v_6) | 0); - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "abl")) { - return false; - } - } - break; - case 2: - lab9 = true; - lab9: - while (lab9 === true) { - lab9 = false; - v_7 = ((this.limit - this.cursor) | 0); - lab10 = true; - lab10: - while (lab10 === true) { - lab10 = false; - if (! (! (this.I_p2 <= this.cursor) ? false : true)) { - break lab10; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break lab9; - } - this.cursor = ((this.limit - v_7) | 0); - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "iqU")) { - return false; - } - } - break; - case 3: - if (! (! (this.I_p2 <= this.cursor) ? false : true)) { - this.cursor = ((this.limit - v_5) | 0); - break lab6; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - } - } - break; - case 8: - if (! (! (this.I_p2 <= this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - v_8 = ((this.limit - this.cursor) | 0); - lab11 = true; - lab11: - while (lab11 === true) { - lab11 = false; - this.ket = this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 2, "at")) { - this.cursor = ((this.limit - v_8) | 0); - break lab11; - } - this.bra = cursor$2 = this.cursor; - if (! (! (this.I_p2 <= cursor$2) ? false : true)) { - this.cursor = ((this.limit - v_8) | 0); - break lab11; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - this.ket = this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 2, "ic")) { - this.cursor = ((this.limit - v_8) | 0); - break lab11; - } - this.bra = this.cursor; - lab12 = true; - lab12: - while (lab12 === true) { - lab12 = false; - v_9 = ((this.limit - this.cursor) | 0); - lab13 = true; - lab13: - while (lab13 === true) { - lab13 = false; - if (! (! (this.I_p2 <= this.cursor) ? false : true)) { - break lab13; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break lab12; - } - this.cursor = ((this.limit - v_9) | 0); - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "iqU")) { - return false; - } - } - } - break; - case 9: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "eau")) { - return false; - } - break; - case 10: - if (! (! (this.I_p1 <= this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "al")) { - return false; - } - break; - case 11: - lab14 = true; - lab14: - while (lab14 === true) { - lab14 = false; - v_10 = ((this.limit - this.cursor) | 0); - lab15 = true; - lab15: - while (lab15 === true) { - lab15 = false; - if (! (! (this.I_p2 <= this.cursor) ? false : true)) { - break lab15; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break lab14; - } - cursor$3 = this.cursor = ((this.limit - v_10) | 0); - if (! (! (this.I_p1 <= cursor$3) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "eux")) { - return false; - } - } - break; - case 12: - if (! (! (this.I_p1 <= this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$out_grouping_b$LBaseStemmer$AIII(this, FrenchStemmer.g_v, 97, 251)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 13: - if (! (! (this.I_pV <= this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "ant")) { - return false; - } - return false; - case 14: - if (! (! (this.I_pV <= this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "ent")) { - return false; - } - return false; - case 15: - v_11 = ((this.limit - this.cursor) | 0); - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII(this, FrenchStemmer.g_v, 97, 251)) { - return false; - } - if (! (! (this.I_pV <= this.cursor) ? false : true)) { - return false; - } - this.cursor = ((this.limit - v_11) | 0); - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - return false; - } - return true; -}; - -FrenchStemmer.prototype.r_standard_suffix = FrenchStemmer.prototype.r_standard_suffix$; - -function FrenchStemmer$r_standard_suffix$LFrenchStemmer$($this) { - var among_var; - var v_1; - var v_2; - var v_3; - var v_4; - var v_5; - var v_6; - var v_7; - var v_8; - var v_9; - var v_10; - var v_11; - var lab0; - var lab1; - var lab2; - var lab3; - var lab4; - var lab5; - var lab6; - var lab7; - var lab8; - var lab9; - var lab10; - var lab11; - var lab12; - var lab13; - var lab14; - var lab15; - var cursor$0; - var cursor$1; - var cursor$2; - var cursor$3; - $this.ket = $this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, FrenchStemmer.a_4, 43); - if (among_var === 0) { - return false; - } - $this.bra = $this.cursor; - switch (among_var) { - case 0: - return false; - case 1: - if (! (! ($this.I_p2 <= $this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 2: - if (! (! ($this.I_p2 <= $this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - v_1 = (($this.limit - $this.cursor) | 0); - lab0 = true; - lab0: - while (lab0 === true) { - lab0 = false; - $this.ket = $this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 2, "ic")) { - $this.cursor = (($this.limit - v_1) | 0); - break lab0; - } - $this.bra = $this.cursor; - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - v_2 = (($this.limit - $this.cursor) | 0); - lab2 = true; - lab2: - while (lab2 === true) { - lab2 = false; - if (! (! ($this.I_p2 <= $this.cursor) ? false : true)) { - break lab2; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break lab1; - } - $this.cursor = (($this.limit - v_2) | 0); - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "iqU")) { - return false; - } - } - } - break; - case 3: - if (! (! ($this.I_p2 <= $this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "log")) { - return false; - } - break; - case 4: - if (! (! ($this.I_p2 <= $this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "u")) { - return false; - } - break; - case 5: - if (! (! ($this.I_p2 <= $this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "ent")) { - return false; - } - break; - case 6: - if (! (! ($this.I_pV <= $this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - v_3 = (($this.limit - $this.cursor) | 0); - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - $this.ket = $this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, FrenchStemmer.a_2, 6); - if (among_var === 0) { - $this.cursor = (($this.limit - v_3) | 0); - break lab3; - } - $this.bra = $this.cursor; - switch (among_var) { - case 0: - $this.cursor = (($this.limit - v_3) | 0); - break lab3; - case 1: - if (! (! ($this.I_p2 <= $this.cursor) ? false : true)) { - $this.cursor = (($this.limit - v_3) | 0); - break lab3; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - $this.ket = $this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 2, "at")) { - $this.cursor = (($this.limit - v_3) | 0); - break lab3; - } - $this.bra = cursor$0 = $this.cursor; - if (! (! ($this.I_p2 <= cursor$0) ? false : true)) { - $this.cursor = (($this.limit - v_3) | 0); - break lab3; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 2: - lab4 = true; - lab4: - while (lab4 === true) { - lab4 = false; - v_4 = (($this.limit - $this.cursor) | 0); - lab5 = true; - lab5: - while (lab5 === true) { - lab5 = false; - if (! (! ($this.I_p2 <= $this.cursor) ? false : true)) { - break lab5; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break lab4; - } - cursor$1 = $this.cursor = (($this.limit - v_4) | 0); - if (! (! ($this.I_p1 <= cursor$1) ? false : true)) { - $this.cursor = (($this.limit - v_3) | 0); - break lab3; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "eux")) { - return false; - } - } - break; - case 3: - if (! (! ($this.I_p2 <= $this.cursor) ? false : true)) { - $this.cursor = (($this.limit - v_3) | 0); - break lab3; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 4: - if (! (! ($this.I_pV <= $this.cursor) ? false : true)) { - $this.cursor = (($this.limit - v_3) | 0); - break lab3; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "i")) { - return false; - } - break; - } - } - break; - case 7: - if (! (! ($this.I_p2 <= $this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - v_5 = (($this.limit - $this.cursor) | 0); - lab6 = true; - lab6: - while (lab6 === true) { - lab6 = false; - $this.ket = $this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, FrenchStemmer.a_3, 3); - if (among_var === 0) { - $this.cursor = (($this.limit - v_5) | 0); - break lab6; - } - $this.bra = $this.cursor; - switch (among_var) { - case 0: - $this.cursor = (($this.limit - v_5) | 0); - break lab6; - case 1: - lab7 = true; - lab7: - while (lab7 === true) { - lab7 = false; - v_6 = (($this.limit - $this.cursor) | 0); - lab8 = true; - lab8: - while (lab8 === true) { - lab8 = false; - if (! (! ($this.I_p2 <= $this.cursor) ? false : true)) { - break lab8; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break lab7; - } - $this.cursor = (($this.limit - v_6) | 0); - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "abl")) { - return false; - } - } - break; - case 2: - lab9 = true; - lab9: - while (lab9 === true) { - lab9 = false; - v_7 = (($this.limit - $this.cursor) | 0); - lab10 = true; - lab10: - while (lab10 === true) { - lab10 = false; - if (! (! ($this.I_p2 <= $this.cursor) ? false : true)) { - break lab10; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break lab9; - } - $this.cursor = (($this.limit - v_7) | 0); - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "iqU")) { - return false; - } - } - break; - case 3: - if (! (! ($this.I_p2 <= $this.cursor) ? false : true)) { - $this.cursor = (($this.limit - v_5) | 0); - break lab6; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - } - } - break; - case 8: - if (! (! ($this.I_p2 <= $this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - v_8 = (($this.limit - $this.cursor) | 0); - lab11 = true; - lab11: - while (lab11 === true) { - lab11 = false; - $this.ket = $this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 2, "at")) { - $this.cursor = (($this.limit - v_8) | 0); - break lab11; - } - $this.bra = cursor$2 = $this.cursor; - if (! (! ($this.I_p2 <= cursor$2) ? false : true)) { - $this.cursor = (($this.limit - v_8) | 0); - break lab11; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - $this.ket = $this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 2, "ic")) { - $this.cursor = (($this.limit - v_8) | 0); - break lab11; - } - $this.bra = $this.cursor; - lab12 = true; - lab12: - while (lab12 === true) { - lab12 = false; - v_9 = (($this.limit - $this.cursor) | 0); - lab13 = true; - lab13: - while (lab13 === true) { - lab13 = false; - if (! (! ($this.I_p2 <= $this.cursor) ? false : true)) { - break lab13; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break lab12; - } - $this.cursor = (($this.limit - v_9) | 0); - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "iqU")) { - return false; - } - } - } - break; - case 9: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "eau")) { - return false; - } - break; - case 10: - if (! (! ($this.I_p1 <= $this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "al")) { - return false; - } - break; - case 11: - lab14 = true; - lab14: - while (lab14 === true) { - lab14 = false; - v_10 = (($this.limit - $this.cursor) | 0); - lab15 = true; - lab15: - while (lab15 === true) { - lab15 = false; - if (! (! ($this.I_p2 <= $this.cursor) ? false : true)) { - break lab15; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break lab14; - } - cursor$3 = $this.cursor = (($this.limit - v_10) | 0); - if (! (! ($this.I_p1 <= cursor$3) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "eux")) { - return false; - } - } - break; - case 12: - if (! (! ($this.I_p1 <= $this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$out_grouping_b$LBaseStemmer$AIII($this, FrenchStemmer.g_v, 97, 251)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 13: - if (! (! ($this.I_pV <= $this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "ant")) { - return false; - } - return false; - case 14: - if (! (! ($this.I_pV <= $this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "ent")) { - return false; - } - return false; - case 15: - v_11 = (($this.limit - $this.cursor) | 0); - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII($this, FrenchStemmer.g_v, 97, 251)) { - return false; - } - if (! (! ($this.I_pV <= $this.cursor) ? false : true)) { - return false; - } - $this.cursor = (($this.limit - v_11) | 0); - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - return false; - } - return true; -}; - -FrenchStemmer.r_standard_suffix$LFrenchStemmer$ = FrenchStemmer$r_standard_suffix$LFrenchStemmer$; - -FrenchStemmer.prototype.r_i_verb_suffix$ = function () { - var among_var; - var v_1; - var v_2; - var cursor$0; - var cursor$1; - var cursor$2; - v_1 = ((this.limit - (cursor$0 = this.cursor)) | 0); - if (cursor$0 < this.I_pV) { - return false; - } - cursor$1 = this.cursor = this.I_pV; - v_2 = this.limit_backward; - this.limit_backward = cursor$1; - cursor$2 = this.cursor = ((this.limit - v_1) | 0); - this.ket = cursor$2; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, FrenchStemmer.a_5, 35); - if (among_var === 0) { - this.limit_backward = v_2; - return false; - } - this.bra = this.cursor; - switch (among_var) { - case 0: - this.limit_backward = v_2; - return false; - case 1: - if (! BaseStemmer$out_grouping_b$LBaseStemmer$AIII(this, FrenchStemmer.g_v, 97, 251)) { - this.limit_backward = v_2; - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - } - this.limit_backward = v_2; - return true; -}; - -FrenchStemmer.prototype.r_i_verb_suffix = FrenchStemmer.prototype.r_i_verb_suffix$; - -function FrenchStemmer$r_i_verb_suffix$LFrenchStemmer$($this) { - var among_var; - var v_1; - var v_2; - var cursor$0; - var cursor$1; - var cursor$2; - v_1 = (($this.limit - (cursor$0 = $this.cursor)) | 0); - if (cursor$0 < $this.I_pV) { - return false; - } - cursor$1 = $this.cursor = $this.I_pV; - v_2 = $this.limit_backward; - $this.limit_backward = cursor$1; - cursor$2 = $this.cursor = (($this.limit - v_1) | 0); - $this.ket = cursor$2; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, FrenchStemmer.a_5, 35); - if (among_var === 0) { - $this.limit_backward = v_2; - return false; - } - $this.bra = $this.cursor; - switch (among_var) { - case 0: - $this.limit_backward = v_2; - return false; - case 1: - if (! BaseStemmer$out_grouping_b$LBaseStemmer$AIII($this, FrenchStemmer.g_v, 97, 251)) { - $this.limit_backward = v_2; - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - } - $this.limit_backward = v_2; - return true; -}; - -FrenchStemmer.r_i_verb_suffix$LFrenchStemmer$ = FrenchStemmer$r_i_verb_suffix$LFrenchStemmer$; - -FrenchStemmer.prototype.r_verb_suffix$ = function () { - var among_var; - var v_1; - var v_2; - var v_3; - var lab0; - var cursor$0; - var cursor$1; - var cursor$2; - v_1 = ((this.limit - (cursor$0 = this.cursor)) | 0); - if (cursor$0 < this.I_pV) { - return false; - } - cursor$1 = this.cursor = this.I_pV; - v_2 = this.limit_backward; - this.limit_backward = cursor$1; - cursor$2 = this.cursor = ((this.limit - v_1) | 0); - this.ket = cursor$2; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, FrenchStemmer.a_6, 38); - if (among_var === 0) { - this.limit_backward = v_2; - return false; - } - this.bra = this.cursor; - switch (among_var) { - case 0: - this.limit_backward = v_2; - return false; - case 1: - if (! (! (this.I_p2 <= this.cursor) ? false : true)) { - this.limit_backward = v_2; - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 3: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - v_3 = ((this.limit - this.cursor) | 0); - lab0 = true; - lab0: - while (lab0 === true) { - lab0 = false; - this.ket = this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "e")) { - this.cursor = ((this.limit - v_3) | 0); - break lab0; - } - this.bra = this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - } - break; - } - this.limit_backward = v_2; - return true; -}; - -FrenchStemmer.prototype.r_verb_suffix = FrenchStemmer.prototype.r_verb_suffix$; - -function FrenchStemmer$r_verb_suffix$LFrenchStemmer$($this) { - var among_var; - var v_1; - var v_2; - var v_3; - var lab0; - var cursor$0; - var cursor$1; - var cursor$2; - v_1 = (($this.limit - (cursor$0 = $this.cursor)) | 0); - if (cursor$0 < $this.I_pV) { - return false; - } - cursor$1 = $this.cursor = $this.I_pV; - v_2 = $this.limit_backward; - $this.limit_backward = cursor$1; - cursor$2 = $this.cursor = (($this.limit - v_1) | 0); - $this.ket = cursor$2; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, FrenchStemmer.a_6, 38); - if (among_var === 0) { - $this.limit_backward = v_2; - return false; - } - $this.bra = $this.cursor; - switch (among_var) { - case 0: - $this.limit_backward = v_2; - return false; - case 1: - if (! (! ($this.I_p2 <= $this.cursor) ? false : true)) { - $this.limit_backward = v_2; - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 3: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - v_3 = (($this.limit - $this.cursor) | 0); - lab0 = true; - lab0: - while (lab0 === true) { - lab0 = false; - $this.ket = $this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "e")) { - $this.cursor = (($this.limit - v_3) | 0); - break lab0; - } - $this.bra = $this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - } - break; - } - $this.limit_backward = v_2; - return true; -}; - -FrenchStemmer.r_verb_suffix$LFrenchStemmer$ = FrenchStemmer$r_verb_suffix$LFrenchStemmer$; - -FrenchStemmer.prototype.r_residual_suffix$ = function () { - var among_var; - var v_1; - var v_2; - var v_3; - var v_4; - var v_5; - var lab0; - var lab1; - var lab2; - var cursor$0; - var cursor$1; - var cursor$2; - var cursor$3; - v_1 = ((this.limit - this.cursor) | 0); - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - this.ket = this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "s")) { - this.cursor = ((this.limit - v_1) | 0); - break lab0; - } - this.bra = cursor$0 = this.cursor; - v_2 = ((this.limit - cursor$0) | 0); - if (! BaseStemmer$out_grouping_b$LBaseStemmer$AIII(this, FrenchStemmer.g_keep_with_s, 97, 232)) { - this.cursor = ((this.limit - v_1) | 0); - break lab0; - } - this.cursor = ((this.limit - v_2) | 0); - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - } - v_3 = ((this.limit - (cursor$1 = this.cursor)) | 0); - if (cursor$1 < this.I_pV) { - return false; - } - cursor$2 = this.cursor = this.I_pV; - v_4 = this.limit_backward; - this.limit_backward = cursor$2; - cursor$3 = this.cursor = ((this.limit - v_3) | 0); - this.ket = cursor$3; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, FrenchStemmer.a_7, 7); - if (among_var === 0) { - this.limit_backward = v_4; - return false; - } - this.bra = this.cursor; - switch (among_var) { - case 0: - this.limit_backward = v_4; - return false; - case 1: - if (! (! (this.I_p2 <= this.cursor) ? false : true)) { - this.limit_backward = v_4; - return false; - } - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - v_5 = ((this.limit - this.cursor) | 0); - lab2 = true; - lab2: - while (lab2 === true) { - lab2 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "s")) { - break lab2; - } - break lab1; - } - this.cursor = ((this.limit - v_5) | 0); - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "t")) { - this.limit_backward = v_4; - return false; - } - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "i")) { - return false; - } - break; - case 3: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 4: - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 2, "gu")) { - this.limit_backward = v_4; - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - } - this.limit_backward = v_4; - return true; -}; - -FrenchStemmer.prototype.r_residual_suffix = FrenchStemmer.prototype.r_residual_suffix$; - -function FrenchStemmer$r_residual_suffix$LFrenchStemmer$($this) { - var among_var; - var v_1; - var v_2; - var v_3; - var v_4; - var v_5; - var lab0; - var lab1; - var lab2; - var cursor$0; - var cursor$1; - var cursor$2; - var cursor$3; - v_1 = (($this.limit - $this.cursor) | 0); - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - $this.ket = $this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "s")) { - $this.cursor = (($this.limit - v_1) | 0); - break lab0; - } - $this.bra = cursor$0 = $this.cursor; - v_2 = (($this.limit - cursor$0) | 0); - if (! BaseStemmer$out_grouping_b$LBaseStemmer$AIII($this, FrenchStemmer.g_keep_with_s, 97, 232)) { - $this.cursor = (($this.limit - v_1) | 0); - break lab0; - } - $this.cursor = (($this.limit - v_2) | 0); - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - } - v_3 = (($this.limit - (cursor$1 = $this.cursor)) | 0); - if (cursor$1 < $this.I_pV) { - return false; - } - cursor$2 = $this.cursor = $this.I_pV; - v_4 = $this.limit_backward; - $this.limit_backward = cursor$2; - cursor$3 = $this.cursor = (($this.limit - v_3) | 0); - $this.ket = cursor$3; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, FrenchStemmer.a_7, 7); - if (among_var === 0) { - $this.limit_backward = v_4; - return false; - } - $this.bra = $this.cursor; - switch (among_var) { - case 0: - $this.limit_backward = v_4; - return false; - case 1: - if (! (! ($this.I_p2 <= $this.cursor) ? false : true)) { - $this.limit_backward = v_4; - return false; - } - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - v_5 = (($this.limit - $this.cursor) | 0); - lab2 = true; - lab2: - while (lab2 === true) { - lab2 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "s")) { - break lab2; - } - break lab1; - } - $this.cursor = (($this.limit - v_5) | 0); - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "t")) { - $this.limit_backward = v_4; - return false; - } - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "i")) { - return false; - } - break; - case 3: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 4: - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 2, "gu")) { - $this.limit_backward = v_4; - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - } - $this.limit_backward = v_4; - return true; -}; - -FrenchStemmer.r_residual_suffix$LFrenchStemmer$ = FrenchStemmer$r_residual_suffix$LFrenchStemmer$; - -FrenchStemmer.prototype.r_un_double$ = function () { - var v_1; - var cursor$0; - var $__jsx_postinc_t; - v_1 = ((this.limit - this.cursor) | 0); - if (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, FrenchStemmer.a_8, 5) === 0) { - return false; - } - cursor$0 = this.cursor = ((this.limit - v_1) | 0); - this.ket = cursor$0; - if (cursor$0 <= this.limit_backward) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - this.bra = this.cursor; - return (! BaseStemmer$slice_from$LBaseStemmer$S(this, "") ? false : true); -}; - -FrenchStemmer.prototype.r_un_double = FrenchStemmer.prototype.r_un_double$; - -function FrenchStemmer$r_un_double$LFrenchStemmer$($this) { - var v_1; - var cursor$0; - var $__jsx_postinc_t; - v_1 = (($this.limit - $this.cursor) | 0); - if (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, FrenchStemmer.a_8, 5) === 0) { - return false; - } - cursor$0 = $this.cursor = (($this.limit - v_1) | 0); - $this.ket = cursor$0; - if (cursor$0 <= $this.limit_backward) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - $this.bra = $this.cursor; - return (! BaseStemmer$slice_from$LBaseStemmer$S($this, "") ? false : true); -}; - -FrenchStemmer.r_un_double$LFrenchStemmer$ = FrenchStemmer$r_un_double$LFrenchStemmer$; - -FrenchStemmer.prototype.r_un_accent$ = function () { - var v_3; - var v_1; - var lab1; - var lab2; - var lab3; - v_1 = 1; -replab0: - while (true) { - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - if (! BaseStemmer$out_grouping_b$LBaseStemmer$AIII(this, FrenchStemmer.g_v, 97, 251)) { - break lab1; - } - v_1--; - continue replab0; - } - break replab0; - } - if (v_1 > 0) { - return false; - } - this.ket = this.cursor; - lab2 = true; -lab2: - while (lab2 === true) { - lab2 = false; - v_3 = ((this.limit - this.cursor) | 0); - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "\u00E9")) { - break lab3; - } - break lab2; - } - this.cursor = ((this.limit - v_3) | 0); - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "\u00E8")) { - return false; - } - } - this.bra = this.cursor; - return (! BaseStemmer$slice_from$LBaseStemmer$S(this, "e") ? false : true); -}; - -FrenchStemmer.prototype.r_un_accent = FrenchStemmer.prototype.r_un_accent$; - -function FrenchStemmer$r_un_accent$LFrenchStemmer$($this) { - var v_3; - var v_1; - var lab1; - var lab2; - var lab3; - v_1 = 1; -replab0: - while (true) { - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - if (! BaseStemmer$out_grouping_b$LBaseStemmer$AIII($this, FrenchStemmer.g_v, 97, 251)) { - break lab1; - } - v_1--; - continue replab0; - } - break replab0; - } - if (v_1 > 0) { - return false; - } - $this.ket = $this.cursor; - lab2 = true; -lab2: - while (lab2 === true) { - lab2 = false; - v_3 = (($this.limit - $this.cursor) | 0); - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "\u00E9")) { - break lab3; - } - break lab2; - } - $this.cursor = (($this.limit - v_3) | 0); - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "\u00E8")) { - return false; - } - } - $this.bra = $this.cursor; - return (! BaseStemmer$slice_from$LBaseStemmer$S($this, "e") ? false : true); -}; - -FrenchStemmer.r_un_accent$LFrenchStemmer$ = FrenchStemmer$r_un_accent$LFrenchStemmer$; - -FrenchStemmer.prototype.stem$ = function () { - var v_1; - var v_2; - var v_3; - var v_4; - var v_5; - var v_6; - var v_7; - var v_8; - var v_9; - var v_11; - var lab0; - var lab1; - var lab2; - var lab3; - var lab4; - var lab5; - var lab6; - var lab7; - var lab8; - var lab9; - var lab10; - var lab11; - var lab12; - var lab13; - var cursor$0; - var limit$0; - var cursor$1; - var cursor$2; - var limit$1; - var cursor$3; - var limit$2; - var cursor$4; - var cursor$5; - v_1 = this.cursor; - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - if (! FrenchStemmer$r_prelude$LFrenchStemmer$(this)) { - break lab0; - } - } - cursor$0 = this.cursor = v_1; - v_2 = cursor$0; - lab1 = true; -lab1: - while (lab1 === true) { - lab1 = false; - if (! FrenchStemmer$r_mark_regions$LFrenchStemmer$(this)) { - break lab1; - } - } - cursor$2 = this.cursor = v_2; - this.limit_backward = cursor$2; - cursor$3 = this.cursor = limit$1 = this.limit; - v_3 = ((limit$1 - cursor$3) | 0); - lab2 = true; -lab2: - while (lab2 === true) { - lab2 = false; - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - v_4 = ((this.limit - this.cursor) | 0); - lab4 = true; - lab4: - while (lab4 === true) { - lab4 = false; - v_5 = ((this.limit - this.cursor) | 0); - lab5 = true; - lab5: - while (lab5 === true) { - lab5 = false; - v_6 = ((this.limit - this.cursor) | 0); - lab6 = true; - lab6: - while (lab6 === true) { - lab6 = false; - if (! FrenchStemmer$r_standard_suffix$LFrenchStemmer$(this)) { - break lab6; - } - break lab5; - } - this.cursor = ((this.limit - v_6) | 0); - lab7 = true; - lab7: - while (lab7 === true) { - lab7 = false; - if (! FrenchStemmer$r_i_verb_suffix$LFrenchStemmer$(this)) { - break lab7; - } - break lab5; - } - this.cursor = ((this.limit - v_6) | 0); - if (! FrenchStemmer$r_verb_suffix$LFrenchStemmer$(this)) { - break lab4; - } - } - cursor$1 = this.cursor = (((limit$0 = this.limit) - v_5) | 0); - v_7 = ((limit$0 - cursor$1) | 0); - lab8 = true; - lab8: - while (lab8 === true) { - lab8 = false; - this.ket = this.cursor; - lab9 = true; - lab9: - while (lab9 === true) { - lab9 = false; - v_8 = ((this.limit - this.cursor) | 0); - lab10 = true; - lab10: - while (lab10 === true) { - lab10 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "Y")) { - break lab10; - } - this.bra = this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "i")) { - return false; - } - break lab9; - } - this.cursor = ((this.limit - v_8) | 0); - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "\u00E7")) { - this.cursor = ((this.limit - v_7) | 0); - break lab8; - } - this.bra = this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "c")) { - return false; - } - } - } - break lab3; - } - this.cursor = ((this.limit - v_4) | 0); - if (! FrenchStemmer$r_residual_suffix$LFrenchStemmer$(this)) { - break lab2; - } - } - } - cursor$4 = this.cursor = (((limit$2 = this.limit) - v_3) | 0); - v_9 = ((limit$2 - cursor$4) | 0); - lab11 = true; -lab11: - while (lab11 === true) { - lab11 = false; - if (! FrenchStemmer$r_un_double$LFrenchStemmer$(this)) { - break lab11; - } - } - this.cursor = ((this.limit - v_9) | 0); - lab12 = true; -lab12: - while (lab12 === true) { - lab12 = false; - if (! FrenchStemmer$r_un_accent$LFrenchStemmer$(this)) { - break lab12; - } - } - cursor$5 = this.cursor = this.limit_backward; - v_11 = cursor$5; - lab13 = true; -lab13: - while (lab13 === true) { - lab13 = false; - if (! FrenchStemmer$r_postlude$LFrenchStemmer$(this)) { - break lab13; - } - } - this.cursor = v_11; - return true; -}; - -FrenchStemmer.prototype.stem = FrenchStemmer.prototype.stem$; - -FrenchStemmer.prototype.equals$X = function (o) { - return o instanceof FrenchStemmer; -}; - -FrenchStemmer.prototype.equals = FrenchStemmer.prototype.equals$X; - -function FrenchStemmer$equals$LFrenchStemmer$X($this, o) { - return o instanceof FrenchStemmer; -}; - -FrenchStemmer.equals$LFrenchStemmer$X = FrenchStemmer$equals$LFrenchStemmer$X; - -FrenchStemmer.prototype.hashCode$ = function () { - var classname; - var hash; - var i; - var char; - classname = "FrenchStemmer"; - hash = 0; - for (i = 0; i < classname.length; i++) { - char = classname.charCodeAt(i); - hash = (hash << 5) - hash + char; - hash = hash & hash; - } - return (hash | 0); -}; - -FrenchStemmer.prototype.hashCode = FrenchStemmer.prototype.hashCode$; - -function FrenchStemmer$hashCode$LFrenchStemmer$($this) { - var classname; - var hash; - var i; - var char; - classname = "FrenchStemmer"; - hash = 0; - for (i = 0; i < classname.length; i++) { - char = classname.charCodeAt(i); - hash = (hash << 5) - hash + char; - hash = hash & hash; - } - return (hash | 0); -}; - -FrenchStemmer.hashCode$LFrenchStemmer$ = FrenchStemmer$hashCode$LFrenchStemmer$; - -FrenchStemmer.serialVersionUID = 1; -$__jsx_lazy_init(FrenchStemmer, "methodObject", function () { - return new FrenchStemmer(); -}); -$__jsx_lazy_init(FrenchStemmer, "a_0", function () { - return [ new Among("col", -1, -1), new Among("par", -1, -1), new Among("tap", -1, -1) ]; -}); -$__jsx_lazy_init(FrenchStemmer, "a_1", function () { - return [ new Among("", -1, 4), new Among("I", 0, 1), new Among("U", 0, 2), new Among("Y", 0, 3) ]; -}); -$__jsx_lazy_init(FrenchStemmer, "a_2", function () { - return [ new Among("iqU", -1, 3), new Among("abl", -1, 3), new Among("I\u00E8r", -1, 4), new Among("i\u00E8r", -1, 4), new Among("eus", -1, 2), new Among("iv", -1, 1) ]; -}); -$__jsx_lazy_init(FrenchStemmer, "a_3", function () { - return [ new Among("ic", -1, 2), new Among("abil", -1, 1), new Among("iv", -1, 3) ]; -}); -$__jsx_lazy_init(FrenchStemmer, "a_4", function () { - return [ new Among("iqUe", -1, 1), new Among("atrice", -1, 2), new Among("ance", -1, 1), new Among("ence", -1, 5), new Among("logie", -1, 3), new Among("able", -1, 1), new Among("isme", -1, 1), new Among("euse", -1, 11), new Among("iste", -1, 1), new Among("ive", -1, 8), new Among("if", -1, 8), new Among("usion", -1, 4), new Among("ation", -1, 2), new Among("ution", -1, 4), new Among("ateur", -1, 2), new Among("iqUes", -1, 1), new Among("atrices", -1, 2), new Among("ances", -1, 1), new Among("ences", -1, 5), new Among("logies", -1, 3), new Among("ables", -1, 1), new Among("ismes", -1, 1), new Among("euses", -1, 11), new Among("istes", -1, 1), new Among("ives", -1, 8), new Among("ifs", -1, 8), new Among("usions", -1, 4), new Among("ations", -1, 2), new Among("utions", -1, 4), new Among("ateurs", -1, 2), new Among("ments", -1, 15), new Among("ements", 30, 6), new Among("issements", 31, 12), new Among("it\u00E9s", -1, 7), new Among("ment", -1, 15), new Among("ement", 34, 6), new Among("issement", 35, 12), new Among("amment", 34, 13), new Among("emment", 34, 14), new Among("aux", -1, 10), new Among("eaux", 39, 9), new Among("eux", -1, 1), new Among("it\u00E9", -1, 7) ]; -}); -$__jsx_lazy_init(FrenchStemmer, "a_5", function () { - return [ new Among("ira", -1, 1), new Among("ie", -1, 1), new Among("isse", -1, 1), new Among("issante", -1, 1), new Among("i", -1, 1), new Among("irai", 4, 1), new Among("ir", -1, 1), new Among("iras", -1, 1), new Among("ies", -1, 1), new Among("\u00EEmes", -1, 1), new Among("isses", -1, 1), new Among("issantes", -1, 1), new Among("\u00EEtes", -1, 1), new Among("is", -1, 1), new Among("irais", 13, 1), new Among("issais", 13, 1), new Among("irions", -1, 1), new Among("issions", -1, 1), new Among("irons", -1, 1), new Among("issons", -1, 1), new Among("issants", -1, 1), new Among("it", -1, 1), new Among("irait", 21, 1), new Among("issait", 21, 1), new Among("issant", -1, 1), new Among("iraIent", -1, 1), new Among("issaIent", -1, 1), new Among("irent", -1, 1), new Among("issent", -1, 1), new Among("iront", -1, 1), new Among("\u00EEt", -1, 1), new Among("iriez", -1, 1), new Among("issiez", -1, 1), new Among("irez", -1, 1), new Among("issez", -1, 1) ]; -}); -$__jsx_lazy_init(FrenchStemmer, "a_6", function () { - return [ new Among("a", -1, 3), new Among("era", 0, 2), new Among("asse", -1, 3), new Among("ante", -1, 3), new Among("\u00E9e", -1, 2), new Among("ai", -1, 3), new Among("erai", 5, 2), new Among("er", -1, 2), new Among("as", -1, 3), new Among("eras", 8, 2), new Among("\u00E2mes", -1, 3), new Among("asses", -1, 3), new Among("antes", -1, 3), new Among("\u00E2tes", -1, 3), new Among("\u00E9es", -1, 2), new Among("ais", -1, 3), new Among("erais", 15, 2), new Among("ions", -1, 1), new Among("erions", 17, 2), new Among("assions", 17, 3), new Among("erons", -1, 2), new Among("ants", -1, 3), new Among("\u00E9s", -1, 2), new Among("ait", -1, 3), new Among("erait", 23, 2), new Among("ant", -1, 3), new Among("aIent", -1, 3), new Among("eraIent", 26, 2), new Among("\u00E8rent", -1, 2), new Among("assent", -1, 3), new Among("eront", -1, 2), new Among("\u00E2t", -1, 3), new Among("ez", -1, 2), new Among("iez", 32, 2), new Among("eriez", 33, 2), new Among("assiez", 33, 3), new Among("erez", 32, 2), new Among("\u00E9", -1, 2) ]; -}); -$__jsx_lazy_init(FrenchStemmer, "a_7", function () { - return [ new Among("e", -1, 3), new Among("I\u00E8re", 0, 2), new Among("i\u00E8re", 0, 2), new Among("ion", -1, 1), new Among("Ier", -1, 2), new Among("ier", -1, 2), new Among("\u00EB", -1, 4) ]; -}); -$__jsx_lazy_init(FrenchStemmer, "a_8", function () { - return [ new Among("ell", -1, -1), new Among("eill", -1, -1), new Among("enn", -1, -1), new Among("onn", -1, -1), new Among("ett", -1, -1) ]; -}); -FrenchStemmer.g_v = [ 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 130, 103, 8, 5 ]; -FrenchStemmer.g_keep_with_s = [ 1, 65, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128 ]; - -var $__jsx_classMap = { - "src/among.jsx": { - Among: Among, - Among$SII: Among, - Among$SIIF$LBaseStemmer$B$LBaseStemmer$: Among$0 - }, - "src/stemmer.jsx": { - Stemmer: Stemmer, - Stemmer$: Stemmer - }, - "src/base-stemmer.jsx": { - BaseStemmer: BaseStemmer, - BaseStemmer$: BaseStemmer - }, - "src/french-stemmer.jsx": { - FrenchStemmer: FrenchStemmer, - FrenchStemmer$: FrenchStemmer - } -}; - - -})(JSX); - -var Among = JSX.require("src/among.jsx").Among; -var Among$SII = JSX.require("src/among.jsx").Among$SII; -var Stemmer = JSX.require("src/stemmer.jsx").Stemmer; -var BaseStemmer = JSX.require("src/base-stemmer.jsx").BaseStemmer; -var FrenchStemmer = JSX.require("src/french-stemmer.jsx").FrenchStemmer; diff --git a/sphinx/search/non-minified-js/german-stemmer.js b/sphinx/search/non-minified-js/german-stemmer.js index a5beb8f3ae8..f5ff81bc9d7 100644 --- a/sphinx/search/non-minified-js/german-stemmer.js +++ b/sphinx/search/non-minified-js/german-stemmer.js @@ -1,2506 +1,577 @@ -// generatedy by JSX compiler 0.9.89 (2014-05-20 06:01:03 +0900; 8e8c6105f36f3dfe440ea026a3c93a3444977102) -var JSX = {}; -(function (JSX) { -/** - * extends the class - */ -function $__jsx_extend(derivations, base) { - var ctor = function () {}; - ctor.prototype = base.prototype; - var proto = new ctor(); - for (var i in derivations) { - derivations[i].prototype = proto; - } -} - -/** - * copies the implementations from source interface to target - */ -function $__jsx_merge_interface(target, source) { - for (var k in source.prototype) - if (source.prototype.hasOwnProperty(k)) - target.prototype[k] = source.prototype[k]; -} - -/** - * defers the initialization of the property - */ -function $__jsx_lazy_init(obj, prop, func) { - function reset(obj, prop, value) { - delete obj[prop]; - obj[prop] = value; - return value; - } - - Object.defineProperty(obj, prop, { - get: function () { - return reset(obj, prop, func()); - }, - set: function (v) { - reset(obj, prop, v); - }, - enumerable: true, - configurable: true - }); -} - -var $__jsx_imul = Math.imul; -if (typeof $__jsx_imul === "undefined") { - $__jsx_imul = function (a, b) { - var ah = (a >>> 16) & 0xffff; - var al = a & 0xffff; - var bh = (b >>> 16) & 0xffff; - var bl = b & 0xffff; - return ((al * bl) + (((ah * bl + al * bh) << 16) >>> 0)|0); - }; -} - -/** - * fused int-ops with side-effects - */ -function $__jsx_ipadd(o, p, r) { - return o[p] = (o[p] + r) | 0; -} -function $__jsx_ipsub(o, p, r) { - return o[p] = (o[p] - r) | 0; -} -function $__jsx_ipmul(o, p, r) { - return o[p] = $__jsx_imul(o[p], r); -} -function $__jsx_ipdiv(o, p, r) { - return o[p] = (o[p] / r) | 0; -} -function $__jsx_ipmod(o, p, r) { - return o[p] = (o[p] % r) | 0; -} -function $__jsx_ippostinc(o, p) { - var v = o[p]; - o[p] = (v + 1) | 0; - return v; -} -function $__jsx_ippostdec(o, p) { - var v = o[p]; - o[p] = (v - 1) | 0; - return v; -} - -/** - * non-inlined version of Array#each - */ -function $__jsx_forEach(o, f) { - var l = o.length; - for (var i = 0; i < l; ++i) - f(o[i]); -} - -/* - * global functions, renamed to avoid conflict with local variable names - */ -var $__jsx_parseInt = parseInt; -var $__jsx_parseFloat = parseFloat; -function $__jsx_isNaN(n) { return n !== n; } -var $__jsx_isFinite = isFinite; - -var $__jsx_encodeURIComponent = encodeURIComponent; -var $__jsx_decodeURIComponent = decodeURIComponent; -var $__jsx_encodeURI = encodeURI; -var $__jsx_decodeURI = decodeURI; - -var $__jsx_ObjectToString = Object.prototype.toString; -var $__jsx_ObjectHasOwnProperty = Object.prototype.hasOwnProperty; - -/* - * profiler object, initialized afterwards - */ -function $__jsx_profiler() { -} - -/* - * public interface to JSX code - */ -JSX.require = function (path) { - var m = $__jsx_classMap[path]; - return m !== undefined ? m : null; -}; - -JSX.profilerIsRunning = function () { - return $__jsx_profiler.getResults != null; -}; - -JSX.getProfileResults = function () { - return ($__jsx_profiler.getResults || function () { return {}; })(); -}; - -JSX.postProfileResults = function (url, cb) { - if ($__jsx_profiler.postResults == null) - throw new Error("profiler has not been turned on"); - return $__jsx_profiler.postResults(url, cb); -}; - -JSX.resetProfileResults = function () { - if ($__jsx_profiler.resetResults == null) - throw new Error("profiler has not been turned on"); - return $__jsx_profiler.resetResults(); -}; -JSX.DEBUG = false; -var GeneratorFunction$0 = -(function () { - try { - return Function('import {GeneratorFunction} from "std:iteration"; return GeneratorFunction')(); - } catch (e) { - return function GeneratorFunction () {}; - } -})(); -var __jsx_generator_object$0 = -(function () { - function __jsx_generator_object() { - this.__next = 0; - this.__loop = null; - this.__seed = null; - this.__value = undefined; - this.__status = 0; // SUSPENDED: 0, ACTIVE: 1, DEAD: 2 - } - - __jsx_generator_object.prototype.next = function (seed) { - switch (this.__status) { - case 0: - this.__status = 1; - this.__seed = seed; - - // go next! - this.__loop(this.__next); - - var done = false; - if (this.__next != -1) { - this.__status = 0; - } else { - this.__status = 2; - done = true; - } - return { value: this.__value, done: done }; - case 1: - throw new Error("Generator is already running"); - case 2: - throw new Error("Generator is already finished"); - default: - throw new Error("Unexpected generator internal state"); - } - }; - - return __jsx_generator_object; -}()); -function Among(s, substring_i, result) { - this.s_size = s.length; - this.s = s; - this.substring_i = substring_i; - this.result = result; - this.method = null; - this.instance = null; -}; - -function Among$0(s, substring_i, result, method, instance) { - this.s_size = s.length; - this.s = s; - this.substring_i = substring_i; - this.result = result; - this.method = method; - this.instance = instance; -}; - -$__jsx_extend([Among, Among$0], Object); -function Stemmer() { -}; - -$__jsx_extend([Stemmer], Object); -function BaseStemmer() { - var current$0; - var cursor$0; - var limit$0; - this.cache = ({ }); - current$0 = this.current = ""; - cursor$0 = this.cursor = 0; - limit$0 = this.limit = current$0.length; - this.limit_backward = 0; - this.bra = cursor$0; - this.ket = limit$0; -}; - -$__jsx_extend([BaseStemmer], Stemmer); -BaseStemmer.prototype.setCurrent$S = function (value) { - var current$0; - var cursor$0; - var limit$0; - current$0 = this.current = value; - cursor$0 = this.cursor = 0; - limit$0 = this.limit = current$0.length; - this.limit_backward = 0; - this.bra = cursor$0; - this.ket = limit$0; -}; - - -function BaseStemmer$setCurrent$LBaseStemmer$S($this, value) { - var current$0; - var cursor$0; - var limit$0; - current$0 = $this.current = value; - cursor$0 = $this.cursor = 0; - limit$0 = $this.limit = current$0.length; - $this.limit_backward = 0; - $this.bra = cursor$0; - $this.ket = limit$0; -}; - -BaseStemmer.setCurrent$LBaseStemmer$S = BaseStemmer$setCurrent$LBaseStemmer$S; - -BaseStemmer.prototype.getCurrent$ = function () { - return this.current; -}; - - -function BaseStemmer$getCurrent$LBaseStemmer$($this) { - return $this.current; -}; - -BaseStemmer.getCurrent$LBaseStemmer$ = BaseStemmer$getCurrent$LBaseStemmer$; - -BaseStemmer.prototype.copy_from$LBaseStemmer$ = function (other) { - this.current = other.current; - this.cursor = other.cursor; - this.limit = other.limit; - this.limit_backward = other.limit_backward; - this.bra = other.bra; - this.ket = other.ket; -}; - - -function BaseStemmer$copy_from$LBaseStemmer$LBaseStemmer$($this, other) { - $this.current = other.current; - $this.cursor = other.cursor; - $this.limit = other.limit; - $this.limit_backward = other.limit_backward; - $this.bra = other.bra; - $this.ket = other.ket; -}; - -BaseStemmer.copy_from$LBaseStemmer$LBaseStemmer$ = BaseStemmer$copy_from$LBaseStemmer$LBaseStemmer$; - -BaseStemmer.prototype.in_grouping$AIII = function (s, min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor >= this.limit) { - return false; - } - ch = this.current.charCodeAt(this.cursor); - if (ch > max || ch < min) { - return false; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$in_grouping$LBaseStemmer$AIII($this, s, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor >= $this.limit) { - return false; - } - ch = $this.current.charCodeAt($this.cursor); - if (ch > max || ch < min) { - return false; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.in_grouping$LBaseStemmer$AIII = BaseStemmer$in_grouping$LBaseStemmer$AIII; - -BaseStemmer.prototype.in_grouping_b$AIII = function (s, min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor <= this.limit_backward) { - return false; - } - ch = this.current.charCodeAt(this.cursor - 1); - if (ch > max || ch < min) { - return false; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$in_grouping_b$LBaseStemmer$AIII($this, s, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor <= $this.limit_backward) { - return false; - } - ch = $this.current.charCodeAt($this.cursor - 1); - if (ch > max || ch < min) { - return false; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.in_grouping_b$LBaseStemmer$AIII = BaseStemmer$in_grouping_b$LBaseStemmer$AIII; - -BaseStemmer.prototype.out_grouping$AIII = function (s, min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor >= this.limit) { - return false; - } - ch = this.current.charCodeAt(this.cursor); - if (ch > max || ch < min) { - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; - } - ch -= min; - if ((s[ch >>> 3] & 0X1 << (ch & 0x7)) === 0) { - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; - } - return false; +// Generated by Snowball 2.1.0 - https://snowballstem.org/ + +/**@constructor*/ +GermanStemmer = function() { + var base = new BaseStemmer(); + /** @const */ var a_0 = [ + ["", -1, 5], + ["U", 0, 2], + ["Y", 0, 1], + ["\u00E4", 0, 3], + ["\u00F6", 0, 4], + ["\u00FC", 0, 2] + ]; + + /** @const */ var a_1 = [ + ["e", -1, 2], + ["em", -1, 1], + ["en", -1, 2], + ["ern", -1, 1], + ["er", -1, 1], + ["s", -1, 3], + ["es", 5, 2] + ]; + + /** @const */ var a_2 = [ + ["en", -1, 1], + ["er", -1, 1], + ["st", -1, 2], + ["est", 2, 1] + ]; + + /** @const */ var a_3 = [ + ["ig", -1, 1], + ["lich", -1, 1] + ]; + + /** @const */ var a_4 = [ + ["end", -1, 1], + ["ig", -1, 2], + ["ung", -1, 1], + ["lich", -1, 3], + ["isch", -1, 2], + ["ik", -1, 2], + ["heit", -1, 3], + ["keit", -1, 4] + ]; + + /** @const */ var /** Array */ g_v = [17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 32, 8]; + + /** @const */ var /** Array */ g_s_ending = [117, 30, 5]; + + /** @const */ var /** Array */ g_st_ending = [117, 30, 4]; + + var /** number */ I_x = 0; + var /** number */ I_p2 = 0; + var /** number */ I_p1 = 0; + + + /** @return {boolean} */ + function r_prelude() { + var /** number */ v_1 = base.cursor; + while(true) + { + var /** number */ v_2 = base.cursor; + lab0: { + lab1: { + var /** number */ v_3 = base.cursor; + lab2: { + base.bra = base.cursor; + if (!(base.eq_s("\u00DF"))) + { + break lab2; + } + base.ket = base.cursor; + if (!base.slice_from("ss")) + { + return false; + } + break lab1; + } + base.cursor = v_3; + if (base.cursor >= base.limit) + { + break lab0; + } + base.cursor++; + } + continue; + } + base.cursor = v_2; + break; + } + base.cursor = v_1; + while(true) + { + var /** number */ v_4 = base.cursor; + lab3: { + golab4: while(true) + { + var /** number */ v_5 = base.cursor; + lab5: { + if (!(base.in_grouping(g_v, 97, 252))) + { + break lab5; + } + base.bra = base.cursor; + lab6: { + var /** number */ v_6 = base.cursor; + lab7: { + if (!(base.eq_s("u"))) + { + break lab7; + } + base.ket = base.cursor; + if (!(base.in_grouping(g_v, 97, 252))) + { + break lab7; + } + if (!base.slice_from("U")) + { + return false; + } + break lab6; + } + base.cursor = v_6; + if (!(base.eq_s("y"))) + { + break lab5; + } + base.ket = base.cursor; + if (!(base.in_grouping(g_v, 97, 252))) + { + break lab5; + } + if (!base.slice_from("Y")) + { + return false; + } + } + base.cursor = v_5; + break golab4; + } + base.cursor = v_5; + if (base.cursor >= base.limit) + { + break lab3; + } + base.cursor++; + } + continue; + } + base.cursor = v_4; + break; + } + return true; + }; + + /** @return {boolean} */ + function r_mark_regions() { + I_p1 = base.limit; + I_p2 = base.limit; + var /** number */ v_1 = base.cursor; + { + var /** number */ c1 = base.cursor + 3; + if (c1 > base.limit) + { + return false; + } + base.cursor = c1; + } + I_x = base.cursor; + base.cursor = v_1; + golab0: while(true) + { + lab1: { + if (!(base.in_grouping(g_v, 97, 252))) + { + break lab1; + } + break golab0; + } + if (base.cursor >= base.limit) + { + return false; + } + base.cursor++; + } + golab2: while(true) + { + lab3: { + if (!(base.out_grouping(g_v, 97, 252))) + { + break lab3; + } + break golab2; + } + if (base.cursor >= base.limit) + { + return false; + } + base.cursor++; + } + I_p1 = base.cursor; + lab4: { + if (!(I_p1 < I_x)) + { + break lab4; + } + I_p1 = I_x; + } + golab5: while(true) + { + lab6: { + if (!(base.in_grouping(g_v, 97, 252))) + { + break lab6; + } + break golab5; + } + if (base.cursor >= base.limit) + { + return false; + } + base.cursor++; + } + golab7: while(true) + { + lab8: { + if (!(base.out_grouping(g_v, 97, 252))) + { + break lab8; + } + break golab7; + } + if (base.cursor >= base.limit) + { + return false; + } + base.cursor++; + } + I_p2 = base.cursor; + return true; + }; + + /** @return {boolean} */ + function r_postlude() { + var /** number */ among_var; + while(true) + { + var /** number */ v_1 = base.cursor; + lab0: { + base.bra = base.cursor; + among_var = base.find_among(a_0); + if (among_var == 0) + { + break lab0; + } + base.ket = base.cursor; + switch (among_var) { + case 1: + if (!base.slice_from("y")) + { + return false; + } + break; + case 2: + if (!base.slice_from("u")) + { + return false; + } + break; + case 3: + if (!base.slice_from("a")) + { + return false; + } + break; + case 4: + if (!base.slice_from("o")) + { + return false; + } + break; + case 5: + if (base.cursor >= base.limit) + { + break lab0; + } + base.cursor++; + break; + } + continue; + } + base.cursor = v_1; + break; + } + return true; + }; + + /** @return {boolean} */ + function r_R1() { + if (!(I_p1 <= base.cursor)) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_R2() { + if (!(I_p2 <= base.cursor)) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_standard_suffix() { + var /** number */ among_var; + var /** number */ v_1 = base.limit - base.cursor; + lab0: { + base.ket = base.cursor; + among_var = base.find_among_b(a_1); + if (among_var == 0) + { + break lab0; + } + base.bra = base.cursor; + if (!r_R1()) + { + break lab0; + } + switch (among_var) { + case 1: + if (!base.slice_del()) + { + return false; + } + break; + case 2: + if (!base.slice_del()) + { + return false; + } + var /** number */ v_2 = base.limit - base.cursor; + lab1: { + base.ket = base.cursor; + if (!(base.eq_s_b("s"))) + { + base.cursor = base.limit - v_2; + break lab1; + } + base.bra = base.cursor; + if (!(base.eq_s_b("nis"))) + { + base.cursor = base.limit - v_2; + break lab1; + } + if (!base.slice_del()) + { + return false; + } + } + break; + case 3: + if (!(base.in_grouping_b(g_s_ending, 98, 116))) + { + break lab0; + } + if (!base.slice_del()) + { + return false; + } + break; + } + } + base.cursor = base.limit - v_1; + var /** number */ v_3 = base.limit - base.cursor; + lab2: { + base.ket = base.cursor; + among_var = base.find_among_b(a_2); + if (among_var == 0) + { + break lab2; + } + base.bra = base.cursor; + if (!r_R1()) + { + break lab2; + } + switch (among_var) { + case 1: + if (!base.slice_del()) + { + return false; + } + break; + case 2: + if (!(base.in_grouping_b(g_st_ending, 98, 116))) + { + break lab2; + } + { + var /** number */ c1 = base.cursor - 3; + if (c1 < base.limit_backward) + { + break lab2; + } + base.cursor = c1; + } + if (!base.slice_del()) + { + return false; + } + break; + } + } + base.cursor = base.limit - v_3; + var /** number */ v_4 = base.limit - base.cursor; + lab3: { + base.ket = base.cursor; + among_var = base.find_among_b(a_4); + if (among_var == 0) + { + break lab3; + } + base.bra = base.cursor; + if (!r_R2()) + { + break lab3; + } + switch (among_var) { + case 1: + if (!base.slice_del()) + { + return false; + } + var /** number */ v_5 = base.limit - base.cursor; + lab4: { + base.ket = base.cursor; + if (!(base.eq_s_b("ig"))) + { + base.cursor = base.limit - v_5; + break lab4; + } + base.bra = base.cursor; + { + var /** number */ v_6 = base.limit - base.cursor; + lab5: { + if (!(base.eq_s_b("e"))) + { + break lab5; + } + base.cursor = base.limit - v_5; + break lab4; + } + base.cursor = base.limit - v_6; + } + if (!r_R2()) + { + base.cursor = base.limit - v_5; + break lab4; + } + if (!base.slice_del()) + { + return false; + } + } + break; + case 2: + { + var /** number */ v_7 = base.limit - base.cursor; + lab6: { + if (!(base.eq_s_b("e"))) + { + break lab6; + } + break lab3; + } + base.cursor = base.limit - v_7; + } + if (!base.slice_del()) + { + return false; + } + break; + case 3: + if (!base.slice_del()) + { + return false; + } + var /** number */ v_8 = base.limit - base.cursor; + lab7: { + base.ket = base.cursor; + lab8: { + var /** number */ v_9 = base.limit - base.cursor; + lab9: { + if (!(base.eq_s_b("er"))) + { + break lab9; + } + break lab8; + } + base.cursor = base.limit - v_9; + if (!(base.eq_s_b("en"))) + { + base.cursor = base.limit - v_8; + break lab7; + } + } + base.bra = base.cursor; + if (!r_R1()) + { + base.cursor = base.limit - v_8; + break lab7; + } + if (!base.slice_del()) + { + return false; + } + } + break; + case 4: + if (!base.slice_del()) + { + return false; + } + var /** number */ v_10 = base.limit - base.cursor; + lab10: { + base.ket = base.cursor; + if (base.find_among_b(a_3) == 0) + { + base.cursor = base.limit - v_10; + break lab10; + } + base.bra = base.cursor; + if (!r_R2()) + { + base.cursor = base.limit - v_10; + break lab10; + } + if (!base.slice_del()) + { + return false; + } + } + break; + } + } + base.cursor = base.limit - v_4; + return true; + }; + + this.stem = /** @return {boolean} */ function() { + var /** number */ v_1 = base.cursor; + r_prelude(); + base.cursor = v_1; + var /** number */ v_2 = base.cursor; + r_mark_regions(); + base.cursor = v_2; + base.limit_backward = base.cursor; base.cursor = base.limit; + r_standard_suffix(); + base.cursor = base.limit_backward; + var /** number */ v_4 = base.cursor; + r_postlude(); + base.cursor = v_4; + return true; + }; + + /**@return{string}*/ + this['stemWord'] = function(/**string*/word) { + base.setCurrent(word); + this.stem(); + return base.getCurrent(); + }; }; - - -function BaseStemmer$out_grouping$LBaseStemmer$AIII($this, s, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor >= $this.limit) { - return false; - } - ch = $this.current.charCodeAt($this.cursor); - if (ch > max || ch < min) { - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; - } - ch -= min; - if ((s[ch >>> 3] & 0X1 << (ch & 0x7)) === 0) { - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; - } - return false; -}; - -BaseStemmer.out_grouping$LBaseStemmer$AIII = BaseStemmer$out_grouping$LBaseStemmer$AIII; - -BaseStemmer.prototype.out_grouping_b$AIII = function (s, min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor <= this.limit_backward) { - return false; - } - ch = this.current.charCodeAt(this.cursor - 1); - if (ch > max || ch < min) { - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; - } - return false; -}; - - -function BaseStemmer$out_grouping_b$LBaseStemmer$AIII($this, s, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor <= $this.limit_backward) { - return false; - } - ch = $this.current.charCodeAt($this.cursor - 1); - if (ch > max || ch < min) { - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; - } - return false; -}; - -BaseStemmer.out_grouping_b$LBaseStemmer$AIII = BaseStemmer$out_grouping_b$LBaseStemmer$AIII; - -BaseStemmer.prototype.in_range$II = function (min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor >= this.limit) { - return false; - } - ch = this.current.charCodeAt(this.cursor); - if (ch > max || ch < min) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$in_range$LBaseStemmer$II($this, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor >= $this.limit) { - return false; - } - ch = $this.current.charCodeAt($this.cursor); - if (ch > max || ch < min) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.in_range$LBaseStemmer$II = BaseStemmer$in_range$LBaseStemmer$II; - -BaseStemmer.prototype.in_range_b$II = function (min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor <= this.limit_backward) { - return false; - } - ch = this.current.charCodeAt(this.cursor - 1); - if (ch > max || ch < min) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$in_range_b$LBaseStemmer$II($this, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor <= $this.limit_backward) { - return false; - } - ch = $this.current.charCodeAt($this.cursor - 1); - if (ch > max || ch < min) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.in_range_b$LBaseStemmer$II = BaseStemmer$in_range_b$LBaseStemmer$II; - -BaseStemmer.prototype.out_range$II = function (min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor >= this.limit) { - return false; - } - ch = this.current.charCodeAt(this.cursor); - if (! (ch > max || ch < min)) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$out_range$LBaseStemmer$II($this, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor >= $this.limit) { - return false; - } - ch = $this.current.charCodeAt($this.cursor); - if (! (ch > max || ch < min)) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.out_range$LBaseStemmer$II = BaseStemmer$out_range$LBaseStemmer$II; - -BaseStemmer.prototype.out_range_b$II = function (min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor <= this.limit_backward) { - return false; - } - ch = this.current.charCodeAt(this.cursor - 1); - if (! (ch > max || ch < min)) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$out_range_b$LBaseStemmer$II($this, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor <= $this.limit_backward) { - return false; - } - ch = $this.current.charCodeAt($this.cursor - 1); - if (! (ch > max || ch < min)) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.out_range_b$LBaseStemmer$II = BaseStemmer$out_range_b$LBaseStemmer$II; - -BaseStemmer.prototype.eq_s$IS = function (s_size, s) { - var cursor$0; - if (((this.limit - this.cursor) | 0) < s_size) { - return false; - } - if (this.current.slice(cursor$0 = this.cursor, ((cursor$0 + s_size) | 0)) !== s) { - return false; - } - this.cursor = (this.cursor + s_size) | 0; - return true; -}; - - -function BaseStemmer$eq_s$LBaseStemmer$IS($this, s_size, s) { - var cursor$0; - if ((($this.limit - $this.cursor) | 0) < s_size) { - return false; - } - if ($this.current.slice(cursor$0 = $this.cursor, ((cursor$0 + s_size) | 0)) !== s) { - return false; - } - $this.cursor = ($this.cursor + s_size) | 0; - return true; -}; - -BaseStemmer.eq_s$LBaseStemmer$IS = BaseStemmer$eq_s$LBaseStemmer$IS; - -BaseStemmer.prototype.eq_s_b$IS = function (s_size, s) { - var cursor$0; - if (((this.cursor - this.limit_backward) | 0) < s_size) { - return false; - } - if (this.current.slice((((cursor$0 = this.cursor) - s_size) | 0), cursor$0) !== s) { - return false; - } - this.cursor = (this.cursor - s_size) | 0; - return true; -}; - - -function BaseStemmer$eq_s_b$LBaseStemmer$IS($this, s_size, s) { - var cursor$0; - if ((($this.cursor - $this.limit_backward) | 0) < s_size) { - return false; - } - if ($this.current.slice((((cursor$0 = $this.cursor) - s_size) | 0), cursor$0) !== s) { - return false; - } - $this.cursor = ($this.cursor - s_size) | 0; - return true; -}; - -BaseStemmer.eq_s_b$LBaseStemmer$IS = BaseStemmer$eq_s_b$LBaseStemmer$IS; - -BaseStemmer.prototype.eq_v$S = function (s) { - return BaseStemmer$eq_s$LBaseStemmer$IS(this, s.length, s); -}; - - -function BaseStemmer$eq_v$LBaseStemmer$S($this, s) { - return BaseStemmer$eq_s$LBaseStemmer$IS($this, s.length, s); -}; - -BaseStemmer.eq_v$LBaseStemmer$S = BaseStemmer$eq_v$LBaseStemmer$S; - -BaseStemmer.prototype.eq_v_b$S = function (s) { - return BaseStemmer$eq_s_b$LBaseStemmer$IS(this, s.length, s); -}; - - -function BaseStemmer$eq_v_b$LBaseStemmer$S($this, s) { - return BaseStemmer$eq_s_b$LBaseStemmer$IS($this, s.length, s); -}; - -BaseStemmer.eq_v_b$LBaseStemmer$S = BaseStemmer$eq_v_b$LBaseStemmer$S; - -BaseStemmer.prototype.find_among$ALAmong$I = function (v, v_size) { - var i; - var j; - var c; - var l; - var common_i; - var common_j; - var first_key_inspected; - var k; - var diff; - var common; - var w; - var i2; - var res; - i = 0; - j = v_size; - c = this.cursor; - l = this.limit; - common_i = 0; - common_j = 0; - first_key_inspected = false; - while (true) { - k = i + (j - i >>> 1); - diff = 0; - common = (common_i < common_j ? common_i : common_j); - w = v[k]; - for (i2 = common; i2 < w.s_size; i2++) { - if (c + common === l) { - diff = -1; - break; - } - diff = this.current.charCodeAt(c + common) - w.s.charCodeAt(i2); - if (diff !== 0) { - break; - } - common++; - } - if (diff < 0) { - j = k; - common_j = common; - } else { - i = k; - common_i = common; - } - if (j - i <= 1) { - if (i > 0) { - break; - } - if (j === i) { - break; - } - if (first_key_inspected) { - break; - } - first_key_inspected = true; - } - } - while (true) { - w = v[i]; - if (common_i >= w.s_size) { - this.cursor = (c + w.s_size | 0); - if (w.method == null) { - return w.result; - } - res = w.method(w.instance); - this.cursor = (c + w.s_size | 0); - if (res) { - return w.result; - } - } - i = w.substring_i; - if (i < 0) { - return 0; - } - } - return -1; -}; - - -function BaseStemmer$find_among$LBaseStemmer$ALAmong$I($this, v, v_size) { - var i; - var j; - var c; - var l; - var common_i; - var common_j; - var first_key_inspected; - var k; - var diff; - var common; - var w; - var i2; - var res; - i = 0; - j = v_size; - c = $this.cursor; - l = $this.limit; - common_i = 0; - common_j = 0; - first_key_inspected = false; - while (true) { - k = i + (j - i >>> 1); - diff = 0; - common = (common_i < common_j ? common_i : common_j); - w = v[k]; - for (i2 = common; i2 < w.s_size; i2++) { - if (c + common === l) { - diff = -1; - break; - } - diff = $this.current.charCodeAt(c + common) - w.s.charCodeAt(i2); - if (diff !== 0) { - break; - } - common++; - } - if (diff < 0) { - j = k; - common_j = common; - } else { - i = k; - common_i = common; - } - if (j - i <= 1) { - if (i > 0) { - break; - } - if (j === i) { - break; - } - if (first_key_inspected) { - break; - } - first_key_inspected = true; - } - } - while (true) { - w = v[i]; - if (common_i >= w.s_size) { - $this.cursor = (c + w.s_size | 0); - if (w.method == null) { - return w.result; - } - res = w.method(w.instance); - $this.cursor = (c + w.s_size | 0); - if (res) { - return w.result; - } - } - i = w.substring_i; - if (i < 0) { - return 0; - } - } - return -1; -}; - -BaseStemmer.find_among$LBaseStemmer$ALAmong$I = BaseStemmer$find_among$LBaseStemmer$ALAmong$I; - -BaseStemmer.prototype.find_among_b$ALAmong$I = function (v, v_size) { - var i; - var j; - var c; - var lb; - var common_i; - var common_j; - var first_key_inspected; - var k; - var diff; - var common; - var w; - var i2; - var res; - i = 0; - j = v_size; - c = this.cursor; - lb = this.limit_backward; - common_i = 0; - common_j = 0; - first_key_inspected = false; - while (true) { - k = i + (j - i >> 1); - diff = 0; - common = (common_i < common_j ? common_i : common_j); - w = v[k]; - for (i2 = w.s_size - 1 - common; i2 >= 0; i2--) { - if (c - common === lb) { - diff = -1; - break; - } - diff = this.current.charCodeAt(c - 1 - common) - w.s.charCodeAt(i2); - if (diff !== 0) { - break; - } - common++; - } - if (diff < 0) { - j = k; - common_j = common; - } else { - i = k; - common_i = common; - } - if (j - i <= 1) { - if (i > 0) { - break; - } - if (j === i) { - break; - } - if (first_key_inspected) { - break; - } - first_key_inspected = true; - } - } - while (true) { - w = v[i]; - if (common_i >= w.s_size) { - this.cursor = (c - w.s_size | 0); - if (w.method == null) { - return w.result; - } - res = w.method(this); - this.cursor = (c - w.s_size | 0); - if (res) { - return w.result; - } - } - i = w.substring_i; - if (i < 0) { - return 0; - } - } - return -1; -}; - - -function BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, v, v_size) { - var i; - var j; - var c; - var lb; - var common_i; - var common_j; - var first_key_inspected; - var k; - var diff; - var common; - var w; - var i2; - var res; - i = 0; - j = v_size; - c = $this.cursor; - lb = $this.limit_backward; - common_i = 0; - common_j = 0; - first_key_inspected = false; - while (true) { - k = i + (j - i >> 1); - diff = 0; - common = (common_i < common_j ? common_i : common_j); - w = v[k]; - for (i2 = w.s_size - 1 - common; i2 >= 0; i2--) { - if (c - common === lb) { - diff = -1; - break; - } - diff = $this.current.charCodeAt(c - 1 - common) - w.s.charCodeAt(i2); - if (diff !== 0) { - break; - } - common++; - } - if (diff < 0) { - j = k; - common_j = common; - } else { - i = k; - common_i = common; - } - if (j - i <= 1) { - if (i > 0) { - break; - } - if (j === i) { - break; - } - if (first_key_inspected) { - break; - } - first_key_inspected = true; - } - } - while (true) { - w = v[i]; - if (common_i >= w.s_size) { - $this.cursor = (c - w.s_size | 0); - if (w.method == null) { - return w.result; - } - res = w.method($this); - $this.cursor = (c - w.s_size | 0); - if (res) { - return w.result; - } - } - i = w.substring_i; - if (i < 0) { - return 0; - } - } - return -1; -}; - -BaseStemmer.find_among_b$LBaseStemmer$ALAmong$I = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I; - -BaseStemmer.prototype.replace_s$IIS = function (c_bra, c_ket, s) { - var adjustment; - adjustment = ((s.length - (((c_ket - c_bra) | 0))) | 0); - this.current = this.current.slice(0, c_bra) + s + this.current.slice(c_ket); - this.limit = (this.limit + adjustment) | 0; - if (this.cursor >= c_ket) { - this.cursor = (this.cursor + adjustment) | 0; - } else if (this.cursor > c_bra) { - this.cursor = c_bra; - } - return (adjustment | 0); -}; - - -function BaseStemmer$replace_s$LBaseStemmer$IIS($this, c_bra, c_ket, s) { - var adjustment; - adjustment = ((s.length - (((c_ket - c_bra) | 0))) | 0); - $this.current = $this.current.slice(0, c_bra) + s + $this.current.slice(c_ket); - $this.limit = ($this.limit + adjustment) | 0; - if ($this.cursor >= c_ket) { - $this.cursor = ($this.cursor + adjustment) | 0; - } else if ($this.cursor > c_bra) { - $this.cursor = c_bra; - } - return (adjustment | 0); -}; - -BaseStemmer.replace_s$LBaseStemmer$IIS = BaseStemmer$replace_s$LBaseStemmer$IIS; - -BaseStemmer.prototype.slice_check$ = function () { - var bra$0; - var ket$0; - var limit$0; - return ((bra$0 = this.bra) < 0 || bra$0 > (ket$0 = this.ket) || ket$0 > (limit$0 = this.limit) || limit$0 > this.current.length ? false : true); -}; - - -function BaseStemmer$slice_check$LBaseStemmer$($this) { - var bra$0; - var ket$0; - var limit$0; - return ((bra$0 = $this.bra) < 0 || bra$0 > (ket$0 = $this.ket) || ket$0 > (limit$0 = $this.limit) || limit$0 > $this.current.length ? false : true); -}; - -BaseStemmer.slice_check$LBaseStemmer$ = BaseStemmer$slice_check$LBaseStemmer$; - -BaseStemmer.prototype.slice_from$S = function (s) { - var result; - var bra$0; - var ket$0; - var limit$0; - result = false; - if ((bra$0 = this.bra) < 0 || bra$0 > (ket$0 = this.ket) || ket$0 > (limit$0 = this.limit) || limit$0 > this.current.length ? false : true) { - BaseStemmer$replace_s$LBaseStemmer$IIS(this, this.bra, this.ket, s); - result = true; - } - return result; -}; - - -function BaseStemmer$slice_from$LBaseStemmer$S($this, s) { - var result; - var bra$0; - var ket$0; - var limit$0; - result = false; - if ((bra$0 = $this.bra) < 0 || bra$0 > (ket$0 = $this.ket) || ket$0 > (limit$0 = $this.limit) || limit$0 > $this.current.length ? false : true) { - BaseStemmer$replace_s$LBaseStemmer$IIS($this, $this.bra, $this.ket, s); - result = true; - } - return result; -}; - -BaseStemmer.slice_from$LBaseStemmer$S = BaseStemmer$slice_from$LBaseStemmer$S; - -BaseStemmer.prototype.slice_del$ = function () { - return BaseStemmer$slice_from$LBaseStemmer$S(this, ""); -}; - - -function BaseStemmer$slice_del$LBaseStemmer$($this) { - return BaseStemmer$slice_from$LBaseStemmer$S($this, ""); -}; - -BaseStemmer.slice_del$LBaseStemmer$ = BaseStemmer$slice_del$LBaseStemmer$; - -BaseStemmer.prototype.insert$IIS = function (c_bra, c_ket, s) { - var adjustment; - adjustment = BaseStemmer$replace_s$LBaseStemmer$IIS(this, c_bra, c_ket, s); - if (c_bra <= this.bra) { - this.bra = (this.bra + adjustment) | 0; - } - if (c_bra <= this.ket) { - this.ket = (this.ket + adjustment) | 0; - } -}; - - -function BaseStemmer$insert$LBaseStemmer$IIS($this, c_bra, c_ket, s) { - var adjustment; - adjustment = BaseStemmer$replace_s$LBaseStemmer$IIS($this, c_bra, c_ket, s); - if (c_bra <= $this.bra) { - $this.bra = ($this.bra + adjustment) | 0; - } - if (c_bra <= $this.ket) { - $this.ket = ($this.ket + adjustment) | 0; - } -}; - -BaseStemmer.insert$LBaseStemmer$IIS = BaseStemmer$insert$LBaseStemmer$IIS; - -BaseStemmer.prototype.slice_to$S = function (s) { - var result; - var bra$0; - var ket$0; - var limit$0; - result = ''; - if ((bra$0 = this.bra) < 0 || bra$0 > (ket$0 = this.ket) || ket$0 > (limit$0 = this.limit) || limit$0 > this.current.length ? false : true) { - result = this.current.slice(this.bra, this.ket); - } - return result; -}; - - -function BaseStemmer$slice_to$LBaseStemmer$S($this, s) { - var result; - var bra$0; - var ket$0; - var limit$0; - result = ''; - if ((bra$0 = $this.bra) < 0 || bra$0 > (ket$0 = $this.ket) || ket$0 > (limit$0 = $this.limit) || limit$0 > $this.current.length ? false : true) { - result = $this.current.slice($this.bra, $this.ket); - } - return result; -}; - -BaseStemmer.slice_to$LBaseStemmer$S = BaseStemmer$slice_to$LBaseStemmer$S; - -BaseStemmer.prototype.assign_to$S = function (s) { - return this.current.slice(0, this.limit); -}; - - -function BaseStemmer$assign_to$LBaseStemmer$S($this, s) { - return $this.current.slice(0, $this.limit); -}; - -BaseStemmer.assign_to$LBaseStemmer$S = BaseStemmer$assign_to$LBaseStemmer$S; - -BaseStemmer.prototype.stem$ = function () { - return false; -}; - - -BaseStemmer.prototype.stemWord$S = function (word) { - var result; - var current$0; - var cursor$0; - var limit$0; - result = this.cache['.' + word]; - if (result == null) { - current$0 = this.current = word; - cursor$0 = this.cursor = 0; - limit$0 = this.limit = current$0.length; - this.limit_backward = 0; - this.bra = cursor$0; - this.ket = limit$0; - this.stem$(); - result = this.current; - this.cache['.' + word] = result; - } - return result; -}; - -BaseStemmer.prototype.stemWord = BaseStemmer.prototype.stemWord$S; - -BaseStemmer.prototype.stemWords$AS = function (words) { - var results; - var i; - var word; - var result; - var current$0; - var cursor$0; - var limit$0; - results = [ ]; - for (i = 0; i < words.length; i++) { - word = words[i]; - result = this.cache['.' + word]; - if (result == null) { - current$0 = this.current = word; - cursor$0 = this.cursor = 0; - limit$0 = this.limit = current$0.length; - this.limit_backward = 0; - this.bra = cursor$0; - this.ket = limit$0; - this.stem$(); - result = this.current; - this.cache['.' + word] = result; - } - results.push(result); - } - return results; -}; - -BaseStemmer.prototype.stemWords = BaseStemmer.prototype.stemWords$AS; - -function GermanStemmer() { - BaseStemmer.call(this); - this.I_x = 0; - this.I_p2 = 0; - this.I_p1 = 0; -}; - -$__jsx_extend([GermanStemmer], BaseStemmer); -GermanStemmer.prototype.copy_from$LGermanStemmer$ = function (other) { - this.I_x = other.I_x; - this.I_p2 = other.I_p2; - this.I_p1 = other.I_p1; - BaseStemmer$copy_from$LBaseStemmer$LBaseStemmer$(this, other); -}; - -GermanStemmer.prototype.copy_from = GermanStemmer.prototype.copy_from$LGermanStemmer$; - -GermanStemmer.prototype.r_prelude$ = function () { - var v_1; - var v_2; - var v_3; - var v_4; - var v_5; - var v_6; - var lab1; - var lab2; - var lab3; - var lab5; - var lab7; - var lab8; - var lab9; - var cursor$0; - var cursor$1; - var $__jsx_postinc_t; - v_1 = this.cursor; -replab0: - while (true) { - v_2 = this.cursor; - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - lab2 = true; - lab2: - while (lab2 === true) { - lab2 = false; - v_3 = this.cursor; - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - this.bra = this.cursor; - if (! BaseStemmer$eq_s$LBaseStemmer$IS(this, 1, "\u00DF")) { - break lab3; - } - this.ket = this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "ss")) { - return false; - } - break lab2; - } - cursor$0 = this.cursor = v_3; - if (cursor$0 >= this.limit) { - break lab1; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - continue replab0; - } - this.cursor = v_2; - break replab0; - } - this.cursor = v_1; -replab4: - while (true) { - v_4 = this.cursor; - lab5 = true; - lab5: - while (lab5 === true) { - lab5 = false; - golab6: - while (true) { - v_5 = this.cursor; - lab7 = true; - lab7: - while (lab7 === true) { - lab7 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, GermanStemmer.g_v, 97, 252)) { - break lab7; - } - this.bra = this.cursor; - lab8 = true; - lab8: - while (lab8 === true) { - lab8 = false; - v_6 = this.cursor; - lab9 = true; - lab9: - while (lab9 === true) { - lab9 = false; - if (! BaseStemmer$eq_s$LBaseStemmer$IS(this, 1, "u")) { - break lab9; - } - this.ket = this.cursor; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, GermanStemmer.g_v, 97, 252)) { - break lab9; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "U")) { - return false; - } - break lab8; - } - this.cursor = v_6; - if (! BaseStemmer$eq_s$LBaseStemmer$IS(this, 1, "y")) { - break lab7; - } - this.ket = this.cursor; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, GermanStemmer.g_v, 97, 252)) { - break lab7; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "Y")) { - return false; - } - } - this.cursor = v_5; - break golab6; - } - cursor$1 = this.cursor = v_5; - if (cursor$1 >= this.limit) { - break lab5; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - continue replab4; - } - this.cursor = v_4; - break replab4; - } - return true; -}; - -GermanStemmer.prototype.r_prelude = GermanStemmer.prototype.r_prelude$; - -function GermanStemmer$r_prelude$LGermanStemmer$($this) { - var v_1; - var v_2; - var v_3; - var v_4; - var v_5; - var v_6; - var lab1; - var lab2; - var lab3; - var lab5; - var lab7; - var lab8; - var lab9; - var cursor$0; - var cursor$1; - var $__jsx_postinc_t; - v_1 = $this.cursor; -replab0: - while (true) { - v_2 = $this.cursor; - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - lab2 = true; - lab2: - while (lab2 === true) { - lab2 = false; - v_3 = $this.cursor; - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - $this.bra = $this.cursor; - if (! BaseStemmer$eq_s$LBaseStemmer$IS($this, 1, "\u00DF")) { - break lab3; - } - $this.ket = $this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "ss")) { - return false; - } - break lab2; - } - cursor$0 = $this.cursor = v_3; - if (cursor$0 >= $this.limit) { - break lab1; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - continue replab0; - } - $this.cursor = v_2; - break replab0; - } - $this.cursor = v_1; -replab4: - while (true) { - v_4 = $this.cursor; - lab5 = true; - lab5: - while (lab5 === true) { - lab5 = false; - golab6: - while (true) { - v_5 = $this.cursor; - lab7 = true; - lab7: - while (lab7 === true) { - lab7 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII($this, GermanStemmer.g_v, 97, 252)) { - break lab7; - } - $this.bra = $this.cursor; - lab8 = true; - lab8: - while (lab8 === true) { - lab8 = false; - v_6 = $this.cursor; - lab9 = true; - lab9: - while (lab9 === true) { - lab9 = false; - if (! BaseStemmer$eq_s$LBaseStemmer$IS($this, 1, "u")) { - break lab9; - } - $this.ket = $this.cursor; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII($this, GermanStemmer.g_v, 97, 252)) { - break lab9; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "U")) { - return false; - } - break lab8; - } - $this.cursor = v_6; - if (! BaseStemmer$eq_s$LBaseStemmer$IS($this, 1, "y")) { - break lab7; - } - $this.ket = $this.cursor; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII($this, GermanStemmer.g_v, 97, 252)) { - break lab7; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "Y")) { - return false; - } - } - $this.cursor = v_5; - break golab6; - } - cursor$1 = $this.cursor = v_5; - if (cursor$1 >= $this.limit) { - break lab5; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - continue replab4; - } - $this.cursor = v_4; - break replab4; - } - return true; -}; - -GermanStemmer.r_prelude$LGermanStemmer$ = GermanStemmer$r_prelude$LGermanStemmer$; - -GermanStemmer.prototype.r_mark_regions$ = function () { - var v_1; - var c; - var lab1; - var lab3; - var lab4; - var lab6; - var lab8; - var limit$0; - var cursor$0; - var cursor$1; - var $__jsx_postinc_t; - this.I_p1 = limit$0 = this.limit; - this.I_p2 = limit$0; - v_1 = cursor$0 = this.cursor; - c = (cursor$0 + 3 | 0); - if (0 > c || c > limit$0) { - return false; - } - cursor$1 = this.cursor = c; - this.I_x = cursor$1; - this.cursor = v_1; -golab0: - while (true) { - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, GermanStemmer.g_v, 97, 252)) { - break lab1; - } - break golab0; - } - if (this.cursor >= this.limit) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } -golab2: - while (true) { - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII(this, GermanStemmer.g_v, 97, 252)) { - break lab3; - } - break golab2; - } - if (this.cursor >= this.limit) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - this.I_p1 = this.cursor; - lab4 = true; -lab4: - while (lab4 === true) { - lab4 = false; - if (! (this.I_p1 < this.I_x)) { - break lab4; - } - this.I_p1 = this.I_x; - } -golab5: - while (true) { - lab6 = true; - lab6: - while (lab6 === true) { - lab6 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, GermanStemmer.g_v, 97, 252)) { - break lab6; - } - break golab5; - } - if (this.cursor >= this.limit) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } -golab7: - while (true) { - lab8 = true; - lab8: - while (lab8 === true) { - lab8 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII(this, GermanStemmer.g_v, 97, 252)) { - break lab8; - } - break golab7; - } - if (this.cursor >= this.limit) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - this.I_p2 = this.cursor; - return true; -}; - -GermanStemmer.prototype.r_mark_regions = GermanStemmer.prototype.r_mark_regions$; - -function GermanStemmer$r_mark_regions$LGermanStemmer$($this) { - var v_1; - var c; - var lab1; - var lab3; - var lab4; - var lab6; - var lab8; - var limit$0; - var cursor$0; - var cursor$1; - var $__jsx_postinc_t; - $this.I_p1 = limit$0 = $this.limit; - $this.I_p2 = limit$0; - v_1 = cursor$0 = $this.cursor; - c = (cursor$0 + 3 | 0); - if (0 > c || c > limit$0) { - return false; - } - cursor$1 = $this.cursor = c; - $this.I_x = cursor$1; - $this.cursor = v_1; -golab0: - while (true) { - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII($this, GermanStemmer.g_v, 97, 252)) { - break lab1; - } - break golab0; - } - if ($this.cursor >= $this.limit) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } -golab2: - while (true) { - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII($this, GermanStemmer.g_v, 97, 252)) { - break lab3; - } - break golab2; - } - if ($this.cursor >= $this.limit) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - $this.I_p1 = $this.cursor; - lab4 = true; -lab4: - while (lab4 === true) { - lab4 = false; - if (! ($this.I_p1 < $this.I_x)) { - break lab4; - } - $this.I_p1 = $this.I_x; - } -golab5: - while (true) { - lab6 = true; - lab6: - while (lab6 === true) { - lab6 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII($this, GermanStemmer.g_v, 97, 252)) { - break lab6; - } - break golab5; - } - if ($this.cursor >= $this.limit) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } -golab7: - while (true) { - lab8 = true; - lab8: - while (lab8 === true) { - lab8 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII($this, GermanStemmer.g_v, 97, 252)) { - break lab8; - } - break golab7; - } - if ($this.cursor >= $this.limit) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - $this.I_p2 = $this.cursor; - return true; -}; - -GermanStemmer.r_mark_regions$LGermanStemmer$ = GermanStemmer$r_mark_regions$LGermanStemmer$; - -GermanStemmer.prototype.r_postlude$ = function () { - var among_var; - var v_1; - var lab1; - var $__jsx_postinc_t; -replab0: - while (true) { - v_1 = this.cursor; - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - this.bra = this.cursor; - among_var = BaseStemmer$find_among$LBaseStemmer$ALAmong$I(this, GermanStemmer.a_0, 6); - if (among_var === 0) { - break lab1; - } - this.ket = this.cursor; - switch (among_var) { - case 0: - break lab1; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "y")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "u")) { - return false; - } - break; - case 3: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "a")) { - return false; - } - break; - case 4: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "o")) { - return false; - } - break; - case 5: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "u")) { - return false; - } - break; - case 6: - if (this.cursor >= this.limit) { - break lab1; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - break; - } - continue replab0; - } - this.cursor = v_1; - break replab0; - } - return true; -}; - -GermanStemmer.prototype.r_postlude = GermanStemmer.prototype.r_postlude$; - -function GermanStemmer$r_postlude$LGermanStemmer$($this) { - var among_var; - var v_1; - var lab1; - var $__jsx_postinc_t; -replab0: - while (true) { - v_1 = $this.cursor; - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - $this.bra = $this.cursor; - among_var = BaseStemmer$find_among$LBaseStemmer$ALAmong$I($this, GermanStemmer.a_0, 6); - if (among_var === 0) { - break lab1; - } - $this.ket = $this.cursor; - switch (among_var) { - case 0: - break lab1; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "y")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "u")) { - return false; - } - break; - case 3: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "a")) { - return false; - } - break; - case 4: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "o")) { - return false; - } - break; - case 5: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "u")) { - return false; - } - break; - case 6: - if ($this.cursor >= $this.limit) { - break lab1; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - break; - } - continue replab0; - } - $this.cursor = v_1; - break replab0; - } - return true; -}; - -GermanStemmer.r_postlude$LGermanStemmer$ = GermanStemmer$r_postlude$LGermanStemmer$; - -GermanStemmer.prototype.r_R1$ = function () { - return (! (this.I_p1 <= this.cursor) ? false : true); -}; - -GermanStemmer.prototype.r_R1 = GermanStemmer.prototype.r_R1$; - -function GermanStemmer$r_R1$LGermanStemmer$($this) { - return (! ($this.I_p1 <= $this.cursor) ? false : true); -}; - -GermanStemmer.r_R1$LGermanStemmer$ = GermanStemmer$r_R1$LGermanStemmer$; - -GermanStemmer.prototype.r_R2$ = function () { - return (! (this.I_p2 <= this.cursor) ? false : true); -}; - -GermanStemmer.prototype.r_R2 = GermanStemmer.prototype.r_R2$; - -function GermanStemmer$r_R2$LGermanStemmer$($this) { - return (! ($this.I_p2 <= $this.cursor) ? false : true); -}; - -GermanStemmer.r_R2$LGermanStemmer$ = GermanStemmer$r_R2$LGermanStemmer$; - -GermanStemmer.prototype.r_standard_suffix$ = function () { - var among_var; - var v_1; - var v_2; - var v_3; - var v_4; - var v_5; - var v_6; - var v_7; - var v_8; - var v_9; - var v_10; - var lab0; - var lab1; - var lab2; - var c; - var lab3; - var lab4; - var lab5; - var lab6; - var lab7; - var lab8; - var lab9; - var lab10; - var cursor$0; - var cursor$1; - var limit$0; - var cursor$2; - var cursor$3; - var cursor$4; - var cursor$5; - var cursor$6; - var cursor$7; - var limit$1; - var cursor$8; - v_1 = ((this.limit - this.cursor) | 0); - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - this.ket = this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, GermanStemmer.a_1, 7); - if (among_var === 0) { - break lab0; - } - this.bra = cursor$0 = this.cursor; - if (! (! (this.I_p1 <= cursor$0) ? false : true)) { - break lab0; - } - switch (among_var) { - case 0: - break lab0; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - v_2 = ((this.limit - this.cursor) | 0); - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - this.ket = this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "s")) { - this.cursor = ((this.limit - v_2) | 0); - break lab1; - } - this.bra = this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 3, "nis")) { - this.cursor = ((this.limit - v_2) | 0); - break lab1; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - } - break; - case 3: - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII(this, GermanStemmer.g_s_ending, 98, 116)) { - break lab0; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - } - } - cursor$2 = this.cursor = (((limit$0 = this.limit) - v_1) | 0); - v_3 = ((limit$0 - cursor$2) | 0); - lab2 = true; -lab2: - while (lab2 === true) { - lab2 = false; - this.ket = this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, GermanStemmer.a_2, 4); - if (among_var === 0) { - break lab2; - } - this.bra = cursor$1 = this.cursor; - if (! (! (this.I_p1 <= cursor$1) ? false : true)) { - break lab2; - } - switch (among_var) { - case 0: - break lab2; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 2: - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII(this, GermanStemmer.g_st_ending, 98, 116)) { - break lab2; - } - c = (this.cursor - 3 | 0); - if (this.limit_backward > c || c > this.limit) { - break lab2; - } - this.cursor = c; - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - } - } - cursor$8 = this.cursor = (((limit$1 = this.limit) - v_3) | 0); - v_4 = ((limit$1 - cursor$8) | 0); - lab3 = true; -lab3: - while (lab3 === true) { - lab3 = false; - this.ket = this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, GermanStemmer.a_4, 8); - if (among_var === 0) { - break lab3; - } - this.bra = cursor$3 = this.cursor; - if (! (! (this.I_p2 <= cursor$3) ? false : true)) { - break lab3; - } - switch (among_var) { - case 0: - break lab3; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - v_5 = ((this.limit - this.cursor) | 0); - lab4 = true; - lab4: - while (lab4 === true) { - lab4 = false; - this.ket = this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 2, "ig")) { - this.cursor = ((this.limit - v_5) | 0); - break lab4; - } - this.bra = cursor$4 = this.cursor; - v_6 = ((this.limit - cursor$4) | 0); - lab5 = true; - lab5: - while (lab5 === true) { - lab5 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "e")) { - break lab5; - } - this.cursor = ((this.limit - v_5) | 0); - break lab4; - } - cursor$5 = this.cursor = ((this.limit - v_6) | 0); - if (! (! (this.I_p2 <= cursor$5) ? false : true)) { - this.cursor = ((this.limit - v_5) | 0); - break lab4; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - } - break; - case 2: - v_7 = ((this.limit - this.cursor) | 0); - lab6 = true; - lab6: - while (lab6 === true) { - lab6 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "e")) { - break lab6; - } - break lab3; - } - this.cursor = ((this.limit - v_7) | 0); - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 3: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - v_8 = ((this.limit - this.cursor) | 0); - lab7 = true; - lab7: - while (lab7 === true) { - lab7 = false; - this.ket = this.cursor; - lab8 = true; - lab8: - while (lab8 === true) { - lab8 = false; - v_9 = ((this.limit - this.cursor) | 0); - lab9 = true; - lab9: - while (lab9 === true) { - lab9 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 2, "er")) { - break lab9; - } - break lab8; - } - this.cursor = ((this.limit - v_9) | 0); - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 2, "en")) { - this.cursor = ((this.limit - v_8) | 0); - break lab7; - } - } - this.bra = cursor$6 = this.cursor; - if (! (! (this.I_p1 <= cursor$6) ? false : true)) { - this.cursor = ((this.limit - v_8) | 0); - break lab7; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - } - break; - case 4: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - v_10 = ((this.limit - this.cursor) | 0); - lab10 = true; - lab10: - while (lab10 === true) { - lab10 = false; - this.ket = this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, GermanStemmer.a_3, 2); - if (among_var === 0) { - this.cursor = ((this.limit - v_10) | 0); - break lab10; - } - this.bra = cursor$7 = this.cursor; - if (! (! (this.I_p2 <= cursor$7) ? false : true)) { - this.cursor = ((this.limit - v_10) | 0); - break lab10; - } - switch (among_var) { - case 0: - this.cursor = ((this.limit - v_10) | 0); - break lab10; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - } - } - break; - } - } - this.cursor = ((this.limit - v_4) | 0); - return true; -}; - -GermanStemmer.prototype.r_standard_suffix = GermanStemmer.prototype.r_standard_suffix$; - -function GermanStemmer$r_standard_suffix$LGermanStemmer$($this) { - var among_var; - var v_1; - var v_2; - var v_3; - var v_4; - var v_5; - var v_6; - var v_7; - var v_8; - var v_9; - var v_10; - var lab0; - var lab1; - var lab2; - var c; - var lab3; - var lab4; - var lab5; - var lab6; - var lab7; - var lab8; - var lab9; - var lab10; - var cursor$0; - var cursor$1; - var limit$0; - var cursor$2; - var cursor$3; - var cursor$4; - var cursor$5; - var cursor$6; - var cursor$7; - var limit$1; - var cursor$8; - v_1 = (($this.limit - $this.cursor) | 0); - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - $this.ket = $this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, GermanStemmer.a_1, 7); - if (among_var === 0) { - break lab0; - } - $this.bra = cursor$0 = $this.cursor; - if (! (! ($this.I_p1 <= cursor$0) ? false : true)) { - break lab0; - } - switch (among_var) { - case 0: - break lab0; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - v_2 = (($this.limit - $this.cursor) | 0); - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - $this.ket = $this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "s")) { - $this.cursor = (($this.limit - v_2) | 0); - break lab1; - } - $this.bra = $this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 3, "nis")) { - $this.cursor = (($this.limit - v_2) | 0); - break lab1; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - } - break; - case 3: - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII($this, GermanStemmer.g_s_ending, 98, 116)) { - break lab0; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - } - } - cursor$2 = $this.cursor = (((limit$0 = $this.limit) - v_1) | 0); - v_3 = ((limit$0 - cursor$2) | 0); - lab2 = true; -lab2: - while (lab2 === true) { - lab2 = false; - $this.ket = $this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, GermanStemmer.a_2, 4); - if (among_var === 0) { - break lab2; - } - $this.bra = cursor$1 = $this.cursor; - if (! (! ($this.I_p1 <= cursor$1) ? false : true)) { - break lab2; - } - switch (among_var) { - case 0: - break lab2; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 2: - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII($this, GermanStemmer.g_st_ending, 98, 116)) { - break lab2; - } - c = ($this.cursor - 3 | 0); - if ($this.limit_backward > c || c > $this.limit) { - break lab2; - } - $this.cursor = c; - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - } - } - cursor$8 = $this.cursor = (((limit$1 = $this.limit) - v_3) | 0); - v_4 = ((limit$1 - cursor$8) | 0); - lab3 = true; -lab3: - while (lab3 === true) { - lab3 = false; - $this.ket = $this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, GermanStemmer.a_4, 8); - if (among_var === 0) { - break lab3; - } - $this.bra = cursor$3 = $this.cursor; - if (! (! ($this.I_p2 <= cursor$3) ? false : true)) { - break lab3; - } - switch (among_var) { - case 0: - break lab3; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - v_5 = (($this.limit - $this.cursor) | 0); - lab4 = true; - lab4: - while (lab4 === true) { - lab4 = false; - $this.ket = $this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 2, "ig")) { - $this.cursor = (($this.limit - v_5) | 0); - break lab4; - } - $this.bra = cursor$4 = $this.cursor; - v_6 = (($this.limit - cursor$4) | 0); - lab5 = true; - lab5: - while (lab5 === true) { - lab5 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "e")) { - break lab5; - } - $this.cursor = (($this.limit - v_5) | 0); - break lab4; - } - cursor$5 = $this.cursor = (($this.limit - v_6) | 0); - if (! (! ($this.I_p2 <= cursor$5) ? false : true)) { - $this.cursor = (($this.limit - v_5) | 0); - break lab4; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - } - break; - case 2: - v_7 = (($this.limit - $this.cursor) | 0); - lab6 = true; - lab6: - while (lab6 === true) { - lab6 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "e")) { - break lab6; - } - break lab3; - } - $this.cursor = (($this.limit - v_7) | 0); - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 3: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - v_8 = (($this.limit - $this.cursor) | 0); - lab7 = true; - lab7: - while (lab7 === true) { - lab7 = false; - $this.ket = $this.cursor; - lab8 = true; - lab8: - while (lab8 === true) { - lab8 = false; - v_9 = (($this.limit - $this.cursor) | 0); - lab9 = true; - lab9: - while (lab9 === true) { - lab9 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 2, "er")) { - break lab9; - } - break lab8; - } - $this.cursor = (($this.limit - v_9) | 0); - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 2, "en")) { - $this.cursor = (($this.limit - v_8) | 0); - break lab7; - } - } - $this.bra = cursor$6 = $this.cursor; - if (! (! ($this.I_p1 <= cursor$6) ? false : true)) { - $this.cursor = (($this.limit - v_8) | 0); - break lab7; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - } - break; - case 4: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - v_10 = (($this.limit - $this.cursor) | 0); - lab10 = true; - lab10: - while (lab10 === true) { - lab10 = false; - $this.ket = $this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, GermanStemmer.a_3, 2); - if (among_var === 0) { - $this.cursor = (($this.limit - v_10) | 0); - break lab10; - } - $this.bra = cursor$7 = $this.cursor; - if (! (! ($this.I_p2 <= cursor$7) ? false : true)) { - $this.cursor = (($this.limit - v_10) | 0); - break lab10; - } - switch (among_var) { - case 0: - $this.cursor = (($this.limit - v_10) | 0); - break lab10; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - } - } - break; - } - } - $this.cursor = (($this.limit - v_4) | 0); - return true; -}; - -GermanStemmer.r_standard_suffix$LGermanStemmer$ = GermanStemmer$r_standard_suffix$LGermanStemmer$; - -GermanStemmer.prototype.stem$ = function () { - var v_1; - var v_2; - var v_4; - var lab0; - var lab1; - var lab2; - var lab3; - var cursor$0; - var cursor$1; - var cursor$2; - v_1 = this.cursor; - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - if (! GermanStemmer$r_prelude$LGermanStemmer$(this)) { - break lab0; - } - } - cursor$0 = this.cursor = v_1; - v_2 = cursor$0; - lab1 = true; -lab1: - while (lab1 === true) { - lab1 = false; - if (! GermanStemmer$r_mark_regions$LGermanStemmer$(this)) { - break lab1; - } - } - cursor$1 = this.cursor = v_2; - this.limit_backward = cursor$1; - this.cursor = this.limit; - lab2 = true; -lab2: - while (lab2 === true) { - lab2 = false; - if (! GermanStemmer$r_standard_suffix$LGermanStemmer$(this)) { - break lab2; - } - } - cursor$2 = this.cursor = this.limit_backward; - v_4 = cursor$2; - lab3 = true; -lab3: - while (lab3 === true) { - lab3 = false; - if (! GermanStemmer$r_postlude$LGermanStemmer$(this)) { - break lab3; - } - } - this.cursor = v_4; - return true; -}; - -GermanStemmer.prototype.stem = GermanStemmer.prototype.stem$; - -GermanStemmer.prototype.equals$X = function (o) { - return o instanceof GermanStemmer; -}; - -GermanStemmer.prototype.equals = GermanStemmer.prototype.equals$X; - -function GermanStemmer$equals$LGermanStemmer$X($this, o) { - return o instanceof GermanStemmer; -}; - -GermanStemmer.equals$LGermanStemmer$X = GermanStemmer$equals$LGermanStemmer$X; - -GermanStemmer.prototype.hashCode$ = function () { - var classname; - var hash; - var i; - var char; - classname = "GermanStemmer"; - hash = 0; - for (i = 0; i < classname.length; i++) { - char = classname.charCodeAt(i); - hash = (hash << 5) - hash + char; - hash = hash & hash; - } - return (hash | 0); -}; - -GermanStemmer.prototype.hashCode = GermanStemmer.prototype.hashCode$; - -function GermanStemmer$hashCode$LGermanStemmer$($this) { - var classname; - var hash; - var i; - var char; - classname = "GermanStemmer"; - hash = 0; - for (i = 0; i < classname.length; i++) { - char = classname.charCodeAt(i); - hash = (hash << 5) - hash + char; - hash = hash & hash; - } - return (hash | 0); -}; - -GermanStemmer.hashCode$LGermanStemmer$ = GermanStemmer$hashCode$LGermanStemmer$; - -GermanStemmer.serialVersionUID = 1; -$__jsx_lazy_init(GermanStemmer, "methodObject", function () { - return new GermanStemmer(); -}); -$__jsx_lazy_init(GermanStemmer, "a_0", function () { - return [ new Among("", -1, 6), new Among("U", 0, 2), new Among("Y", 0, 1), new Among("\u00E4", 0, 3), new Among("\u00F6", 0, 4), new Among("\u00FC", 0, 5) ]; -}); -$__jsx_lazy_init(GermanStemmer, "a_1", function () { - return [ new Among("e", -1, 2), new Among("em", -1, 1), new Among("en", -1, 2), new Among("ern", -1, 1), new Among("er", -1, 1), new Among("s", -1, 3), new Among("es", 5, 2) ]; -}); -$__jsx_lazy_init(GermanStemmer, "a_2", function () { - return [ new Among("en", -1, 1), new Among("er", -1, 1), new Among("st", -1, 2), new Among("est", 2, 1) ]; -}); -$__jsx_lazy_init(GermanStemmer, "a_3", function () { - return [ new Among("ig", -1, 1), new Among("lich", -1, 1) ]; -}); -$__jsx_lazy_init(GermanStemmer, "a_4", function () { - return [ new Among("end", -1, 1), new Among("ig", -1, 2), new Among("ung", -1, 1), new Among("lich", -1, 3), new Among("isch", -1, 2), new Among("ik", -1, 2), new Among("heit", -1, 3), new Among("keit", -1, 4) ]; -}); -GermanStemmer.g_v = [ 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 32, 8 ]; -GermanStemmer.g_s_ending = [ 117, 30, 5 ]; -GermanStemmer.g_st_ending = [ 117, 30, 4 ]; - -var $__jsx_classMap = { - "src/among.jsx": { - Among: Among, - Among$SII: Among, - Among$SIIF$LBaseStemmer$B$LBaseStemmer$: Among$0 - }, - "src/stemmer.jsx": { - Stemmer: Stemmer, - Stemmer$: Stemmer - }, - "src/base-stemmer.jsx": { - BaseStemmer: BaseStemmer, - BaseStemmer$: BaseStemmer - }, - "src/german-stemmer.jsx": { - GermanStemmer: GermanStemmer, - GermanStemmer$: GermanStemmer - } -}; - - -})(JSX); - -var Among = JSX.require("src/among.jsx").Among; -var Among$SII = JSX.require("src/among.jsx").Among$SII; -var Stemmer = JSX.require("src/stemmer.jsx").Stemmer; -var BaseStemmer = JSX.require("src/base-stemmer.jsx").BaseStemmer; -var GermanStemmer = JSX.require("src/german-stemmer.jsx").GermanStemmer; diff --git a/sphinx/search/non-minified-js/hungarian-stemmer.js b/sphinx/search/non-minified-js/hungarian-stemmer.js index 67fd1cdf047..2c550ac0d0e 100644 --- a/sphinx/search/non-minified-js/hungarian-stemmer.js +++ b/sphinx/search/non-minified-js/hungarian-stemmer.js @@ -1,2893 +1,711 @@ -// generatedy by JSX compiler 0.9.89 (2014-05-20 06:01:03 +0900; 8e8c6105f36f3dfe440ea026a3c93a3444977102) -var JSX = {}; -(function (JSX) { -/** - * extends the class - */ -function $__jsx_extend(derivations, base) { - var ctor = function () {}; - ctor.prototype = base.prototype; - var proto = new ctor(); - for (var i in derivations) { - derivations[i].prototype = proto; - } -} - -/** - * copies the implementations from source interface to target - */ -function $__jsx_merge_interface(target, source) { - for (var k in source.prototype) - if (source.prototype.hasOwnProperty(k)) - target.prototype[k] = source.prototype[k]; -} - -/** - * defers the initialization of the property - */ -function $__jsx_lazy_init(obj, prop, func) { - function reset(obj, prop, value) { - delete obj[prop]; - obj[prop] = value; - return value; - } - - Object.defineProperty(obj, prop, { - get: function () { - return reset(obj, prop, func()); - }, - set: function (v) { - reset(obj, prop, v); - }, - enumerable: true, - configurable: true - }); -} - -var $__jsx_imul = Math.imul; -if (typeof $__jsx_imul === "undefined") { - $__jsx_imul = function (a, b) { - var ah = (a >>> 16) & 0xffff; - var al = a & 0xffff; - var bh = (b >>> 16) & 0xffff; - var bl = b & 0xffff; - return ((al * bl) + (((ah * bl + al * bh) << 16) >>> 0)|0); - }; -} - -/** - * fused int-ops with side-effects - */ -function $__jsx_ipadd(o, p, r) { - return o[p] = (o[p] + r) | 0; -} -function $__jsx_ipsub(o, p, r) { - return o[p] = (o[p] - r) | 0; -} -function $__jsx_ipmul(o, p, r) { - return o[p] = $__jsx_imul(o[p], r); -} -function $__jsx_ipdiv(o, p, r) { - return o[p] = (o[p] / r) | 0; -} -function $__jsx_ipmod(o, p, r) { - return o[p] = (o[p] % r) | 0; -} -function $__jsx_ippostinc(o, p) { - var v = o[p]; - o[p] = (v + 1) | 0; - return v; -} -function $__jsx_ippostdec(o, p) { - var v = o[p]; - o[p] = (v - 1) | 0; - return v; -} - -/** - * non-inlined version of Array#each - */ -function $__jsx_forEach(o, f) { - var l = o.length; - for (var i = 0; i < l; ++i) - f(o[i]); -} - -/* - * global functions, renamed to avoid conflict with local variable names - */ -var $__jsx_parseInt = parseInt; -var $__jsx_parseFloat = parseFloat; -function $__jsx_isNaN(n) { return n !== n; } -var $__jsx_isFinite = isFinite; - -var $__jsx_encodeURIComponent = encodeURIComponent; -var $__jsx_decodeURIComponent = decodeURIComponent; -var $__jsx_encodeURI = encodeURI; -var $__jsx_decodeURI = decodeURI; - -var $__jsx_ObjectToString = Object.prototype.toString; -var $__jsx_ObjectHasOwnProperty = Object.prototype.hasOwnProperty; - -/* - * profiler object, initialized afterwards - */ -function $__jsx_profiler() { -} - -/* - * public interface to JSX code - */ -JSX.require = function (path) { - var m = $__jsx_classMap[path]; - return m !== undefined ? m : null; -}; - -JSX.profilerIsRunning = function () { - return $__jsx_profiler.getResults != null; -}; - -JSX.getProfileResults = function () { - return ($__jsx_profiler.getResults || function () { return {}; })(); -}; - -JSX.postProfileResults = function (url, cb) { - if ($__jsx_profiler.postResults == null) - throw new Error("profiler has not been turned on"); - return $__jsx_profiler.postResults(url, cb); -}; - -JSX.resetProfileResults = function () { - if ($__jsx_profiler.resetResults == null) - throw new Error("profiler has not been turned on"); - return $__jsx_profiler.resetResults(); -}; -JSX.DEBUG = false; -var GeneratorFunction$0 = -(function () { - try { - return Function('import {GeneratorFunction} from "std:iteration"; return GeneratorFunction')(); - } catch (e) { - return function GeneratorFunction () {}; - } -})(); -var __jsx_generator_object$0 = -(function () { - function __jsx_generator_object() { - this.__next = 0; - this.__loop = null; - this.__seed = null; - this.__value = undefined; - this.__status = 0; // SUSPENDED: 0, ACTIVE: 1, DEAD: 2 - } - - __jsx_generator_object.prototype.next = function (seed) { - switch (this.__status) { - case 0: - this.__status = 1; - this.__seed = seed; - - // go next! - this.__loop(this.__next); - - var done = false; - if (this.__next != -1) { - this.__status = 0; - } else { - this.__status = 2; - done = true; - } - return { value: this.__value, done: done }; - case 1: - throw new Error("Generator is already running"); - case 2: - throw new Error("Generator is already finished"); - default: - throw new Error("Unexpected generator internal state"); - } - }; - - return __jsx_generator_object; -}()); -function Among(s, substring_i, result) { - this.s_size = s.length; - this.s = s; - this.substring_i = substring_i; - this.result = result; - this.method = null; - this.instance = null; -}; - -function Among$0(s, substring_i, result, method, instance) { - this.s_size = s.length; - this.s = s; - this.substring_i = substring_i; - this.result = result; - this.method = method; - this.instance = instance; -}; - -$__jsx_extend([Among, Among$0], Object); -function Stemmer() { -}; - -$__jsx_extend([Stemmer], Object); -function BaseStemmer() { - var current$0; - var cursor$0; - var limit$0; - this.cache = ({ }); - current$0 = this.current = ""; - cursor$0 = this.cursor = 0; - limit$0 = this.limit = current$0.length; - this.limit_backward = 0; - this.bra = cursor$0; - this.ket = limit$0; -}; - -$__jsx_extend([BaseStemmer], Stemmer); -BaseStemmer.prototype.setCurrent$S = function (value) { - var current$0; - var cursor$0; - var limit$0; - current$0 = this.current = value; - cursor$0 = this.cursor = 0; - limit$0 = this.limit = current$0.length; - this.limit_backward = 0; - this.bra = cursor$0; - this.ket = limit$0; -}; - - -function BaseStemmer$setCurrent$LBaseStemmer$S($this, value) { - var current$0; - var cursor$0; - var limit$0; - current$0 = $this.current = value; - cursor$0 = $this.cursor = 0; - limit$0 = $this.limit = current$0.length; - $this.limit_backward = 0; - $this.bra = cursor$0; - $this.ket = limit$0; -}; - -BaseStemmer.setCurrent$LBaseStemmer$S = BaseStemmer$setCurrent$LBaseStemmer$S; - -BaseStemmer.prototype.getCurrent$ = function () { - return this.current; -}; - - -function BaseStemmer$getCurrent$LBaseStemmer$($this) { - return $this.current; -}; - -BaseStemmer.getCurrent$LBaseStemmer$ = BaseStemmer$getCurrent$LBaseStemmer$; - -BaseStemmer.prototype.copy_from$LBaseStemmer$ = function (other) { - this.current = other.current; - this.cursor = other.cursor; - this.limit = other.limit; - this.limit_backward = other.limit_backward; - this.bra = other.bra; - this.ket = other.ket; -}; - - -function BaseStemmer$copy_from$LBaseStemmer$LBaseStemmer$($this, other) { - $this.current = other.current; - $this.cursor = other.cursor; - $this.limit = other.limit; - $this.limit_backward = other.limit_backward; - $this.bra = other.bra; - $this.ket = other.ket; -}; - -BaseStemmer.copy_from$LBaseStemmer$LBaseStemmer$ = BaseStemmer$copy_from$LBaseStemmer$LBaseStemmer$; - -BaseStemmer.prototype.in_grouping$AIII = function (s, min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor >= this.limit) { - return false; - } - ch = this.current.charCodeAt(this.cursor); - if (ch > max || ch < min) { - return false; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$in_grouping$LBaseStemmer$AIII($this, s, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor >= $this.limit) { - return false; - } - ch = $this.current.charCodeAt($this.cursor); - if (ch > max || ch < min) { - return false; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.in_grouping$LBaseStemmer$AIII = BaseStemmer$in_grouping$LBaseStemmer$AIII; - -BaseStemmer.prototype.in_grouping_b$AIII = function (s, min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor <= this.limit_backward) { - return false; - } - ch = this.current.charCodeAt(this.cursor - 1); - if (ch > max || ch < min) { - return false; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$in_grouping_b$LBaseStemmer$AIII($this, s, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor <= $this.limit_backward) { - return false; - } - ch = $this.current.charCodeAt($this.cursor - 1); - if (ch > max || ch < min) { - return false; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.in_grouping_b$LBaseStemmer$AIII = BaseStemmer$in_grouping_b$LBaseStemmer$AIII; - -BaseStemmer.prototype.out_grouping$AIII = function (s, min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor >= this.limit) { - return false; - } - ch = this.current.charCodeAt(this.cursor); - if (ch > max || ch < min) { - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; - } - ch -= min; - if ((s[ch >>> 3] & 0X1 << (ch & 0x7)) === 0) { - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; - } - return false; -}; - - -function BaseStemmer$out_grouping$LBaseStemmer$AIII($this, s, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor >= $this.limit) { - return false; - } - ch = $this.current.charCodeAt($this.cursor); - if (ch > max || ch < min) { - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; - } - ch -= min; - if ((s[ch >>> 3] & 0X1 << (ch & 0x7)) === 0) { - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; - } - return false; -}; - -BaseStemmer.out_grouping$LBaseStemmer$AIII = BaseStemmer$out_grouping$LBaseStemmer$AIII; - -BaseStemmer.prototype.out_grouping_b$AIII = function (s, min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor <= this.limit_backward) { - return false; - } - ch = this.current.charCodeAt(this.cursor - 1); - if (ch > max || ch < min) { - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; - } - return false; -}; - - -function BaseStemmer$out_grouping_b$LBaseStemmer$AIII($this, s, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor <= $this.limit_backward) { - return false; - } - ch = $this.current.charCodeAt($this.cursor - 1); - if (ch > max || ch < min) { - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; - } - return false; -}; - -BaseStemmer.out_grouping_b$LBaseStemmer$AIII = BaseStemmer$out_grouping_b$LBaseStemmer$AIII; - -BaseStemmer.prototype.in_range$II = function (min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor >= this.limit) { - return false; - } - ch = this.current.charCodeAt(this.cursor); - if (ch > max || ch < min) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; +// Generated by Snowball 2.1.0 - https://snowballstem.org/ + +/**@constructor*/ +HungarianStemmer = function() { + var base = new BaseStemmer(); + /** @const */ var a_0 = [ + ["cs", -1, -1], + ["dzs", -1, -1], + ["gy", -1, -1], + ["ly", -1, -1], + ["ny", -1, -1], + ["sz", -1, -1], + ["ty", -1, -1], + ["zs", -1, -1] + ]; + + /** @const */ var a_1 = [ + ["\u00E1", -1, 1], + ["\u00E9", -1, 2] + ]; + + /** @const */ var a_2 = [ + ["bb", -1, -1], + ["cc", -1, -1], + ["dd", -1, -1], + ["ff", -1, -1], + ["gg", -1, -1], + ["jj", -1, -1], + ["kk", -1, -1], + ["ll", -1, -1], + ["mm", -1, -1], + ["nn", -1, -1], + ["pp", -1, -1], + ["rr", -1, -1], + ["ccs", -1, -1], + ["ss", -1, -1], + ["zzs", -1, -1], + ["tt", -1, -1], + ["vv", -1, -1], + ["ggy", -1, -1], + ["lly", -1, -1], + ["nny", -1, -1], + ["tty", -1, -1], + ["ssz", -1, -1], + ["zz", -1, -1] + ]; + + /** @const */ var a_3 = [ + ["al", -1, 1], + ["el", -1, 1] + ]; + + /** @const */ var a_4 = [ + ["ba", -1, -1], + ["ra", -1, -1], + ["be", -1, -1], + ["re", -1, -1], + ["ig", -1, -1], + ["nak", -1, -1], + ["nek", -1, -1], + ["val", -1, -1], + ["vel", -1, -1], + ["ul", -1, -1], + ["n\u00E1l", -1, -1], + ["n\u00E9l", -1, -1], + ["b\u00F3l", -1, -1], + ["r\u00F3l", -1, -1], + ["t\u00F3l", -1, -1], + ["\u00FCl", -1, -1], + ["b\u0151l", -1, -1], + ["r\u0151l", -1, -1], + ["t\u0151l", -1, -1], + ["n", -1, -1], + ["an", 19, -1], + ["ban", 20, -1], + ["en", 19, -1], + ["ben", 22, -1], + ["k\u00E9ppen", 22, -1], + ["on", 19, -1], + ["\u00F6n", 19, -1], + ["k\u00E9pp", -1, -1], + ["kor", -1, -1], + ["t", -1, -1], + ["at", 29, -1], + ["et", 29, -1], + ["k\u00E9nt", 29, -1], + ["ank\u00E9nt", 32, -1], + ["enk\u00E9nt", 32, -1], + ["onk\u00E9nt", 32, -1], + ["ot", 29, -1], + ["\u00E9rt", 29, -1], + ["\u00F6t", 29, -1], + ["hez", -1, -1], + ["hoz", -1, -1], + ["h\u00F6z", -1, -1], + ["v\u00E1", -1, -1], + ["v\u00E9", -1, -1] + ]; + + /** @const */ var a_5 = [ + ["\u00E1n", -1, 2], + ["\u00E9n", -1, 1], + ["\u00E1nk\u00E9nt", -1, 2] + ]; + + /** @const */ var a_6 = [ + ["stul", -1, 1], + ["astul", 0, 1], + ["\u00E1stul", 0, 2], + ["st\u00FCl", -1, 1], + ["est\u00FCl", 3, 1], + ["\u00E9st\u00FCl", 3, 3] + ]; + + /** @const */ var a_7 = [ + ["\u00E1", -1, 1], + ["\u00E9", -1, 1] + ]; + + /** @const */ var a_8 = [ + ["k", -1, 3], + ["ak", 0, 3], + ["ek", 0, 3], + ["ok", 0, 3], + ["\u00E1k", 0, 1], + ["\u00E9k", 0, 2], + ["\u00F6k", 0, 3] + ]; + + /** @const */ var a_9 = [ + ["\u00E9i", -1, 1], + ["\u00E1\u00E9i", 0, 3], + ["\u00E9\u00E9i", 0, 2], + ["\u00E9", -1, 1], + ["k\u00E9", 3, 1], + ["ak\u00E9", 4, 1], + ["ek\u00E9", 4, 1], + ["ok\u00E9", 4, 1], + ["\u00E1k\u00E9", 4, 3], + ["\u00E9k\u00E9", 4, 2], + ["\u00F6k\u00E9", 4, 1], + ["\u00E9\u00E9", 3, 2] + ]; + + /** @const */ var a_10 = [ + ["a", -1, 1], + ["ja", 0, 1], + ["d", -1, 1], + ["ad", 2, 1], + ["ed", 2, 1], + ["od", 2, 1], + ["\u00E1d", 2, 2], + ["\u00E9d", 2, 3], + ["\u00F6d", 2, 1], + ["e", -1, 1], + ["je", 9, 1], + ["nk", -1, 1], + ["unk", 11, 1], + ["\u00E1nk", 11, 2], + ["\u00E9nk", 11, 3], + ["\u00FCnk", 11, 1], + ["uk", -1, 1], + ["juk", 16, 1], + ["\u00E1juk", 17, 2], + ["\u00FCk", -1, 1], + ["j\u00FCk", 19, 1], + ["\u00E9j\u00FCk", 20, 3], + ["m", -1, 1], + ["am", 22, 1], + ["em", 22, 1], + ["om", 22, 1], + ["\u00E1m", 22, 2], + ["\u00E9m", 22, 3], + ["o", -1, 1], + ["\u00E1", -1, 2], + ["\u00E9", -1, 3] + ]; + + /** @const */ var a_11 = [ + ["id", -1, 1], + ["aid", 0, 1], + ["jaid", 1, 1], + ["eid", 0, 1], + ["jeid", 3, 1], + ["\u00E1id", 0, 2], + ["\u00E9id", 0, 3], + ["i", -1, 1], + ["ai", 7, 1], + ["jai", 8, 1], + ["ei", 7, 1], + ["jei", 10, 1], + ["\u00E1i", 7, 2], + ["\u00E9i", 7, 3], + ["itek", -1, 1], + ["eitek", 14, 1], + ["jeitek", 15, 1], + ["\u00E9itek", 14, 3], + ["ik", -1, 1], + ["aik", 18, 1], + ["jaik", 19, 1], + ["eik", 18, 1], + ["jeik", 21, 1], + ["\u00E1ik", 18, 2], + ["\u00E9ik", 18, 3], + ["ink", -1, 1], + ["aink", 25, 1], + ["jaink", 26, 1], + ["eink", 25, 1], + ["jeink", 28, 1], + ["\u00E1ink", 25, 2], + ["\u00E9ink", 25, 3], + ["aitok", -1, 1], + ["jaitok", 32, 1], + ["\u00E1itok", -1, 2], + ["im", -1, 1], + ["aim", 35, 1], + ["jaim", 36, 1], + ["eim", 35, 1], + ["jeim", 38, 1], + ["\u00E1im", 35, 2], + ["\u00E9im", 35, 3] + ]; + + /** @const */ var /** Array */ g_v = [17, 65, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 17, 36, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1]; + + var /** number */ I_p1 = 0; + + + /** @return {boolean} */ + function r_mark_regions() { + I_p1 = base.limit; + lab0: { + var /** number */ v_1 = base.cursor; + lab1: { + if (!(base.in_grouping(g_v, 97, 369))) + { + break lab1; + } + golab2: while(true) + { + var /** number */ v_2 = base.cursor; + lab3: { + if (!(base.out_grouping(g_v, 97, 369))) + { + break lab3; + } + base.cursor = v_2; + break golab2; + } + base.cursor = v_2; + if (base.cursor >= base.limit) + { + break lab1; + } + base.cursor++; + } + lab4: { + var /** number */ v_3 = base.cursor; + lab5: { + if (base.find_among(a_0) == 0) + { + break lab5; + } + break lab4; + } + base.cursor = v_3; + if (base.cursor >= base.limit) + { + break lab1; + } + base.cursor++; + } + I_p1 = base.cursor; + break lab0; + } + base.cursor = v_1; + if (!(base.out_grouping(g_v, 97, 369))) + { + return false; + } + golab6: while(true) + { + lab7: { + if (!(base.in_grouping(g_v, 97, 369))) + { + break lab7; + } + break golab6; + } + if (base.cursor >= base.limit) + { + return false; + } + base.cursor++; + } + I_p1 = base.cursor; + } + return true; + }; + + /** @return {boolean} */ + function r_R1() { + if (!(I_p1 <= base.cursor)) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_v_ending() { + var /** number */ among_var; + base.ket = base.cursor; + among_var = base.find_among_b(a_1); + if (among_var == 0) + { + return false; + } + base.bra = base.cursor; + if (!r_R1()) + { + return false; + } + switch (among_var) { + case 1: + if (!base.slice_from("a")) + { + return false; + } + break; + case 2: + if (!base.slice_from("e")) + { + return false; + } + break; + } + return true; + }; + + /** @return {boolean} */ + function r_double() { + var /** number */ v_1 = base.limit - base.cursor; + if (base.find_among_b(a_2) == 0) + { + return false; + } + base.cursor = base.limit - v_1; + return true; + }; + + /** @return {boolean} */ + function r_undouble() { + if (base.cursor <= base.limit_backward) + { + return false; + } + base.cursor--; + base.ket = base.cursor; + { + var /** number */ c1 = base.cursor - 1; + if (c1 < base.limit_backward) + { + return false; + } + base.cursor = c1; + } + base.bra = base.cursor; + if (!base.slice_del()) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_instrum() { + base.ket = base.cursor; + if (base.find_among_b(a_3) == 0) + { + return false; + } + base.bra = base.cursor; + if (!r_R1()) + { + return false; + } + if (!r_double()) + { + return false; + } + if (!base.slice_del()) + { + return false; + } + if (!r_undouble()) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_case() { + base.ket = base.cursor; + if (base.find_among_b(a_4) == 0) + { + return false; + } + base.bra = base.cursor; + if (!r_R1()) + { + return false; + } + if (!base.slice_del()) + { + return false; + } + if (!r_v_ending()) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_case_special() { + var /** number */ among_var; + base.ket = base.cursor; + among_var = base.find_among_b(a_5); + if (among_var == 0) + { + return false; + } + base.bra = base.cursor; + if (!r_R1()) + { + return false; + } + switch (among_var) { + case 1: + if (!base.slice_from("e")) + { + return false; + } + break; + case 2: + if (!base.slice_from("a")) + { + return false; + } + break; + } + return true; + }; + + /** @return {boolean} */ + function r_case_other() { + var /** number */ among_var; + base.ket = base.cursor; + among_var = base.find_among_b(a_6); + if (among_var == 0) + { + return false; + } + base.bra = base.cursor; + if (!r_R1()) + { + return false; + } + switch (among_var) { + case 1: + if (!base.slice_del()) + { + return false; + } + break; + case 2: + if (!base.slice_from("a")) + { + return false; + } + break; + case 3: + if (!base.slice_from("e")) + { + return false; + } + break; + } + return true; + }; + + /** @return {boolean} */ + function r_factive() { + base.ket = base.cursor; + if (base.find_among_b(a_7) == 0) + { + return false; + } + base.bra = base.cursor; + if (!r_R1()) + { + return false; + } + if (!r_double()) + { + return false; + } + if (!base.slice_del()) + { + return false; + } + if (!r_undouble()) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_plural() { + var /** number */ among_var; + base.ket = base.cursor; + among_var = base.find_among_b(a_8); + if (among_var == 0) + { + return false; + } + base.bra = base.cursor; + if (!r_R1()) + { + return false; + } + switch (among_var) { + case 1: + if (!base.slice_from("a")) + { + return false; + } + break; + case 2: + if (!base.slice_from("e")) + { + return false; + } + break; + case 3: + if (!base.slice_del()) + { + return false; + } + break; + } + return true; + }; + + /** @return {boolean} */ + function r_owned() { + var /** number */ among_var; + base.ket = base.cursor; + among_var = base.find_among_b(a_9); + if (among_var == 0) + { + return false; + } + base.bra = base.cursor; + if (!r_R1()) + { + return false; + } + switch (among_var) { + case 1: + if (!base.slice_del()) + { + return false; + } + break; + case 2: + if (!base.slice_from("e")) + { + return false; + } + break; + case 3: + if (!base.slice_from("a")) + { + return false; + } + break; + } + return true; + }; + + /** @return {boolean} */ + function r_sing_owner() { + var /** number */ among_var; + base.ket = base.cursor; + among_var = base.find_among_b(a_10); + if (among_var == 0) + { + return false; + } + base.bra = base.cursor; + if (!r_R1()) + { + return false; + } + switch (among_var) { + case 1: + if (!base.slice_del()) + { + return false; + } + break; + case 2: + if (!base.slice_from("a")) + { + return false; + } + break; + case 3: + if (!base.slice_from("e")) + { + return false; + } + break; + } + return true; + }; + + /** @return {boolean} */ + function r_plur_owner() { + var /** number */ among_var; + base.ket = base.cursor; + among_var = base.find_among_b(a_11); + if (among_var == 0) + { + return false; + } + base.bra = base.cursor; + if (!r_R1()) + { + return false; + } + switch (among_var) { + case 1: + if (!base.slice_del()) + { + return false; + } + break; + case 2: + if (!base.slice_from("a")) + { + return false; + } + break; + case 3: + if (!base.slice_from("e")) + { + return false; + } + break; + } + return true; + }; + + this.stem = /** @return {boolean} */ function() { + var /** number */ v_1 = base.cursor; + r_mark_regions(); + base.cursor = v_1; + base.limit_backward = base.cursor; base.cursor = base.limit; + var /** number */ v_2 = base.limit - base.cursor; + r_instrum(); + base.cursor = base.limit - v_2; + var /** number */ v_3 = base.limit - base.cursor; + r_case(); + base.cursor = base.limit - v_3; + var /** number */ v_4 = base.limit - base.cursor; + r_case_special(); + base.cursor = base.limit - v_4; + var /** number */ v_5 = base.limit - base.cursor; + r_case_other(); + base.cursor = base.limit - v_5; + var /** number */ v_6 = base.limit - base.cursor; + r_factive(); + base.cursor = base.limit - v_6; + var /** number */ v_7 = base.limit - base.cursor; + r_owned(); + base.cursor = base.limit - v_7; + var /** number */ v_8 = base.limit - base.cursor; + r_sing_owner(); + base.cursor = base.limit - v_8; + var /** number */ v_9 = base.limit - base.cursor; + r_plur_owner(); + base.cursor = base.limit - v_9; + var /** number */ v_10 = base.limit - base.cursor; + r_plural(); + base.cursor = base.limit - v_10; + base.cursor = base.limit_backward; + return true; + }; + + /**@return{string}*/ + this['stemWord'] = function(/**string*/word) { + base.setCurrent(word); + this.stem(); + return base.getCurrent(); + }; }; - - -function BaseStemmer$in_range$LBaseStemmer$II($this, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor >= $this.limit) { - return false; - } - ch = $this.current.charCodeAt($this.cursor); - if (ch > max || ch < min) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.in_range$LBaseStemmer$II = BaseStemmer$in_range$LBaseStemmer$II; - -BaseStemmer.prototype.in_range_b$II = function (min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor <= this.limit_backward) { - return false; - } - ch = this.current.charCodeAt(this.cursor - 1); - if (ch > max || ch < min) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$in_range_b$LBaseStemmer$II($this, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor <= $this.limit_backward) { - return false; - } - ch = $this.current.charCodeAt($this.cursor - 1); - if (ch > max || ch < min) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.in_range_b$LBaseStemmer$II = BaseStemmer$in_range_b$LBaseStemmer$II; - -BaseStemmer.prototype.out_range$II = function (min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor >= this.limit) { - return false; - } - ch = this.current.charCodeAt(this.cursor); - if (! (ch > max || ch < min)) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$out_range$LBaseStemmer$II($this, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor >= $this.limit) { - return false; - } - ch = $this.current.charCodeAt($this.cursor); - if (! (ch > max || ch < min)) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.out_range$LBaseStemmer$II = BaseStemmer$out_range$LBaseStemmer$II; - -BaseStemmer.prototype.out_range_b$II = function (min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor <= this.limit_backward) { - return false; - } - ch = this.current.charCodeAt(this.cursor - 1); - if (! (ch > max || ch < min)) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$out_range_b$LBaseStemmer$II($this, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor <= $this.limit_backward) { - return false; - } - ch = $this.current.charCodeAt($this.cursor - 1); - if (! (ch > max || ch < min)) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.out_range_b$LBaseStemmer$II = BaseStemmer$out_range_b$LBaseStemmer$II; - -BaseStemmer.prototype.eq_s$IS = function (s_size, s) { - var cursor$0; - if (((this.limit - this.cursor) | 0) < s_size) { - return false; - } - if (this.current.slice(cursor$0 = this.cursor, ((cursor$0 + s_size) | 0)) !== s) { - return false; - } - this.cursor = (this.cursor + s_size) | 0; - return true; -}; - - -function BaseStemmer$eq_s$LBaseStemmer$IS($this, s_size, s) { - var cursor$0; - if ((($this.limit - $this.cursor) | 0) < s_size) { - return false; - } - if ($this.current.slice(cursor$0 = $this.cursor, ((cursor$0 + s_size) | 0)) !== s) { - return false; - } - $this.cursor = ($this.cursor + s_size) | 0; - return true; -}; - -BaseStemmer.eq_s$LBaseStemmer$IS = BaseStemmer$eq_s$LBaseStemmer$IS; - -BaseStemmer.prototype.eq_s_b$IS = function (s_size, s) { - var cursor$0; - if (((this.cursor - this.limit_backward) | 0) < s_size) { - return false; - } - if (this.current.slice((((cursor$0 = this.cursor) - s_size) | 0), cursor$0) !== s) { - return false; - } - this.cursor = (this.cursor - s_size) | 0; - return true; -}; - - -function BaseStemmer$eq_s_b$LBaseStemmer$IS($this, s_size, s) { - var cursor$0; - if ((($this.cursor - $this.limit_backward) | 0) < s_size) { - return false; - } - if ($this.current.slice((((cursor$0 = $this.cursor) - s_size) | 0), cursor$0) !== s) { - return false; - } - $this.cursor = ($this.cursor - s_size) | 0; - return true; -}; - -BaseStemmer.eq_s_b$LBaseStemmer$IS = BaseStemmer$eq_s_b$LBaseStemmer$IS; - -BaseStemmer.prototype.eq_v$S = function (s) { - return BaseStemmer$eq_s$LBaseStemmer$IS(this, s.length, s); -}; - - -function BaseStemmer$eq_v$LBaseStemmer$S($this, s) { - return BaseStemmer$eq_s$LBaseStemmer$IS($this, s.length, s); -}; - -BaseStemmer.eq_v$LBaseStemmer$S = BaseStemmer$eq_v$LBaseStemmer$S; - -BaseStemmer.prototype.eq_v_b$S = function (s) { - return BaseStemmer$eq_s_b$LBaseStemmer$IS(this, s.length, s); -}; - - -function BaseStemmer$eq_v_b$LBaseStemmer$S($this, s) { - return BaseStemmer$eq_s_b$LBaseStemmer$IS($this, s.length, s); -}; - -BaseStemmer.eq_v_b$LBaseStemmer$S = BaseStemmer$eq_v_b$LBaseStemmer$S; - -BaseStemmer.prototype.find_among$ALAmong$I = function (v, v_size) { - var i; - var j; - var c; - var l; - var common_i; - var common_j; - var first_key_inspected; - var k; - var diff; - var common; - var w; - var i2; - var res; - i = 0; - j = v_size; - c = this.cursor; - l = this.limit; - common_i = 0; - common_j = 0; - first_key_inspected = false; - while (true) { - k = i + (j - i >>> 1); - diff = 0; - common = (common_i < common_j ? common_i : common_j); - w = v[k]; - for (i2 = common; i2 < w.s_size; i2++) { - if (c + common === l) { - diff = -1; - break; - } - diff = this.current.charCodeAt(c + common) - w.s.charCodeAt(i2); - if (diff !== 0) { - break; - } - common++; - } - if (diff < 0) { - j = k; - common_j = common; - } else { - i = k; - common_i = common; - } - if (j - i <= 1) { - if (i > 0) { - break; - } - if (j === i) { - break; - } - if (first_key_inspected) { - break; - } - first_key_inspected = true; - } - } - while (true) { - w = v[i]; - if (common_i >= w.s_size) { - this.cursor = (c + w.s_size | 0); - if (w.method == null) { - return w.result; - } - res = w.method(w.instance); - this.cursor = (c + w.s_size | 0); - if (res) { - return w.result; - } - } - i = w.substring_i; - if (i < 0) { - return 0; - } - } - return -1; -}; - - -function BaseStemmer$find_among$LBaseStemmer$ALAmong$I($this, v, v_size) { - var i; - var j; - var c; - var l; - var common_i; - var common_j; - var first_key_inspected; - var k; - var diff; - var common; - var w; - var i2; - var res; - i = 0; - j = v_size; - c = $this.cursor; - l = $this.limit; - common_i = 0; - common_j = 0; - first_key_inspected = false; - while (true) { - k = i + (j - i >>> 1); - diff = 0; - common = (common_i < common_j ? common_i : common_j); - w = v[k]; - for (i2 = common; i2 < w.s_size; i2++) { - if (c + common === l) { - diff = -1; - break; - } - diff = $this.current.charCodeAt(c + common) - w.s.charCodeAt(i2); - if (diff !== 0) { - break; - } - common++; - } - if (diff < 0) { - j = k; - common_j = common; - } else { - i = k; - common_i = common; - } - if (j - i <= 1) { - if (i > 0) { - break; - } - if (j === i) { - break; - } - if (first_key_inspected) { - break; - } - first_key_inspected = true; - } - } - while (true) { - w = v[i]; - if (common_i >= w.s_size) { - $this.cursor = (c + w.s_size | 0); - if (w.method == null) { - return w.result; - } - res = w.method(w.instance); - $this.cursor = (c + w.s_size | 0); - if (res) { - return w.result; - } - } - i = w.substring_i; - if (i < 0) { - return 0; - } - } - return -1; -}; - -BaseStemmer.find_among$LBaseStemmer$ALAmong$I = BaseStemmer$find_among$LBaseStemmer$ALAmong$I; - -BaseStemmer.prototype.find_among_b$ALAmong$I = function (v, v_size) { - var i; - var j; - var c; - var lb; - var common_i; - var common_j; - var first_key_inspected; - var k; - var diff; - var common; - var w; - var i2; - var res; - i = 0; - j = v_size; - c = this.cursor; - lb = this.limit_backward; - common_i = 0; - common_j = 0; - first_key_inspected = false; - while (true) { - k = i + (j - i >> 1); - diff = 0; - common = (common_i < common_j ? common_i : common_j); - w = v[k]; - for (i2 = w.s_size - 1 - common; i2 >= 0; i2--) { - if (c - common === lb) { - diff = -1; - break; - } - diff = this.current.charCodeAt(c - 1 - common) - w.s.charCodeAt(i2); - if (diff !== 0) { - break; - } - common++; - } - if (diff < 0) { - j = k; - common_j = common; - } else { - i = k; - common_i = common; - } - if (j - i <= 1) { - if (i > 0) { - break; - } - if (j === i) { - break; - } - if (first_key_inspected) { - break; - } - first_key_inspected = true; - } - } - while (true) { - w = v[i]; - if (common_i >= w.s_size) { - this.cursor = (c - w.s_size | 0); - if (w.method == null) { - return w.result; - } - res = w.method(this); - this.cursor = (c - w.s_size | 0); - if (res) { - return w.result; - } - } - i = w.substring_i; - if (i < 0) { - return 0; - } - } - return -1; -}; - - -function BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, v, v_size) { - var i; - var j; - var c; - var lb; - var common_i; - var common_j; - var first_key_inspected; - var k; - var diff; - var common; - var w; - var i2; - var res; - i = 0; - j = v_size; - c = $this.cursor; - lb = $this.limit_backward; - common_i = 0; - common_j = 0; - first_key_inspected = false; - while (true) { - k = i + (j - i >> 1); - diff = 0; - common = (common_i < common_j ? common_i : common_j); - w = v[k]; - for (i2 = w.s_size - 1 - common; i2 >= 0; i2--) { - if (c - common === lb) { - diff = -1; - break; - } - diff = $this.current.charCodeAt(c - 1 - common) - w.s.charCodeAt(i2); - if (diff !== 0) { - break; - } - common++; - } - if (diff < 0) { - j = k; - common_j = common; - } else { - i = k; - common_i = common; - } - if (j - i <= 1) { - if (i > 0) { - break; - } - if (j === i) { - break; - } - if (first_key_inspected) { - break; - } - first_key_inspected = true; - } - } - while (true) { - w = v[i]; - if (common_i >= w.s_size) { - $this.cursor = (c - w.s_size | 0); - if (w.method == null) { - return w.result; - } - res = w.method($this); - $this.cursor = (c - w.s_size | 0); - if (res) { - return w.result; - } - } - i = w.substring_i; - if (i < 0) { - return 0; - } - } - return -1; -}; - -BaseStemmer.find_among_b$LBaseStemmer$ALAmong$I = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I; - -BaseStemmer.prototype.replace_s$IIS = function (c_bra, c_ket, s) { - var adjustment; - adjustment = ((s.length - (((c_ket - c_bra) | 0))) | 0); - this.current = this.current.slice(0, c_bra) + s + this.current.slice(c_ket); - this.limit = (this.limit + adjustment) | 0; - if (this.cursor >= c_ket) { - this.cursor = (this.cursor + adjustment) | 0; - } else if (this.cursor > c_bra) { - this.cursor = c_bra; - } - return (adjustment | 0); -}; - - -function BaseStemmer$replace_s$LBaseStemmer$IIS($this, c_bra, c_ket, s) { - var adjustment; - adjustment = ((s.length - (((c_ket - c_bra) | 0))) | 0); - $this.current = $this.current.slice(0, c_bra) + s + $this.current.slice(c_ket); - $this.limit = ($this.limit + adjustment) | 0; - if ($this.cursor >= c_ket) { - $this.cursor = ($this.cursor + adjustment) | 0; - } else if ($this.cursor > c_bra) { - $this.cursor = c_bra; - } - return (adjustment | 0); -}; - -BaseStemmer.replace_s$LBaseStemmer$IIS = BaseStemmer$replace_s$LBaseStemmer$IIS; - -BaseStemmer.prototype.slice_check$ = function () { - var bra$0; - var ket$0; - var limit$0; - return ((bra$0 = this.bra) < 0 || bra$0 > (ket$0 = this.ket) || ket$0 > (limit$0 = this.limit) || limit$0 > this.current.length ? false : true); -}; - - -function BaseStemmer$slice_check$LBaseStemmer$($this) { - var bra$0; - var ket$0; - var limit$0; - return ((bra$0 = $this.bra) < 0 || bra$0 > (ket$0 = $this.ket) || ket$0 > (limit$0 = $this.limit) || limit$0 > $this.current.length ? false : true); -}; - -BaseStemmer.slice_check$LBaseStemmer$ = BaseStemmer$slice_check$LBaseStemmer$; - -BaseStemmer.prototype.slice_from$S = function (s) { - var result; - var bra$0; - var ket$0; - var limit$0; - result = false; - if ((bra$0 = this.bra) < 0 || bra$0 > (ket$0 = this.ket) || ket$0 > (limit$0 = this.limit) || limit$0 > this.current.length ? false : true) { - BaseStemmer$replace_s$LBaseStemmer$IIS(this, this.bra, this.ket, s); - result = true; - } - return result; -}; - - -function BaseStemmer$slice_from$LBaseStemmer$S($this, s) { - var result; - var bra$0; - var ket$0; - var limit$0; - result = false; - if ((bra$0 = $this.bra) < 0 || bra$0 > (ket$0 = $this.ket) || ket$0 > (limit$0 = $this.limit) || limit$0 > $this.current.length ? false : true) { - BaseStemmer$replace_s$LBaseStemmer$IIS($this, $this.bra, $this.ket, s); - result = true; - } - return result; -}; - -BaseStemmer.slice_from$LBaseStemmer$S = BaseStemmer$slice_from$LBaseStemmer$S; - -BaseStemmer.prototype.slice_del$ = function () { - return BaseStemmer$slice_from$LBaseStemmer$S(this, ""); -}; - - -function BaseStemmer$slice_del$LBaseStemmer$($this) { - return BaseStemmer$slice_from$LBaseStemmer$S($this, ""); -}; - -BaseStemmer.slice_del$LBaseStemmer$ = BaseStemmer$slice_del$LBaseStemmer$; - -BaseStemmer.prototype.insert$IIS = function (c_bra, c_ket, s) { - var adjustment; - adjustment = BaseStemmer$replace_s$LBaseStemmer$IIS(this, c_bra, c_ket, s); - if (c_bra <= this.bra) { - this.bra = (this.bra + adjustment) | 0; - } - if (c_bra <= this.ket) { - this.ket = (this.ket + adjustment) | 0; - } -}; - - -function BaseStemmer$insert$LBaseStemmer$IIS($this, c_bra, c_ket, s) { - var adjustment; - adjustment = BaseStemmer$replace_s$LBaseStemmer$IIS($this, c_bra, c_ket, s); - if (c_bra <= $this.bra) { - $this.bra = ($this.bra + adjustment) | 0; - } - if (c_bra <= $this.ket) { - $this.ket = ($this.ket + adjustment) | 0; - } -}; - -BaseStemmer.insert$LBaseStemmer$IIS = BaseStemmer$insert$LBaseStemmer$IIS; - -BaseStemmer.prototype.slice_to$S = function (s) { - var result; - var bra$0; - var ket$0; - var limit$0; - result = ''; - if ((bra$0 = this.bra) < 0 || bra$0 > (ket$0 = this.ket) || ket$0 > (limit$0 = this.limit) || limit$0 > this.current.length ? false : true) { - result = this.current.slice(this.bra, this.ket); - } - return result; -}; - - -function BaseStemmer$slice_to$LBaseStemmer$S($this, s) { - var result; - var bra$0; - var ket$0; - var limit$0; - result = ''; - if ((bra$0 = $this.bra) < 0 || bra$0 > (ket$0 = $this.ket) || ket$0 > (limit$0 = $this.limit) || limit$0 > $this.current.length ? false : true) { - result = $this.current.slice($this.bra, $this.ket); - } - return result; -}; - -BaseStemmer.slice_to$LBaseStemmer$S = BaseStemmer$slice_to$LBaseStemmer$S; - -BaseStemmer.prototype.assign_to$S = function (s) { - return this.current.slice(0, this.limit); -}; - - -function BaseStemmer$assign_to$LBaseStemmer$S($this, s) { - return $this.current.slice(0, $this.limit); -}; - -BaseStemmer.assign_to$LBaseStemmer$S = BaseStemmer$assign_to$LBaseStemmer$S; - -BaseStemmer.prototype.stem$ = function () { - return false; -}; - - -BaseStemmer.prototype.stemWord$S = function (word) { - var result; - var current$0; - var cursor$0; - var limit$0; - result = this.cache['.' + word]; - if (result == null) { - current$0 = this.current = word; - cursor$0 = this.cursor = 0; - limit$0 = this.limit = current$0.length; - this.limit_backward = 0; - this.bra = cursor$0; - this.ket = limit$0; - this.stem$(); - result = this.current; - this.cache['.' + word] = result; - } - return result; -}; - -BaseStemmer.prototype.stemWord = BaseStemmer.prototype.stemWord$S; - -BaseStemmer.prototype.stemWords$AS = function (words) { - var results; - var i; - var word; - var result; - var current$0; - var cursor$0; - var limit$0; - results = [ ]; - for (i = 0; i < words.length; i++) { - word = words[i]; - result = this.cache['.' + word]; - if (result == null) { - current$0 = this.current = word; - cursor$0 = this.cursor = 0; - limit$0 = this.limit = current$0.length; - this.limit_backward = 0; - this.bra = cursor$0; - this.ket = limit$0; - this.stem$(); - result = this.current; - this.cache['.' + word] = result; - } - results.push(result); - } - return results; -}; - -BaseStemmer.prototype.stemWords = BaseStemmer.prototype.stemWords$AS; - -function HungarianStemmer() { - BaseStemmer.call(this); - this.I_p1 = 0; -}; - -$__jsx_extend([HungarianStemmer], BaseStemmer); -HungarianStemmer.prototype.copy_from$LHungarianStemmer$ = function (other) { - this.I_p1 = other.I_p1; - BaseStemmer$copy_from$LBaseStemmer$LBaseStemmer$(this, other); -}; - -HungarianStemmer.prototype.copy_from = HungarianStemmer.prototype.copy_from$LHungarianStemmer$; - -HungarianStemmer.prototype.r_mark_regions$ = function () { - var v_1; - var v_2; - var v_3; - var lab0; - var lab1; - var lab3; - var lab4; - var lab5; - var lab7; - var cursor$0; - var cursor$1; - var $__jsx_postinc_t; - this.I_p1 = this.limit; - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - v_1 = this.cursor; - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, HungarianStemmer.g_v, 97, 252)) { - break lab1; - } - golab2: - while (true) { - v_2 = this.cursor; - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII(this, HungarianStemmer.g_v, 97, 252)) { - break lab3; - } - this.cursor = v_2; - break golab2; - } - cursor$0 = this.cursor = v_2; - if (cursor$0 >= this.limit) { - break lab1; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - lab4 = true; - lab4: - while (lab4 === true) { - lab4 = false; - v_3 = this.cursor; - lab5 = true; - lab5: - while (lab5 === true) { - lab5 = false; - if (BaseStemmer$find_among$LBaseStemmer$ALAmong$I(this, HungarianStemmer.a_0, 8) === 0) { - break lab5; - } - break lab4; - } - cursor$1 = this.cursor = v_3; - if (cursor$1 >= this.limit) { - break lab1; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - this.I_p1 = this.cursor; - break lab0; - } - this.cursor = v_1; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII(this, HungarianStemmer.g_v, 97, 252)) { - return false; - } - golab6: - while (true) { - lab7 = true; - lab7: - while (lab7 === true) { - lab7 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, HungarianStemmer.g_v, 97, 252)) { - break lab7; - } - break golab6; - } - if (this.cursor >= this.limit) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - this.I_p1 = this.cursor; - } - return true; -}; - -HungarianStemmer.prototype.r_mark_regions = HungarianStemmer.prototype.r_mark_regions$; - -function HungarianStemmer$r_mark_regions$LHungarianStemmer$($this) { - var v_1; - var v_2; - var v_3; - var lab0; - var lab1; - var lab3; - var lab4; - var lab5; - var lab7; - var cursor$0; - var cursor$1; - var $__jsx_postinc_t; - $this.I_p1 = $this.limit; - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - v_1 = $this.cursor; - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII($this, HungarianStemmer.g_v, 97, 252)) { - break lab1; - } - golab2: - while (true) { - v_2 = $this.cursor; - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII($this, HungarianStemmer.g_v, 97, 252)) { - break lab3; - } - $this.cursor = v_2; - break golab2; - } - cursor$0 = $this.cursor = v_2; - if (cursor$0 >= $this.limit) { - break lab1; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - lab4 = true; - lab4: - while (lab4 === true) { - lab4 = false; - v_3 = $this.cursor; - lab5 = true; - lab5: - while (lab5 === true) { - lab5 = false; - if (BaseStemmer$find_among$LBaseStemmer$ALAmong$I($this, HungarianStemmer.a_0, 8) === 0) { - break lab5; - } - break lab4; - } - cursor$1 = $this.cursor = v_3; - if (cursor$1 >= $this.limit) { - break lab1; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - $this.I_p1 = $this.cursor; - break lab0; - } - $this.cursor = v_1; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII($this, HungarianStemmer.g_v, 97, 252)) { - return false; - } - golab6: - while (true) { - lab7 = true; - lab7: - while (lab7 === true) { - lab7 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII($this, HungarianStemmer.g_v, 97, 252)) { - break lab7; - } - break golab6; - } - if ($this.cursor >= $this.limit) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - $this.I_p1 = $this.cursor; - } - return true; -}; - -HungarianStemmer.r_mark_regions$LHungarianStemmer$ = HungarianStemmer$r_mark_regions$LHungarianStemmer$; - -HungarianStemmer.prototype.r_R1$ = function () { - return (! (this.I_p1 <= this.cursor) ? false : true); -}; - -HungarianStemmer.prototype.r_R1 = HungarianStemmer.prototype.r_R1$; - -function HungarianStemmer$r_R1$LHungarianStemmer$($this) { - return (! ($this.I_p1 <= $this.cursor) ? false : true); -}; - -HungarianStemmer.r_R1$LHungarianStemmer$ = HungarianStemmer$r_R1$LHungarianStemmer$; - -HungarianStemmer.prototype.r_v_ending$ = function () { - var among_var; - var cursor$0; - this.ket = this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, HungarianStemmer.a_1, 2); - if (among_var === 0) { - return false; - } - this.bra = cursor$0 = this.cursor; - if (! (! (this.I_p1 <= cursor$0) ? false : true)) { - return false; - } - switch (among_var) { - case 0: - return false; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "a")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "e")) { - return false; - } - break; - } - return true; -}; - -HungarianStemmer.prototype.r_v_ending = HungarianStemmer.prototype.r_v_ending$; - -function HungarianStemmer$r_v_ending$LHungarianStemmer$($this) { - var among_var; - var cursor$0; - $this.ket = $this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, HungarianStemmer.a_1, 2); - if (among_var === 0) { - return false; - } - $this.bra = cursor$0 = $this.cursor; - if (! (! ($this.I_p1 <= cursor$0) ? false : true)) { - return false; - } - switch (among_var) { - case 0: - return false; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "a")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "e")) { - return false; - } - break; - } - return true; -}; - -HungarianStemmer.r_v_ending$LHungarianStemmer$ = HungarianStemmer$r_v_ending$LHungarianStemmer$; - -HungarianStemmer.prototype.r_double$ = function () { - var v_1; - v_1 = ((this.limit - this.cursor) | 0); - if (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, HungarianStemmer.a_2, 23) === 0) { - return false; - } - this.cursor = ((this.limit - v_1) | 0); - return true; -}; - -HungarianStemmer.prototype.r_double = HungarianStemmer.prototype.r_double$; - -function HungarianStemmer$r_double$LHungarianStemmer$($this) { - var v_1; - v_1 = (($this.limit - $this.cursor) | 0); - if (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, HungarianStemmer.a_2, 23) === 0) { - return false; - } - $this.cursor = (($this.limit - v_1) | 0); - return true; -}; - -HungarianStemmer.r_double$LHungarianStemmer$ = HungarianStemmer$r_double$LHungarianStemmer$; - -HungarianStemmer.prototype.r_undouble$ = function () { - var c; - var cursor$0; - var cursor$1; - var $__jsx_postinc_t; - if (this.cursor <= this.limit_backward) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - this.ket = cursor$0 = this.cursor; - c = (cursor$0 - 1 | 0); - if (this.limit_backward > c || c > this.limit) { - return false; - } - cursor$1 = this.cursor = c; - this.bra = cursor$1; - return (! BaseStemmer$slice_from$LBaseStemmer$S(this, "") ? false : true); -}; - -HungarianStemmer.prototype.r_undouble = HungarianStemmer.prototype.r_undouble$; - -function HungarianStemmer$r_undouble$LHungarianStemmer$($this) { - var c; - var cursor$0; - var cursor$1; - var $__jsx_postinc_t; - if ($this.cursor <= $this.limit_backward) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - $this.ket = cursor$0 = $this.cursor; - c = (cursor$0 - 1 | 0); - if ($this.limit_backward > c || c > $this.limit) { - return false; - } - cursor$1 = $this.cursor = c; - $this.bra = cursor$1; - return (! BaseStemmer$slice_from$LBaseStemmer$S($this, "") ? false : true); -}; - -HungarianStemmer.r_undouble$LHungarianStemmer$ = HungarianStemmer$r_undouble$LHungarianStemmer$; - -HungarianStemmer.prototype.r_instrum$ = function () { - var among_var; - var cursor$0; - this.ket = this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, HungarianStemmer.a_3, 2); - if (among_var === 0) { - return false; - } - this.bra = cursor$0 = this.cursor; - if (! (! (this.I_p1 <= cursor$0) ? false : true)) { - return false; - } - switch (among_var) { - case 0: - return false; - case 1: - if (! HungarianStemmer$r_double$LHungarianStemmer$(this)) { - return false; - } - break; - case 2: - if (! HungarianStemmer$r_double$LHungarianStemmer$(this)) { - return false; - } - break; - } - return (! BaseStemmer$slice_from$LBaseStemmer$S(this, "") ? false : ! HungarianStemmer$r_undouble$LHungarianStemmer$(this) ? false : true); -}; - -HungarianStemmer.prototype.r_instrum = HungarianStemmer.prototype.r_instrum$; - -function HungarianStemmer$r_instrum$LHungarianStemmer$($this) { - var among_var; - var cursor$0; - $this.ket = $this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, HungarianStemmer.a_3, 2); - if (among_var === 0) { - return false; - } - $this.bra = cursor$0 = $this.cursor; - if (! (! ($this.I_p1 <= cursor$0) ? false : true)) { - return false; - } - switch (among_var) { - case 0: - return false; - case 1: - if (! HungarianStemmer$r_double$LHungarianStemmer$($this)) { - return false; - } - break; - case 2: - if (! HungarianStemmer$r_double$LHungarianStemmer$($this)) { - return false; - } - break; - } - return (! BaseStemmer$slice_from$LBaseStemmer$S($this, "") ? false : ! HungarianStemmer$r_undouble$LHungarianStemmer$($this) ? false : true); -}; - -HungarianStemmer.r_instrum$LHungarianStemmer$ = HungarianStemmer$r_instrum$LHungarianStemmer$; - -HungarianStemmer.prototype.r_case$ = function () { - var cursor$0; - this.ket = this.cursor; - if (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, HungarianStemmer.a_4, 44) === 0) { - return false; - } - this.bra = cursor$0 = this.cursor; - return (! (! (this.I_p1 <= cursor$0) ? false : true) ? false : ! BaseStemmer$slice_from$LBaseStemmer$S(this, "") ? false : ! HungarianStemmer$r_v_ending$LHungarianStemmer$(this) ? false : true); -}; - -HungarianStemmer.prototype.r_case = HungarianStemmer.prototype.r_case$; - -function HungarianStemmer$r_case$LHungarianStemmer$($this) { - var cursor$0; - $this.ket = $this.cursor; - if (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, HungarianStemmer.a_4, 44) === 0) { - return false; - } - $this.bra = cursor$0 = $this.cursor; - return (! (! ($this.I_p1 <= cursor$0) ? false : true) ? false : ! BaseStemmer$slice_from$LBaseStemmer$S($this, "") ? false : ! HungarianStemmer$r_v_ending$LHungarianStemmer$($this) ? false : true); -}; - -HungarianStemmer.r_case$LHungarianStemmer$ = HungarianStemmer$r_case$LHungarianStemmer$; - -HungarianStemmer.prototype.r_case_special$ = function () { - var among_var; - var cursor$0; - this.ket = this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, HungarianStemmer.a_5, 3); - if (among_var === 0) { - return false; - } - this.bra = cursor$0 = this.cursor; - if (! (! (this.I_p1 <= cursor$0) ? false : true)) { - return false; - } - switch (among_var) { - case 0: - return false; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "e")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "a")) { - return false; - } - break; - case 3: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "a")) { - return false; - } - break; - } - return true; -}; - -HungarianStemmer.prototype.r_case_special = HungarianStemmer.prototype.r_case_special$; - -function HungarianStemmer$r_case_special$LHungarianStemmer$($this) { - var among_var; - var cursor$0; - $this.ket = $this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, HungarianStemmer.a_5, 3); - if (among_var === 0) { - return false; - } - $this.bra = cursor$0 = $this.cursor; - if (! (! ($this.I_p1 <= cursor$0) ? false : true)) { - return false; - } - switch (among_var) { - case 0: - return false; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "e")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "a")) { - return false; - } - break; - case 3: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "a")) { - return false; - } - break; - } - return true; -}; - -HungarianStemmer.r_case_special$LHungarianStemmer$ = HungarianStemmer$r_case_special$LHungarianStemmer$; - -HungarianStemmer.prototype.r_case_other$ = function () { - var among_var; - var cursor$0; - this.ket = this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, HungarianStemmer.a_6, 6); - if (among_var === 0) { - return false; - } - this.bra = cursor$0 = this.cursor; - if (! (! (this.I_p1 <= cursor$0) ? false : true)) { - return false; - } - switch (among_var) { - case 0: - return false; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 3: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "a")) { - return false; - } - break; - case 4: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "e")) { - return false; - } - break; - } - return true; -}; - -HungarianStemmer.prototype.r_case_other = HungarianStemmer.prototype.r_case_other$; - -function HungarianStemmer$r_case_other$LHungarianStemmer$($this) { - var among_var; - var cursor$0; - $this.ket = $this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, HungarianStemmer.a_6, 6); - if (among_var === 0) { - return false; - } - $this.bra = cursor$0 = $this.cursor; - if (! (! ($this.I_p1 <= cursor$0) ? false : true)) { - return false; - } - switch (among_var) { - case 0: - return false; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 3: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "a")) { - return false; - } - break; - case 4: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "e")) { - return false; - } - break; - } - return true; -}; - -HungarianStemmer.r_case_other$LHungarianStemmer$ = HungarianStemmer$r_case_other$LHungarianStemmer$; - -HungarianStemmer.prototype.r_factive$ = function () { - var among_var; - var cursor$0; - this.ket = this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, HungarianStemmer.a_7, 2); - if (among_var === 0) { - return false; - } - this.bra = cursor$0 = this.cursor; - if (! (! (this.I_p1 <= cursor$0) ? false : true)) { - return false; - } - switch (among_var) { - case 0: - return false; - case 1: - if (! HungarianStemmer$r_double$LHungarianStemmer$(this)) { - return false; - } - break; - case 2: - if (! HungarianStemmer$r_double$LHungarianStemmer$(this)) { - return false; - } - break; - } - return (! BaseStemmer$slice_from$LBaseStemmer$S(this, "") ? false : ! HungarianStemmer$r_undouble$LHungarianStemmer$(this) ? false : true); -}; - -HungarianStemmer.prototype.r_factive = HungarianStemmer.prototype.r_factive$; - -function HungarianStemmer$r_factive$LHungarianStemmer$($this) { - var among_var; - var cursor$0; - $this.ket = $this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, HungarianStemmer.a_7, 2); - if (among_var === 0) { - return false; - } - $this.bra = cursor$0 = $this.cursor; - if (! (! ($this.I_p1 <= cursor$0) ? false : true)) { - return false; - } - switch (among_var) { - case 0: - return false; - case 1: - if (! HungarianStemmer$r_double$LHungarianStemmer$($this)) { - return false; - } - break; - case 2: - if (! HungarianStemmer$r_double$LHungarianStemmer$($this)) { - return false; - } - break; - } - return (! BaseStemmer$slice_from$LBaseStemmer$S($this, "") ? false : ! HungarianStemmer$r_undouble$LHungarianStemmer$($this) ? false : true); -}; - -HungarianStemmer.r_factive$LHungarianStemmer$ = HungarianStemmer$r_factive$LHungarianStemmer$; - -HungarianStemmer.prototype.r_plural$ = function () { - var among_var; - var cursor$0; - this.ket = this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, HungarianStemmer.a_8, 7); - if (among_var === 0) { - return false; - } - this.bra = cursor$0 = this.cursor; - if (! (! (this.I_p1 <= cursor$0) ? false : true)) { - return false; - } - switch (among_var) { - case 0: - return false; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "a")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "e")) { - return false; - } - break; - case 3: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 4: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 5: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 6: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 7: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - } - return true; -}; - -HungarianStemmer.prototype.r_plural = HungarianStemmer.prototype.r_plural$; - -function HungarianStemmer$r_plural$LHungarianStemmer$($this) { - var among_var; - var cursor$0; - $this.ket = $this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, HungarianStemmer.a_8, 7); - if (among_var === 0) { - return false; - } - $this.bra = cursor$0 = $this.cursor; - if (! (! ($this.I_p1 <= cursor$0) ? false : true)) { - return false; - } - switch (among_var) { - case 0: - return false; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "a")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "e")) { - return false; - } - break; - case 3: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 4: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 5: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 6: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 7: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - } - return true; -}; - -HungarianStemmer.r_plural$LHungarianStemmer$ = HungarianStemmer$r_plural$LHungarianStemmer$; - -HungarianStemmer.prototype.r_owned$ = function () { - var among_var; - var cursor$0; - this.ket = this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, HungarianStemmer.a_9, 12); - if (among_var === 0) { - return false; - } - this.bra = cursor$0 = this.cursor; - if (! (! (this.I_p1 <= cursor$0) ? false : true)) { - return false; - } - switch (among_var) { - case 0: - return false; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "e")) { - return false; - } - break; - case 3: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "a")) { - return false; - } - break; - case 4: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 5: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "e")) { - return false; - } - break; - case 6: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "a")) { - return false; - } - break; - case 7: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 8: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "e")) { - return false; - } - break; - case 9: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - } - return true; -}; - -HungarianStemmer.prototype.r_owned = HungarianStemmer.prototype.r_owned$; - -function HungarianStemmer$r_owned$LHungarianStemmer$($this) { - var among_var; - var cursor$0; - $this.ket = $this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, HungarianStemmer.a_9, 12); - if (among_var === 0) { - return false; - } - $this.bra = cursor$0 = $this.cursor; - if (! (! ($this.I_p1 <= cursor$0) ? false : true)) { - return false; - } - switch (among_var) { - case 0: - return false; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "e")) { - return false; - } - break; - case 3: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "a")) { - return false; - } - break; - case 4: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 5: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "e")) { - return false; - } - break; - case 6: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "a")) { - return false; - } - break; - case 7: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 8: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "e")) { - return false; - } - break; - case 9: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - } - return true; -}; - -HungarianStemmer.r_owned$LHungarianStemmer$ = HungarianStemmer$r_owned$LHungarianStemmer$; - -HungarianStemmer.prototype.r_sing_owner$ = function () { - var among_var; - var cursor$0; - this.ket = this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, HungarianStemmer.a_10, 31); - if (among_var === 0) { - return false; - } - this.bra = cursor$0 = this.cursor; - if (! (! (this.I_p1 <= cursor$0) ? false : true)) { - return false; - } - switch (among_var) { - case 0: - return false; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "a")) { - return false; - } - break; - case 3: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "e")) { - return false; - } - break; - case 4: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 5: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "a")) { - return false; - } - break; - case 6: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "e")) { - return false; - } - break; - case 7: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 8: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 9: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 10: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "a")) { - return false; - } - break; - case 11: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "e")) { - return false; - } - break; - case 12: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 13: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 14: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "a")) { - return false; - } - break; - case 15: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "e")) { - return false; - } - break; - case 16: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 17: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 18: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 19: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "a")) { - return false; - } - break; - case 20: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "e")) { - return false; - } - break; - } - return true; -}; - -HungarianStemmer.prototype.r_sing_owner = HungarianStemmer.prototype.r_sing_owner$; - -function HungarianStemmer$r_sing_owner$LHungarianStemmer$($this) { - var among_var; - var cursor$0; - $this.ket = $this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, HungarianStemmer.a_10, 31); - if (among_var === 0) { - return false; - } - $this.bra = cursor$0 = $this.cursor; - if (! (! ($this.I_p1 <= cursor$0) ? false : true)) { - return false; - } - switch (among_var) { - case 0: - return false; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "a")) { - return false; - } - break; - case 3: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "e")) { - return false; - } - break; - case 4: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 5: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "a")) { - return false; - } - break; - case 6: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "e")) { - return false; - } - break; - case 7: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 8: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 9: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 10: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "a")) { - return false; - } - break; - case 11: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "e")) { - return false; - } - break; - case 12: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 13: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 14: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "a")) { - return false; - } - break; - case 15: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "e")) { - return false; - } - break; - case 16: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 17: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 18: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 19: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "a")) { - return false; - } - break; - case 20: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "e")) { - return false; - } - break; - } - return true; -}; - -HungarianStemmer.r_sing_owner$LHungarianStemmer$ = HungarianStemmer$r_sing_owner$LHungarianStemmer$; - -HungarianStemmer.prototype.r_plur_owner$ = function () { - var among_var; - var cursor$0; - this.ket = this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, HungarianStemmer.a_11, 42); - if (among_var === 0) { - return false; - } - this.bra = cursor$0 = this.cursor; - if (! (! (this.I_p1 <= cursor$0) ? false : true)) { - return false; - } - switch (among_var) { - case 0: - return false; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "a")) { - return false; - } - break; - case 3: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "e")) { - return false; - } - break; - case 4: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 5: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 6: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 7: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "a")) { - return false; - } - break; - case 8: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "e")) { - return false; - } - break; - case 9: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 10: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 11: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 12: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "a")) { - return false; - } - break; - case 13: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "e")) { - return false; - } - break; - case 14: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 15: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 16: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 17: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 18: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "a")) { - return false; - } - break; - case 19: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "e")) { - return false; - } - break; - case 20: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 21: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 22: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "a")) { - return false; - } - break; - case 23: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "e")) { - return false; - } - break; - case 24: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 25: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 26: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 27: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "a")) { - return false; - } - break; - case 28: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "e")) { - return false; - } - break; - case 29: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - } - return true; -}; - -HungarianStemmer.prototype.r_plur_owner = HungarianStemmer.prototype.r_plur_owner$; - -function HungarianStemmer$r_plur_owner$LHungarianStemmer$($this) { - var among_var; - var cursor$0; - $this.ket = $this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, HungarianStemmer.a_11, 42); - if (among_var === 0) { - return false; - } - $this.bra = cursor$0 = $this.cursor; - if (! (! ($this.I_p1 <= cursor$0) ? false : true)) { - return false; - } - switch (among_var) { - case 0: - return false; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "a")) { - return false; - } - break; - case 3: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "e")) { - return false; - } - break; - case 4: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 5: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 6: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 7: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "a")) { - return false; - } - break; - case 8: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "e")) { - return false; - } - break; - case 9: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 10: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 11: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 12: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "a")) { - return false; - } - break; - case 13: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "e")) { - return false; - } - break; - case 14: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 15: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 16: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 17: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 18: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "a")) { - return false; - } - break; - case 19: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "e")) { - return false; - } - break; - case 20: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 21: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 22: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "a")) { - return false; - } - break; - case 23: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "e")) { - return false; - } - break; - case 24: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 25: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 26: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 27: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "a")) { - return false; - } - break; - case 28: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "e")) { - return false; - } - break; - case 29: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - } - return true; -}; - -HungarianStemmer.r_plur_owner$LHungarianStemmer$ = HungarianStemmer$r_plur_owner$LHungarianStemmer$; - -HungarianStemmer.prototype.stem$ = function () { - var v_1; - var v_2; - var v_3; - var v_4; - var v_5; - var v_6; - var v_7; - var v_8; - var v_9; - var lab0; - var lab1; - var lab2; - var lab3; - var lab4; - var lab5; - var lab6; - var lab7; - var lab8; - var lab9; - var cursor$0; - var limit$0; - var cursor$1; - var limit$1; - var cursor$2; - var limit$2; - var cursor$3; - var limit$3; - var cursor$4; - var limit$4; - var cursor$5; - var limit$5; - var cursor$6; - var limit$6; - var cursor$7; - var limit$7; - var cursor$8; - v_1 = this.cursor; - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - if (! HungarianStemmer$r_mark_regions$LHungarianStemmer$(this)) { - break lab0; - } - } - cursor$0 = this.cursor = v_1; - this.limit_backward = cursor$0; - cursor$1 = this.cursor = limit$0 = this.limit; - v_2 = ((limit$0 - cursor$1) | 0); - lab1 = true; -lab1: - while (lab1 === true) { - lab1 = false; - if (! HungarianStemmer$r_instrum$LHungarianStemmer$(this)) { - break lab1; - } - } - cursor$2 = this.cursor = (((limit$1 = this.limit) - v_2) | 0); - v_3 = ((limit$1 - cursor$2) | 0); - lab2 = true; -lab2: - while (lab2 === true) { - lab2 = false; - if (! HungarianStemmer$r_case$LHungarianStemmer$(this)) { - break lab2; - } - } - cursor$3 = this.cursor = (((limit$2 = this.limit) - v_3) | 0); - v_4 = ((limit$2 - cursor$3) | 0); - lab3 = true; -lab3: - while (lab3 === true) { - lab3 = false; - if (! HungarianStemmer$r_case_special$LHungarianStemmer$(this)) { - break lab3; - } - } - cursor$4 = this.cursor = (((limit$3 = this.limit) - v_4) | 0); - v_5 = ((limit$3 - cursor$4) | 0); - lab4 = true; -lab4: - while (lab4 === true) { - lab4 = false; - if (! HungarianStemmer$r_case_other$LHungarianStemmer$(this)) { - break lab4; - } - } - cursor$5 = this.cursor = (((limit$4 = this.limit) - v_5) | 0); - v_6 = ((limit$4 - cursor$5) | 0); - lab5 = true; -lab5: - while (lab5 === true) { - lab5 = false; - if (! HungarianStemmer$r_factive$LHungarianStemmer$(this)) { - break lab5; - } - } - cursor$6 = this.cursor = (((limit$5 = this.limit) - v_6) | 0); - v_7 = ((limit$5 - cursor$6) | 0); - lab6 = true; -lab6: - while (lab6 === true) { - lab6 = false; - if (! HungarianStemmer$r_owned$LHungarianStemmer$(this)) { - break lab6; - } - } - cursor$7 = this.cursor = (((limit$6 = this.limit) - v_7) | 0); - v_8 = ((limit$6 - cursor$7) | 0); - lab7 = true; -lab7: - while (lab7 === true) { - lab7 = false; - if (! HungarianStemmer$r_sing_owner$LHungarianStemmer$(this)) { - break lab7; - } - } - cursor$8 = this.cursor = (((limit$7 = this.limit) - v_8) | 0); - v_9 = ((limit$7 - cursor$8) | 0); - lab8 = true; -lab8: - while (lab8 === true) { - lab8 = false; - if (! HungarianStemmer$r_plur_owner$LHungarianStemmer$(this)) { - break lab8; - } - } - this.cursor = ((this.limit - v_9) | 0); - lab9 = true; -lab9: - while (lab9 === true) { - lab9 = false; - if (! HungarianStemmer$r_plural$LHungarianStemmer$(this)) { - break lab9; - } - } - this.cursor = this.limit_backward; - return true; -}; - -HungarianStemmer.prototype.stem = HungarianStemmer.prototype.stem$; - -HungarianStemmer.prototype.equals$X = function (o) { - return o instanceof HungarianStemmer; -}; - -HungarianStemmer.prototype.equals = HungarianStemmer.prototype.equals$X; - -function HungarianStemmer$equals$LHungarianStemmer$X($this, o) { - return o instanceof HungarianStemmer; -}; - -HungarianStemmer.equals$LHungarianStemmer$X = HungarianStemmer$equals$LHungarianStemmer$X; - -HungarianStemmer.prototype.hashCode$ = function () { - var classname; - var hash; - var i; - var char; - classname = "HungarianStemmer"; - hash = 0; - for (i = 0; i < classname.length; i++) { - char = classname.charCodeAt(i); - hash = (hash << 5) - hash + char; - hash = hash & hash; - } - return (hash | 0); -}; - -HungarianStemmer.prototype.hashCode = HungarianStemmer.prototype.hashCode$; - -function HungarianStemmer$hashCode$LHungarianStemmer$($this) { - var classname; - var hash; - var i; - var char; - classname = "HungarianStemmer"; - hash = 0; - for (i = 0; i < classname.length; i++) { - char = classname.charCodeAt(i); - hash = (hash << 5) - hash + char; - hash = hash & hash; - } - return (hash | 0); -}; - -HungarianStemmer.hashCode$LHungarianStemmer$ = HungarianStemmer$hashCode$LHungarianStemmer$; - -HungarianStemmer.serialVersionUID = 1; -$__jsx_lazy_init(HungarianStemmer, "methodObject", function () { - return new HungarianStemmer(); -}); -$__jsx_lazy_init(HungarianStemmer, "a_0", function () { - return [ new Among("cs", -1, -1), new Among("dzs", -1, -1), new Among("gy", -1, -1), new Among("ly", -1, -1), new Among("ny", -1, -1), new Among("sz", -1, -1), new Among("ty", -1, -1), new Among("zs", -1, -1) ]; -}); -$__jsx_lazy_init(HungarianStemmer, "a_1", function () { - return [ new Among("\u00E1", -1, 1), new Among("\u00E9", -1, 2) ]; -}); -$__jsx_lazy_init(HungarianStemmer, "a_2", function () { - return [ new Among("bb", -1, -1), new Among("cc", -1, -1), new Among("dd", -1, -1), new Among("ff", -1, -1), new Among("gg", -1, -1), new Among("jj", -1, -1), new Among("kk", -1, -1), new Among("ll", -1, -1), new Among("mm", -1, -1), new Among("nn", -1, -1), new Among("pp", -1, -1), new Among("rr", -1, -1), new Among("ccs", -1, -1), new Among("ss", -1, -1), new Among("zzs", -1, -1), new Among("tt", -1, -1), new Among("vv", -1, -1), new Among("ggy", -1, -1), new Among("lly", -1, -1), new Among("nny", -1, -1), new Among("tty", -1, -1), new Among("ssz", -1, -1), new Among("zz", -1, -1) ]; -}); -$__jsx_lazy_init(HungarianStemmer, "a_3", function () { - return [ new Among("al", -1, 1), new Among("el", -1, 2) ]; -}); -$__jsx_lazy_init(HungarianStemmer, "a_4", function () { - return [ new Among("ba", -1, -1), new Among("ra", -1, -1), new Among("be", -1, -1), new Among("re", -1, -1), new Among("ig", -1, -1), new Among("nak", -1, -1), new Among("nek", -1, -1), new Among("val", -1, -1), new Among("vel", -1, -1), new Among("ul", -1, -1), new Among("n\u00E1l", -1, -1), new Among("n\u00E9l", -1, -1), new Among("b\u00F3l", -1, -1), new Among("r\u00F3l", -1, -1), new Among("t\u00F3l", -1, -1), new Among("b\u00F5l", -1, -1), new Among("r\u00F5l", -1, -1), new Among("t\u00F5l", -1, -1), new Among("\u00FCl", -1, -1), new Among("n", -1, -1), new Among("an", 19, -1), new Among("ban", 20, -1), new Among("en", 19, -1), new Among("ben", 22, -1), new Among("k\u00E9ppen", 22, -1), new Among("on", 19, -1), new Among("\u00F6n", 19, -1), new Among("k\u00E9pp", -1, -1), new Among("kor", -1, -1), new Among("t", -1, -1), new Among("at", 29, -1), new Among("et", 29, -1), new Among("k\u00E9nt", 29, -1), new Among("ank\u00E9nt", 32, -1), new Among("enk\u00E9nt", 32, -1), new Among("onk\u00E9nt", 32, -1), new Among("ot", 29, -1), new Among("\u00E9rt", 29, -1), new Among("\u00F6t", 29, -1), new Among("hez", -1, -1), new Among("hoz", -1, -1), new Among("h\u00F6z", -1, -1), new Among("v\u00E1", -1, -1), new Among("v\u00E9", -1, -1) ]; -}); -$__jsx_lazy_init(HungarianStemmer, "a_5", function () { - return [ new Among("\u00E1n", -1, 2), new Among("\u00E9n", -1, 1), new Among("\u00E1nk\u00E9nt", -1, 3) ]; -}); -$__jsx_lazy_init(HungarianStemmer, "a_6", function () { - return [ new Among("stul", -1, 2), new Among("astul", 0, 1), new Among("\u00E1stul", 0, 3), new Among("st\u00FCl", -1, 2), new Among("est\u00FCl", 3, 1), new Among("\u00E9st\u00FCl", 3, 4) ]; -}); -$__jsx_lazy_init(HungarianStemmer, "a_7", function () { - return [ new Among("\u00E1", -1, 1), new Among("\u00E9", -1, 2) ]; -}); -$__jsx_lazy_init(HungarianStemmer, "a_8", function () { - return [ new Among("k", -1, 7), new Among("ak", 0, 4), new Among("ek", 0, 6), new Among("ok", 0, 5), new Among("\u00E1k", 0, 1), new Among("\u00E9k", 0, 2), new Among("\u00F6k", 0, 3) ]; -}); -$__jsx_lazy_init(HungarianStemmer, "a_9", function () { - return [ new Among("\u00E9i", -1, 7), new Among("\u00E1\u00E9i", 0, 6), new Among("\u00E9\u00E9i", 0, 5), new Among("\u00E9", -1, 9), new Among("k\u00E9", 3, 4), new Among("ak\u00E9", 4, 1), new Among("ek\u00E9", 4, 1), new Among("ok\u00E9", 4, 1), new Among("\u00E1k\u00E9", 4, 3), new Among("\u00E9k\u00E9", 4, 2), new Among("\u00F6k\u00E9", 4, 1), new Among("\u00E9\u00E9", 3, 8) ]; -}); -$__jsx_lazy_init(HungarianStemmer, "a_10", function () { - return [ new Among("a", -1, 18), new Among("ja", 0, 17), new Among("d", -1, 16), new Among("ad", 2, 13), new Among("ed", 2, 13), new Among("od", 2, 13), new Among("\u00E1d", 2, 14), new Among("\u00E9d", 2, 15), new Among("\u00F6d", 2, 13), new Among("e", -1, 18), new Among("je", 9, 17), new Among("nk", -1, 4), new Among("unk", 11, 1), new Among("\u00E1nk", 11, 2), new Among("\u00E9nk", 11, 3), new Among("\u00FCnk", 11, 1), new Among("uk", -1, 8), new Among("juk", 16, 7), new Among("\u00E1juk", 17, 5), new Among("\u00FCk", -1, 8), new Among("j\u00FCk", 19, 7), new Among("\u00E9j\u00FCk", 20, 6), new Among("m", -1, 12), new Among("am", 22, 9), new Among("em", 22, 9), new Among("om", 22, 9), new Among("\u00E1m", 22, 10), new Among("\u00E9m", 22, 11), new Among("o", -1, 18), new Among("\u00E1", -1, 19), new Among("\u00E9", -1, 20) ]; -}); -$__jsx_lazy_init(HungarianStemmer, "a_11", function () { - return [ new Among("id", -1, 10), new Among("aid", 0, 9), new Among("jaid", 1, 6), new Among("eid", 0, 9), new Among("jeid", 3, 6), new Among("\u00E1id", 0, 7), new Among("\u00E9id", 0, 8), new Among("i", -1, 15), new Among("ai", 7, 14), new Among("jai", 8, 11), new Among("ei", 7, 14), new Among("jei", 10, 11), new Among("\u00E1i", 7, 12), new Among("\u00E9i", 7, 13), new Among("itek", -1, 24), new Among("eitek", 14, 21), new Among("jeitek", 15, 20), new Among("\u00E9itek", 14, 23), new Among("ik", -1, 29), new Among("aik", 18, 26), new Among("jaik", 19, 25), new Among("eik", 18, 26), new Among("jeik", 21, 25), new Among("\u00E1ik", 18, 27), new Among("\u00E9ik", 18, 28), new Among("ink", -1, 20), new Among("aink", 25, 17), new Among("jaink", 26, 16), new Among("eink", 25, 17), new Among("jeink", 28, 16), new Among("\u00E1ink", 25, 18), new Among("\u00E9ink", 25, 19), new Among("aitok", -1, 21), new Among("jaitok", 32, 20), new Among("\u00E1itok", -1, 22), new Among("im", -1, 5), new Among("aim", 35, 4), new Among("jaim", 36, 1), new Among("eim", 35, 4), new Among("jeim", 38, 1), new Among("\u00E1im", 35, 2), new Among("\u00E9im", 35, 3) ]; -}); -HungarianStemmer.g_v = [ 17, 65, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 17, 52, 14 ]; - -var $__jsx_classMap = { - "src/among.jsx": { - Among: Among, - Among$SII: Among, - Among$SIIF$LBaseStemmer$B$LBaseStemmer$: Among$0 - }, - "src/stemmer.jsx": { - Stemmer: Stemmer, - Stemmer$: Stemmer - }, - "src/base-stemmer.jsx": { - BaseStemmer: BaseStemmer, - BaseStemmer$: BaseStemmer - }, - "src/hungarian-stemmer.jsx": { - HungarianStemmer: HungarianStemmer, - HungarianStemmer$: HungarianStemmer - } -}; - - -})(JSX); - -var Among = JSX.require("src/among.jsx").Among; -var Among$SII = JSX.require("src/among.jsx").Among$SII; -var Stemmer = JSX.require("src/stemmer.jsx").Stemmer; -var BaseStemmer = JSX.require("src/base-stemmer.jsx").BaseStemmer; -var HungarianStemmer = JSX.require("src/hungarian-stemmer.jsx").HungarianStemmer; diff --git a/sphinx/search/non-minified-js/italian-stemmer.js b/sphinx/search/non-minified-js/italian-stemmer.js index 52daef58f8c..df6ddfd332a 100644 --- a/sphinx/search/non-minified-js/italian-stemmer.js +++ b/sphinx/search/non-minified-js/italian-stemmer.js @@ -1,2978 +1,996 @@ -// generatedy by JSX compiler 0.9.89 (2014-05-20 06:01:03 +0900; 8e8c6105f36f3dfe440ea026a3c93a3444977102) -var JSX = {}; -(function (JSX) { -/** - * extends the class - */ -function $__jsx_extend(derivations, base) { - var ctor = function () {}; - ctor.prototype = base.prototype; - var proto = new ctor(); - for (var i in derivations) { - derivations[i].prototype = proto; - } -} - -/** - * copies the implementations from source interface to target - */ -function $__jsx_merge_interface(target, source) { - for (var k in source.prototype) - if (source.prototype.hasOwnProperty(k)) - target.prototype[k] = source.prototype[k]; -} - -/** - * defers the initialization of the property - */ -function $__jsx_lazy_init(obj, prop, func) { - function reset(obj, prop, value) { - delete obj[prop]; - obj[prop] = value; - return value; - } - - Object.defineProperty(obj, prop, { - get: function () { - return reset(obj, prop, func()); - }, - set: function (v) { - reset(obj, prop, v); - }, - enumerable: true, - configurable: true - }); -} - -var $__jsx_imul = Math.imul; -if (typeof $__jsx_imul === "undefined") { - $__jsx_imul = function (a, b) { - var ah = (a >>> 16) & 0xffff; - var al = a & 0xffff; - var bh = (b >>> 16) & 0xffff; - var bl = b & 0xffff; - return ((al * bl) + (((ah * bl + al * bh) << 16) >>> 0)|0); - }; -} - -/** - * fused int-ops with side-effects - */ -function $__jsx_ipadd(o, p, r) { - return o[p] = (o[p] + r) | 0; -} -function $__jsx_ipsub(o, p, r) { - return o[p] = (o[p] - r) | 0; -} -function $__jsx_ipmul(o, p, r) { - return o[p] = $__jsx_imul(o[p], r); -} -function $__jsx_ipdiv(o, p, r) { - return o[p] = (o[p] / r) | 0; -} -function $__jsx_ipmod(o, p, r) { - return o[p] = (o[p] % r) | 0; -} -function $__jsx_ippostinc(o, p) { - var v = o[p]; - o[p] = (v + 1) | 0; - return v; -} -function $__jsx_ippostdec(o, p) { - var v = o[p]; - o[p] = (v - 1) | 0; - return v; -} - -/** - * non-inlined version of Array#each - */ -function $__jsx_forEach(o, f) { - var l = o.length; - for (var i = 0; i < l; ++i) - f(o[i]); -} - -/* - * global functions, renamed to avoid conflict with local variable names - */ -var $__jsx_parseInt = parseInt; -var $__jsx_parseFloat = parseFloat; -function $__jsx_isNaN(n) { return n !== n; } -var $__jsx_isFinite = isFinite; - -var $__jsx_encodeURIComponent = encodeURIComponent; -var $__jsx_decodeURIComponent = decodeURIComponent; -var $__jsx_encodeURI = encodeURI; -var $__jsx_decodeURI = decodeURI; - -var $__jsx_ObjectToString = Object.prototype.toString; -var $__jsx_ObjectHasOwnProperty = Object.prototype.hasOwnProperty; - -/* - * profiler object, initialized afterwards - */ -function $__jsx_profiler() { -} - -/* - * public interface to JSX code - */ -JSX.require = function (path) { - var m = $__jsx_classMap[path]; - return m !== undefined ? m : null; -}; - -JSX.profilerIsRunning = function () { - return $__jsx_profiler.getResults != null; -}; - -JSX.getProfileResults = function () { - return ($__jsx_profiler.getResults || function () { return {}; })(); -}; - -JSX.postProfileResults = function (url, cb) { - if ($__jsx_profiler.postResults == null) - throw new Error("profiler has not been turned on"); - return $__jsx_profiler.postResults(url, cb); -}; - -JSX.resetProfileResults = function () { - if ($__jsx_profiler.resetResults == null) - throw new Error("profiler has not been turned on"); - return $__jsx_profiler.resetResults(); -}; -JSX.DEBUG = false; -var GeneratorFunction$0 = -(function () { - try { - return Function('import {GeneratorFunction} from "std:iteration"; return GeneratorFunction')(); - } catch (e) { - return function GeneratorFunction () {}; - } -})(); -var __jsx_generator_object$0 = -(function () { - function __jsx_generator_object() { - this.__next = 0; - this.__loop = null; - this.__seed = null; - this.__value = undefined; - this.__status = 0; // SUSPENDED: 0, ACTIVE: 1, DEAD: 2 - } - - __jsx_generator_object.prototype.next = function (seed) { - switch (this.__status) { - case 0: - this.__status = 1; - this.__seed = seed; - - // go next! - this.__loop(this.__next); - - var done = false; - if (this.__next != -1) { - this.__status = 0; - } else { - this.__status = 2; - done = true; - } - return { value: this.__value, done: done }; - case 1: - throw new Error("Generator is already running"); - case 2: - throw new Error("Generator is already finished"); - default: - throw new Error("Unexpected generator internal state"); - } - }; - - return __jsx_generator_object; -}()); -function Among(s, substring_i, result) { - this.s_size = s.length; - this.s = s; - this.substring_i = substring_i; - this.result = result; - this.method = null; - this.instance = null; -}; - -function Among$0(s, substring_i, result, method, instance) { - this.s_size = s.length; - this.s = s; - this.substring_i = substring_i; - this.result = result; - this.method = method; - this.instance = instance; -}; - -$__jsx_extend([Among, Among$0], Object); -function Stemmer() { -}; - -$__jsx_extend([Stemmer], Object); -function BaseStemmer() { - var current$0; - var cursor$0; - var limit$0; - this.cache = ({ }); - current$0 = this.current = ""; - cursor$0 = this.cursor = 0; - limit$0 = this.limit = current$0.length; - this.limit_backward = 0; - this.bra = cursor$0; - this.ket = limit$0; -}; - -$__jsx_extend([BaseStemmer], Stemmer); -BaseStemmer.prototype.setCurrent$S = function (value) { - var current$0; - var cursor$0; - var limit$0; - current$0 = this.current = value; - cursor$0 = this.cursor = 0; - limit$0 = this.limit = current$0.length; - this.limit_backward = 0; - this.bra = cursor$0; - this.ket = limit$0; -}; - - -function BaseStemmer$setCurrent$LBaseStemmer$S($this, value) { - var current$0; - var cursor$0; - var limit$0; - current$0 = $this.current = value; - cursor$0 = $this.cursor = 0; - limit$0 = $this.limit = current$0.length; - $this.limit_backward = 0; - $this.bra = cursor$0; - $this.ket = limit$0; -}; - -BaseStemmer.setCurrent$LBaseStemmer$S = BaseStemmer$setCurrent$LBaseStemmer$S; - -BaseStemmer.prototype.getCurrent$ = function () { - return this.current; -}; - - -function BaseStemmer$getCurrent$LBaseStemmer$($this) { - return $this.current; -}; - -BaseStemmer.getCurrent$LBaseStemmer$ = BaseStemmer$getCurrent$LBaseStemmer$; - -BaseStemmer.prototype.copy_from$LBaseStemmer$ = function (other) { - this.current = other.current; - this.cursor = other.cursor; - this.limit = other.limit; - this.limit_backward = other.limit_backward; - this.bra = other.bra; - this.ket = other.ket; -}; - - -function BaseStemmer$copy_from$LBaseStemmer$LBaseStemmer$($this, other) { - $this.current = other.current; - $this.cursor = other.cursor; - $this.limit = other.limit; - $this.limit_backward = other.limit_backward; - $this.bra = other.bra; - $this.ket = other.ket; -}; - -BaseStemmer.copy_from$LBaseStemmer$LBaseStemmer$ = BaseStemmer$copy_from$LBaseStemmer$LBaseStemmer$; - -BaseStemmer.prototype.in_grouping$AIII = function (s, min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor >= this.limit) { - return false; - } - ch = this.current.charCodeAt(this.cursor); - if (ch > max || ch < min) { - return false; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$in_grouping$LBaseStemmer$AIII($this, s, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor >= $this.limit) { - return false; - } - ch = $this.current.charCodeAt($this.cursor); - if (ch > max || ch < min) { - return false; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.in_grouping$LBaseStemmer$AIII = BaseStemmer$in_grouping$LBaseStemmer$AIII; - -BaseStemmer.prototype.in_grouping_b$AIII = function (s, min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor <= this.limit_backward) { - return false; - } - ch = this.current.charCodeAt(this.cursor - 1); - if (ch > max || ch < min) { - return false; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$in_grouping_b$LBaseStemmer$AIII($this, s, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor <= $this.limit_backward) { - return false; - } - ch = $this.current.charCodeAt($this.cursor - 1); - if (ch > max || ch < min) { - return false; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.in_grouping_b$LBaseStemmer$AIII = BaseStemmer$in_grouping_b$LBaseStemmer$AIII; - -BaseStemmer.prototype.out_grouping$AIII = function (s, min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor >= this.limit) { - return false; - } - ch = this.current.charCodeAt(this.cursor); - if (ch > max || ch < min) { - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; - } - ch -= min; - if ((s[ch >>> 3] & 0X1 << (ch & 0x7)) === 0) { - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; - } - return false; -}; - - -function BaseStemmer$out_grouping$LBaseStemmer$AIII($this, s, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor >= $this.limit) { - return false; - } - ch = $this.current.charCodeAt($this.cursor); - if (ch > max || ch < min) { - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; - } - ch -= min; - if ((s[ch >>> 3] & 0X1 << (ch & 0x7)) === 0) { - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; - } - return false; -}; - -BaseStemmer.out_grouping$LBaseStemmer$AIII = BaseStemmer$out_grouping$LBaseStemmer$AIII; - -BaseStemmer.prototype.out_grouping_b$AIII = function (s, min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor <= this.limit_backward) { - return false; - } - ch = this.current.charCodeAt(this.cursor - 1); - if (ch > max || ch < min) { - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; - } - return false; +// Generated by Snowball 2.1.0 - https://snowballstem.org/ + +/**@constructor*/ +ItalianStemmer = function() { + var base = new BaseStemmer(); + /** @const */ var a_0 = [ + ["", -1, 7], + ["qu", 0, 6], + ["\u00E1", 0, 1], + ["\u00E9", 0, 2], + ["\u00ED", 0, 3], + ["\u00F3", 0, 4], + ["\u00FA", 0, 5] + ]; + + /** @const */ var a_1 = [ + ["", -1, 3], + ["I", 0, 1], + ["U", 0, 2] + ]; + + /** @const */ var a_2 = [ + ["la", -1, -1], + ["cela", 0, -1], + ["gliela", 0, -1], + ["mela", 0, -1], + ["tela", 0, -1], + ["vela", 0, -1], + ["le", -1, -1], + ["cele", 6, -1], + ["gliele", 6, -1], + ["mele", 6, -1], + ["tele", 6, -1], + ["vele", 6, -1], + ["ne", -1, -1], + ["cene", 12, -1], + ["gliene", 12, -1], + ["mene", 12, -1], + ["sene", 12, -1], + ["tene", 12, -1], + ["vene", 12, -1], + ["ci", -1, -1], + ["li", -1, -1], + ["celi", 20, -1], + ["glieli", 20, -1], + ["meli", 20, -1], + ["teli", 20, -1], + ["veli", 20, -1], + ["gli", 20, -1], + ["mi", -1, -1], + ["si", -1, -1], + ["ti", -1, -1], + ["vi", -1, -1], + ["lo", -1, -1], + ["celo", 31, -1], + ["glielo", 31, -1], + ["melo", 31, -1], + ["telo", 31, -1], + ["velo", 31, -1] + ]; + + /** @const */ var a_3 = [ + ["ando", -1, 1], + ["endo", -1, 1], + ["ar", -1, 2], + ["er", -1, 2], + ["ir", -1, 2] + ]; + + /** @const */ var a_4 = [ + ["ic", -1, -1], + ["abil", -1, -1], + ["os", -1, -1], + ["iv", -1, 1] + ]; + + /** @const */ var a_5 = [ + ["ic", -1, 1], + ["abil", -1, 1], + ["iv", -1, 1] + ]; + + /** @const */ var a_6 = [ + ["ica", -1, 1], + ["logia", -1, 3], + ["osa", -1, 1], + ["ista", -1, 1], + ["iva", -1, 9], + ["anza", -1, 1], + ["enza", -1, 5], + ["ice", -1, 1], + ["atrice", 7, 1], + ["iche", -1, 1], + ["logie", -1, 3], + ["abile", -1, 1], + ["ibile", -1, 1], + ["usione", -1, 4], + ["azione", -1, 2], + ["uzione", -1, 4], + ["atore", -1, 2], + ["ose", -1, 1], + ["ante", -1, 1], + ["mente", -1, 1], + ["amente", 19, 7], + ["iste", -1, 1], + ["ive", -1, 9], + ["anze", -1, 1], + ["enze", -1, 5], + ["ici", -1, 1], + ["atrici", 25, 1], + ["ichi", -1, 1], + ["abili", -1, 1], + ["ibili", -1, 1], + ["ismi", -1, 1], + ["usioni", -1, 4], + ["azioni", -1, 2], + ["uzioni", -1, 4], + ["atori", -1, 2], + ["osi", -1, 1], + ["anti", -1, 1], + ["amenti", -1, 6], + ["imenti", -1, 6], + ["isti", -1, 1], + ["ivi", -1, 9], + ["ico", -1, 1], + ["ismo", -1, 1], + ["oso", -1, 1], + ["amento", -1, 6], + ["imento", -1, 6], + ["ivo", -1, 9], + ["it\u00E0", -1, 8], + ["ist\u00E0", -1, 1], + ["ist\u00E8", -1, 1], + ["ist\u00EC", -1, 1] + ]; + + /** @const */ var a_7 = [ + ["isca", -1, 1], + ["enda", -1, 1], + ["ata", -1, 1], + ["ita", -1, 1], + ["uta", -1, 1], + ["ava", -1, 1], + ["eva", -1, 1], + ["iva", -1, 1], + ["erebbe", -1, 1], + ["irebbe", -1, 1], + ["isce", -1, 1], + ["ende", -1, 1], + ["are", -1, 1], + ["ere", -1, 1], + ["ire", -1, 1], + ["asse", -1, 1], + ["ate", -1, 1], + ["avate", 16, 1], + ["evate", 16, 1], + ["ivate", 16, 1], + ["ete", -1, 1], + ["erete", 20, 1], + ["irete", 20, 1], + ["ite", -1, 1], + ["ereste", -1, 1], + ["ireste", -1, 1], + ["ute", -1, 1], + ["erai", -1, 1], + ["irai", -1, 1], + ["isci", -1, 1], + ["endi", -1, 1], + ["erei", -1, 1], + ["irei", -1, 1], + ["assi", -1, 1], + ["ati", -1, 1], + ["iti", -1, 1], + ["eresti", -1, 1], + ["iresti", -1, 1], + ["uti", -1, 1], + ["avi", -1, 1], + ["evi", -1, 1], + ["ivi", -1, 1], + ["isco", -1, 1], + ["ando", -1, 1], + ["endo", -1, 1], + ["Yamo", -1, 1], + ["iamo", -1, 1], + ["avamo", -1, 1], + ["evamo", -1, 1], + ["ivamo", -1, 1], + ["eremo", -1, 1], + ["iremo", -1, 1], + ["assimo", -1, 1], + ["ammo", -1, 1], + ["emmo", -1, 1], + ["eremmo", 54, 1], + ["iremmo", 54, 1], + ["immo", -1, 1], + ["ano", -1, 1], + ["iscano", 58, 1], + ["avano", 58, 1], + ["evano", 58, 1], + ["ivano", 58, 1], + ["eranno", -1, 1], + ["iranno", -1, 1], + ["ono", -1, 1], + ["iscono", 65, 1], + ["arono", 65, 1], + ["erono", 65, 1], + ["irono", 65, 1], + ["erebbero", -1, 1], + ["irebbero", -1, 1], + ["assero", -1, 1], + ["essero", -1, 1], + ["issero", -1, 1], + ["ato", -1, 1], + ["ito", -1, 1], + ["uto", -1, 1], + ["avo", -1, 1], + ["evo", -1, 1], + ["ivo", -1, 1], + ["ar", -1, 1], + ["ir", -1, 1], + ["er\u00E0", -1, 1], + ["ir\u00E0", -1, 1], + ["er\u00F2", -1, 1], + ["ir\u00F2", -1, 1] + ]; + + /** @const */ var /** Array */ g_v = [17, 65, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 8, 2, 1]; + + /** @const */ var /** Array */ g_AEIO = [17, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 8, 2]; + + /** @const */ var /** Array */ g_CG = [17]; + + var /** number */ I_p2 = 0; + var /** number */ I_p1 = 0; + var /** number */ I_pV = 0; + + + /** @return {boolean} */ + function r_prelude() { + var /** number */ among_var; + var /** number */ v_1 = base.cursor; + while(true) + { + var /** number */ v_2 = base.cursor; + lab0: { + base.bra = base.cursor; + among_var = base.find_among(a_0); + if (among_var == 0) + { + break lab0; + } + base.ket = base.cursor; + switch (among_var) { + case 1: + if (!base.slice_from("\u00E0")) + { + return false; + } + break; + case 2: + if (!base.slice_from("\u00E8")) + { + return false; + } + break; + case 3: + if (!base.slice_from("\u00EC")) + { + return false; + } + break; + case 4: + if (!base.slice_from("\u00F2")) + { + return false; + } + break; + case 5: + if (!base.slice_from("\u00F9")) + { + return false; + } + break; + case 6: + if (!base.slice_from("qU")) + { + return false; + } + break; + case 7: + if (base.cursor >= base.limit) + { + break lab0; + } + base.cursor++; + break; + } + continue; + } + base.cursor = v_2; + break; + } + base.cursor = v_1; + while(true) + { + var /** number */ v_3 = base.cursor; + lab1: { + golab2: while(true) + { + var /** number */ v_4 = base.cursor; + lab3: { + if (!(base.in_grouping(g_v, 97, 249))) + { + break lab3; + } + base.bra = base.cursor; + lab4: { + var /** number */ v_5 = base.cursor; + lab5: { + if (!(base.eq_s("u"))) + { + break lab5; + } + base.ket = base.cursor; + if (!(base.in_grouping(g_v, 97, 249))) + { + break lab5; + } + if (!base.slice_from("U")) + { + return false; + } + break lab4; + } + base.cursor = v_5; + if (!(base.eq_s("i"))) + { + break lab3; + } + base.ket = base.cursor; + if (!(base.in_grouping(g_v, 97, 249))) + { + break lab3; + } + if (!base.slice_from("I")) + { + return false; + } + } + base.cursor = v_4; + break golab2; + } + base.cursor = v_4; + if (base.cursor >= base.limit) + { + break lab1; + } + base.cursor++; + } + continue; + } + base.cursor = v_3; + break; + } + return true; + }; + + /** @return {boolean} */ + function r_mark_regions() { + I_pV = base.limit; + I_p1 = base.limit; + I_p2 = base.limit; + var /** number */ v_1 = base.cursor; + lab0: { + lab1: { + var /** number */ v_2 = base.cursor; + lab2: { + if (!(base.in_grouping(g_v, 97, 249))) + { + break lab2; + } + lab3: { + var /** number */ v_3 = base.cursor; + lab4: { + if (!(base.out_grouping(g_v, 97, 249))) + { + break lab4; + } + golab5: while(true) + { + lab6: { + if (!(base.in_grouping(g_v, 97, 249))) + { + break lab6; + } + break golab5; + } + if (base.cursor >= base.limit) + { + break lab4; + } + base.cursor++; + } + break lab3; + } + base.cursor = v_3; + if (!(base.in_grouping(g_v, 97, 249))) + { + break lab2; + } + golab7: while(true) + { + lab8: { + if (!(base.out_grouping(g_v, 97, 249))) + { + break lab8; + } + break golab7; + } + if (base.cursor >= base.limit) + { + break lab2; + } + base.cursor++; + } + } + break lab1; + } + base.cursor = v_2; + if (!(base.out_grouping(g_v, 97, 249))) + { + break lab0; + } + lab9: { + var /** number */ v_6 = base.cursor; + lab10: { + if (!(base.out_grouping(g_v, 97, 249))) + { + break lab10; + } + golab11: while(true) + { + lab12: { + if (!(base.in_grouping(g_v, 97, 249))) + { + break lab12; + } + break golab11; + } + if (base.cursor >= base.limit) + { + break lab10; + } + base.cursor++; + } + break lab9; + } + base.cursor = v_6; + if (!(base.in_grouping(g_v, 97, 249))) + { + break lab0; + } + if (base.cursor >= base.limit) + { + break lab0; + } + base.cursor++; + } + } + I_pV = base.cursor; + } + base.cursor = v_1; + var /** number */ v_8 = base.cursor; + lab13: { + golab14: while(true) + { + lab15: { + if (!(base.in_grouping(g_v, 97, 249))) + { + break lab15; + } + break golab14; + } + if (base.cursor >= base.limit) + { + break lab13; + } + base.cursor++; + } + golab16: while(true) + { + lab17: { + if (!(base.out_grouping(g_v, 97, 249))) + { + break lab17; + } + break golab16; + } + if (base.cursor >= base.limit) + { + break lab13; + } + base.cursor++; + } + I_p1 = base.cursor; + golab18: while(true) + { + lab19: { + if (!(base.in_grouping(g_v, 97, 249))) + { + break lab19; + } + break golab18; + } + if (base.cursor >= base.limit) + { + break lab13; + } + base.cursor++; + } + golab20: while(true) + { + lab21: { + if (!(base.out_grouping(g_v, 97, 249))) + { + break lab21; + } + break golab20; + } + if (base.cursor >= base.limit) + { + break lab13; + } + base.cursor++; + } + I_p2 = base.cursor; + } + base.cursor = v_8; + return true; + }; + + /** @return {boolean} */ + function r_postlude() { + var /** number */ among_var; + while(true) + { + var /** number */ v_1 = base.cursor; + lab0: { + base.bra = base.cursor; + among_var = base.find_among(a_1); + if (among_var == 0) + { + break lab0; + } + base.ket = base.cursor; + switch (among_var) { + case 1: + if (!base.slice_from("i")) + { + return false; + } + break; + case 2: + if (!base.slice_from("u")) + { + return false; + } + break; + case 3: + if (base.cursor >= base.limit) + { + break lab0; + } + base.cursor++; + break; + } + continue; + } + base.cursor = v_1; + break; + } + return true; + }; + + /** @return {boolean} */ + function r_RV() { + if (!(I_pV <= base.cursor)) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_R1() { + if (!(I_p1 <= base.cursor)) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_R2() { + if (!(I_p2 <= base.cursor)) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_attached_pronoun() { + var /** number */ among_var; + base.ket = base.cursor; + if (base.find_among_b(a_2) == 0) + { + return false; + } + base.bra = base.cursor; + among_var = base.find_among_b(a_3); + if (among_var == 0) + { + return false; + } + if (!r_RV()) + { + return false; + } + switch (among_var) { + case 1: + if (!base.slice_del()) + { + return false; + } + break; + case 2: + if (!base.slice_from("e")) + { + return false; + } + break; + } + return true; + }; + + /** @return {boolean} */ + function r_standard_suffix() { + var /** number */ among_var; + base.ket = base.cursor; + among_var = base.find_among_b(a_6); + if (among_var == 0) + { + return false; + } + base.bra = base.cursor; + switch (among_var) { + case 1: + if (!r_R2()) + { + return false; + } + if (!base.slice_del()) + { + return false; + } + break; + case 2: + if (!r_R2()) + { + return false; + } + if (!base.slice_del()) + { + return false; + } + var /** number */ v_1 = base.limit - base.cursor; + lab0: { + base.ket = base.cursor; + if (!(base.eq_s_b("ic"))) + { + base.cursor = base.limit - v_1; + break lab0; + } + base.bra = base.cursor; + if (!r_R2()) + { + base.cursor = base.limit - v_1; + break lab0; + } + if (!base.slice_del()) + { + return false; + } + } + break; + case 3: + if (!r_R2()) + { + return false; + } + if (!base.slice_from("log")) + { + return false; + } + break; + case 4: + if (!r_R2()) + { + return false; + } + if (!base.slice_from("u")) + { + return false; + } + break; + case 5: + if (!r_R2()) + { + return false; + } + if (!base.slice_from("ente")) + { + return false; + } + break; + case 6: + if (!r_RV()) + { + return false; + } + if (!base.slice_del()) + { + return false; + } + break; + case 7: + if (!r_R1()) + { + return false; + } + if (!base.slice_del()) + { + return false; + } + var /** number */ v_2 = base.limit - base.cursor; + lab1: { + base.ket = base.cursor; + among_var = base.find_among_b(a_4); + if (among_var == 0) + { + base.cursor = base.limit - v_2; + break lab1; + } + base.bra = base.cursor; + if (!r_R2()) + { + base.cursor = base.limit - v_2; + break lab1; + } + if (!base.slice_del()) + { + return false; + } + switch (among_var) { + case 1: + base.ket = base.cursor; + if (!(base.eq_s_b("at"))) + { + base.cursor = base.limit - v_2; + break lab1; + } + base.bra = base.cursor; + if (!r_R2()) + { + base.cursor = base.limit - v_2; + break lab1; + } + if (!base.slice_del()) + { + return false; + } + break; + } + } + break; + case 8: + if (!r_R2()) + { + return false; + } + if (!base.slice_del()) + { + return false; + } + var /** number */ v_3 = base.limit - base.cursor; + lab2: { + base.ket = base.cursor; + if (base.find_among_b(a_5) == 0) + { + base.cursor = base.limit - v_3; + break lab2; + } + base.bra = base.cursor; + if (!r_R2()) + { + base.cursor = base.limit - v_3; + break lab2; + } + if (!base.slice_del()) + { + return false; + } + } + break; + case 9: + if (!r_R2()) + { + return false; + } + if (!base.slice_del()) + { + return false; + } + var /** number */ v_4 = base.limit - base.cursor; + lab3: { + base.ket = base.cursor; + if (!(base.eq_s_b("at"))) + { + base.cursor = base.limit - v_4; + break lab3; + } + base.bra = base.cursor; + if (!r_R2()) + { + base.cursor = base.limit - v_4; + break lab3; + } + if (!base.slice_del()) + { + return false; + } + base.ket = base.cursor; + if (!(base.eq_s_b("ic"))) + { + base.cursor = base.limit - v_4; + break lab3; + } + base.bra = base.cursor; + if (!r_R2()) + { + base.cursor = base.limit - v_4; + break lab3; + } + if (!base.slice_del()) + { + return false; + } + } + break; + } + return true; + }; + + /** @return {boolean} */ + function r_verb_suffix() { + if (base.cursor < I_pV) + { + return false; + } + var /** number */ v_2 = base.limit_backward; + base.limit_backward = I_pV; + base.ket = base.cursor; + if (base.find_among_b(a_7) == 0) + { + base.limit_backward = v_2; + return false; + } + base.bra = base.cursor; + if (!base.slice_del()) + { + return false; + } + base.limit_backward = v_2; + return true; + }; + + /** @return {boolean} */ + function r_vowel_suffix() { + var /** number */ v_1 = base.limit - base.cursor; + lab0: { + base.ket = base.cursor; + if (!(base.in_grouping_b(g_AEIO, 97, 242))) + { + base.cursor = base.limit - v_1; + break lab0; + } + base.bra = base.cursor; + if (!r_RV()) + { + base.cursor = base.limit - v_1; + break lab0; + } + if (!base.slice_del()) + { + return false; + } + base.ket = base.cursor; + if (!(base.eq_s_b("i"))) + { + base.cursor = base.limit - v_1; + break lab0; + } + base.bra = base.cursor; + if (!r_RV()) + { + base.cursor = base.limit - v_1; + break lab0; + } + if (!base.slice_del()) + { + return false; + } + } + var /** number */ v_2 = base.limit - base.cursor; + lab1: { + base.ket = base.cursor; + if (!(base.eq_s_b("h"))) + { + base.cursor = base.limit - v_2; + break lab1; + } + base.bra = base.cursor; + if (!(base.in_grouping_b(g_CG, 99, 103))) + { + base.cursor = base.limit - v_2; + break lab1; + } + if (!r_RV()) + { + base.cursor = base.limit - v_2; + break lab1; + } + if (!base.slice_del()) + { + return false; + } + } + return true; + }; + + this.stem = /** @return {boolean} */ function() { + var /** number */ v_1 = base.cursor; + r_prelude(); + base.cursor = v_1; + r_mark_regions(); + base.limit_backward = base.cursor; base.cursor = base.limit; + var /** number */ v_3 = base.limit - base.cursor; + r_attached_pronoun(); + base.cursor = base.limit - v_3; + var /** number */ v_4 = base.limit - base.cursor; + lab0: { + lab1: { + var /** number */ v_5 = base.limit - base.cursor; + lab2: { + if (!r_standard_suffix()) + { + break lab2; + } + break lab1; + } + base.cursor = base.limit - v_5; + if (!r_verb_suffix()) + { + break lab0; + } + } + } + base.cursor = base.limit - v_4; + var /** number */ v_6 = base.limit - base.cursor; + r_vowel_suffix(); + base.cursor = base.limit - v_6; + base.cursor = base.limit_backward; + var /** number */ v_7 = base.cursor; + r_postlude(); + base.cursor = v_7; + return true; + }; + + /**@return{string}*/ + this['stemWord'] = function(/**string*/word) { + base.setCurrent(word); + this.stem(); + return base.getCurrent(); + }; }; - - -function BaseStemmer$out_grouping_b$LBaseStemmer$AIII($this, s, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor <= $this.limit_backward) { - return false; - } - ch = $this.current.charCodeAt($this.cursor - 1); - if (ch > max || ch < min) { - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; - } - return false; -}; - -BaseStemmer.out_grouping_b$LBaseStemmer$AIII = BaseStemmer$out_grouping_b$LBaseStemmer$AIII; - -BaseStemmer.prototype.in_range$II = function (min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor >= this.limit) { - return false; - } - ch = this.current.charCodeAt(this.cursor); - if (ch > max || ch < min) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$in_range$LBaseStemmer$II($this, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor >= $this.limit) { - return false; - } - ch = $this.current.charCodeAt($this.cursor); - if (ch > max || ch < min) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.in_range$LBaseStemmer$II = BaseStemmer$in_range$LBaseStemmer$II; - -BaseStemmer.prototype.in_range_b$II = function (min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor <= this.limit_backward) { - return false; - } - ch = this.current.charCodeAt(this.cursor - 1); - if (ch > max || ch < min) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$in_range_b$LBaseStemmer$II($this, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor <= $this.limit_backward) { - return false; - } - ch = $this.current.charCodeAt($this.cursor - 1); - if (ch > max || ch < min) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.in_range_b$LBaseStemmer$II = BaseStemmer$in_range_b$LBaseStemmer$II; - -BaseStemmer.prototype.out_range$II = function (min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor >= this.limit) { - return false; - } - ch = this.current.charCodeAt(this.cursor); - if (! (ch > max || ch < min)) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$out_range$LBaseStemmer$II($this, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor >= $this.limit) { - return false; - } - ch = $this.current.charCodeAt($this.cursor); - if (! (ch > max || ch < min)) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.out_range$LBaseStemmer$II = BaseStemmer$out_range$LBaseStemmer$II; - -BaseStemmer.prototype.out_range_b$II = function (min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor <= this.limit_backward) { - return false; - } - ch = this.current.charCodeAt(this.cursor - 1); - if (! (ch > max || ch < min)) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$out_range_b$LBaseStemmer$II($this, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor <= $this.limit_backward) { - return false; - } - ch = $this.current.charCodeAt($this.cursor - 1); - if (! (ch > max || ch < min)) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.out_range_b$LBaseStemmer$II = BaseStemmer$out_range_b$LBaseStemmer$II; - -BaseStemmer.prototype.eq_s$IS = function (s_size, s) { - var cursor$0; - if (((this.limit - this.cursor) | 0) < s_size) { - return false; - } - if (this.current.slice(cursor$0 = this.cursor, ((cursor$0 + s_size) | 0)) !== s) { - return false; - } - this.cursor = (this.cursor + s_size) | 0; - return true; -}; - - -function BaseStemmer$eq_s$LBaseStemmer$IS($this, s_size, s) { - var cursor$0; - if ((($this.limit - $this.cursor) | 0) < s_size) { - return false; - } - if ($this.current.slice(cursor$0 = $this.cursor, ((cursor$0 + s_size) | 0)) !== s) { - return false; - } - $this.cursor = ($this.cursor + s_size) | 0; - return true; -}; - -BaseStemmer.eq_s$LBaseStemmer$IS = BaseStemmer$eq_s$LBaseStemmer$IS; - -BaseStemmer.prototype.eq_s_b$IS = function (s_size, s) { - var cursor$0; - if (((this.cursor - this.limit_backward) | 0) < s_size) { - return false; - } - if (this.current.slice((((cursor$0 = this.cursor) - s_size) | 0), cursor$0) !== s) { - return false; - } - this.cursor = (this.cursor - s_size) | 0; - return true; -}; - - -function BaseStemmer$eq_s_b$LBaseStemmer$IS($this, s_size, s) { - var cursor$0; - if ((($this.cursor - $this.limit_backward) | 0) < s_size) { - return false; - } - if ($this.current.slice((((cursor$0 = $this.cursor) - s_size) | 0), cursor$0) !== s) { - return false; - } - $this.cursor = ($this.cursor - s_size) | 0; - return true; -}; - -BaseStemmer.eq_s_b$LBaseStemmer$IS = BaseStemmer$eq_s_b$LBaseStemmer$IS; - -BaseStemmer.prototype.eq_v$S = function (s) { - return BaseStemmer$eq_s$LBaseStemmer$IS(this, s.length, s); -}; - - -function BaseStemmer$eq_v$LBaseStemmer$S($this, s) { - return BaseStemmer$eq_s$LBaseStemmer$IS($this, s.length, s); -}; - -BaseStemmer.eq_v$LBaseStemmer$S = BaseStemmer$eq_v$LBaseStemmer$S; - -BaseStemmer.prototype.eq_v_b$S = function (s) { - return BaseStemmer$eq_s_b$LBaseStemmer$IS(this, s.length, s); -}; - - -function BaseStemmer$eq_v_b$LBaseStemmer$S($this, s) { - return BaseStemmer$eq_s_b$LBaseStemmer$IS($this, s.length, s); -}; - -BaseStemmer.eq_v_b$LBaseStemmer$S = BaseStemmer$eq_v_b$LBaseStemmer$S; - -BaseStemmer.prototype.find_among$ALAmong$I = function (v, v_size) { - var i; - var j; - var c; - var l; - var common_i; - var common_j; - var first_key_inspected; - var k; - var diff; - var common; - var w; - var i2; - var res; - i = 0; - j = v_size; - c = this.cursor; - l = this.limit; - common_i = 0; - common_j = 0; - first_key_inspected = false; - while (true) { - k = i + (j - i >>> 1); - diff = 0; - common = (common_i < common_j ? common_i : common_j); - w = v[k]; - for (i2 = common; i2 < w.s_size; i2++) { - if (c + common === l) { - diff = -1; - break; - } - diff = this.current.charCodeAt(c + common) - w.s.charCodeAt(i2); - if (diff !== 0) { - break; - } - common++; - } - if (diff < 0) { - j = k; - common_j = common; - } else { - i = k; - common_i = common; - } - if (j - i <= 1) { - if (i > 0) { - break; - } - if (j === i) { - break; - } - if (first_key_inspected) { - break; - } - first_key_inspected = true; - } - } - while (true) { - w = v[i]; - if (common_i >= w.s_size) { - this.cursor = (c + w.s_size | 0); - if (w.method == null) { - return w.result; - } - res = w.method(w.instance); - this.cursor = (c + w.s_size | 0); - if (res) { - return w.result; - } - } - i = w.substring_i; - if (i < 0) { - return 0; - } - } - return -1; -}; - - -function BaseStemmer$find_among$LBaseStemmer$ALAmong$I($this, v, v_size) { - var i; - var j; - var c; - var l; - var common_i; - var common_j; - var first_key_inspected; - var k; - var diff; - var common; - var w; - var i2; - var res; - i = 0; - j = v_size; - c = $this.cursor; - l = $this.limit; - common_i = 0; - common_j = 0; - first_key_inspected = false; - while (true) { - k = i + (j - i >>> 1); - diff = 0; - common = (common_i < common_j ? common_i : common_j); - w = v[k]; - for (i2 = common; i2 < w.s_size; i2++) { - if (c + common === l) { - diff = -1; - break; - } - diff = $this.current.charCodeAt(c + common) - w.s.charCodeAt(i2); - if (diff !== 0) { - break; - } - common++; - } - if (diff < 0) { - j = k; - common_j = common; - } else { - i = k; - common_i = common; - } - if (j - i <= 1) { - if (i > 0) { - break; - } - if (j === i) { - break; - } - if (first_key_inspected) { - break; - } - first_key_inspected = true; - } - } - while (true) { - w = v[i]; - if (common_i >= w.s_size) { - $this.cursor = (c + w.s_size | 0); - if (w.method == null) { - return w.result; - } - res = w.method(w.instance); - $this.cursor = (c + w.s_size | 0); - if (res) { - return w.result; - } - } - i = w.substring_i; - if (i < 0) { - return 0; - } - } - return -1; -}; - -BaseStemmer.find_among$LBaseStemmer$ALAmong$I = BaseStemmer$find_among$LBaseStemmer$ALAmong$I; - -BaseStemmer.prototype.find_among_b$ALAmong$I = function (v, v_size) { - var i; - var j; - var c; - var lb; - var common_i; - var common_j; - var first_key_inspected; - var k; - var diff; - var common; - var w; - var i2; - var res; - i = 0; - j = v_size; - c = this.cursor; - lb = this.limit_backward; - common_i = 0; - common_j = 0; - first_key_inspected = false; - while (true) { - k = i + (j - i >> 1); - diff = 0; - common = (common_i < common_j ? common_i : common_j); - w = v[k]; - for (i2 = w.s_size - 1 - common; i2 >= 0; i2--) { - if (c - common === lb) { - diff = -1; - break; - } - diff = this.current.charCodeAt(c - 1 - common) - w.s.charCodeAt(i2); - if (diff !== 0) { - break; - } - common++; - } - if (diff < 0) { - j = k; - common_j = common; - } else { - i = k; - common_i = common; - } - if (j - i <= 1) { - if (i > 0) { - break; - } - if (j === i) { - break; - } - if (first_key_inspected) { - break; - } - first_key_inspected = true; - } - } - while (true) { - w = v[i]; - if (common_i >= w.s_size) { - this.cursor = (c - w.s_size | 0); - if (w.method == null) { - return w.result; - } - res = w.method(this); - this.cursor = (c - w.s_size | 0); - if (res) { - return w.result; - } - } - i = w.substring_i; - if (i < 0) { - return 0; - } - } - return -1; -}; - - -function BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, v, v_size) { - var i; - var j; - var c; - var lb; - var common_i; - var common_j; - var first_key_inspected; - var k; - var diff; - var common; - var w; - var i2; - var res; - i = 0; - j = v_size; - c = $this.cursor; - lb = $this.limit_backward; - common_i = 0; - common_j = 0; - first_key_inspected = false; - while (true) { - k = i + (j - i >> 1); - diff = 0; - common = (common_i < common_j ? common_i : common_j); - w = v[k]; - for (i2 = w.s_size - 1 - common; i2 >= 0; i2--) { - if (c - common === lb) { - diff = -1; - break; - } - diff = $this.current.charCodeAt(c - 1 - common) - w.s.charCodeAt(i2); - if (diff !== 0) { - break; - } - common++; - } - if (diff < 0) { - j = k; - common_j = common; - } else { - i = k; - common_i = common; - } - if (j - i <= 1) { - if (i > 0) { - break; - } - if (j === i) { - break; - } - if (first_key_inspected) { - break; - } - first_key_inspected = true; - } - } - while (true) { - w = v[i]; - if (common_i >= w.s_size) { - $this.cursor = (c - w.s_size | 0); - if (w.method == null) { - return w.result; - } - res = w.method($this); - $this.cursor = (c - w.s_size | 0); - if (res) { - return w.result; - } - } - i = w.substring_i; - if (i < 0) { - return 0; - } - } - return -1; -}; - -BaseStemmer.find_among_b$LBaseStemmer$ALAmong$I = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I; - -BaseStemmer.prototype.replace_s$IIS = function (c_bra, c_ket, s) { - var adjustment; - adjustment = ((s.length - (((c_ket - c_bra) | 0))) | 0); - this.current = this.current.slice(0, c_bra) + s + this.current.slice(c_ket); - this.limit = (this.limit + adjustment) | 0; - if (this.cursor >= c_ket) { - this.cursor = (this.cursor + adjustment) | 0; - } else if (this.cursor > c_bra) { - this.cursor = c_bra; - } - return (adjustment | 0); -}; - - -function BaseStemmer$replace_s$LBaseStemmer$IIS($this, c_bra, c_ket, s) { - var adjustment; - adjustment = ((s.length - (((c_ket - c_bra) | 0))) | 0); - $this.current = $this.current.slice(0, c_bra) + s + $this.current.slice(c_ket); - $this.limit = ($this.limit + adjustment) | 0; - if ($this.cursor >= c_ket) { - $this.cursor = ($this.cursor + adjustment) | 0; - } else if ($this.cursor > c_bra) { - $this.cursor = c_bra; - } - return (adjustment | 0); -}; - -BaseStemmer.replace_s$LBaseStemmer$IIS = BaseStemmer$replace_s$LBaseStemmer$IIS; - -BaseStemmer.prototype.slice_check$ = function () { - var bra$0; - var ket$0; - var limit$0; - return ((bra$0 = this.bra) < 0 || bra$0 > (ket$0 = this.ket) || ket$0 > (limit$0 = this.limit) || limit$0 > this.current.length ? false : true); -}; - - -function BaseStemmer$slice_check$LBaseStemmer$($this) { - var bra$0; - var ket$0; - var limit$0; - return ((bra$0 = $this.bra) < 0 || bra$0 > (ket$0 = $this.ket) || ket$0 > (limit$0 = $this.limit) || limit$0 > $this.current.length ? false : true); -}; - -BaseStemmer.slice_check$LBaseStemmer$ = BaseStemmer$slice_check$LBaseStemmer$; - -BaseStemmer.prototype.slice_from$S = function (s) { - var result; - var bra$0; - var ket$0; - var limit$0; - result = false; - if ((bra$0 = this.bra) < 0 || bra$0 > (ket$0 = this.ket) || ket$0 > (limit$0 = this.limit) || limit$0 > this.current.length ? false : true) { - BaseStemmer$replace_s$LBaseStemmer$IIS(this, this.bra, this.ket, s); - result = true; - } - return result; -}; - - -function BaseStemmer$slice_from$LBaseStemmer$S($this, s) { - var result; - var bra$0; - var ket$0; - var limit$0; - result = false; - if ((bra$0 = $this.bra) < 0 || bra$0 > (ket$0 = $this.ket) || ket$0 > (limit$0 = $this.limit) || limit$0 > $this.current.length ? false : true) { - BaseStemmer$replace_s$LBaseStemmer$IIS($this, $this.bra, $this.ket, s); - result = true; - } - return result; -}; - -BaseStemmer.slice_from$LBaseStemmer$S = BaseStemmer$slice_from$LBaseStemmer$S; - -BaseStemmer.prototype.slice_del$ = function () { - return BaseStemmer$slice_from$LBaseStemmer$S(this, ""); -}; - - -function BaseStemmer$slice_del$LBaseStemmer$($this) { - return BaseStemmer$slice_from$LBaseStemmer$S($this, ""); -}; - -BaseStemmer.slice_del$LBaseStemmer$ = BaseStemmer$slice_del$LBaseStemmer$; - -BaseStemmer.prototype.insert$IIS = function (c_bra, c_ket, s) { - var adjustment; - adjustment = BaseStemmer$replace_s$LBaseStemmer$IIS(this, c_bra, c_ket, s); - if (c_bra <= this.bra) { - this.bra = (this.bra + adjustment) | 0; - } - if (c_bra <= this.ket) { - this.ket = (this.ket + adjustment) | 0; - } -}; - - -function BaseStemmer$insert$LBaseStemmer$IIS($this, c_bra, c_ket, s) { - var adjustment; - adjustment = BaseStemmer$replace_s$LBaseStemmer$IIS($this, c_bra, c_ket, s); - if (c_bra <= $this.bra) { - $this.bra = ($this.bra + adjustment) | 0; - } - if (c_bra <= $this.ket) { - $this.ket = ($this.ket + adjustment) | 0; - } -}; - -BaseStemmer.insert$LBaseStemmer$IIS = BaseStemmer$insert$LBaseStemmer$IIS; - -BaseStemmer.prototype.slice_to$S = function (s) { - var result; - var bra$0; - var ket$0; - var limit$0; - result = ''; - if ((bra$0 = this.bra) < 0 || bra$0 > (ket$0 = this.ket) || ket$0 > (limit$0 = this.limit) || limit$0 > this.current.length ? false : true) { - result = this.current.slice(this.bra, this.ket); - } - return result; -}; - - -function BaseStemmer$slice_to$LBaseStemmer$S($this, s) { - var result; - var bra$0; - var ket$0; - var limit$0; - result = ''; - if ((bra$0 = $this.bra) < 0 || bra$0 > (ket$0 = $this.ket) || ket$0 > (limit$0 = $this.limit) || limit$0 > $this.current.length ? false : true) { - result = $this.current.slice($this.bra, $this.ket); - } - return result; -}; - -BaseStemmer.slice_to$LBaseStemmer$S = BaseStemmer$slice_to$LBaseStemmer$S; - -BaseStemmer.prototype.assign_to$S = function (s) { - return this.current.slice(0, this.limit); -}; - - -function BaseStemmer$assign_to$LBaseStemmer$S($this, s) { - return $this.current.slice(0, $this.limit); -}; - -BaseStemmer.assign_to$LBaseStemmer$S = BaseStemmer$assign_to$LBaseStemmer$S; - -BaseStemmer.prototype.stem$ = function () { - return false; -}; - - -BaseStemmer.prototype.stemWord$S = function (word) { - var result; - var current$0; - var cursor$0; - var limit$0; - result = this.cache['.' + word]; - if (result == null) { - current$0 = this.current = word; - cursor$0 = this.cursor = 0; - limit$0 = this.limit = current$0.length; - this.limit_backward = 0; - this.bra = cursor$0; - this.ket = limit$0; - this.stem$(); - result = this.current; - this.cache['.' + word] = result; - } - return result; -}; - -BaseStemmer.prototype.stemWord = BaseStemmer.prototype.stemWord$S; - -BaseStemmer.prototype.stemWords$AS = function (words) { - var results; - var i; - var word; - var result; - var current$0; - var cursor$0; - var limit$0; - results = [ ]; - for (i = 0; i < words.length; i++) { - word = words[i]; - result = this.cache['.' + word]; - if (result == null) { - current$0 = this.current = word; - cursor$0 = this.cursor = 0; - limit$0 = this.limit = current$0.length; - this.limit_backward = 0; - this.bra = cursor$0; - this.ket = limit$0; - this.stem$(); - result = this.current; - this.cache['.' + word] = result; - } - results.push(result); - } - return results; -}; - -BaseStemmer.prototype.stemWords = BaseStemmer.prototype.stemWords$AS; - -function ItalianStemmer() { - BaseStemmer.call(this); - this.I_p2 = 0; - this.I_p1 = 0; - this.I_pV = 0; -}; - -$__jsx_extend([ItalianStemmer], BaseStemmer); -ItalianStemmer.prototype.copy_from$LItalianStemmer$ = function (other) { - this.I_p2 = other.I_p2; - this.I_p1 = other.I_p1; - this.I_pV = other.I_pV; - BaseStemmer$copy_from$LBaseStemmer$LBaseStemmer$(this, other); -}; - -ItalianStemmer.prototype.copy_from = ItalianStemmer.prototype.copy_from$LItalianStemmer$; - -ItalianStemmer.prototype.r_prelude$ = function () { - var among_var; - var v_1; - var v_2; - var v_3; - var v_4; - var v_5; - var lab1; - var lab3; - var lab5; - var lab6; - var lab7; - var cursor$0; - var $__jsx_postinc_t; - v_1 = this.cursor; -replab0: - while (true) { - v_2 = this.cursor; - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - this.bra = this.cursor; - among_var = BaseStemmer$find_among$LBaseStemmer$ALAmong$I(this, ItalianStemmer.a_0, 7); - if (among_var === 0) { - break lab1; - } - this.ket = this.cursor; - switch (among_var) { - case 0: - break lab1; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "\u00E0")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "\u00E8")) { - return false; - } - break; - case 3: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "\u00EC")) { - return false; - } - break; - case 4: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "\u00F2")) { - return false; - } - break; - case 5: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "\u00F9")) { - return false; - } - break; - case 6: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "qU")) { - return false; - } - break; - case 7: - if (this.cursor >= this.limit) { - break lab1; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - break; - } - continue replab0; - } - this.cursor = v_2; - break replab0; - } - this.cursor = v_1; -replab2: - while (true) { - v_3 = this.cursor; - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - golab4: - while (true) { - v_4 = this.cursor; - lab5 = true; - lab5: - while (lab5 === true) { - lab5 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, ItalianStemmer.g_v, 97, 249)) { - break lab5; - } - this.bra = this.cursor; - lab6 = true; - lab6: - while (lab6 === true) { - lab6 = false; - v_5 = this.cursor; - lab7 = true; - lab7: - while (lab7 === true) { - lab7 = false; - if (! BaseStemmer$eq_s$LBaseStemmer$IS(this, 1, "u")) { - break lab7; - } - this.ket = this.cursor; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, ItalianStemmer.g_v, 97, 249)) { - break lab7; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "U")) { - return false; - } - break lab6; - } - this.cursor = v_5; - if (! BaseStemmer$eq_s$LBaseStemmer$IS(this, 1, "i")) { - break lab5; - } - this.ket = this.cursor; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, ItalianStemmer.g_v, 97, 249)) { - break lab5; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "I")) { - return false; - } - } - this.cursor = v_4; - break golab4; - } - cursor$0 = this.cursor = v_4; - if (cursor$0 >= this.limit) { - break lab3; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - continue replab2; - } - this.cursor = v_3; - break replab2; - } - return true; -}; - -ItalianStemmer.prototype.r_prelude = ItalianStemmer.prototype.r_prelude$; - -function ItalianStemmer$r_prelude$LItalianStemmer$($this) { - var among_var; - var v_1; - var v_2; - var v_3; - var v_4; - var v_5; - var lab1; - var lab3; - var lab5; - var lab6; - var lab7; - var cursor$0; - var $__jsx_postinc_t; - v_1 = $this.cursor; -replab0: - while (true) { - v_2 = $this.cursor; - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - $this.bra = $this.cursor; - among_var = BaseStemmer$find_among$LBaseStemmer$ALAmong$I($this, ItalianStemmer.a_0, 7); - if (among_var === 0) { - break lab1; - } - $this.ket = $this.cursor; - switch (among_var) { - case 0: - break lab1; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "\u00E0")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "\u00E8")) { - return false; - } - break; - case 3: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "\u00EC")) { - return false; - } - break; - case 4: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "\u00F2")) { - return false; - } - break; - case 5: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "\u00F9")) { - return false; - } - break; - case 6: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "qU")) { - return false; - } - break; - case 7: - if ($this.cursor >= $this.limit) { - break lab1; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - break; - } - continue replab0; - } - $this.cursor = v_2; - break replab0; - } - $this.cursor = v_1; -replab2: - while (true) { - v_3 = $this.cursor; - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - golab4: - while (true) { - v_4 = $this.cursor; - lab5 = true; - lab5: - while (lab5 === true) { - lab5 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII($this, ItalianStemmer.g_v, 97, 249)) { - break lab5; - } - $this.bra = $this.cursor; - lab6 = true; - lab6: - while (lab6 === true) { - lab6 = false; - v_5 = $this.cursor; - lab7 = true; - lab7: - while (lab7 === true) { - lab7 = false; - if (! BaseStemmer$eq_s$LBaseStemmer$IS($this, 1, "u")) { - break lab7; - } - $this.ket = $this.cursor; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII($this, ItalianStemmer.g_v, 97, 249)) { - break lab7; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "U")) { - return false; - } - break lab6; - } - $this.cursor = v_5; - if (! BaseStemmer$eq_s$LBaseStemmer$IS($this, 1, "i")) { - break lab5; - } - $this.ket = $this.cursor; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII($this, ItalianStemmer.g_v, 97, 249)) { - break lab5; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "I")) { - return false; - } - } - $this.cursor = v_4; - break golab4; - } - cursor$0 = $this.cursor = v_4; - if (cursor$0 >= $this.limit) { - break lab3; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - continue replab2; - } - $this.cursor = v_3; - break replab2; - } - return true; -}; - -ItalianStemmer.r_prelude$LItalianStemmer$ = ItalianStemmer$r_prelude$LItalianStemmer$; - -ItalianStemmer.prototype.r_mark_regions$ = function () { - var v_1; - var v_2; - var v_3; - var v_6; - var v_8; - var lab0; - var lab1; - var lab2; - var lab3; - var lab4; - var lab6; - var lab8; - var lab9; - var lab10; - var lab12; - var lab13; - var lab15; - var lab17; - var lab19; - var lab21; - var limit$0; - var cursor$0; - var $__jsx_postinc_t; - this.I_pV = limit$0 = this.limit; - this.I_p1 = limit$0; - this.I_p2 = limit$0; - v_1 = this.cursor; - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - v_2 = this.cursor; - lab2 = true; - lab2: - while (lab2 === true) { - lab2 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, ItalianStemmer.g_v, 97, 249)) { - break lab2; - } - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - v_3 = this.cursor; - lab4 = true; - lab4: - while (lab4 === true) { - lab4 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII(this, ItalianStemmer.g_v, 97, 249)) { - break lab4; - } - golab5: - while (true) { - lab6 = true; - lab6: - while (lab6 === true) { - lab6 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, ItalianStemmer.g_v, 97, 249)) { - break lab6; - } - break golab5; - } - if (this.cursor >= this.limit) { - break lab4; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - break lab3; - } - this.cursor = v_3; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, ItalianStemmer.g_v, 97, 249)) { - break lab2; - } - golab7: - while (true) { - lab8 = true; - lab8: - while (lab8 === true) { - lab8 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII(this, ItalianStemmer.g_v, 97, 249)) { - break lab8; - } - break golab7; - } - if (this.cursor >= this.limit) { - break lab2; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - } - break lab1; - } - this.cursor = v_2; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII(this, ItalianStemmer.g_v, 97, 249)) { - break lab0; - } - lab9 = true; - lab9: - while (lab9 === true) { - lab9 = false; - v_6 = this.cursor; - lab10 = true; - lab10: - while (lab10 === true) { - lab10 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII(this, ItalianStemmer.g_v, 97, 249)) { - break lab10; - } - golab11: - while (true) { - lab12 = true; - lab12: - while (lab12 === true) { - lab12 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, ItalianStemmer.g_v, 97, 249)) { - break lab12; - } - break golab11; - } - if (this.cursor >= this.limit) { - break lab10; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - break lab9; - } - this.cursor = v_6; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, ItalianStemmer.g_v, 97, 249)) { - break lab0; - } - if (this.cursor >= this.limit) { - break lab0; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - } - this.I_pV = this.cursor; - } - cursor$0 = this.cursor = v_1; - v_8 = cursor$0; - lab13 = true; -lab13: - while (lab13 === true) { - lab13 = false; - golab14: - while (true) { - lab15 = true; - lab15: - while (lab15 === true) { - lab15 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, ItalianStemmer.g_v, 97, 249)) { - break lab15; - } - break golab14; - } - if (this.cursor >= this.limit) { - break lab13; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - golab16: - while (true) { - lab17 = true; - lab17: - while (lab17 === true) { - lab17 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII(this, ItalianStemmer.g_v, 97, 249)) { - break lab17; - } - break golab16; - } - if (this.cursor >= this.limit) { - break lab13; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - this.I_p1 = this.cursor; - golab18: - while (true) { - lab19 = true; - lab19: - while (lab19 === true) { - lab19 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, ItalianStemmer.g_v, 97, 249)) { - break lab19; - } - break golab18; - } - if (this.cursor >= this.limit) { - break lab13; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - golab20: - while (true) { - lab21 = true; - lab21: - while (lab21 === true) { - lab21 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII(this, ItalianStemmer.g_v, 97, 249)) { - break lab21; - } - break golab20; - } - if (this.cursor >= this.limit) { - break lab13; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - this.I_p2 = this.cursor; - } - this.cursor = v_8; - return true; -}; - -ItalianStemmer.prototype.r_mark_regions = ItalianStemmer.prototype.r_mark_regions$; - -function ItalianStemmer$r_mark_regions$LItalianStemmer$($this) { - var v_1; - var v_2; - var v_3; - var v_6; - var v_8; - var lab0; - var lab1; - var lab2; - var lab3; - var lab4; - var lab6; - var lab8; - var lab9; - var lab10; - var lab12; - var lab13; - var lab15; - var lab17; - var lab19; - var lab21; - var limit$0; - var cursor$0; - var $__jsx_postinc_t; - $this.I_pV = limit$0 = $this.limit; - $this.I_p1 = limit$0; - $this.I_p2 = limit$0; - v_1 = $this.cursor; - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - v_2 = $this.cursor; - lab2 = true; - lab2: - while (lab2 === true) { - lab2 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII($this, ItalianStemmer.g_v, 97, 249)) { - break lab2; - } - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - v_3 = $this.cursor; - lab4 = true; - lab4: - while (lab4 === true) { - lab4 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII($this, ItalianStemmer.g_v, 97, 249)) { - break lab4; - } - golab5: - while (true) { - lab6 = true; - lab6: - while (lab6 === true) { - lab6 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII($this, ItalianStemmer.g_v, 97, 249)) { - break lab6; - } - break golab5; - } - if ($this.cursor >= $this.limit) { - break lab4; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - break lab3; - } - $this.cursor = v_3; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII($this, ItalianStemmer.g_v, 97, 249)) { - break lab2; - } - golab7: - while (true) { - lab8 = true; - lab8: - while (lab8 === true) { - lab8 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII($this, ItalianStemmer.g_v, 97, 249)) { - break lab8; - } - break golab7; - } - if ($this.cursor >= $this.limit) { - break lab2; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - } - break lab1; - } - $this.cursor = v_2; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII($this, ItalianStemmer.g_v, 97, 249)) { - break lab0; - } - lab9 = true; - lab9: - while (lab9 === true) { - lab9 = false; - v_6 = $this.cursor; - lab10 = true; - lab10: - while (lab10 === true) { - lab10 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII($this, ItalianStemmer.g_v, 97, 249)) { - break lab10; - } - golab11: - while (true) { - lab12 = true; - lab12: - while (lab12 === true) { - lab12 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII($this, ItalianStemmer.g_v, 97, 249)) { - break lab12; - } - break golab11; - } - if ($this.cursor >= $this.limit) { - break lab10; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - break lab9; - } - $this.cursor = v_6; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII($this, ItalianStemmer.g_v, 97, 249)) { - break lab0; - } - if ($this.cursor >= $this.limit) { - break lab0; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - } - $this.I_pV = $this.cursor; - } - cursor$0 = $this.cursor = v_1; - v_8 = cursor$0; - lab13 = true; -lab13: - while (lab13 === true) { - lab13 = false; - golab14: - while (true) { - lab15 = true; - lab15: - while (lab15 === true) { - lab15 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII($this, ItalianStemmer.g_v, 97, 249)) { - break lab15; - } - break golab14; - } - if ($this.cursor >= $this.limit) { - break lab13; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - golab16: - while (true) { - lab17 = true; - lab17: - while (lab17 === true) { - lab17 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII($this, ItalianStemmer.g_v, 97, 249)) { - break lab17; - } - break golab16; - } - if ($this.cursor >= $this.limit) { - break lab13; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - $this.I_p1 = $this.cursor; - golab18: - while (true) { - lab19 = true; - lab19: - while (lab19 === true) { - lab19 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII($this, ItalianStemmer.g_v, 97, 249)) { - break lab19; - } - break golab18; - } - if ($this.cursor >= $this.limit) { - break lab13; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - golab20: - while (true) { - lab21 = true; - lab21: - while (lab21 === true) { - lab21 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII($this, ItalianStemmer.g_v, 97, 249)) { - break lab21; - } - break golab20; - } - if ($this.cursor >= $this.limit) { - break lab13; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - $this.I_p2 = $this.cursor; - } - $this.cursor = v_8; - return true; -}; - -ItalianStemmer.r_mark_regions$LItalianStemmer$ = ItalianStemmer$r_mark_regions$LItalianStemmer$; - -ItalianStemmer.prototype.r_postlude$ = function () { - var among_var; - var v_1; - var lab1; - var $__jsx_postinc_t; -replab0: - while (true) { - v_1 = this.cursor; - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - this.bra = this.cursor; - among_var = BaseStemmer$find_among$LBaseStemmer$ALAmong$I(this, ItalianStemmer.a_1, 3); - if (among_var === 0) { - break lab1; - } - this.ket = this.cursor; - switch (among_var) { - case 0: - break lab1; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "i")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "u")) { - return false; - } - break; - case 3: - if (this.cursor >= this.limit) { - break lab1; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - break; - } - continue replab0; - } - this.cursor = v_1; - break replab0; - } - return true; -}; - -ItalianStemmer.prototype.r_postlude = ItalianStemmer.prototype.r_postlude$; - -function ItalianStemmer$r_postlude$LItalianStemmer$($this) { - var among_var; - var v_1; - var lab1; - var $__jsx_postinc_t; -replab0: - while (true) { - v_1 = $this.cursor; - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - $this.bra = $this.cursor; - among_var = BaseStemmer$find_among$LBaseStemmer$ALAmong$I($this, ItalianStemmer.a_1, 3); - if (among_var === 0) { - break lab1; - } - $this.ket = $this.cursor; - switch (among_var) { - case 0: - break lab1; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "i")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "u")) { - return false; - } - break; - case 3: - if ($this.cursor >= $this.limit) { - break lab1; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - break; - } - continue replab0; - } - $this.cursor = v_1; - break replab0; - } - return true; -}; - -ItalianStemmer.r_postlude$LItalianStemmer$ = ItalianStemmer$r_postlude$LItalianStemmer$; - -ItalianStemmer.prototype.r_RV$ = function () { - return (! (this.I_pV <= this.cursor) ? false : true); -}; - -ItalianStemmer.prototype.r_RV = ItalianStemmer.prototype.r_RV$; - -function ItalianStemmer$r_RV$LItalianStemmer$($this) { - return (! ($this.I_pV <= $this.cursor) ? false : true); -}; - -ItalianStemmer.r_RV$LItalianStemmer$ = ItalianStemmer$r_RV$LItalianStemmer$; - -ItalianStemmer.prototype.r_R1$ = function () { - return (! (this.I_p1 <= this.cursor) ? false : true); -}; - -ItalianStemmer.prototype.r_R1 = ItalianStemmer.prototype.r_R1$; - -function ItalianStemmer$r_R1$LItalianStemmer$($this) { - return (! ($this.I_p1 <= $this.cursor) ? false : true); -}; - -ItalianStemmer.r_R1$LItalianStemmer$ = ItalianStemmer$r_R1$LItalianStemmer$; - -ItalianStemmer.prototype.r_R2$ = function () { - return (! (this.I_p2 <= this.cursor) ? false : true); -}; - -ItalianStemmer.prototype.r_R2 = ItalianStemmer.prototype.r_R2$; - -function ItalianStemmer$r_R2$LItalianStemmer$($this) { - return (! ($this.I_p2 <= $this.cursor) ? false : true); -}; - -ItalianStemmer.r_R2$LItalianStemmer$ = ItalianStemmer$r_R2$LItalianStemmer$; - -ItalianStemmer.prototype.r_attached_pronoun$ = function () { - var among_var; - this.ket = this.cursor; - if (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, ItalianStemmer.a_2, 37) === 0) { - return false; - } - this.bra = this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, ItalianStemmer.a_3, 5); - if (among_var === 0) { - return false; - } - if (! (! (this.I_pV <= this.cursor) ? false : true)) { - return false; - } - switch (among_var) { - case 0: - return false; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "e")) { - return false; - } - break; - } - return true; -}; - -ItalianStemmer.prototype.r_attached_pronoun = ItalianStemmer.prototype.r_attached_pronoun$; - -function ItalianStemmer$r_attached_pronoun$LItalianStemmer$($this) { - var among_var; - $this.ket = $this.cursor; - if (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, ItalianStemmer.a_2, 37) === 0) { - return false; - } - $this.bra = $this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, ItalianStemmer.a_3, 5); - if (among_var === 0) { - return false; - } - if (! (! ($this.I_pV <= $this.cursor) ? false : true)) { - return false; - } - switch (among_var) { - case 0: - return false; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "e")) { - return false; - } - break; - } - return true; -}; - -ItalianStemmer.r_attached_pronoun$LItalianStemmer$ = ItalianStemmer$r_attached_pronoun$LItalianStemmer$; - -ItalianStemmer.prototype.r_standard_suffix$ = function () { - var among_var; - var v_1; - var v_2; - var v_3; - var v_4; - var lab0; - var lab1; - var lab2; - var lab3; - var cursor$0; - var cursor$1; - var cursor$2; - var cursor$3; - var cursor$4; - this.ket = this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, ItalianStemmer.a_6, 51); - if (among_var === 0) { - return false; - } - this.bra = this.cursor; - switch (among_var) { - case 0: - return false; - case 1: - if (! (! (this.I_p2 <= this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 2: - if (! (! (this.I_p2 <= this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - v_1 = ((this.limit - this.cursor) | 0); - lab0 = true; - lab0: - while (lab0 === true) { - lab0 = false; - this.ket = this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 2, "ic")) { - this.cursor = ((this.limit - v_1) | 0); - break lab0; - } - this.bra = cursor$0 = this.cursor; - if (! (! (this.I_p2 <= cursor$0) ? false : true)) { - this.cursor = ((this.limit - v_1) | 0); - break lab0; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - } - break; - case 3: - if (! (! (this.I_p2 <= this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "log")) { - return false; - } - break; - case 4: - if (! (! (this.I_p2 <= this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "u")) { - return false; - } - break; - case 5: - if (! (! (this.I_p2 <= this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "ente")) { - return false; - } - break; - case 6: - if (! (! (this.I_pV <= this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 7: - if (! (! (this.I_p1 <= this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - v_2 = ((this.limit - this.cursor) | 0); - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - this.ket = this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, ItalianStemmer.a_4, 4); - if (among_var === 0) { - this.cursor = ((this.limit - v_2) | 0); - break lab1; - } - this.bra = cursor$1 = this.cursor; - if (! (! (this.I_p2 <= cursor$1) ? false : true)) { - this.cursor = ((this.limit - v_2) | 0); - break lab1; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - switch (among_var) { - case 0: - this.cursor = ((this.limit - v_2) | 0); - break lab1; - case 1: - this.ket = this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 2, "at")) { - this.cursor = ((this.limit - v_2) | 0); - break lab1; - } - this.bra = cursor$2 = this.cursor; - if (! (! (this.I_p2 <= cursor$2) ? false : true)) { - this.cursor = ((this.limit - v_2) | 0); - break lab1; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - } - } - break; - case 8: - if (! (! (this.I_p2 <= this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - v_3 = ((this.limit - this.cursor) | 0); - lab2 = true; - lab2: - while (lab2 === true) { - lab2 = false; - this.ket = this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, ItalianStemmer.a_5, 3); - if (among_var === 0) { - this.cursor = ((this.limit - v_3) | 0); - break lab2; - } - this.bra = this.cursor; - switch (among_var) { - case 0: - this.cursor = ((this.limit - v_3) | 0); - break lab2; - case 1: - if (! (! (this.I_p2 <= this.cursor) ? false : true)) { - this.cursor = ((this.limit - v_3) | 0); - break lab2; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - } - } - break; - case 9: - if (! (! (this.I_p2 <= this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - v_4 = ((this.limit - this.cursor) | 0); - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - this.ket = this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 2, "at")) { - this.cursor = ((this.limit - v_4) | 0); - break lab3; - } - this.bra = cursor$3 = this.cursor; - if (! (! (this.I_p2 <= cursor$3) ? false : true)) { - this.cursor = ((this.limit - v_4) | 0); - break lab3; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - this.ket = this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 2, "ic")) { - this.cursor = ((this.limit - v_4) | 0); - break lab3; - } - this.bra = cursor$4 = this.cursor; - if (! (! (this.I_p2 <= cursor$4) ? false : true)) { - this.cursor = ((this.limit - v_4) | 0); - break lab3; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - } - break; - } - return true; -}; - -ItalianStemmer.prototype.r_standard_suffix = ItalianStemmer.prototype.r_standard_suffix$; - -function ItalianStemmer$r_standard_suffix$LItalianStemmer$($this) { - var among_var; - var v_1; - var v_2; - var v_3; - var v_4; - var lab0; - var lab1; - var lab2; - var lab3; - var cursor$0; - var cursor$1; - var cursor$2; - var cursor$3; - var cursor$4; - $this.ket = $this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, ItalianStemmer.a_6, 51); - if (among_var === 0) { - return false; - } - $this.bra = $this.cursor; - switch (among_var) { - case 0: - return false; - case 1: - if (! (! ($this.I_p2 <= $this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 2: - if (! (! ($this.I_p2 <= $this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - v_1 = (($this.limit - $this.cursor) | 0); - lab0 = true; - lab0: - while (lab0 === true) { - lab0 = false; - $this.ket = $this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 2, "ic")) { - $this.cursor = (($this.limit - v_1) | 0); - break lab0; - } - $this.bra = cursor$0 = $this.cursor; - if (! (! ($this.I_p2 <= cursor$0) ? false : true)) { - $this.cursor = (($this.limit - v_1) | 0); - break lab0; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - } - break; - case 3: - if (! (! ($this.I_p2 <= $this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "log")) { - return false; - } - break; - case 4: - if (! (! ($this.I_p2 <= $this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "u")) { - return false; - } - break; - case 5: - if (! (! ($this.I_p2 <= $this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "ente")) { - return false; - } - break; - case 6: - if (! (! ($this.I_pV <= $this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 7: - if (! (! ($this.I_p1 <= $this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - v_2 = (($this.limit - $this.cursor) | 0); - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - $this.ket = $this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, ItalianStemmer.a_4, 4); - if (among_var === 0) { - $this.cursor = (($this.limit - v_2) | 0); - break lab1; - } - $this.bra = cursor$1 = $this.cursor; - if (! (! ($this.I_p2 <= cursor$1) ? false : true)) { - $this.cursor = (($this.limit - v_2) | 0); - break lab1; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - switch (among_var) { - case 0: - $this.cursor = (($this.limit - v_2) | 0); - break lab1; - case 1: - $this.ket = $this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 2, "at")) { - $this.cursor = (($this.limit - v_2) | 0); - break lab1; - } - $this.bra = cursor$2 = $this.cursor; - if (! (! ($this.I_p2 <= cursor$2) ? false : true)) { - $this.cursor = (($this.limit - v_2) | 0); - break lab1; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - } - } - break; - case 8: - if (! (! ($this.I_p2 <= $this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - v_3 = (($this.limit - $this.cursor) | 0); - lab2 = true; - lab2: - while (lab2 === true) { - lab2 = false; - $this.ket = $this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, ItalianStemmer.a_5, 3); - if (among_var === 0) { - $this.cursor = (($this.limit - v_3) | 0); - break lab2; - } - $this.bra = $this.cursor; - switch (among_var) { - case 0: - $this.cursor = (($this.limit - v_3) | 0); - break lab2; - case 1: - if (! (! ($this.I_p2 <= $this.cursor) ? false : true)) { - $this.cursor = (($this.limit - v_3) | 0); - break lab2; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - } - } - break; - case 9: - if (! (! ($this.I_p2 <= $this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - v_4 = (($this.limit - $this.cursor) | 0); - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - $this.ket = $this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 2, "at")) { - $this.cursor = (($this.limit - v_4) | 0); - break lab3; - } - $this.bra = cursor$3 = $this.cursor; - if (! (! ($this.I_p2 <= cursor$3) ? false : true)) { - $this.cursor = (($this.limit - v_4) | 0); - break lab3; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - $this.ket = $this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 2, "ic")) { - $this.cursor = (($this.limit - v_4) | 0); - break lab3; - } - $this.bra = cursor$4 = $this.cursor; - if (! (! ($this.I_p2 <= cursor$4) ? false : true)) { - $this.cursor = (($this.limit - v_4) | 0); - break lab3; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - } - break; - } - return true; -}; - -ItalianStemmer.r_standard_suffix$LItalianStemmer$ = ItalianStemmer$r_standard_suffix$LItalianStemmer$; - -ItalianStemmer.prototype.r_verb_suffix$ = function () { - var among_var; - var v_1; - var v_2; - var cursor$0; - var cursor$1; - var cursor$2; - v_1 = ((this.limit - (cursor$0 = this.cursor)) | 0); - if (cursor$0 < this.I_pV) { - return false; - } - cursor$1 = this.cursor = this.I_pV; - v_2 = this.limit_backward; - this.limit_backward = cursor$1; - cursor$2 = this.cursor = ((this.limit - v_1) | 0); - this.ket = cursor$2; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, ItalianStemmer.a_7, 87); - if (among_var === 0) { - this.limit_backward = v_2; - return false; - } - this.bra = this.cursor; - switch (among_var) { - case 0: - this.limit_backward = v_2; - return false; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - } - this.limit_backward = v_2; - return true; -}; - -ItalianStemmer.prototype.r_verb_suffix = ItalianStemmer.prototype.r_verb_suffix$; - -function ItalianStemmer$r_verb_suffix$LItalianStemmer$($this) { - var among_var; - var v_1; - var v_2; - var cursor$0; - var cursor$1; - var cursor$2; - v_1 = (($this.limit - (cursor$0 = $this.cursor)) | 0); - if (cursor$0 < $this.I_pV) { - return false; - } - cursor$1 = $this.cursor = $this.I_pV; - v_2 = $this.limit_backward; - $this.limit_backward = cursor$1; - cursor$2 = $this.cursor = (($this.limit - v_1) | 0); - $this.ket = cursor$2; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, ItalianStemmer.a_7, 87); - if (among_var === 0) { - $this.limit_backward = v_2; - return false; - } - $this.bra = $this.cursor; - switch (among_var) { - case 0: - $this.limit_backward = v_2; - return false; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - } - $this.limit_backward = v_2; - return true; -}; - -ItalianStemmer.r_verb_suffix$LItalianStemmer$ = ItalianStemmer$r_verb_suffix$LItalianStemmer$; - -ItalianStemmer.prototype.r_vowel_suffix$ = function () { - var v_1; - var v_2; - var lab0; - var lab1; - var cursor$0; - var cursor$1; - v_1 = ((this.limit - this.cursor) | 0); - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - this.ket = this.cursor; - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII(this, ItalianStemmer.g_AEIO, 97, 242)) { - this.cursor = ((this.limit - v_1) | 0); - break lab0; - } - this.bra = cursor$0 = this.cursor; - if (! (! (this.I_pV <= cursor$0) ? false : true)) { - this.cursor = ((this.limit - v_1) | 0); - break lab0; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - this.ket = this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "i")) { - this.cursor = ((this.limit - v_1) | 0); - break lab0; - } - this.bra = cursor$1 = this.cursor; - if (! (! (this.I_pV <= cursor$1) ? false : true)) { - this.cursor = ((this.limit - v_1) | 0); - break lab0; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - } - v_2 = ((this.limit - this.cursor) | 0); - lab1 = true; -lab1: - while (lab1 === true) { - lab1 = false; - this.ket = this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "h")) { - this.cursor = ((this.limit - v_2) | 0); - break lab1; - } - this.bra = this.cursor; - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII(this, ItalianStemmer.g_CG, 99, 103)) { - this.cursor = ((this.limit - v_2) | 0); - break lab1; - } - if (! (! (this.I_pV <= this.cursor) ? false : true)) { - this.cursor = ((this.limit - v_2) | 0); - break lab1; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - } - return true; -}; - -ItalianStemmer.prototype.r_vowel_suffix = ItalianStemmer.prototype.r_vowel_suffix$; - -function ItalianStemmer$r_vowel_suffix$LItalianStemmer$($this) { - var v_1; - var v_2; - var lab0; - var lab1; - var cursor$0; - var cursor$1; - v_1 = (($this.limit - $this.cursor) | 0); - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - $this.ket = $this.cursor; - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII($this, ItalianStemmer.g_AEIO, 97, 242)) { - $this.cursor = (($this.limit - v_1) | 0); - break lab0; - } - $this.bra = cursor$0 = $this.cursor; - if (! (! ($this.I_pV <= cursor$0) ? false : true)) { - $this.cursor = (($this.limit - v_1) | 0); - break lab0; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - $this.ket = $this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "i")) { - $this.cursor = (($this.limit - v_1) | 0); - break lab0; - } - $this.bra = cursor$1 = $this.cursor; - if (! (! ($this.I_pV <= cursor$1) ? false : true)) { - $this.cursor = (($this.limit - v_1) | 0); - break lab0; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - } - v_2 = (($this.limit - $this.cursor) | 0); - lab1 = true; -lab1: - while (lab1 === true) { - lab1 = false; - $this.ket = $this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "h")) { - $this.cursor = (($this.limit - v_2) | 0); - break lab1; - } - $this.bra = $this.cursor; - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII($this, ItalianStemmer.g_CG, 99, 103)) { - $this.cursor = (($this.limit - v_2) | 0); - break lab1; - } - if (! (! ($this.I_pV <= $this.cursor) ? false : true)) { - $this.cursor = (($this.limit - v_2) | 0); - break lab1; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - } - return true; -}; - -ItalianStemmer.r_vowel_suffix$LItalianStemmer$ = ItalianStemmer$r_vowel_suffix$LItalianStemmer$; - -ItalianStemmer.prototype.stem$ = function () { - var v_1; - var v_2; - var v_3; - var v_4; - var v_5; - var v_7; - var lab0; - var lab1; - var lab2; - var lab3; - var lab4; - var lab5; - var lab6; - var lab7; - var cursor$0; - var cursor$1; - var limit$0; - var cursor$2; - var limit$1; - var cursor$3; - var cursor$4; - v_1 = this.cursor; - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - if (! ItalianStemmer$r_prelude$LItalianStemmer$(this)) { - break lab0; - } - } - cursor$0 = this.cursor = v_1; - v_2 = cursor$0; - lab1 = true; -lab1: - while (lab1 === true) { - lab1 = false; - if (! ItalianStemmer$r_mark_regions$LItalianStemmer$(this)) { - break lab1; - } - } - cursor$1 = this.cursor = v_2; - this.limit_backward = cursor$1; - cursor$2 = this.cursor = limit$0 = this.limit; - v_3 = ((limit$0 - cursor$2) | 0); - lab2 = true; -lab2: - while (lab2 === true) { - lab2 = false; - if (! ItalianStemmer$r_attached_pronoun$LItalianStemmer$(this)) { - break lab2; - } - } - cursor$3 = this.cursor = (((limit$1 = this.limit) - v_3) | 0); - v_4 = ((limit$1 - cursor$3) | 0); - lab3 = true; -lab3: - while (lab3 === true) { - lab3 = false; - lab4 = true; - lab4: - while (lab4 === true) { - lab4 = false; - v_5 = ((this.limit - this.cursor) | 0); - lab5 = true; - lab5: - while (lab5 === true) { - lab5 = false; - if (! ItalianStemmer$r_standard_suffix$LItalianStemmer$(this)) { - break lab5; - } - break lab4; - } - this.cursor = ((this.limit - v_5) | 0); - if (! ItalianStemmer$r_verb_suffix$LItalianStemmer$(this)) { - break lab3; - } - } - } - this.cursor = ((this.limit - v_4) | 0); - lab6 = true; -lab6: - while (lab6 === true) { - lab6 = false; - if (! ItalianStemmer$r_vowel_suffix$LItalianStemmer$(this)) { - break lab6; - } - } - cursor$4 = this.cursor = this.limit_backward; - v_7 = cursor$4; - lab7 = true; -lab7: - while (lab7 === true) { - lab7 = false; - if (! ItalianStemmer$r_postlude$LItalianStemmer$(this)) { - break lab7; - } - } - this.cursor = v_7; - return true; -}; - -ItalianStemmer.prototype.stem = ItalianStemmer.prototype.stem$; - -ItalianStemmer.prototype.equals$X = function (o) { - return o instanceof ItalianStemmer; -}; - -ItalianStemmer.prototype.equals = ItalianStemmer.prototype.equals$X; - -function ItalianStemmer$equals$LItalianStemmer$X($this, o) { - return o instanceof ItalianStemmer; -}; - -ItalianStemmer.equals$LItalianStemmer$X = ItalianStemmer$equals$LItalianStemmer$X; - -ItalianStemmer.prototype.hashCode$ = function () { - var classname; - var hash; - var i; - var char; - classname = "ItalianStemmer"; - hash = 0; - for (i = 0; i < classname.length; i++) { - char = classname.charCodeAt(i); - hash = (hash << 5) - hash + char; - hash = hash & hash; - } - return (hash | 0); -}; - -ItalianStemmer.prototype.hashCode = ItalianStemmer.prototype.hashCode$; - -function ItalianStemmer$hashCode$LItalianStemmer$($this) { - var classname; - var hash; - var i; - var char; - classname = "ItalianStemmer"; - hash = 0; - for (i = 0; i < classname.length; i++) { - char = classname.charCodeAt(i); - hash = (hash << 5) - hash + char; - hash = hash & hash; - } - return (hash | 0); -}; - -ItalianStemmer.hashCode$LItalianStemmer$ = ItalianStemmer$hashCode$LItalianStemmer$; - -ItalianStemmer.serialVersionUID = 1; -$__jsx_lazy_init(ItalianStemmer, "methodObject", function () { - return new ItalianStemmer(); -}); -$__jsx_lazy_init(ItalianStemmer, "a_0", function () { - return [ new Among("", -1, 7), new Among("qu", 0, 6), new Among("\u00E1", 0, 1), new Among("\u00E9", 0, 2), new Among("\u00ED", 0, 3), new Among("\u00F3", 0, 4), new Among("\u00FA", 0, 5) ]; -}); -$__jsx_lazy_init(ItalianStemmer, "a_1", function () { - return [ new Among("", -1, 3), new Among("I", 0, 1), new Among("U", 0, 2) ]; -}); -$__jsx_lazy_init(ItalianStemmer, "a_2", function () { - return [ new Among("la", -1, -1), new Among("cela", 0, -1), new Among("gliela", 0, -1), new Among("mela", 0, -1), new Among("tela", 0, -1), new Among("vela", 0, -1), new Among("le", -1, -1), new Among("cele", 6, -1), new Among("gliele", 6, -1), new Among("mele", 6, -1), new Among("tele", 6, -1), new Among("vele", 6, -1), new Among("ne", -1, -1), new Among("cene", 12, -1), new Among("gliene", 12, -1), new Among("mene", 12, -1), new Among("sene", 12, -1), new Among("tene", 12, -1), new Among("vene", 12, -1), new Among("ci", -1, -1), new Among("li", -1, -1), new Among("celi", 20, -1), new Among("glieli", 20, -1), new Among("meli", 20, -1), new Among("teli", 20, -1), new Among("veli", 20, -1), new Among("gli", 20, -1), new Among("mi", -1, -1), new Among("si", -1, -1), new Among("ti", -1, -1), new Among("vi", -1, -1), new Among("lo", -1, -1), new Among("celo", 31, -1), new Among("glielo", 31, -1), new Among("melo", 31, -1), new Among("telo", 31, -1), new Among("velo", 31, -1) ]; -}); -$__jsx_lazy_init(ItalianStemmer, "a_3", function () { - return [ new Among("ando", -1, 1), new Among("endo", -1, 1), new Among("ar", -1, 2), new Among("er", -1, 2), new Among("ir", -1, 2) ]; -}); -$__jsx_lazy_init(ItalianStemmer, "a_4", function () { - return [ new Among("ic", -1, -1), new Among("abil", -1, -1), new Among("os", -1, -1), new Among("iv", -1, 1) ]; -}); -$__jsx_lazy_init(ItalianStemmer, "a_5", function () { - return [ new Among("ic", -1, 1), new Among("abil", -1, 1), new Among("iv", -1, 1) ]; -}); -$__jsx_lazy_init(ItalianStemmer, "a_6", function () { - return [ new Among("ica", -1, 1), new Among("logia", -1, 3), new Among("osa", -1, 1), new Among("ista", -1, 1), new Among("iva", -1, 9), new Among("anza", -1, 1), new Among("enza", -1, 5), new Among("ice", -1, 1), new Among("atrice", 7, 1), new Among("iche", -1, 1), new Among("logie", -1, 3), new Among("abile", -1, 1), new Among("ibile", -1, 1), new Among("usione", -1, 4), new Among("azione", -1, 2), new Among("uzione", -1, 4), new Among("atore", -1, 2), new Among("ose", -1, 1), new Among("ante", -1, 1), new Among("mente", -1, 1), new Among("amente", 19, 7), new Among("iste", -1, 1), new Among("ive", -1, 9), new Among("anze", -1, 1), new Among("enze", -1, 5), new Among("ici", -1, 1), new Among("atrici", 25, 1), new Among("ichi", -1, 1), new Among("abili", -1, 1), new Among("ibili", -1, 1), new Among("ismi", -1, 1), new Among("usioni", -1, 4), new Among("azioni", -1, 2), new Among("uzioni", -1, 4), new Among("atori", -1, 2), new Among("osi", -1, 1), new Among("anti", -1, 1), new Among("amenti", -1, 6), new Among("imenti", -1, 6), new Among("isti", -1, 1), new Among("ivi", -1, 9), new Among("ico", -1, 1), new Among("ismo", -1, 1), new Among("oso", -1, 1), new Among("amento", -1, 6), new Among("imento", -1, 6), new Among("ivo", -1, 9), new Among("it\u00E0", -1, 8), new Among("ist\u00E0", -1, 1), new Among("ist\u00E8", -1, 1), new Among("ist\u00EC", -1, 1) ]; -}); -$__jsx_lazy_init(ItalianStemmer, "a_7", function () { - return [ new Among("isca", -1, 1), new Among("enda", -1, 1), new Among("ata", -1, 1), new Among("ita", -1, 1), new Among("uta", -1, 1), new Among("ava", -1, 1), new Among("eva", -1, 1), new Among("iva", -1, 1), new Among("erebbe", -1, 1), new Among("irebbe", -1, 1), new Among("isce", -1, 1), new Among("ende", -1, 1), new Among("are", -1, 1), new Among("ere", -1, 1), new Among("ire", -1, 1), new Among("asse", -1, 1), new Among("ate", -1, 1), new Among("avate", 16, 1), new Among("evate", 16, 1), new Among("ivate", 16, 1), new Among("ete", -1, 1), new Among("erete", 20, 1), new Among("irete", 20, 1), new Among("ite", -1, 1), new Among("ereste", -1, 1), new Among("ireste", -1, 1), new Among("ute", -1, 1), new Among("erai", -1, 1), new Among("irai", -1, 1), new Among("isci", -1, 1), new Among("endi", -1, 1), new Among("erei", -1, 1), new Among("irei", -1, 1), new Among("assi", -1, 1), new Among("ati", -1, 1), new Among("iti", -1, 1), new Among("eresti", -1, 1), new Among("iresti", -1, 1), new Among("uti", -1, 1), new Among("avi", -1, 1), new Among("evi", -1, 1), new Among("ivi", -1, 1), new Among("isco", -1, 1), new Among("ando", -1, 1), new Among("endo", -1, 1), new Among("Yamo", -1, 1), new Among("iamo", -1, 1), new Among("avamo", -1, 1), new Among("evamo", -1, 1), new Among("ivamo", -1, 1), new Among("eremo", -1, 1), new Among("iremo", -1, 1), new Among("assimo", -1, 1), new Among("ammo", -1, 1), new Among("emmo", -1, 1), new Among("eremmo", 54, 1), new Among("iremmo", 54, 1), new Among("immo", -1, 1), new Among("ano", -1, 1), new Among("iscano", 58, 1), new Among("avano", 58, 1), new Among("evano", 58, 1), new Among("ivano", 58, 1), new Among("eranno", -1, 1), new Among("iranno", -1, 1), new Among("ono", -1, 1), new Among("iscono", 65, 1), new Among("arono", 65, 1), new Among("erono", 65, 1), new Among("irono", 65, 1), new Among("erebbero", -1, 1), new Among("irebbero", -1, 1), new Among("assero", -1, 1), new Among("essero", -1, 1), new Among("issero", -1, 1), new Among("ato", -1, 1), new Among("ito", -1, 1), new Among("uto", -1, 1), new Among("avo", -1, 1), new Among("evo", -1, 1), new Among("ivo", -1, 1), new Among("ar", -1, 1), new Among("ir", -1, 1), new Among("er\u00E0", -1, 1), new Among("ir\u00E0", -1, 1), new Among("er\u00F2", -1, 1), new Among("ir\u00F2", -1, 1) ]; -}); -ItalianStemmer.g_v = [ 17, 65, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 8, 2, 1 ]; -ItalianStemmer.g_AEIO = [ 17, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 8, 2 ]; -ItalianStemmer.g_CG = [ 17 ]; - -var $__jsx_classMap = { - "src/among.jsx": { - Among: Among, - Among$SII: Among, - Among$SIIF$LBaseStemmer$B$LBaseStemmer$: Among$0 - }, - "src/stemmer.jsx": { - Stemmer: Stemmer, - Stemmer$: Stemmer - }, - "src/base-stemmer.jsx": { - BaseStemmer: BaseStemmer, - BaseStemmer$: BaseStemmer - }, - "src/italian-stemmer.jsx": { - ItalianStemmer: ItalianStemmer, - ItalianStemmer$: ItalianStemmer - } -}; - - -})(JSX); - -var Among = JSX.require("src/among.jsx").Among; -var Among$SII = JSX.require("src/among.jsx").Among$SII; -var Stemmer = JSX.require("src/stemmer.jsx").Stemmer; -var BaseStemmer = JSX.require("src/base-stemmer.jsx").BaseStemmer; -var ItalianStemmer = JSX.require("src/italian-stemmer.jsx").ItalianStemmer; diff --git a/sphinx/search/non-minified-js/norwegian-stemmer.js b/sphinx/search/non-minified-js/norwegian-stemmer.js index 5c6eba182bb..e1760631ab9 100644 --- a/sphinx/search/non-minified-js/norwegian-stemmer.js +++ b/sphinx/search/non-minified-js/norwegian-stemmer.js @@ -1,1771 +1,261 @@ -// generatedy by JSX compiler 0.9.89 (2014-05-20 06:01:03 +0900; 8e8c6105f36f3dfe440ea026a3c93a3444977102) -var JSX = {}; -(function (JSX) { -/** - * extends the class - */ -function $__jsx_extend(derivations, base) { - var ctor = function () {}; - ctor.prototype = base.prototype; - var proto = new ctor(); - for (var i in derivations) { - derivations[i].prototype = proto; - } -} - -/** - * copies the implementations from source interface to target - */ -function $__jsx_merge_interface(target, source) { - for (var k in source.prototype) - if (source.prototype.hasOwnProperty(k)) - target.prototype[k] = source.prototype[k]; -} - -/** - * defers the initialization of the property - */ -function $__jsx_lazy_init(obj, prop, func) { - function reset(obj, prop, value) { - delete obj[prop]; - obj[prop] = value; - return value; - } - - Object.defineProperty(obj, prop, { - get: function () { - return reset(obj, prop, func()); - }, - set: function (v) { - reset(obj, prop, v); - }, - enumerable: true, - configurable: true - }); -} - -var $__jsx_imul = Math.imul; -if (typeof $__jsx_imul === "undefined") { - $__jsx_imul = function (a, b) { - var ah = (a >>> 16) & 0xffff; - var al = a & 0xffff; - var bh = (b >>> 16) & 0xffff; - var bl = b & 0xffff; - return ((al * bl) + (((ah * bl + al * bh) << 16) >>> 0)|0); - }; -} - -/** - * fused int-ops with side-effects - */ -function $__jsx_ipadd(o, p, r) { - return o[p] = (o[p] + r) | 0; -} -function $__jsx_ipsub(o, p, r) { - return o[p] = (o[p] - r) | 0; -} -function $__jsx_ipmul(o, p, r) { - return o[p] = $__jsx_imul(o[p], r); -} -function $__jsx_ipdiv(o, p, r) { - return o[p] = (o[p] / r) | 0; -} -function $__jsx_ipmod(o, p, r) { - return o[p] = (o[p] % r) | 0; -} -function $__jsx_ippostinc(o, p) { - var v = o[p]; - o[p] = (v + 1) | 0; - return v; -} -function $__jsx_ippostdec(o, p) { - var v = o[p]; - o[p] = (v - 1) | 0; - return v; -} - -/** - * non-inlined version of Array#each - */ -function $__jsx_forEach(o, f) { - var l = o.length; - for (var i = 0; i < l; ++i) - f(o[i]); -} - -/* - * global functions, renamed to avoid conflict with local variable names - */ -var $__jsx_parseInt = parseInt; -var $__jsx_parseFloat = parseFloat; -function $__jsx_isNaN(n) { return n !== n; } -var $__jsx_isFinite = isFinite; - -var $__jsx_encodeURIComponent = encodeURIComponent; -var $__jsx_decodeURIComponent = decodeURIComponent; -var $__jsx_encodeURI = encodeURI; -var $__jsx_decodeURI = decodeURI; - -var $__jsx_ObjectToString = Object.prototype.toString; -var $__jsx_ObjectHasOwnProperty = Object.prototype.hasOwnProperty; - -/* - * profiler object, initialized afterwards - */ -function $__jsx_profiler() { -} - -/* - * public interface to JSX code - */ -JSX.require = function (path) { - var m = $__jsx_classMap[path]; - return m !== undefined ? m : null; -}; - -JSX.profilerIsRunning = function () { - return $__jsx_profiler.getResults != null; -}; - -JSX.getProfileResults = function () { - return ($__jsx_profiler.getResults || function () { return {}; })(); -}; - -JSX.postProfileResults = function (url, cb) { - if ($__jsx_profiler.postResults == null) - throw new Error("profiler has not been turned on"); - return $__jsx_profiler.postResults(url, cb); -}; - -JSX.resetProfileResults = function () { - if ($__jsx_profiler.resetResults == null) - throw new Error("profiler has not been turned on"); - return $__jsx_profiler.resetResults(); -}; -JSX.DEBUG = false; -var GeneratorFunction$0 = -(function () { - try { - return Function('import {GeneratorFunction} from "std:iteration"; return GeneratorFunction')(); - } catch (e) { - return function GeneratorFunction () {}; - } -})(); -var __jsx_generator_object$0 = -(function () { - function __jsx_generator_object() { - this.__next = 0; - this.__loop = null; - this.__seed = null; - this.__value = undefined; - this.__status = 0; // SUSPENDED: 0, ACTIVE: 1, DEAD: 2 - } - - __jsx_generator_object.prototype.next = function (seed) { - switch (this.__status) { - case 0: - this.__status = 1; - this.__seed = seed; - - // go next! - this.__loop(this.__next); - - var done = false; - if (this.__next != -1) { - this.__status = 0; - } else { - this.__status = 2; - done = true; - } - return { value: this.__value, done: done }; - case 1: - throw new Error("Generator is already running"); - case 2: - throw new Error("Generator is already finished"); - default: - throw new Error("Unexpected generator internal state"); - } - }; - - return __jsx_generator_object; -}()); -function Among(s, substring_i, result) { - this.s_size = s.length; - this.s = s; - this.substring_i = substring_i; - this.result = result; - this.method = null; - this.instance = null; -}; - -function Among$0(s, substring_i, result, method, instance) { - this.s_size = s.length; - this.s = s; - this.substring_i = substring_i; - this.result = result; - this.method = method; - this.instance = instance; -}; - -$__jsx_extend([Among, Among$0], Object); -function Stemmer() { -}; - -$__jsx_extend([Stemmer], Object); -function BaseStemmer() { - var current$0; - var cursor$0; - var limit$0; - this.cache = ({ }); - current$0 = this.current = ""; - cursor$0 = this.cursor = 0; - limit$0 = this.limit = current$0.length; - this.limit_backward = 0; - this.bra = cursor$0; - this.ket = limit$0; -}; - -$__jsx_extend([BaseStemmer], Stemmer); -BaseStemmer.prototype.setCurrent$S = function (value) { - var current$0; - var cursor$0; - var limit$0; - current$0 = this.current = value; - cursor$0 = this.cursor = 0; - limit$0 = this.limit = current$0.length; - this.limit_backward = 0; - this.bra = cursor$0; - this.ket = limit$0; -}; - - -function BaseStemmer$setCurrent$LBaseStemmer$S($this, value) { - var current$0; - var cursor$0; - var limit$0; - current$0 = $this.current = value; - cursor$0 = $this.cursor = 0; - limit$0 = $this.limit = current$0.length; - $this.limit_backward = 0; - $this.bra = cursor$0; - $this.ket = limit$0; -}; - -BaseStemmer.setCurrent$LBaseStemmer$S = BaseStemmer$setCurrent$LBaseStemmer$S; - -BaseStemmer.prototype.getCurrent$ = function () { - return this.current; -}; - - -function BaseStemmer$getCurrent$LBaseStemmer$($this) { - return $this.current; -}; - -BaseStemmer.getCurrent$LBaseStemmer$ = BaseStemmer$getCurrent$LBaseStemmer$; - -BaseStemmer.prototype.copy_from$LBaseStemmer$ = function (other) { - this.current = other.current; - this.cursor = other.cursor; - this.limit = other.limit; - this.limit_backward = other.limit_backward; - this.bra = other.bra; - this.ket = other.ket; -}; - - -function BaseStemmer$copy_from$LBaseStemmer$LBaseStemmer$($this, other) { - $this.current = other.current; - $this.cursor = other.cursor; - $this.limit = other.limit; - $this.limit_backward = other.limit_backward; - $this.bra = other.bra; - $this.ket = other.ket; -}; - -BaseStemmer.copy_from$LBaseStemmer$LBaseStemmer$ = BaseStemmer$copy_from$LBaseStemmer$LBaseStemmer$; - -BaseStemmer.prototype.in_grouping$AIII = function (s, min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor >= this.limit) { - return false; - } - ch = this.current.charCodeAt(this.cursor); - if (ch > max || ch < min) { - return false; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$in_grouping$LBaseStemmer$AIII($this, s, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor >= $this.limit) { - return false; - } - ch = $this.current.charCodeAt($this.cursor); - if (ch > max || ch < min) { - return false; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.in_grouping$LBaseStemmer$AIII = BaseStemmer$in_grouping$LBaseStemmer$AIII; - -BaseStemmer.prototype.in_grouping_b$AIII = function (s, min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor <= this.limit_backward) { - return false; - } - ch = this.current.charCodeAt(this.cursor - 1); - if (ch > max || ch < min) { - return false; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$in_grouping_b$LBaseStemmer$AIII($this, s, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor <= $this.limit_backward) { - return false; - } - ch = $this.current.charCodeAt($this.cursor - 1); - if (ch > max || ch < min) { - return false; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; +// Generated by Snowball 2.1.0 - https://snowballstem.org/ + +/**@constructor*/ +NorwegianStemmer = function() { + var base = new BaseStemmer(); + /** @const */ var a_0 = [ + ["a", -1, 1], + ["e", -1, 1], + ["ede", 1, 1], + ["ande", 1, 1], + ["ende", 1, 1], + ["ane", 1, 1], + ["ene", 1, 1], + ["hetene", 6, 1], + ["erte", 1, 3], + ["en", -1, 1], + ["heten", 9, 1], + ["ar", -1, 1], + ["er", -1, 1], + ["heter", 12, 1], + ["s", -1, 2], + ["as", 14, 1], + ["es", 14, 1], + ["edes", 16, 1], + ["endes", 16, 1], + ["enes", 16, 1], + ["hetenes", 19, 1], + ["ens", 14, 1], + ["hetens", 21, 1], + ["ers", 14, 1], + ["ets", 14, 1], + ["et", -1, 1], + ["het", 25, 1], + ["ert", -1, 3], + ["ast", -1, 1] + ]; + + /** @const */ var a_1 = [ + ["dt", -1, -1], + ["vt", -1, -1] + ]; + + /** @const */ var a_2 = [ + ["leg", -1, 1], + ["eleg", 0, 1], + ["ig", -1, 1], + ["eig", 2, 1], + ["lig", 2, 1], + ["elig", 4, 1], + ["els", -1, 1], + ["lov", -1, 1], + ["elov", 7, 1], + ["slov", 7, 1], + ["hetslov", 9, 1] + ]; + + /** @const */ var /** Array */ g_v = [17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 128]; + + /** @const */ var /** Array */ g_s_ending = [119, 125, 149, 1]; + + var /** number */ I_x = 0; + var /** number */ I_p1 = 0; + + + /** @return {boolean} */ + function r_mark_regions() { + I_p1 = base.limit; + var /** number */ v_1 = base.cursor; + { + var /** number */ c1 = base.cursor + 3; + if (c1 > base.limit) + { + return false; + } + base.cursor = c1; + } + I_x = base.cursor; + base.cursor = v_1; + golab0: while(true) + { + var /** number */ v_2 = base.cursor; + lab1: { + if (!(base.in_grouping(g_v, 97, 248))) + { + break lab1; + } + base.cursor = v_2; + break golab0; + } + base.cursor = v_2; + if (base.cursor >= base.limit) + { + return false; + } + base.cursor++; + } + golab2: while(true) + { + lab3: { + if (!(base.out_grouping(g_v, 97, 248))) + { + break lab3; + } + break golab2; + } + if (base.cursor >= base.limit) + { + return false; + } + base.cursor++; + } + I_p1 = base.cursor; + lab4: { + if (!(I_p1 < I_x)) + { + break lab4; + } + I_p1 = I_x; + } + return true; + }; + + /** @return {boolean} */ + function r_main_suffix() { + var /** number */ among_var; + if (base.cursor < I_p1) + { + return false; + } + var /** number */ v_2 = base.limit_backward; + base.limit_backward = I_p1; + base.ket = base.cursor; + among_var = base.find_among_b(a_0); + if (among_var == 0) + { + base.limit_backward = v_2; + return false; + } + base.bra = base.cursor; + base.limit_backward = v_2; + switch (among_var) { + case 1: + if (!base.slice_del()) + { + return false; + } + break; + case 2: + lab0: { + var /** number */ v_3 = base.limit - base.cursor; + lab1: { + if (!(base.in_grouping_b(g_s_ending, 98, 122))) + { + break lab1; + } + break lab0; + } + base.cursor = base.limit - v_3; + if (!(base.eq_s_b("k"))) + { + return false; + } + if (!(base.out_grouping_b(g_v, 97, 248))) + { + return false; + } + } + if (!base.slice_del()) + { + return false; + } + break; + case 3: + if (!base.slice_from("er")) + { + return false; + } + break; + } + return true; + }; + + /** @return {boolean} */ + function r_consonant_pair() { + var /** number */ v_1 = base.limit - base.cursor; + if (base.cursor < I_p1) + { + return false; + } + var /** number */ v_3 = base.limit_backward; + base.limit_backward = I_p1; + base.ket = base.cursor; + if (base.find_among_b(a_1) == 0) + { + base.limit_backward = v_3; + return false; + } + base.bra = base.cursor; + base.limit_backward = v_3; + base.cursor = base.limit - v_1; + if (base.cursor <= base.limit_backward) + { + return false; + } + base.cursor--; + base.bra = base.cursor; + if (!base.slice_del()) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_other_suffix() { + if (base.cursor < I_p1) + { + return false; + } + var /** number */ v_2 = base.limit_backward; + base.limit_backward = I_p1; + base.ket = base.cursor; + if (base.find_among_b(a_2) == 0) + { + base.limit_backward = v_2; + return false; + } + base.bra = base.cursor; + base.limit_backward = v_2; + if (!base.slice_del()) + { + return false; + } + return true; + }; + + this.stem = /** @return {boolean} */ function() { + var /** number */ v_1 = base.cursor; + r_mark_regions(); + base.cursor = v_1; + base.limit_backward = base.cursor; base.cursor = base.limit; + var /** number */ v_2 = base.limit - base.cursor; + r_main_suffix(); + base.cursor = base.limit - v_2; + var /** number */ v_3 = base.limit - base.cursor; + r_consonant_pair(); + base.cursor = base.limit - v_3; + var /** number */ v_4 = base.limit - base.cursor; + r_other_suffix(); + base.cursor = base.limit - v_4; + base.cursor = base.limit_backward; + return true; + }; + + /**@return{string}*/ + this['stemWord'] = function(/**string*/word) { + base.setCurrent(word); + this.stem(); + return base.getCurrent(); + }; }; - -BaseStemmer.in_grouping_b$LBaseStemmer$AIII = BaseStemmer$in_grouping_b$LBaseStemmer$AIII; - -BaseStemmer.prototype.out_grouping$AIII = function (s, min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor >= this.limit) { - return false; - } - ch = this.current.charCodeAt(this.cursor); - if (ch > max || ch < min) { - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; - } - ch -= min; - if ((s[ch >>> 3] & 0X1 << (ch & 0x7)) === 0) { - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; - } - return false; -}; - - -function BaseStemmer$out_grouping$LBaseStemmer$AIII($this, s, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor >= $this.limit) { - return false; - } - ch = $this.current.charCodeAt($this.cursor); - if (ch > max || ch < min) { - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; - } - ch -= min; - if ((s[ch >>> 3] & 0X1 << (ch & 0x7)) === 0) { - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; - } - return false; -}; - -BaseStemmer.out_grouping$LBaseStemmer$AIII = BaseStemmer$out_grouping$LBaseStemmer$AIII; - -BaseStemmer.prototype.out_grouping_b$AIII = function (s, min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor <= this.limit_backward) { - return false; - } - ch = this.current.charCodeAt(this.cursor - 1); - if (ch > max || ch < min) { - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; - } - return false; -}; - - -function BaseStemmer$out_grouping_b$LBaseStemmer$AIII($this, s, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor <= $this.limit_backward) { - return false; - } - ch = $this.current.charCodeAt($this.cursor - 1); - if (ch > max || ch < min) { - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; - } - return false; -}; - -BaseStemmer.out_grouping_b$LBaseStemmer$AIII = BaseStemmer$out_grouping_b$LBaseStemmer$AIII; - -BaseStemmer.prototype.in_range$II = function (min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor >= this.limit) { - return false; - } - ch = this.current.charCodeAt(this.cursor); - if (ch > max || ch < min) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$in_range$LBaseStemmer$II($this, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor >= $this.limit) { - return false; - } - ch = $this.current.charCodeAt($this.cursor); - if (ch > max || ch < min) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.in_range$LBaseStemmer$II = BaseStemmer$in_range$LBaseStemmer$II; - -BaseStemmer.prototype.in_range_b$II = function (min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor <= this.limit_backward) { - return false; - } - ch = this.current.charCodeAt(this.cursor - 1); - if (ch > max || ch < min) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$in_range_b$LBaseStemmer$II($this, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor <= $this.limit_backward) { - return false; - } - ch = $this.current.charCodeAt($this.cursor - 1); - if (ch > max || ch < min) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.in_range_b$LBaseStemmer$II = BaseStemmer$in_range_b$LBaseStemmer$II; - -BaseStemmer.prototype.out_range$II = function (min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor >= this.limit) { - return false; - } - ch = this.current.charCodeAt(this.cursor); - if (! (ch > max || ch < min)) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$out_range$LBaseStemmer$II($this, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor >= $this.limit) { - return false; - } - ch = $this.current.charCodeAt($this.cursor); - if (! (ch > max || ch < min)) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.out_range$LBaseStemmer$II = BaseStemmer$out_range$LBaseStemmer$II; - -BaseStemmer.prototype.out_range_b$II = function (min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor <= this.limit_backward) { - return false; - } - ch = this.current.charCodeAt(this.cursor - 1); - if (! (ch > max || ch < min)) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$out_range_b$LBaseStemmer$II($this, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor <= $this.limit_backward) { - return false; - } - ch = $this.current.charCodeAt($this.cursor - 1); - if (! (ch > max || ch < min)) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.out_range_b$LBaseStemmer$II = BaseStemmer$out_range_b$LBaseStemmer$II; - -BaseStemmer.prototype.eq_s$IS = function (s_size, s) { - var cursor$0; - if (((this.limit - this.cursor) | 0) < s_size) { - return false; - } - if (this.current.slice(cursor$0 = this.cursor, ((cursor$0 + s_size) | 0)) !== s) { - return false; - } - this.cursor = (this.cursor + s_size) | 0; - return true; -}; - - -function BaseStemmer$eq_s$LBaseStemmer$IS($this, s_size, s) { - var cursor$0; - if ((($this.limit - $this.cursor) | 0) < s_size) { - return false; - } - if ($this.current.slice(cursor$0 = $this.cursor, ((cursor$0 + s_size) | 0)) !== s) { - return false; - } - $this.cursor = ($this.cursor + s_size) | 0; - return true; -}; - -BaseStemmer.eq_s$LBaseStemmer$IS = BaseStemmer$eq_s$LBaseStemmer$IS; - -BaseStemmer.prototype.eq_s_b$IS = function (s_size, s) { - var cursor$0; - if (((this.cursor - this.limit_backward) | 0) < s_size) { - return false; - } - if (this.current.slice((((cursor$0 = this.cursor) - s_size) | 0), cursor$0) !== s) { - return false; - } - this.cursor = (this.cursor - s_size) | 0; - return true; -}; - - -function BaseStemmer$eq_s_b$LBaseStemmer$IS($this, s_size, s) { - var cursor$0; - if ((($this.cursor - $this.limit_backward) | 0) < s_size) { - return false; - } - if ($this.current.slice((((cursor$0 = $this.cursor) - s_size) | 0), cursor$0) !== s) { - return false; - } - $this.cursor = ($this.cursor - s_size) | 0; - return true; -}; - -BaseStemmer.eq_s_b$LBaseStemmer$IS = BaseStemmer$eq_s_b$LBaseStemmer$IS; - -BaseStemmer.prototype.eq_v$S = function (s) { - return BaseStemmer$eq_s$LBaseStemmer$IS(this, s.length, s); -}; - - -function BaseStemmer$eq_v$LBaseStemmer$S($this, s) { - return BaseStemmer$eq_s$LBaseStemmer$IS($this, s.length, s); -}; - -BaseStemmer.eq_v$LBaseStemmer$S = BaseStemmer$eq_v$LBaseStemmer$S; - -BaseStemmer.prototype.eq_v_b$S = function (s) { - return BaseStemmer$eq_s_b$LBaseStemmer$IS(this, s.length, s); -}; - - -function BaseStemmer$eq_v_b$LBaseStemmer$S($this, s) { - return BaseStemmer$eq_s_b$LBaseStemmer$IS($this, s.length, s); -}; - -BaseStemmer.eq_v_b$LBaseStemmer$S = BaseStemmer$eq_v_b$LBaseStemmer$S; - -BaseStemmer.prototype.find_among$ALAmong$I = function (v, v_size) { - var i; - var j; - var c; - var l; - var common_i; - var common_j; - var first_key_inspected; - var k; - var diff; - var common; - var w; - var i2; - var res; - i = 0; - j = v_size; - c = this.cursor; - l = this.limit; - common_i = 0; - common_j = 0; - first_key_inspected = false; - while (true) { - k = i + (j - i >>> 1); - diff = 0; - common = (common_i < common_j ? common_i : common_j); - w = v[k]; - for (i2 = common; i2 < w.s_size; i2++) { - if (c + common === l) { - diff = -1; - break; - } - diff = this.current.charCodeAt(c + common) - w.s.charCodeAt(i2); - if (diff !== 0) { - break; - } - common++; - } - if (diff < 0) { - j = k; - common_j = common; - } else { - i = k; - common_i = common; - } - if (j - i <= 1) { - if (i > 0) { - break; - } - if (j === i) { - break; - } - if (first_key_inspected) { - break; - } - first_key_inspected = true; - } - } - while (true) { - w = v[i]; - if (common_i >= w.s_size) { - this.cursor = (c + w.s_size | 0); - if (w.method == null) { - return w.result; - } - res = w.method(w.instance); - this.cursor = (c + w.s_size | 0); - if (res) { - return w.result; - } - } - i = w.substring_i; - if (i < 0) { - return 0; - } - } - return -1; -}; - - -function BaseStemmer$find_among$LBaseStemmer$ALAmong$I($this, v, v_size) { - var i; - var j; - var c; - var l; - var common_i; - var common_j; - var first_key_inspected; - var k; - var diff; - var common; - var w; - var i2; - var res; - i = 0; - j = v_size; - c = $this.cursor; - l = $this.limit; - common_i = 0; - common_j = 0; - first_key_inspected = false; - while (true) { - k = i + (j - i >>> 1); - diff = 0; - common = (common_i < common_j ? common_i : common_j); - w = v[k]; - for (i2 = common; i2 < w.s_size; i2++) { - if (c + common === l) { - diff = -1; - break; - } - diff = $this.current.charCodeAt(c + common) - w.s.charCodeAt(i2); - if (diff !== 0) { - break; - } - common++; - } - if (diff < 0) { - j = k; - common_j = common; - } else { - i = k; - common_i = common; - } - if (j - i <= 1) { - if (i > 0) { - break; - } - if (j === i) { - break; - } - if (first_key_inspected) { - break; - } - first_key_inspected = true; - } - } - while (true) { - w = v[i]; - if (common_i >= w.s_size) { - $this.cursor = (c + w.s_size | 0); - if (w.method == null) { - return w.result; - } - res = w.method(w.instance); - $this.cursor = (c + w.s_size | 0); - if (res) { - return w.result; - } - } - i = w.substring_i; - if (i < 0) { - return 0; - } - } - return -1; -}; - -BaseStemmer.find_among$LBaseStemmer$ALAmong$I = BaseStemmer$find_among$LBaseStemmer$ALAmong$I; - -BaseStemmer.prototype.find_among_b$ALAmong$I = function (v, v_size) { - var i; - var j; - var c; - var lb; - var common_i; - var common_j; - var first_key_inspected; - var k; - var diff; - var common; - var w; - var i2; - var res; - i = 0; - j = v_size; - c = this.cursor; - lb = this.limit_backward; - common_i = 0; - common_j = 0; - first_key_inspected = false; - while (true) { - k = i + (j - i >> 1); - diff = 0; - common = (common_i < common_j ? common_i : common_j); - w = v[k]; - for (i2 = w.s_size - 1 - common; i2 >= 0; i2--) { - if (c - common === lb) { - diff = -1; - break; - } - diff = this.current.charCodeAt(c - 1 - common) - w.s.charCodeAt(i2); - if (diff !== 0) { - break; - } - common++; - } - if (diff < 0) { - j = k; - common_j = common; - } else { - i = k; - common_i = common; - } - if (j - i <= 1) { - if (i > 0) { - break; - } - if (j === i) { - break; - } - if (first_key_inspected) { - break; - } - first_key_inspected = true; - } - } - while (true) { - w = v[i]; - if (common_i >= w.s_size) { - this.cursor = (c - w.s_size | 0); - if (w.method == null) { - return w.result; - } - res = w.method(this); - this.cursor = (c - w.s_size | 0); - if (res) { - return w.result; - } - } - i = w.substring_i; - if (i < 0) { - return 0; - } - } - return -1; -}; - - -function BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, v, v_size) { - var i; - var j; - var c; - var lb; - var common_i; - var common_j; - var first_key_inspected; - var k; - var diff; - var common; - var w; - var i2; - var res; - i = 0; - j = v_size; - c = $this.cursor; - lb = $this.limit_backward; - common_i = 0; - common_j = 0; - first_key_inspected = false; - while (true) { - k = i + (j - i >> 1); - diff = 0; - common = (common_i < common_j ? common_i : common_j); - w = v[k]; - for (i2 = w.s_size - 1 - common; i2 >= 0; i2--) { - if (c - common === lb) { - diff = -1; - break; - } - diff = $this.current.charCodeAt(c - 1 - common) - w.s.charCodeAt(i2); - if (diff !== 0) { - break; - } - common++; - } - if (diff < 0) { - j = k; - common_j = common; - } else { - i = k; - common_i = common; - } - if (j - i <= 1) { - if (i > 0) { - break; - } - if (j === i) { - break; - } - if (first_key_inspected) { - break; - } - first_key_inspected = true; - } - } - while (true) { - w = v[i]; - if (common_i >= w.s_size) { - $this.cursor = (c - w.s_size | 0); - if (w.method == null) { - return w.result; - } - res = w.method($this); - $this.cursor = (c - w.s_size | 0); - if (res) { - return w.result; - } - } - i = w.substring_i; - if (i < 0) { - return 0; - } - } - return -1; -}; - -BaseStemmer.find_among_b$LBaseStemmer$ALAmong$I = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I; - -BaseStemmer.prototype.replace_s$IIS = function (c_bra, c_ket, s) { - var adjustment; - adjustment = ((s.length - (((c_ket - c_bra) | 0))) | 0); - this.current = this.current.slice(0, c_bra) + s + this.current.slice(c_ket); - this.limit = (this.limit + adjustment) | 0; - if (this.cursor >= c_ket) { - this.cursor = (this.cursor + adjustment) | 0; - } else if (this.cursor > c_bra) { - this.cursor = c_bra; - } - return (adjustment | 0); -}; - - -function BaseStemmer$replace_s$LBaseStemmer$IIS($this, c_bra, c_ket, s) { - var adjustment; - adjustment = ((s.length - (((c_ket - c_bra) | 0))) | 0); - $this.current = $this.current.slice(0, c_bra) + s + $this.current.slice(c_ket); - $this.limit = ($this.limit + adjustment) | 0; - if ($this.cursor >= c_ket) { - $this.cursor = ($this.cursor + adjustment) | 0; - } else if ($this.cursor > c_bra) { - $this.cursor = c_bra; - } - return (adjustment | 0); -}; - -BaseStemmer.replace_s$LBaseStemmer$IIS = BaseStemmer$replace_s$LBaseStemmer$IIS; - -BaseStemmer.prototype.slice_check$ = function () { - var bra$0; - var ket$0; - var limit$0; - return ((bra$0 = this.bra) < 0 || bra$0 > (ket$0 = this.ket) || ket$0 > (limit$0 = this.limit) || limit$0 > this.current.length ? false : true); -}; - - -function BaseStemmer$slice_check$LBaseStemmer$($this) { - var bra$0; - var ket$0; - var limit$0; - return ((bra$0 = $this.bra) < 0 || bra$0 > (ket$0 = $this.ket) || ket$0 > (limit$0 = $this.limit) || limit$0 > $this.current.length ? false : true); -}; - -BaseStemmer.slice_check$LBaseStemmer$ = BaseStemmer$slice_check$LBaseStemmer$; - -BaseStemmer.prototype.slice_from$S = function (s) { - var result; - var bra$0; - var ket$0; - var limit$0; - result = false; - if ((bra$0 = this.bra) < 0 || bra$0 > (ket$0 = this.ket) || ket$0 > (limit$0 = this.limit) || limit$0 > this.current.length ? false : true) { - BaseStemmer$replace_s$LBaseStemmer$IIS(this, this.bra, this.ket, s); - result = true; - } - return result; -}; - - -function BaseStemmer$slice_from$LBaseStemmer$S($this, s) { - var result; - var bra$0; - var ket$0; - var limit$0; - result = false; - if ((bra$0 = $this.bra) < 0 || bra$0 > (ket$0 = $this.ket) || ket$0 > (limit$0 = $this.limit) || limit$0 > $this.current.length ? false : true) { - BaseStemmer$replace_s$LBaseStemmer$IIS($this, $this.bra, $this.ket, s); - result = true; - } - return result; -}; - -BaseStemmer.slice_from$LBaseStemmer$S = BaseStemmer$slice_from$LBaseStemmer$S; - -BaseStemmer.prototype.slice_del$ = function () { - return BaseStemmer$slice_from$LBaseStemmer$S(this, ""); -}; - - -function BaseStemmer$slice_del$LBaseStemmer$($this) { - return BaseStemmer$slice_from$LBaseStemmer$S($this, ""); -}; - -BaseStemmer.slice_del$LBaseStemmer$ = BaseStemmer$slice_del$LBaseStemmer$; - -BaseStemmer.prototype.insert$IIS = function (c_bra, c_ket, s) { - var adjustment; - adjustment = BaseStemmer$replace_s$LBaseStemmer$IIS(this, c_bra, c_ket, s); - if (c_bra <= this.bra) { - this.bra = (this.bra + adjustment) | 0; - } - if (c_bra <= this.ket) { - this.ket = (this.ket + adjustment) | 0; - } -}; - - -function BaseStemmer$insert$LBaseStemmer$IIS($this, c_bra, c_ket, s) { - var adjustment; - adjustment = BaseStemmer$replace_s$LBaseStemmer$IIS($this, c_bra, c_ket, s); - if (c_bra <= $this.bra) { - $this.bra = ($this.bra + adjustment) | 0; - } - if (c_bra <= $this.ket) { - $this.ket = ($this.ket + adjustment) | 0; - } -}; - -BaseStemmer.insert$LBaseStemmer$IIS = BaseStemmer$insert$LBaseStemmer$IIS; - -BaseStemmer.prototype.slice_to$S = function (s) { - var result; - var bra$0; - var ket$0; - var limit$0; - result = ''; - if ((bra$0 = this.bra) < 0 || bra$0 > (ket$0 = this.ket) || ket$0 > (limit$0 = this.limit) || limit$0 > this.current.length ? false : true) { - result = this.current.slice(this.bra, this.ket); - } - return result; -}; - - -function BaseStemmer$slice_to$LBaseStemmer$S($this, s) { - var result; - var bra$0; - var ket$0; - var limit$0; - result = ''; - if ((bra$0 = $this.bra) < 0 || bra$0 > (ket$0 = $this.ket) || ket$0 > (limit$0 = $this.limit) || limit$0 > $this.current.length ? false : true) { - result = $this.current.slice($this.bra, $this.ket); - } - return result; -}; - -BaseStemmer.slice_to$LBaseStemmer$S = BaseStemmer$slice_to$LBaseStemmer$S; - -BaseStemmer.prototype.assign_to$S = function (s) { - return this.current.slice(0, this.limit); -}; - - -function BaseStemmer$assign_to$LBaseStemmer$S($this, s) { - return $this.current.slice(0, $this.limit); -}; - -BaseStemmer.assign_to$LBaseStemmer$S = BaseStemmer$assign_to$LBaseStemmer$S; - -BaseStemmer.prototype.stem$ = function () { - return false; -}; - - -BaseStemmer.prototype.stemWord$S = function (word) { - var result; - var current$0; - var cursor$0; - var limit$0; - result = this.cache['.' + word]; - if (result == null) { - current$0 = this.current = word; - cursor$0 = this.cursor = 0; - limit$0 = this.limit = current$0.length; - this.limit_backward = 0; - this.bra = cursor$0; - this.ket = limit$0; - this.stem$(); - result = this.current; - this.cache['.' + word] = result; - } - return result; -}; - -BaseStemmer.prototype.stemWord = BaseStemmer.prototype.stemWord$S; - -BaseStemmer.prototype.stemWords$AS = function (words) { - var results; - var i; - var word; - var result; - var current$0; - var cursor$0; - var limit$0; - results = [ ]; - for (i = 0; i < words.length; i++) { - word = words[i]; - result = this.cache['.' + word]; - if (result == null) { - current$0 = this.current = word; - cursor$0 = this.cursor = 0; - limit$0 = this.limit = current$0.length; - this.limit_backward = 0; - this.bra = cursor$0; - this.ket = limit$0; - this.stem$(); - result = this.current; - this.cache['.' + word] = result; - } - results.push(result); - } - return results; -}; - -BaseStemmer.prototype.stemWords = BaseStemmer.prototype.stemWords$AS; - -function NorwegianStemmer() { - BaseStemmer.call(this); - this.I_x = 0; - this.I_p1 = 0; -}; - -$__jsx_extend([NorwegianStemmer], BaseStemmer); -NorwegianStemmer.prototype.copy_from$LNorwegianStemmer$ = function (other) { - this.I_x = other.I_x; - this.I_p1 = other.I_p1; - BaseStemmer$copy_from$LBaseStemmer$LBaseStemmer$(this, other); -}; - -NorwegianStemmer.prototype.copy_from = NorwegianStemmer.prototype.copy_from$LNorwegianStemmer$; - -NorwegianStemmer.prototype.r_mark_regions$ = function () { - var v_1; - var v_2; - var c; - var lab1; - var lab3; - var lab4; - var cursor$0; - var limit$0; - var cursor$1; - var cursor$2; - var $__jsx_postinc_t; - this.I_p1 = limit$0 = this.limit; - v_1 = cursor$0 = this.cursor; - c = (cursor$0 + 3 | 0); - if (0 > c || c > limit$0) { - return false; - } - cursor$2 = this.cursor = c; - this.I_x = cursor$2; - this.cursor = v_1; -golab0: - while (true) { - v_2 = this.cursor; - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, NorwegianStemmer.g_v, 97, 248)) { - break lab1; - } - this.cursor = v_2; - break golab0; - } - cursor$1 = this.cursor = v_2; - if (cursor$1 >= this.limit) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } -golab2: - while (true) { - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII(this, NorwegianStemmer.g_v, 97, 248)) { - break lab3; - } - break golab2; - } - if (this.cursor >= this.limit) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - this.I_p1 = this.cursor; - lab4 = true; -lab4: - while (lab4 === true) { - lab4 = false; - if (! (this.I_p1 < this.I_x)) { - break lab4; - } - this.I_p1 = this.I_x; - } - return true; -}; - -NorwegianStemmer.prototype.r_mark_regions = NorwegianStemmer.prototype.r_mark_regions$; - -function NorwegianStemmer$r_mark_regions$LNorwegianStemmer$($this) { - var v_1; - var v_2; - var c; - var lab1; - var lab3; - var lab4; - var cursor$0; - var limit$0; - var cursor$1; - var cursor$2; - var $__jsx_postinc_t; - $this.I_p1 = limit$0 = $this.limit; - v_1 = cursor$0 = $this.cursor; - c = (cursor$0 + 3 | 0); - if (0 > c || c > limit$0) { - return false; - } - cursor$2 = $this.cursor = c; - $this.I_x = cursor$2; - $this.cursor = v_1; -golab0: - while (true) { - v_2 = $this.cursor; - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII($this, NorwegianStemmer.g_v, 97, 248)) { - break lab1; - } - $this.cursor = v_2; - break golab0; - } - cursor$1 = $this.cursor = v_2; - if (cursor$1 >= $this.limit) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } -golab2: - while (true) { - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII($this, NorwegianStemmer.g_v, 97, 248)) { - break lab3; - } - break golab2; - } - if ($this.cursor >= $this.limit) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - $this.I_p1 = $this.cursor; - lab4 = true; -lab4: - while (lab4 === true) { - lab4 = false; - if (! ($this.I_p1 < $this.I_x)) { - break lab4; - } - $this.I_p1 = $this.I_x; - } - return true; -}; - -NorwegianStemmer.r_mark_regions$LNorwegianStemmer$ = NorwegianStemmer$r_mark_regions$LNorwegianStemmer$; - -NorwegianStemmer.prototype.r_main_suffix$ = function () { - var among_var; - var v_1; - var v_2; - var v_3; - var lab0; - var lab1; - var cursor$0; - var cursor$1; - var cursor$2; - v_1 = ((this.limit - (cursor$0 = this.cursor)) | 0); - if (cursor$0 < this.I_p1) { - return false; - } - cursor$1 = this.cursor = this.I_p1; - v_2 = this.limit_backward; - this.limit_backward = cursor$1; - cursor$2 = this.cursor = ((this.limit - v_1) | 0); - this.ket = cursor$2; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, NorwegianStemmer.a_0, 29); - if (among_var === 0) { - this.limit_backward = v_2; - return false; - } - this.bra = this.cursor; - this.limit_backward = v_2; - switch (among_var) { - case 0: - return false; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 2: - lab0 = true; - lab0: - while (lab0 === true) { - lab0 = false; - v_3 = ((this.limit - this.cursor) | 0); - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII(this, NorwegianStemmer.g_s_ending, 98, 122)) { - break lab1; - } - break lab0; - } - this.cursor = ((this.limit - v_3) | 0); - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "k")) { - return false; - } - if (! BaseStemmer$out_grouping_b$LBaseStemmer$AIII(this, NorwegianStemmer.g_v, 97, 248)) { - return false; - } - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 3: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "er")) { - return false; - } - break; - } - return true; -}; - -NorwegianStemmer.prototype.r_main_suffix = NorwegianStemmer.prototype.r_main_suffix$; - -function NorwegianStemmer$r_main_suffix$LNorwegianStemmer$($this) { - var among_var; - var v_1; - var v_2; - var v_3; - var lab0; - var lab1; - var cursor$0; - var cursor$1; - var cursor$2; - v_1 = (($this.limit - (cursor$0 = $this.cursor)) | 0); - if (cursor$0 < $this.I_p1) { - return false; - } - cursor$1 = $this.cursor = $this.I_p1; - v_2 = $this.limit_backward; - $this.limit_backward = cursor$1; - cursor$2 = $this.cursor = (($this.limit - v_1) | 0); - $this.ket = cursor$2; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, NorwegianStemmer.a_0, 29); - if (among_var === 0) { - $this.limit_backward = v_2; - return false; - } - $this.bra = $this.cursor; - $this.limit_backward = v_2; - switch (among_var) { - case 0: - return false; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 2: - lab0 = true; - lab0: - while (lab0 === true) { - lab0 = false; - v_3 = (($this.limit - $this.cursor) | 0); - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII($this, NorwegianStemmer.g_s_ending, 98, 122)) { - break lab1; - } - break lab0; - } - $this.cursor = (($this.limit - v_3) | 0); - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "k")) { - return false; - } - if (! BaseStemmer$out_grouping_b$LBaseStemmer$AIII($this, NorwegianStemmer.g_v, 97, 248)) { - return false; - } - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 3: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "er")) { - return false; - } - break; - } - return true; -}; - -NorwegianStemmer.r_main_suffix$LNorwegianStemmer$ = NorwegianStemmer$r_main_suffix$LNorwegianStemmer$; - -NorwegianStemmer.prototype.r_consonant_pair$ = function () { - var v_1; - var v_2; - var v_3; - var limit$0; - var cursor$0; - var cursor$1; - var cursor$2; - var cursor$3; - var limit_backward$0; - var $__jsx_postinc_t; - v_1 = (((limit$0 = this.limit) - (cursor$0 = this.cursor)) | 0); - v_2 = ((limit$0 - cursor$0) | 0); - if (cursor$0 < this.I_p1) { - return false; - } - cursor$1 = this.cursor = this.I_p1; - v_3 = this.limit_backward; - this.limit_backward = cursor$1; - cursor$2 = this.cursor = ((this.limit - v_2) | 0); - this.ket = cursor$2; - if (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, NorwegianStemmer.a_1, 2) === 0) { - this.limit_backward = v_3; - return false; - } - this.bra = this.cursor; - limit_backward$0 = this.limit_backward = v_3; - cursor$3 = this.cursor = ((this.limit - v_1) | 0); - if (cursor$3 <= limit_backward$0) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - this.bra = this.cursor; - return (! BaseStemmer$slice_from$LBaseStemmer$S(this, "") ? false : true); -}; - -NorwegianStemmer.prototype.r_consonant_pair = NorwegianStemmer.prototype.r_consonant_pair$; - -function NorwegianStemmer$r_consonant_pair$LNorwegianStemmer$($this) { - var v_1; - var v_2; - var v_3; - var limit$0; - var cursor$0; - var cursor$1; - var cursor$2; - var cursor$3; - var limit_backward$0; - var $__jsx_postinc_t; - v_1 = (((limit$0 = $this.limit) - (cursor$0 = $this.cursor)) | 0); - v_2 = ((limit$0 - cursor$0) | 0); - if (cursor$0 < $this.I_p1) { - return false; - } - cursor$1 = $this.cursor = $this.I_p1; - v_3 = $this.limit_backward; - $this.limit_backward = cursor$1; - cursor$2 = $this.cursor = (($this.limit - v_2) | 0); - $this.ket = cursor$2; - if (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, NorwegianStemmer.a_1, 2) === 0) { - $this.limit_backward = v_3; - return false; - } - $this.bra = $this.cursor; - limit_backward$0 = $this.limit_backward = v_3; - cursor$3 = $this.cursor = (($this.limit - v_1) | 0); - if (cursor$3 <= limit_backward$0) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - $this.bra = $this.cursor; - return (! BaseStemmer$slice_from$LBaseStemmer$S($this, "") ? false : true); -}; - -NorwegianStemmer.r_consonant_pair$LNorwegianStemmer$ = NorwegianStemmer$r_consonant_pair$LNorwegianStemmer$; - -NorwegianStemmer.prototype.r_other_suffix$ = function () { - var among_var; - var v_1; - var v_2; - var cursor$0; - var cursor$1; - var cursor$2; - v_1 = ((this.limit - (cursor$0 = this.cursor)) | 0); - if (cursor$0 < this.I_p1) { - return false; - } - cursor$1 = this.cursor = this.I_p1; - v_2 = this.limit_backward; - this.limit_backward = cursor$1; - cursor$2 = this.cursor = ((this.limit - v_1) | 0); - this.ket = cursor$2; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, NorwegianStemmer.a_2, 11); - if (among_var === 0) { - this.limit_backward = v_2; - return false; - } - this.bra = this.cursor; - this.limit_backward = v_2; - switch (among_var) { - case 0: - return false; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - } - return true; -}; - -NorwegianStemmer.prototype.r_other_suffix = NorwegianStemmer.prototype.r_other_suffix$; - -function NorwegianStemmer$r_other_suffix$LNorwegianStemmer$($this) { - var among_var; - var v_1; - var v_2; - var cursor$0; - var cursor$1; - var cursor$2; - v_1 = (($this.limit - (cursor$0 = $this.cursor)) | 0); - if (cursor$0 < $this.I_p1) { - return false; - } - cursor$1 = $this.cursor = $this.I_p1; - v_2 = $this.limit_backward; - $this.limit_backward = cursor$1; - cursor$2 = $this.cursor = (($this.limit - v_1) | 0); - $this.ket = cursor$2; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, NorwegianStemmer.a_2, 11); - if (among_var === 0) { - $this.limit_backward = v_2; - return false; - } - $this.bra = $this.cursor; - $this.limit_backward = v_2; - switch (among_var) { - case 0: - return false; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - } - return true; -}; - -NorwegianStemmer.r_other_suffix$LNorwegianStemmer$ = NorwegianStemmer$r_other_suffix$LNorwegianStemmer$; - -NorwegianStemmer.prototype.stem$ = function () { - var v_1; - var v_2; - var v_3; - var lab0; - var lab1; - var lab2; - var lab3; - var cursor$0; - var limit$0; - var cursor$1; - var limit$1; - var cursor$2; - v_1 = this.cursor; - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - if (! NorwegianStemmer$r_mark_regions$LNorwegianStemmer$(this)) { - break lab0; - } - } - cursor$0 = this.cursor = v_1; - this.limit_backward = cursor$0; - cursor$1 = this.cursor = limit$0 = this.limit; - v_2 = ((limit$0 - cursor$1) | 0); - lab1 = true; -lab1: - while (lab1 === true) { - lab1 = false; - if (! NorwegianStemmer$r_main_suffix$LNorwegianStemmer$(this)) { - break lab1; - } - } - cursor$2 = this.cursor = (((limit$1 = this.limit) - v_2) | 0); - v_3 = ((limit$1 - cursor$2) | 0); - lab2 = true; -lab2: - while (lab2 === true) { - lab2 = false; - if (! NorwegianStemmer$r_consonant_pair$LNorwegianStemmer$(this)) { - break lab2; - } - } - this.cursor = ((this.limit - v_3) | 0); - lab3 = true; -lab3: - while (lab3 === true) { - lab3 = false; - if (! NorwegianStemmer$r_other_suffix$LNorwegianStemmer$(this)) { - break lab3; - } - } - this.cursor = this.limit_backward; - return true; -}; - -NorwegianStemmer.prototype.stem = NorwegianStemmer.prototype.stem$; - -NorwegianStemmer.prototype.equals$X = function (o) { - return o instanceof NorwegianStemmer; -}; - -NorwegianStemmer.prototype.equals = NorwegianStemmer.prototype.equals$X; - -function NorwegianStemmer$equals$LNorwegianStemmer$X($this, o) { - return o instanceof NorwegianStemmer; -}; - -NorwegianStemmer.equals$LNorwegianStemmer$X = NorwegianStemmer$equals$LNorwegianStemmer$X; - -NorwegianStemmer.prototype.hashCode$ = function () { - var classname; - var hash; - var i; - var char; - classname = "NorwegianStemmer"; - hash = 0; - for (i = 0; i < classname.length; i++) { - char = classname.charCodeAt(i); - hash = (hash << 5) - hash + char; - hash = hash & hash; - } - return (hash | 0); -}; - -NorwegianStemmer.prototype.hashCode = NorwegianStemmer.prototype.hashCode$; - -function NorwegianStemmer$hashCode$LNorwegianStemmer$($this) { - var classname; - var hash; - var i; - var char; - classname = "NorwegianStemmer"; - hash = 0; - for (i = 0; i < classname.length; i++) { - char = classname.charCodeAt(i); - hash = (hash << 5) - hash + char; - hash = hash & hash; - } - return (hash | 0); -}; - -NorwegianStemmer.hashCode$LNorwegianStemmer$ = NorwegianStemmer$hashCode$LNorwegianStemmer$; - -NorwegianStemmer.serialVersionUID = 1; -$__jsx_lazy_init(NorwegianStemmer, "methodObject", function () { - return new NorwegianStemmer(); -}); -$__jsx_lazy_init(NorwegianStemmer, "a_0", function () { - return [ new Among("a", -1, 1), new Among("e", -1, 1), new Among("ede", 1, 1), new Among("ande", 1, 1), new Among("ende", 1, 1), new Among("ane", 1, 1), new Among("ene", 1, 1), new Among("hetene", 6, 1), new Among("erte", 1, 3), new Among("en", -1, 1), new Among("heten", 9, 1), new Among("ar", -1, 1), new Among("er", -1, 1), new Among("heter", 12, 1), new Among("s", -1, 2), new Among("as", 14, 1), new Among("es", 14, 1), new Among("edes", 16, 1), new Among("endes", 16, 1), new Among("enes", 16, 1), new Among("hetenes", 19, 1), new Among("ens", 14, 1), new Among("hetens", 21, 1), new Among("ers", 14, 1), new Among("ets", 14, 1), new Among("et", -1, 1), new Among("het", 25, 1), new Among("ert", -1, 3), new Among("ast", -1, 1) ]; -}); -$__jsx_lazy_init(NorwegianStemmer, "a_1", function () { - return [ new Among("dt", -1, -1), new Among("vt", -1, -1) ]; -}); -$__jsx_lazy_init(NorwegianStemmer, "a_2", function () { - return [ new Among("leg", -1, 1), new Among("eleg", 0, 1), new Among("ig", -1, 1), new Among("eig", 2, 1), new Among("lig", 2, 1), new Among("elig", 4, 1), new Among("els", -1, 1), new Among("lov", -1, 1), new Among("elov", 7, 1), new Among("slov", 7, 1), new Among("hetslov", 9, 1) ]; -}); -NorwegianStemmer.g_v = [ 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 128 ]; -NorwegianStemmer.g_s_ending = [ 119, 125, 149, 1 ]; - -var $__jsx_classMap = { - "src/among.jsx": { - Among: Among, - Among$SII: Among, - Among$SIIF$LBaseStemmer$B$LBaseStemmer$: Among$0 - }, - "src/stemmer.jsx": { - Stemmer: Stemmer, - Stemmer$: Stemmer - }, - "src/base-stemmer.jsx": { - BaseStemmer: BaseStemmer, - BaseStemmer$: BaseStemmer - }, - "src/norwegian-stemmer.jsx": { - NorwegianStemmer: NorwegianStemmer, - NorwegianStemmer$: NorwegianStemmer - } -}; - - -})(JSX); - -var Among = JSX.require("src/among.jsx").Among; -var Among$SII = JSX.require("src/among.jsx").Among$SII; -var Stemmer = JSX.require("src/stemmer.jsx").Stemmer; -var BaseStemmer = JSX.require("src/base-stemmer.jsx").BaseStemmer; -var NorwegianStemmer = JSX.require("src/norwegian-stemmer.jsx").NorwegianStemmer; diff --git a/sphinx/search/non-minified-js/porter-stemmer.js b/sphinx/search/non-minified-js/porter-stemmer.js index d07e7a426d8..0747d2cf3ea 100644 --- a/sphinx/search/non-minified-js/porter-stemmer.js +++ b/sphinx/search/non-minified-js/porter-stemmer.js @@ -1,2518 +1,749 @@ -// generatedy by JSX compiler 0.9.89 (2014-05-20 06:01:03 +0900; 8e8c6105f36f3dfe440ea026a3c93a3444977102) -var JSX = {}; -(function (JSX) { -/** - * extends the class - */ -function $__jsx_extend(derivations, base) { - var ctor = function () {}; - ctor.prototype = base.prototype; - var proto = new ctor(); - for (var i in derivations) { - derivations[i].prototype = proto; - } -} - -/** - * copies the implementations from source interface to target - */ -function $__jsx_merge_interface(target, source) { - for (var k in source.prototype) - if (source.prototype.hasOwnProperty(k)) - target.prototype[k] = source.prototype[k]; -} - -/** - * defers the initialization of the property - */ -function $__jsx_lazy_init(obj, prop, func) { - function reset(obj, prop, value) { - delete obj[prop]; - obj[prop] = value; - return value; - } - - Object.defineProperty(obj, prop, { - get: function () { - return reset(obj, prop, func()); - }, - set: function (v) { - reset(obj, prop, v); - }, - enumerable: true, - configurable: true - }); -} - -var $__jsx_imul = Math.imul; -if (typeof $__jsx_imul === "undefined") { - $__jsx_imul = function (a, b) { - var ah = (a >>> 16) & 0xffff; - var al = a & 0xffff; - var bh = (b >>> 16) & 0xffff; - var bl = b & 0xffff; - return ((al * bl) + (((ah * bl + al * bh) << 16) >>> 0)|0); - }; -} - -/** - * fused int-ops with side-effects - */ -function $__jsx_ipadd(o, p, r) { - return o[p] = (o[p] + r) | 0; -} -function $__jsx_ipsub(o, p, r) { - return o[p] = (o[p] - r) | 0; -} -function $__jsx_ipmul(o, p, r) { - return o[p] = $__jsx_imul(o[p], r); -} -function $__jsx_ipdiv(o, p, r) { - return o[p] = (o[p] / r) | 0; -} -function $__jsx_ipmod(o, p, r) { - return o[p] = (o[p] % r) | 0; -} -function $__jsx_ippostinc(o, p) { - var v = o[p]; - o[p] = (v + 1) | 0; - return v; -} -function $__jsx_ippostdec(o, p) { - var v = o[p]; - o[p] = (v - 1) | 0; - return v; -} - -/** - * non-inlined version of Array#each - */ -function $__jsx_forEach(o, f) { - var l = o.length; - for (var i = 0; i < l; ++i) - f(o[i]); -} - -/* - * global functions, renamed to avoid conflict with local variable names - */ -var $__jsx_parseInt = parseInt; -var $__jsx_parseFloat = parseFloat; -function $__jsx_isNaN(n) { return n !== n; } -var $__jsx_isFinite = isFinite; - -var $__jsx_encodeURIComponent = encodeURIComponent; -var $__jsx_decodeURIComponent = decodeURIComponent; -var $__jsx_encodeURI = encodeURI; -var $__jsx_decodeURI = decodeURI; - -var $__jsx_ObjectToString = Object.prototype.toString; -var $__jsx_ObjectHasOwnProperty = Object.prototype.hasOwnProperty; - -/* - * profiler object, initialized afterwards - */ -function $__jsx_profiler() { -} - -/* - * public interface to JSX code - */ -JSX.require = function (path) { - var m = $__jsx_classMap[path]; - return m !== undefined ? m : null; -}; - -JSX.profilerIsRunning = function () { - return $__jsx_profiler.getResults != null; -}; - -JSX.getProfileResults = function () { - return ($__jsx_profiler.getResults || function () { return {}; })(); -}; - -JSX.postProfileResults = function (url, cb) { - if ($__jsx_profiler.postResults == null) - throw new Error("profiler has not been turned on"); - return $__jsx_profiler.postResults(url, cb); -}; - -JSX.resetProfileResults = function () { - if ($__jsx_profiler.resetResults == null) - throw new Error("profiler has not been turned on"); - return $__jsx_profiler.resetResults(); -}; -JSX.DEBUG = false; -var GeneratorFunction$0 = -(function () { - try { - return Function('import {GeneratorFunction} from "std:iteration"; return GeneratorFunction')(); - } catch (e) { - return function GeneratorFunction () {}; - } -})(); -var __jsx_generator_object$0 = -(function () { - function __jsx_generator_object() { - this.__next = 0; - this.__loop = null; - this.__seed = null; - this.__value = undefined; - this.__status = 0; // SUSPENDED: 0, ACTIVE: 1, DEAD: 2 - } - - __jsx_generator_object.prototype.next = function (seed) { - switch (this.__status) { - case 0: - this.__status = 1; - this.__seed = seed; - - // go next! - this.__loop(this.__next); - - var done = false; - if (this.__next != -1) { - this.__status = 0; - } else { - this.__status = 2; - done = true; - } - return { value: this.__value, done: done }; - case 1: - throw new Error("Generator is already running"); - case 2: - throw new Error("Generator is already finished"); - default: - throw new Error("Unexpected generator internal state"); - } - }; - - return __jsx_generator_object; -}()); -function Among(s, substring_i, result) { - this.s_size = s.length; - this.s = s; - this.substring_i = substring_i; - this.result = result; - this.method = null; - this.instance = null; -}; - -function Among$0(s, substring_i, result, method, instance) { - this.s_size = s.length; - this.s = s; - this.substring_i = substring_i; - this.result = result; - this.method = method; - this.instance = instance; -}; - -$__jsx_extend([Among, Among$0], Object); -function Stemmer() { -}; - -$__jsx_extend([Stemmer], Object); -function BaseStemmer() { - var current$0; - var cursor$0; - var limit$0; - this.cache = ({ }); - current$0 = this.current = ""; - cursor$0 = this.cursor = 0; - limit$0 = this.limit = current$0.length; - this.limit_backward = 0; - this.bra = cursor$0; - this.ket = limit$0; -}; - -$__jsx_extend([BaseStemmer], Stemmer); -BaseStemmer.prototype.setCurrent$S = function (value) { - var current$0; - var cursor$0; - var limit$0; - current$0 = this.current = value; - cursor$0 = this.cursor = 0; - limit$0 = this.limit = current$0.length; - this.limit_backward = 0; - this.bra = cursor$0; - this.ket = limit$0; -}; - - -function BaseStemmer$setCurrent$LBaseStemmer$S($this, value) { - var current$0; - var cursor$0; - var limit$0; - current$0 = $this.current = value; - cursor$0 = $this.cursor = 0; - limit$0 = $this.limit = current$0.length; - $this.limit_backward = 0; - $this.bra = cursor$0; - $this.ket = limit$0; -}; - -BaseStemmer.setCurrent$LBaseStemmer$S = BaseStemmer$setCurrent$LBaseStemmer$S; - -BaseStemmer.prototype.getCurrent$ = function () { - return this.current; -}; - - -function BaseStemmer$getCurrent$LBaseStemmer$($this) { - return $this.current; -}; - -BaseStemmer.getCurrent$LBaseStemmer$ = BaseStemmer$getCurrent$LBaseStemmer$; - -BaseStemmer.prototype.copy_from$LBaseStemmer$ = function (other) { - this.current = other.current; - this.cursor = other.cursor; - this.limit = other.limit; - this.limit_backward = other.limit_backward; - this.bra = other.bra; - this.ket = other.ket; -}; - - -function BaseStemmer$copy_from$LBaseStemmer$LBaseStemmer$($this, other) { - $this.current = other.current; - $this.cursor = other.cursor; - $this.limit = other.limit; - $this.limit_backward = other.limit_backward; - $this.bra = other.bra; - $this.ket = other.ket; -}; - -BaseStemmer.copy_from$LBaseStemmer$LBaseStemmer$ = BaseStemmer$copy_from$LBaseStemmer$LBaseStemmer$; - -BaseStemmer.prototype.in_grouping$AIII = function (s, min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor >= this.limit) { - return false; - } - ch = this.current.charCodeAt(this.cursor); - if (ch > max || ch < min) { - return false; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$in_grouping$LBaseStemmer$AIII($this, s, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor >= $this.limit) { - return false; - } - ch = $this.current.charCodeAt($this.cursor); - if (ch > max || ch < min) { - return false; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.in_grouping$LBaseStemmer$AIII = BaseStemmer$in_grouping$LBaseStemmer$AIII; - -BaseStemmer.prototype.in_grouping_b$AIII = function (s, min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor <= this.limit_backward) { - return false; - } - ch = this.current.charCodeAt(this.cursor - 1); - if (ch > max || ch < min) { - return false; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$in_grouping_b$LBaseStemmer$AIII($this, s, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor <= $this.limit_backward) { - return false; - } - ch = $this.current.charCodeAt($this.cursor - 1); - if (ch > max || ch < min) { - return false; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.in_grouping_b$LBaseStemmer$AIII = BaseStemmer$in_grouping_b$LBaseStemmer$AIII; - -BaseStemmer.prototype.out_grouping$AIII = function (s, min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor >= this.limit) { - return false; - } - ch = this.current.charCodeAt(this.cursor); - if (ch > max || ch < min) { - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; - } - ch -= min; - if ((s[ch >>> 3] & 0X1 << (ch & 0x7)) === 0) { - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; - } - return false; -}; - - -function BaseStemmer$out_grouping$LBaseStemmer$AIII($this, s, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor >= $this.limit) { - return false; - } - ch = $this.current.charCodeAt($this.cursor); - if (ch > max || ch < min) { - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; - } - ch -= min; - if ((s[ch >>> 3] & 0X1 << (ch & 0x7)) === 0) { - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; - } - return false; -}; - -BaseStemmer.out_grouping$LBaseStemmer$AIII = BaseStemmer$out_grouping$LBaseStemmer$AIII; - -BaseStemmer.prototype.out_grouping_b$AIII = function (s, min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor <= this.limit_backward) { - return false; - } - ch = this.current.charCodeAt(this.cursor - 1); - if (ch > max || ch < min) { - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; - } - return false; -}; - - -function BaseStemmer$out_grouping_b$LBaseStemmer$AIII($this, s, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor <= $this.limit_backward) { - return false; - } - ch = $this.current.charCodeAt($this.cursor - 1); - if (ch > max || ch < min) { - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; - } - return false; -}; - -BaseStemmer.out_grouping_b$LBaseStemmer$AIII = BaseStemmer$out_grouping_b$LBaseStemmer$AIII; - -BaseStemmer.prototype.in_range$II = function (min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor >= this.limit) { - return false; - } - ch = this.current.charCodeAt(this.cursor); - if (ch > max || ch < min) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$in_range$LBaseStemmer$II($this, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor >= $this.limit) { - return false; - } - ch = $this.current.charCodeAt($this.cursor); - if (ch > max || ch < min) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.in_range$LBaseStemmer$II = BaseStemmer$in_range$LBaseStemmer$II; - -BaseStemmer.prototype.in_range_b$II = function (min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor <= this.limit_backward) { - return false; - } - ch = this.current.charCodeAt(this.cursor - 1); - if (ch > max || ch < min) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$in_range_b$LBaseStemmer$II($this, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor <= $this.limit_backward) { - return false; - } - ch = $this.current.charCodeAt($this.cursor - 1); - if (ch > max || ch < min) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.in_range_b$LBaseStemmer$II = BaseStemmer$in_range_b$LBaseStemmer$II; - -BaseStemmer.prototype.out_range$II = function (min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor >= this.limit) { - return false; - } - ch = this.current.charCodeAt(this.cursor); - if (! (ch > max || ch < min)) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$out_range$LBaseStemmer$II($this, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor >= $this.limit) { - return false; - } - ch = $this.current.charCodeAt($this.cursor); - if (! (ch > max || ch < min)) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.out_range$LBaseStemmer$II = BaseStemmer$out_range$LBaseStemmer$II; - -BaseStemmer.prototype.out_range_b$II = function (min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor <= this.limit_backward) { - return false; - } - ch = this.current.charCodeAt(this.cursor - 1); - if (! (ch > max || ch < min)) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$out_range_b$LBaseStemmer$II($this, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor <= $this.limit_backward) { - return false; - } - ch = $this.current.charCodeAt($this.cursor - 1); - if (! (ch > max || ch < min)) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.out_range_b$LBaseStemmer$II = BaseStemmer$out_range_b$LBaseStemmer$II; - -BaseStemmer.prototype.eq_s$IS = function (s_size, s) { - var cursor$0; - if (((this.limit - this.cursor) | 0) < s_size) { - return false; - } - if (this.current.slice(cursor$0 = this.cursor, ((cursor$0 + s_size) | 0)) !== s) { - return false; - } - this.cursor = (this.cursor + s_size) | 0; - return true; -}; - - -function BaseStemmer$eq_s$LBaseStemmer$IS($this, s_size, s) { - var cursor$0; - if ((($this.limit - $this.cursor) | 0) < s_size) { - return false; - } - if ($this.current.slice(cursor$0 = $this.cursor, ((cursor$0 + s_size) | 0)) !== s) { - return false; - } - $this.cursor = ($this.cursor + s_size) | 0; - return true; -}; - -BaseStemmer.eq_s$LBaseStemmer$IS = BaseStemmer$eq_s$LBaseStemmer$IS; - -BaseStemmer.prototype.eq_s_b$IS = function (s_size, s) { - var cursor$0; - if (((this.cursor - this.limit_backward) | 0) < s_size) { - return false; - } - if (this.current.slice((((cursor$0 = this.cursor) - s_size) | 0), cursor$0) !== s) { - return false; - } - this.cursor = (this.cursor - s_size) | 0; - return true; +// Generated by Snowball 2.1.0 - https://snowballstem.org/ + +/**@constructor*/ +PorterStemmer = function() { + var base = new BaseStemmer(); + /** @const */ var a_0 = [ + ["s", -1, 3], + ["ies", 0, 2], + ["sses", 0, 1], + ["ss", 0, -1] + ]; + + /** @const */ var a_1 = [ + ["", -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] + ]; + + /** @const */ var a_2 = [ + ["ed", -1, 2], + ["eed", 0, 1], + ["ing", -1, 2] + ]; + + /** @const */ var a_3 = [ + ["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] + ]; + + /** @const */ var a_4 = [ + ["icate", -1, 2], + ["ative", -1, 3], + ["alize", -1, 1], + ["iciti", -1, 2], + ["ical", -1, 2], + ["ful", -1, 3], + ["ness", -1, 3] + ]; + + /** @const */ var a_5 = [ + ["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] + ]; + + /** @const */ var /** Array */ g_v = [17, 65, 16, 1]; + + /** @const */ var /** Array */ g_v_WXY = [1, 17, 65, 208, 1]; + + var /** boolean */ B_Y_found = false; + var /** number */ I_p2 = 0; + var /** number */ I_p1 = 0; + + + /** @return {boolean} */ + function r_shortv() { + if (!(base.out_grouping_b(g_v_WXY, 89, 121))) + { + return false; + } + if (!(base.in_grouping_b(g_v, 97, 121))) + { + return false; + } + if (!(base.out_grouping_b(g_v, 97, 121))) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_R1() { + if (!(I_p1 <= base.cursor)) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_R2() { + if (!(I_p2 <= base.cursor)) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_Step_1a() { + var /** number */ among_var; + base.ket = base.cursor; + among_var = base.find_among_b(a_0); + if (among_var == 0) + { + return false; + } + base.bra = base.cursor; + switch (among_var) { + case 1: + if (!base.slice_from("ss")) + { + return false; + } + break; + case 2: + if (!base.slice_from("i")) + { + return false; + } + break; + case 3: + if (!base.slice_del()) + { + return false; + } + break; + } + return true; + }; + + /** @return {boolean} */ + function r_Step_1b() { + var /** number */ among_var; + base.ket = base.cursor; + among_var = base.find_among_b(a_2); + if (among_var == 0) + { + return false; + } + base.bra = base.cursor; + switch (among_var) { + case 1: + if (!r_R1()) + { + return false; + } + if (!base.slice_from("ee")) + { + return false; + } + break; + case 2: + var /** number */ v_1 = base.limit - base.cursor; + golab0: while(true) + { + lab1: { + if (!(base.in_grouping_b(g_v, 97, 121))) + { + break lab1; + } + break golab0; + } + if (base.cursor <= base.limit_backward) + { + return false; + } + base.cursor--; + } + base.cursor = base.limit - v_1; + if (!base.slice_del()) + { + return false; + } + var /** number */ v_3 = base.limit - base.cursor; + among_var = base.find_among_b(a_1); + if (among_var == 0) + { + return false; + } + base.cursor = base.limit - v_3; + switch (among_var) { + case 1: + { + var /** number */ c1 = base.cursor; + base.insert(base.cursor, base.cursor, "e"); + base.cursor = c1; + } + break; + case 2: + base.ket = base.cursor; + if (base.cursor <= base.limit_backward) + { + return false; + } + base.cursor--; + base.bra = base.cursor; + if (!base.slice_del()) + { + return false; + } + break; + case 3: + if (base.cursor != I_p1) + { + return false; + } + var /** number */ v_4 = base.limit - base.cursor; + if (!r_shortv()) + { + return false; + } + base.cursor = base.limit - v_4; + { + var /** number */ c2 = base.cursor; + base.insert(base.cursor, base.cursor, "e"); + base.cursor = c2; + } + break; + } + break; + } + return true; + }; + + /** @return {boolean} */ + function r_Step_1c() { + base.ket = base.cursor; + lab0: { + var /** number */ v_1 = base.limit - base.cursor; + lab1: { + if (!(base.eq_s_b("y"))) + { + break lab1; + } + break lab0; + } + base.cursor = base.limit - v_1; + if (!(base.eq_s_b("Y"))) + { + return false; + } + } + base.bra = base.cursor; + golab2: while(true) + { + lab3: { + if (!(base.in_grouping_b(g_v, 97, 121))) + { + break lab3; + } + break golab2; + } + if (base.cursor <= base.limit_backward) + { + return false; + } + base.cursor--; + } + if (!base.slice_from("i")) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_Step_2() { + var /** number */ among_var; + base.ket = base.cursor; + among_var = base.find_among_b(a_3); + if (among_var == 0) + { + return false; + } + base.bra = base.cursor; + if (!r_R1()) + { + return false; + } + switch (among_var) { + case 1: + if (!base.slice_from("tion")) + { + return false; + } + break; + case 2: + if (!base.slice_from("ence")) + { + return false; + } + break; + case 3: + if (!base.slice_from("ance")) + { + return false; + } + break; + case 4: + if (!base.slice_from("able")) + { + return false; + } + break; + case 5: + if (!base.slice_from("ent")) + { + return false; + } + break; + case 6: + if (!base.slice_from("e")) + { + return false; + } + break; + case 7: + if (!base.slice_from("ize")) + { + return false; + } + break; + case 8: + if (!base.slice_from("ate")) + { + return false; + } + break; + case 9: + if (!base.slice_from("al")) + { + return false; + } + break; + case 10: + if (!base.slice_from("ful")) + { + return false; + } + break; + case 11: + if (!base.slice_from("ous")) + { + return false; + } + break; + case 12: + if (!base.slice_from("ive")) + { + return false; + } + break; + case 13: + if (!base.slice_from("ble")) + { + return false; + } + break; + } + return true; + }; + + /** @return {boolean} */ + function r_Step_3() { + var /** number */ among_var; + base.ket = base.cursor; + among_var = base.find_among_b(a_4); + if (among_var == 0) + { + return false; + } + base.bra = base.cursor; + if (!r_R1()) + { + return false; + } + switch (among_var) { + case 1: + if (!base.slice_from("al")) + { + return false; + } + break; + case 2: + if (!base.slice_from("ic")) + { + return false; + } + break; + case 3: + if (!base.slice_del()) + { + return false; + } + break; + } + return true; + }; + + /** @return {boolean} */ + function r_Step_4() { + var /** number */ among_var; + base.ket = base.cursor; + among_var = base.find_among_b(a_5); + if (among_var == 0) + { + return false; + } + base.bra = base.cursor; + if (!r_R2()) + { + return false; + } + switch (among_var) { + case 1: + if (!base.slice_del()) + { + return false; + } + break; + case 2: + lab0: { + var /** number */ v_1 = base.limit - base.cursor; + lab1: { + if (!(base.eq_s_b("s"))) + { + break lab1; + } + break lab0; + } + base.cursor = base.limit - v_1; + if (!(base.eq_s_b("t"))) + { + return false; + } + } + if (!base.slice_del()) + { + return false; + } + break; + } + return true; + }; + + /** @return {boolean} */ + function r_Step_5a() { + base.ket = base.cursor; + if (!(base.eq_s_b("e"))) + { + return false; + } + base.bra = base.cursor; + lab0: { + var /** number */ v_1 = base.limit - base.cursor; + lab1: { + if (!r_R2()) + { + break lab1; + } + break lab0; + } + base.cursor = base.limit - v_1; + if (!r_R1()) + { + return false; + } + { + var /** number */ v_2 = base.limit - base.cursor; + lab2: { + if (!r_shortv()) + { + break lab2; + } + return false; + } + base.cursor = base.limit - v_2; + } + } + if (!base.slice_del()) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_Step_5b() { + base.ket = base.cursor; + if (!(base.eq_s_b("l"))) + { + return false; + } + base.bra = base.cursor; + if (!r_R2()) + { + return false; + } + if (!(base.eq_s_b("l"))) + { + return false; + } + if (!base.slice_del()) + { + return false; + } + return true; + }; + + this.stem = /** @return {boolean} */ function() { + B_Y_found = false; + var /** number */ v_1 = base.cursor; + lab0: { + base.bra = base.cursor; + if (!(base.eq_s("y"))) + { + break lab0; + } + base.ket = base.cursor; + if (!base.slice_from("Y")) + { + return false; + } + B_Y_found = true; + } + base.cursor = v_1; + var /** number */ v_2 = base.cursor; + lab1: { + while(true) + { + var /** number */ v_3 = base.cursor; + lab2: { + golab3: while(true) + { + var /** number */ v_4 = base.cursor; + lab4: { + if (!(base.in_grouping(g_v, 97, 121))) + { + break lab4; + } + base.bra = base.cursor; + if (!(base.eq_s("y"))) + { + break lab4; + } + base.ket = base.cursor; + base.cursor = v_4; + break golab3; + } + base.cursor = v_4; + if (base.cursor >= base.limit) + { + break lab2; + } + base.cursor++; + } + if (!base.slice_from("Y")) + { + return false; + } + B_Y_found = true; + continue; + } + base.cursor = v_3; + break; + } + } + base.cursor = v_2; + I_p1 = base.limit; + I_p2 = base.limit; + var /** number */ v_5 = base.cursor; + lab5: { + golab6: while(true) + { + lab7: { + if (!(base.in_grouping(g_v, 97, 121))) + { + break lab7; + } + break golab6; + } + if (base.cursor >= base.limit) + { + break lab5; + } + base.cursor++; + } + golab8: while(true) + { + lab9: { + if (!(base.out_grouping(g_v, 97, 121))) + { + break lab9; + } + break golab8; + } + if (base.cursor >= base.limit) + { + break lab5; + } + base.cursor++; + } + I_p1 = base.cursor; + golab10: while(true) + { + lab11: { + if (!(base.in_grouping(g_v, 97, 121))) + { + break lab11; + } + break golab10; + } + if (base.cursor >= base.limit) + { + break lab5; + } + base.cursor++; + } + golab12: while(true) + { + lab13: { + if (!(base.out_grouping(g_v, 97, 121))) + { + break lab13; + } + break golab12; + } + if (base.cursor >= base.limit) + { + break lab5; + } + base.cursor++; + } + I_p2 = base.cursor; + } + base.cursor = v_5; + base.limit_backward = base.cursor; base.cursor = base.limit; + var /** number */ v_10 = base.limit - base.cursor; + r_Step_1a(); + base.cursor = base.limit - v_10; + var /** number */ v_11 = base.limit - base.cursor; + r_Step_1b(); + base.cursor = base.limit - v_11; + var /** number */ v_12 = base.limit - base.cursor; + r_Step_1c(); + base.cursor = base.limit - v_12; + var /** number */ v_13 = base.limit - base.cursor; + r_Step_2(); + base.cursor = base.limit - v_13; + var /** number */ v_14 = base.limit - base.cursor; + r_Step_3(); + base.cursor = base.limit - v_14; + var /** number */ v_15 = base.limit - base.cursor; + r_Step_4(); + base.cursor = base.limit - v_15; + var /** number */ v_16 = base.limit - base.cursor; + r_Step_5a(); + base.cursor = base.limit - v_16; + var /** number */ v_17 = base.limit - base.cursor; + r_Step_5b(); + base.cursor = base.limit - v_17; + base.cursor = base.limit_backward; + var /** number */ v_18 = base.cursor; + lab14: { + if (!B_Y_found) + { + break lab14; + } + while(true) + { + var /** number */ v_19 = base.cursor; + lab15: { + golab16: while(true) + { + var /** number */ v_20 = base.cursor; + lab17: { + base.bra = base.cursor; + if (!(base.eq_s("Y"))) + { + break lab17; + } + base.ket = base.cursor; + base.cursor = v_20; + break golab16; + } + base.cursor = v_20; + if (base.cursor >= base.limit) + { + break lab15; + } + base.cursor++; + } + if (!base.slice_from("y")) + { + return false; + } + continue; + } + base.cursor = v_19; + break; + } + } + base.cursor = v_18; + return true; + }; + + /**@return{string}*/ + this['stemWord'] = function(/**string*/word) { + base.setCurrent(word); + this.stem(); + return base.getCurrent(); + }; }; - - -function BaseStemmer$eq_s_b$LBaseStemmer$IS($this, s_size, s) { - var cursor$0; - if ((($this.cursor - $this.limit_backward) | 0) < s_size) { - return false; - } - if ($this.current.slice((((cursor$0 = $this.cursor) - s_size) | 0), cursor$0) !== s) { - return false; - } - $this.cursor = ($this.cursor - s_size) | 0; - return true; -}; - -BaseStemmer.eq_s_b$LBaseStemmer$IS = BaseStemmer$eq_s_b$LBaseStemmer$IS; - -BaseStemmer.prototype.eq_v$S = function (s) { - return BaseStemmer$eq_s$LBaseStemmer$IS(this, s.length, s); -}; - - -function BaseStemmer$eq_v$LBaseStemmer$S($this, s) { - return BaseStemmer$eq_s$LBaseStemmer$IS($this, s.length, s); -}; - -BaseStemmer.eq_v$LBaseStemmer$S = BaseStemmer$eq_v$LBaseStemmer$S; - -BaseStemmer.prototype.eq_v_b$S = function (s) { - return BaseStemmer$eq_s_b$LBaseStemmer$IS(this, s.length, s); -}; - - -function BaseStemmer$eq_v_b$LBaseStemmer$S($this, s) { - return BaseStemmer$eq_s_b$LBaseStemmer$IS($this, s.length, s); -}; - -BaseStemmer.eq_v_b$LBaseStemmer$S = BaseStemmer$eq_v_b$LBaseStemmer$S; - -BaseStemmer.prototype.find_among$ALAmong$I = function (v, v_size) { - var i; - var j; - var c; - var l; - var common_i; - var common_j; - var first_key_inspected; - var k; - var diff; - var common; - var w; - var i2; - var res; - i = 0; - j = v_size; - c = this.cursor; - l = this.limit; - common_i = 0; - common_j = 0; - first_key_inspected = false; - while (true) { - k = i + (j - i >>> 1); - diff = 0; - common = (common_i < common_j ? common_i : common_j); - w = v[k]; - for (i2 = common; i2 < w.s_size; i2++) { - if (c + common === l) { - diff = -1; - break; - } - diff = this.current.charCodeAt(c + common) - w.s.charCodeAt(i2); - if (diff !== 0) { - break; - } - common++; - } - if (diff < 0) { - j = k; - common_j = common; - } else { - i = k; - common_i = common; - } - if (j - i <= 1) { - if (i > 0) { - break; - } - if (j === i) { - break; - } - if (first_key_inspected) { - break; - } - first_key_inspected = true; - } - } - while (true) { - w = v[i]; - if (common_i >= w.s_size) { - this.cursor = (c + w.s_size | 0); - if (w.method == null) { - return w.result; - } - res = w.method(w.instance); - this.cursor = (c + w.s_size | 0); - if (res) { - return w.result; - } - } - i = w.substring_i; - if (i < 0) { - return 0; - } - } - return -1; -}; - - -function BaseStemmer$find_among$LBaseStemmer$ALAmong$I($this, v, v_size) { - var i; - var j; - var c; - var l; - var common_i; - var common_j; - var first_key_inspected; - var k; - var diff; - var common; - var w; - var i2; - var res; - i = 0; - j = v_size; - c = $this.cursor; - l = $this.limit; - common_i = 0; - common_j = 0; - first_key_inspected = false; - while (true) { - k = i + (j - i >>> 1); - diff = 0; - common = (common_i < common_j ? common_i : common_j); - w = v[k]; - for (i2 = common; i2 < w.s_size; i2++) { - if (c + common === l) { - diff = -1; - break; - } - diff = $this.current.charCodeAt(c + common) - w.s.charCodeAt(i2); - if (diff !== 0) { - break; - } - common++; - } - if (diff < 0) { - j = k; - common_j = common; - } else { - i = k; - common_i = common; - } - if (j - i <= 1) { - if (i > 0) { - break; - } - if (j === i) { - break; - } - if (first_key_inspected) { - break; - } - first_key_inspected = true; - } - } - while (true) { - w = v[i]; - if (common_i >= w.s_size) { - $this.cursor = (c + w.s_size | 0); - if (w.method == null) { - return w.result; - } - res = w.method(w.instance); - $this.cursor = (c + w.s_size | 0); - if (res) { - return w.result; - } - } - i = w.substring_i; - if (i < 0) { - return 0; - } - } - return -1; -}; - -BaseStemmer.find_among$LBaseStemmer$ALAmong$I = BaseStemmer$find_among$LBaseStemmer$ALAmong$I; - -BaseStemmer.prototype.find_among_b$ALAmong$I = function (v, v_size) { - var i; - var j; - var c; - var lb; - var common_i; - var common_j; - var first_key_inspected; - var k; - var diff; - var common; - var w; - var i2; - var res; - i = 0; - j = v_size; - c = this.cursor; - lb = this.limit_backward; - common_i = 0; - common_j = 0; - first_key_inspected = false; - while (true) { - k = i + (j - i >> 1); - diff = 0; - common = (common_i < common_j ? common_i : common_j); - w = v[k]; - for (i2 = w.s_size - 1 - common; i2 >= 0; i2--) { - if (c - common === lb) { - diff = -1; - break; - } - diff = this.current.charCodeAt(c - 1 - common) - w.s.charCodeAt(i2); - if (diff !== 0) { - break; - } - common++; - } - if (diff < 0) { - j = k; - common_j = common; - } else { - i = k; - common_i = common; - } - if (j - i <= 1) { - if (i > 0) { - break; - } - if (j === i) { - break; - } - if (first_key_inspected) { - break; - } - first_key_inspected = true; - } - } - while (true) { - w = v[i]; - if (common_i >= w.s_size) { - this.cursor = (c - w.s_size | 0); - if (w.method == null) { - return w.result; - } - res = w.method(this); - this.cursor = (c - w.s_size | 0); - if (res) { - return w.result; - } - } - i = w.substring_i; - if (i < 0) { - return 0; - } - } - return -1; -}; - - -function BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, v, v_size) { - var i; - var j; - var c; - var lb; - var common_i; - var common_j; - var first_key_inspected; - var k; - var diff; - var common; - var w; - var i2; - var res; - i = 0; - j = v_size; - c = $this.cursor; - lb = $this.limit_backward; - common_i = 0; - common_j = 0; - first_key_inspected = false; - while (true) { - k = i + (j - i >> 1); - diff = 0; - common = (common_i < common_j ? common_i : common_j); - w = v[k]; - for (i2 = w.s_size - 1 - common; i2 >= 0; i2--) { - if (c - common === lb) { - diff = -1; - break; - } - diff = $this.current.charCodeAt(c - 1 - common) - w.s.charCodeAt(i2); - if (diff !== 0) { - break; - } - common++; - } - if (diff < 0) { - j = k; - common_j = common; - } else { - i = k; - common_i = common; - } - if (j - i <= 1) { - if (i > 0) { - break; - } - if (j === i) { - break; - } - if (first_key_inspected) { - break; - } - first_key_inspected = true; - } - } - while (true) { - w = v[i]; - if (common_i >= w.s_size) { - $this.cursor = (c - w.s_size | 0); - if (w.method == null) { - return w.result; - } - res = w.method($this); - $this.cursor = (c - w.s_size | 0); - if (res) { - return w.result; - } - } - i = w.substring_i; - if (i < 0) { - return 0; - } - } - return -1; -}; - -BaseStemmer.find_among_b$LBaseStemmer$ALAmong$I = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I; - -BaseStemmer.prototype.replace_s$IIS = function (c_bra, c_ket, s) { - var adjustment; - adjustment = ((s.length - (((c_ket - c_bra) | 0))) | 0); - this.current = this.current.slice(0, c_bra) + s + this.current.slice(c_ket); - this.limit = (this.limit + adjustment) | 0; - if (this.cursor >= c_ket) { - this.cursor = (this.cursor + adjustment) | 0; - } else if (this.cursor > c_bra) { - this.cursor = c_bra; - } - return (adjustment | 0); -}; - - -function BaseStemmer$replace_s$LBaseStemmer$IIS($this, c_bra, c_ket, s) { - var adjustment; - adjustment = ((s.length - (((c_ket - c_bra) | 0))) | 0); - $this.current = $this.current.slice(0, c_bra) + s + $this.current.slice(c_ket); - $this.limit = ($this.limit + adjustment) | 0; - if ($this.cursor >= c_ket) { - $this.cursor = ($this.cursor + adjustment) | 0; - } else if ($this.cursor > c_bra) { - $this.cursor = c_bra; - } - return (adjustment | 0); -}; - -BaseStemmer.replace_s$LBaseStemmer$IIS = BaseStemmer$replace_s$LBaseStemmer$IIS; - -BaseStemmer.prototype.slice_check$ = function () { - var bra$0; - var ket$0; - var limit$0; - return ((bra$0 = this.bra) < 0 || bra$0 > (ket$0 = this.ket) || ket$0 > (limit$0 = this.limit) || limit$0 > this.current.length ? false : true); -}; - - -function BaseStemmer$slice_check$LBaseStemmer$($this) { - var bra$0; - var ket$0; - var limit$0; - return ((bra$0 = $this.bra) < 0 || bra$0 > (ket$0 = $this.ket) || ket$0 > (limit$0 = $this.limit) || limit$0 > $this.current.length ? false : true); -}; - -BaseStemmer.slice_check$LBaseStemmer$ = BaseStemmer$slice_check$LBaseStemmer$; - -BaseStemmer.prototype.slice_from$S = function (s) { - var result; - var bra$0; - var ket$0; - var limit$0; - result = false; - if ((bra$0 = this.bra) < 0 || bra$0 > (ket$0 = this.ket) || ket$0 > (limit$0 = this.limit) || limit$0 > this.current.length ? false : true) { - BaseStemmer$replace_s$LBaseStemmer$IIS(this, this.bra, this.ket, s); - result = true; - } - return result; -}; - - -function BaseStemmer$slice_from$LBaseStemmer$S($this, s) { - var result; - var bra$0; - var ket$0; - var limit$0; - result = false; - if ((bra$0 = $this.bra) < 0 || bra$0 > (ket$0 = $this.ket) || ket$0 > (limit$0 = $this.limit) || limit$0 > $this.current.length ? false : true) { - BaseStemmer$replace_s$LBaseStemmer$IIS($this, $this.bra, $this.ket, s); - result = true; - } - return result; -}; - -BaseStemmer.slice_from$LBaseStemmer$S = BaseStemmer$slice_from$LBaseStemmer$S; - -BaseStemmer.prototype.slice_del$ = function () { - return BaseStemmer$slice_from$LBaseStemmer$S(this, ""); -}; - - -function BaseStemmer$slice_del$LBaseStemmer$($this) { - return BaseStemmer$slice_from$LBaseStemmer$S($this, ""); -}; - -BaseStemmer.slice_del$LBaseStemmer$ = BaseStemmer$slice_del$LBaseStemmer$; - -BaseStemmer.prototype.insert$IIS = function (c_bra, c_ket, s) { - var adjustment; - adjustment = BaseStemmer$replace_s$LBaseStemmer$IIS(this, c_bra, c_ket, s); - if (c_bra <= this.bra) { - this.bra = (this.bra + adjustment) | 0; - } - if (c_bra <= this.ket) { - this.ket = (this.ket + adjustment) | 0; - } -}; - - -function BaseStemmer$insert$LBaseStemmer$IIS($this, c_bra, c_ket, s) { - var adjustment; - adjustment = BaseStemmer$replace_s$LBaseStemmer$IIS($this, c_bra, c_ket, s); - if (c_bra <= $this.bra) { - $this.bra = ($this.bra + adjustment) | 0; - } - if (c_bra <= $this.ket) { - $this.ket = ($this.ket + adjustment) | 0; - } -}; - -BaseStemmer.insert$LBaseStemmer$IIS = BaseStemmer$insert$LBaseStemmer$IIS; - -BaseStemmer.prototype.slice_to$S = function (s) { - var result; - var bra$0; - var ket$0; - var limit$0; - result = ''; - if ((bra$0 = this.bra) < 0 || bra$0 > (ket$0 = this.ket) || ket$0 > (limit$0 = this.limit) || limit$0 > this.current.length ? false : true) { - result = this.current.slice(this.bra, this.ket); - } - return result; -}; - - -function BaseStemmer$slice_to$LBaseStemmer$S($this, s) { - var result; - var bra$0; - var ket$0; - var limit$0; - result = ''; - if ((bra$0 = $this.bra) < 0 || bra$0 > (ket$0 = $this.ket) || ket$0 > (limit$0 = $this.limit) || limit$0 > $this.current.length ? false : true) { - result = $this.current.slice($this.bra, $this.ket); - } - return result; -}; - -BaseStemmer.slice_to$LBaseStemmer$S = BaseStemmer$slice_to$LBaseStemmer$S; - -BaseStemmer.prototype.assign_to$S = function (s) { - return this.current.slice(0, this.limit); -}; - - -function BaseStemmer$assign_to$LBaseStemmer$S($this, s) { - return $this.current.slice(0, $this.limit); -}; - -BaseStemmer.assign_to$LBaseStemmer$S = BaseStemmer$assign_to$LBaseStemmer$S; - -BaseStemmer.prototype.stem$ = function () { - return false; -}; - - -BaseStemmer.prototype.stemWord$S = function (word) { - var result; - var current$0; - var cursor$0; - var limit$0; - result = this.cache['.' + word]; - if (result == null) { - current$0 = this.current = word; - cursor$0 = this.cursor = 0; - limit$0 = this.limit = current$0.length; - this.limit_backward = 0; - this.bra = cursor$0; - this.ket = limit$0; - this.stem$(); - result = this.current; - this.cache['.' + word] = result; - } - return result; -}; - -BaseStemmer.prototype.stemWord = BaseStemmer.prototype.stemWord$S; - -BaseStemmer.prototype.stemWords$AS = function (words) { - var results; - var i; - var word; - var result; - var current$0; - var cursor$0; - var limit$0; - results = [ ]; - for (i = 0; i < words.length; i++) { - word = words[i]; - result = this.cache['.' + word]; - if (result == null) { - current$0 = this.current = word; - cursor$0 = this.cursor = 0; - limit$0 = this.limit = current$0.length; - this.limit_backward = 0; - this.bra = cursor$0; - this.ket = limit$0; - this.stem$(); - result = this.current; - this.cache['.' + word] = result; - } - results.push(result); - } - return results; -}; - -BaseStemmer.prototype.stemWords = BaseStemmer.prototype.stemWords$AS; - -function PorterStemmer() { - BaseStemmer.call(this); - this.B_Y_found = false; - this.I_p2 = 0; - this.I_p1 = 0; -}; - -$__jsx_extend([PorterStemmer], BaseStemmer); -PorterStemmer.prototype.copy_from$LPorterStemmer$ = function (other) { - this.B_Y_found = other.B_Y_found; - this.I_p2 = other.I_p2; - this.I_p1 = other.I_p1; - BaseStemmer$copy_from$LBaseStemmer$LBaseStemmer$(this, other); -}; - -PorterStemmer.prototype.copy_from = PorterStemmer.prototype.copy_from$LPorterStemmer$; - -PorterStemmer.prototype.r_shortv$ = function () { - return (! BaseStemmer$out_grouping_b$LBaseStemmer$AIII(this, PorterStemmer.g_v_WXY, 89, 121) ? false : ! BaseStemmer$in_grouping_b$LBaseStemmer$AIII(this, PorterStemmer.g_v, 97, 121) ? false : ! BaseStemmer$out_grouping_b$LBaseStemmer$AIII(this, PorterStemmer.g_v, 97, 121) ? false : true); -}; - -PorterStemmer.prototype.r_shortv = PorterStemmer.prototype.r_shortv$; - -function PorterStemmer$r_shortv$LPorterStemmer$($this) { - return (! BaseStemmer$out_grouping_b$LBaseStemmer$AIII($this, PorterStemmer.g_v_WXY, 89, 121) ? false : ! BaseStemmer$in_grouping_b$LBaseStemmer$AIII($this, PorterStemmer.g_v, 97, 121) ? false : ! BaseStemmer$out_grouping_b$LBaseStemmer$AIII($this, PorterStemmer.g_v, 97, 121) ? false : true); -}; - -PorterStemmer.r_shortv$LPorterStemmer$ = PorterStemmer$r_shortv$LPorterStemmer$; - -PorterStemmer.prototype.r_R1$ = function () { - return (! (this.I_p1 <= this.cursor) ? false : true); -}; - -PorterStemmer.prototype.r_R1 = PorterStemmer.prototype.r_R1$; - -function PorterStemmer$r_R1$LPorterStemmer$($this) { - return (! ($this.I_p1 <= $this.cursor) ? false : true); -}; - -PorterStemmer.r_R1$LPorterStemmer$ = PorterStemmer$r_R1$LPorterStemmer$; - -PorterStemmer.prototype.r_R2$ = function () { - return (! (this.I_p2 <= this.cursor) ? false : true); -}; - -PorterStemmer.prototype.r_R2 = PorterStemmer.prototype.r_R2$; - -function PorterStemmer$r_R2$LPorterStemmer$($this) { - return (! ($this.I_p2 <= $this.cursor) ? false : true); -}; - -PorterStemmer.r_R2$LPorterStemmer$ = PorterStemmer$r_R2$LPorterStemmer$; - -PorterStemmer.prototype.r_Step_1a$ = function () { - var among_var; - this.ket = this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, PorterStemmer.a_0, 4); - if (among_var === 0) { - return false; - } - this.bra = this.cursor; - switch (among_var) { - case 0: - return false; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "ss")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "i")) { - return false; - } - break; - case 3: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - } - return true; -}; - -PorterStemmer.prototype.r_Step_1a = PorterStemmer.prototype.r_Step_1a$; - -function PorterStemmer$r_Step_1a$LPorterStemmer$($this) { - var among_var; - $this.ket = $this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, PorterStemmer.a_0, 4); - if (among_var === 0) { - return false; - } - $this.bra = $this.cursor; - switch (among_var) { - case 0: - return false; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "ss")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "i")) { - return false; - } - break; - case 3: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - } - return true; -}; - -PorterStemmer.r_Step_1a$LPorterStemmer$ = PorterStemmer$r_Step_1a$LPorterStemmer$; - -PorterStemmer.prototype.r_Step_1b$ = function () { - var among_var; - var v_1; - var v_3; - var v_4; - var lab1; - var c; - var c_bra$0; - var adjustment$0; - var c_bra$1; - var adjustment$1; - var cursor$0; - var cursor$1; - var cursor$2; - var $__jsx_postinc_t; - this.ket = this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, PorterStemmer.a_2, 3); - if (among_var === 0) { - return false; - } - this.bra = this.cursor; - switch (among_var) { - case 0: - return false; - case 1: - if (! (! (this.I_p1 <= this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "ee")) { - return false; - } - break; - case 2: - v_1 = ((this.limit - this.cursor) | 0); - golab0: - while (true) { - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII(this, PorterStemmer.g_v, 97, 121)) { - break lab1; - } - break golab0; - } - if (this.cursor <= this.limit_backward) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - } - this.cursor = ((this.limit - v_1) | 0); - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - v_3 = ((this.limit - this.cursor) | 0); - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, PorterStemmer.a_1, 13); - if (among_var === 0) { - return false; - } - this.cursor = ((this.limit - v_3) | 0); - switch (among_var) { - case 0: - return false; - case 1: - c = cursor$0 = this.cursor; - c_bra$0 = cursor$0; - adjustment$0 = BaseStemmer$replace_s$LBaseStemmer$IIS(this, cursor$0, cursor$0, "e"); - if (cursor$0 <= this.bra) { - this.bra = (this.bra + adjustment$0) | 0; - } - if (c_bra$0 <= this.ket) { - this.ket = (this.ket + adjustment$0) | 0; - } - this.cursor = c; - break; - case 2: - this.ket = cursor$1 = this.cursor; - if (cursor$1 <= this.limit_backward) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - this.bra = this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 3: - if (this.cursor !== this.I_p1) { - return false; - } - v_4 = ((this.limit - this.cursor) | 0); - if (! PorterStemmer$r_shortv$LPorterStemmer$(this)) { - return false; - } - cursor$2 = this.cursor = ((this.limit - v_4) | 0); - c = cursor$2; - c_bra$1 = cursor$2; - adjustment$1 = BaseStemmer$replace_s$LBaseStemmer$IIS(this, cursor$2, cursor$2, "e"); - if (cursor$2 <= this.bra) { - this.bra = (this.bra + adjustment$1) | 0; - } - if (c_bra$1 <= this.ket) { - this.ket = (this.ket + adjustment$1) | 0; - } - this.cursor = c; - break; - } - break; - } - return true; -}; - -PorterStemmer.prototype.r_Step_1b = PorterStemmer.prototype.r_Step_1b$; - -function PorterStemmer$r_Step_1b$LPorterStemmer$($this) { - var among_var; - var v_1; - var v_3; - var v_4; - var lab1; - var c; - var c_bra$0; - var adjustment$0; - var c_bra$1; - var adjustment$1; - var cursor$0; - var cursor$1; - var cursor$2; - var $__jsx_postinc_t; - $this.ket = $this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, PorterStemmer.a_2, 3); - if (among_var === 0) { - return false; - } - $this.bra = $this.cursor; - switch (among_var) { - case 0: - return false; - case 1: - if (! (! ($this.I_p1 <= $this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "ee")) { - return false; - } - break; - case 2: - v_1 = (($this.limit - $this.cursor) | 0); - golab0: - while (true) { - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII($this, PorterStemmer.g_v, 97, 121)) { - break lab1; - } - break golab0; - } - if ($this.cursor <= $this.limit_backward) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - } - $this.cursor = (($this.limit - v_1) | 0); - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - v_3 = (($this.limit - $this.cursor) | 0); - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, PorterStemmer.a_1, 13); - if (among_var === 0) { - return false; - } - $this.cursor = (($this.limit - v_3) | 0); - switch (among_var) { - case 0: - return false; - case 1: - c = cursor$0 = $this.cursor; - c_bra$0 = cursor$0; - adjustment$0 = BaseStemmer$replace_s$LBaseStemmer$IIS($this, cursor$0, cursor$0, "e"); - if (cursor$0 <= $this.bra) { - $this.bra = ($this.bra + adjustment$0) | 0; - } - if (c_bra$0 <= $this.ket) { - $this.ket = ($this.ket + adjustment$0) | 0; - } - $this.cursor = c; - break; - case 2: - $this.ket = cursor$1 = $this.cursor; - if (cursor$1 <= $this.limit_backward) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - $this.bra = $this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 3: - if ($this.cursor !== $this.I_p1) { - return false; - } - v_4 = (($this.limit - $this.cursor) | 0); - if (! PorterStemmer$r_shortv$LPorterStemmer$($this)) { - return false; - } - cursor$2 = $this.cursor = (($this.limit - v_4) | 0); - c = cursor$2; - c_bra$1 = cursor$2; - adjustment$1 = BaseStemmer$replace_s$LBaseStemmer$IIS($this, cursor$2, cursor$2, "e"); - if (cursor$2 <= $this.bra) { - $this.bra = ($this.bra + adjustment$1) | 0; - } - if (c_bra$1 <= $this.ket) { - $this.ket = ($this.ket + adjustment$1) | 0; - } - $this.cursor = c; - break; - } - break; - } - return true; -}; - -PorterStemmer.r_Step_1b$LPorterStemmer$ = PorterStemmer$r_Step_1b$LPorterStemmer$; - -PorterStemmer.prototype.r_Step_1c$ = function () { - var v_1; - var lab0; - var lab1; - var lab3; - var $__jsx_postinc_t; - this.ket = this.cursor; - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - v_1 = ((this.limit - this.cursor) | 0); - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "y")) { - break lab1; - } - break lab0; - } - this.cursor = ((this.limit - v_1) | 0); - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "Y")) { - return false; - } - } - this.bra = this.cursor; -golab2: - while (true) { - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII(this, PorterStemmer.g_v, 97, 121)) { - break lab3; - } - break golab2; - } - if (this.cursor <= this.limit_backward) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - } - return (! BaseStemmer$slice_from$LBaseStemmer$S(this, "i") ? false : true); -}; - -PorterStemmer.prototype.r_Step_1c = PorterStemmer.prototype.r_Step_1c$; - -function PorterStemmer$r_Step_1c$LPorterStemmer$($this) { - var v_1; - var lab0; - var lab1; - var lab3; - var $__jsx_postinc_t; - $this.ket = $this.cursor; - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - v_1 = (($this.limit - $this.cursor) | 0); - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "y")) { - break lab1; - } - break lab0; - } - $this.cursor = (($this.limit - v_1) | 0); - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "Y")) { - return false; - } - } - $this.bra = $this.cursor; -golab2: - while (true) { - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII($this, PorterStemmer.g_v, 97, 121)) { - break lab3; - } - break golab2; - } - if ($this.cursor <= $this.limit_backward) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - } - return (! BaseStemmer$slice_from$LBaseStemmer$S($this, "i") ? false : true); -}; - -PorterStemmer.r_Step_1c$LPorterStemmer$ = PorterStemmer$r_Step_1c$LPorterStemmer$; - -PorterStemmer.prototype.r_Step_2$ = function () { - var among_var; - var cursor$0; - this.ket = this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, PorterStemmer.a_3, 20); - if (among_var === 0) { - return false; - } - this.bra = cursor$0 = this.cursor; - if (! (! (this.I_p1 <= cursor$0) ? false : true)) { - return false; - } - switch (among_var) { - case 0: - return false; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "tion")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "ence")) { - return false; - } - break; - case 3: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "ance")) { - return false; - } - break; - case 4: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "able")) { - return false; - } - break; - case 5: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "ent")) { - return false; - } - break; - case 6: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "e")) { - return false; - } - break; - case 7: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "ize")) { - return false; - } - break; - case 8: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "ate")) { - return false; - } - break; - case 9: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "al")) { - return false; - } - break; - case 10: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "al")) { - return false; - } - break; - case 11: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "ful")) { - return false; - } - break; - case 12: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "ous")) { - return false; - } - break; - case 13: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "ive")) { - return false; - } - break; - case 14: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "ble")) { - return false; - } - break; - } - return true; -}; - -PorterStemmer.prototype.r_Step_2 = PorterStemmer.prototype.r_Step_2$; - -function PorterStemmer$r_Step_2$LPorterStemmer$($this) { - var among_var; - var cursor$0; - $this.ket = $this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, PorterStemmer.a_3, 20); - if (among_var === 0) { - return false; - } - $this.bra = cursor$0 = $this.cursor; - if (! (! ($this.I_p1 <= cursor$0) ? false : true)) { - return false; - } - switch (among_var) { - case 0: - return false; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "tion")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "ence")) { - return false; - } - break; - case 3: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "ance")) { - return false; - } - break; - case 4: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "able")) { - return false; - } - break; - case 5: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "ent")) { - return false; - } - break; - case 6: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "e")) { - return false; - } - break; - case 7: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "ize")) { - return false; - } - break; - case 8: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "ate")) { - return false; - } - break; - case 9: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "al")) { - return false; - } - break; - case 10: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "al")) { - return false; - } - break; - case 11: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "ful")) { - return false; - } - break; - case 12: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "ous")) { - return false; - } - break; - case 13: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "ive")) { - return false; - } - break; - case 14: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "ble")) { - return false; - } - break; - } - return true; -}; - -PorterStemmer.r_Step_2$LPorterStemmer$ = PorterStemmer$r_Step_2$LPorterStemmer$; - -PorterStemmer.prototype.r_Step_3$ = function () { - var among_var; - var cursor$0; - this.ket = this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, PorterStemmer.a_4, 7); - if (among_var === 0) { - return false; - } - this.bra = cursor$0 = this.cursor; - if (! (! (this.I_p1 <= cursor$0) ? false : true)) { - return false; - } - switch (among_var) { - case 0: - return false; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "al")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "ic")) { - return false; - } - break; - case 3: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - } - return true; -}; - -PorterStemmer.prototype.r_Step_3 = PorterStemmer.prototype.r_Step_3$; - -function PorterStemmer$r_Step_3$LPorterStemmer$($this) { - var among_var; - var cursor$0; - $this.ket = $this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, PorterStemmer.a_4, 7); - if (among_var === 0) { - return false; - } - $this.bra = cursor$0 = $this.cursor; - if (! (! ($this.I_p1 <= cursor$0) ? false : true)) { - return false; - } - switch (among_var) { - case 0: - return false; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "al")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "ic")) { - return false; - } - break; - case 3: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - } - return true; -}; - -PorterStemmer.r_Step_3$LPorterStemmer$ = PorterStemmer$r_Step_3$LPorterStemmer$; - -PorterStemmer.prototype.r_Step_4$ = function () { - var among_var; - var v_1; - var lab0; - var lab1; - var cursor$0; - this.ket = this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, PorterStemmer.a_5, 19); - if (among_var === 0) { - return false; - } - this.bra = cursor$0 = this.cursor; - if (! (! (this.I_p2 <= cursor$0) ? false : true)) { - return false; - } - switch (among_var) { - case 0: - return false; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 2: - lab0 = true; - lab0: - while (lab0 === true) { - lab0 = false; - v_1 = ((this.limit - this.cursor) | 0); - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "s")) { - break lab1; - } - break lab0; - } - this.cursor = ((this.limit - v_1) | 0); - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "t")) { - return false; - } - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - } - return true; -}; - -PorterStemmer.prototype.r_Step_4 = PorterStemmer.prototype.r_Step_4$; - -function PorterStemmer$r_Step_4$LPorterStemmer$($this) { - var among_var; - var v_1; - var lab0; - var lab1; - var cursor$0; - $this.ket = $this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, PorterStemmer.a_5, 19); - if (among_var === 0) { - return false; - } - $this.bra = cursor$0 = $this.cursor; - if (! (! ($this.I_p2 <= cursor$0) ? false : true)) { - return false; - } - switch (among_var) { - case 0: - return false; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 2: - lab0 = true; - lab0: - while (lab0 === true) { - lab0 = false; - v_1 = (($this.limit - $this.cursor) | 0); - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "s")) { - break lab1; - } - break lab0; - } - $this.cursor = (($this.limit - v_1) | 0); - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "t")) { - return false; - } - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - } - return true; -}; - -PorterStemmer.r_Step_4$LPorterStemmer$ = PorterStemmer$r_Step_4$LPorterStemmer$; - -PorterStemmer.prototype.r_Step_5a$ = function () { - var v_1; - var v_2; - var lab0; - var lab1; - var lab2; - var cursor$0; - this.ket = this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "e")) { - return false; - } - this.bra = this.cursor; - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - v_1 = ((this.limit - this.cursor) | 0); - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - if (! (! (this.I_p2 <= this.cursor) ? false : true)) { - break lab1; - } - break lab0; - } - cursor$0 = this.cursor = ((this.limit - v_1) | 0); - if (! (! (this.I_p1 <= cursor$0) ? false : true)) { - return false; - } - v_2 = ((this.limit - this.cursor) | 0); - lab2 = true; - lab2: - while (lab2 === true) { - lab2 = false; - if (! PorterStemmer$r_shortv$LPorterStemmer$(this)) { - break lab2; - } - return false; - } - this.cursor = ((this.limit - v_2) | 0); - } - return (! BaseStemmer$slice_from$LBaseStemmer$S(this, "") ? false : true); -}; - -PorterStemmer.prototype.r_Step_5a = PorterStemmer.prototype.r_Step_5a$; - -function PorterStemmer$r_Step_5a$LPorterStemmer$($this) { - var v_1; - var v_2; - var lab0; - var lab1; - var lab2; - var cursor$0; - $this.ket = $this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "e")) { - return false; - } - $this.bra = $this.cursor; - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - v_1 = (($this.limit - $this.cursor) | 0); - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - if (! (! ($this.I_p2 <= $this.cursor) ? false : true)) { - break lab1; - } - break lab0; - } - cursor$0 = $this.cursor = (($this.limit - v_1) | 0); - if (! (! ($this.I_p1 <= cursor$0) ? false : true)) { - return false; - } - v_2 = (($this.limit - $this.cursor) | 0); - lab2 = true; - lab2: - while (lab2 === true) { - lab2 = false; - if (! PorterStemmer$r_shortv$LPorterStemmer$($this)) { - break lab2; - } - return false; - } - $this.cursor = (($this.limit - v_2) | 0); - } - return (! BaseStemmer$slice_from$LBaseStemmer$S($this, "") ? false : true); -}; - -PorterStemmer.r_Step_5a$LPorterStemmer$ = PorterStemmer$r_Step_5a$LPorterStemmer$; - -PorterStemmer.prototype.r_Step_5b$ = function () { - var cursor$0; - this.ket = this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "l")) { - return false; - } - this.bra = cursor$0 = this.cursor; - return (! (! (this.I_p2 <= cursor$0) ? false : true) ? false : ! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "l") ? false : ! BaseStemmer$slice_from$LBaseStemmer$S(this, "") ? false : true); -}; - -PorterStemmer.prototype.r_Step_5b = PorterStemmer.prototype.r_Step_5b$; - -function PorterStemmer$r_Step_5b$LPorterStemmer$($this) { - var cursor$0; - $this.ket = $this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "l")) { - return false; - } - $this.bra = cursor$0 = $this.cursor; - return (! (! ($this.I_p2 <= cursor$0) ? false : true) ? false : ! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "l") ? false : ! BaseStemmer$slice_from$LBaseStemmer$S($this, "") ? false : true); -}; - -PorterStemmer.r_Step_5b$LPorterStemmer$ = PorterStemmer$r_Step_5b$LPorterStemmer$; - -PorterStemmer.prototype.stem$ = function () { - var v_1; - var v_2; - var v_3; - var v_4; - var v_5; - var v_10; - var v_11; - var v_12; - var v_13; - var v_14; - var v_15; - var v_16; - var v_18; - var v_19; - var v_20; - var lab0; - var lab1; - var lab3; - var lab5; - var lab6; - var lab8; - var lab10; - var lab12; - var lab14; - var lab15; - var lab16; - var lab17; - var lab18; - var lab19; - var lab20; - var lab21; - var lab22; - var lab23; - var lab25; - var lab27; - var cursor$0; - var cursor$1; - var limit$0; - var cursor$2; - var cursor$3; - var limit$1; - var cursor$4; - var limit$2; - var cursor$5; - var limit$3; - var cursor$6; - var limit$4; - var cursor$7; - var limit$5; - var cursor$8; - var limit$6; - var cursor$9; - var limit$7; - var cursor$10; - var cursor$11; - var cursor$12; - var $__jsx_postinc_t; - this.B_Y_found = false; - v_1 = this.cursor; - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - this.bra = this.cursor; - if (! BaseStemmer$eq_s$LBaseStemmer$IS(this, 1, "y")) { - break lab0; - } - this.ket = this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "Y")) { - return false; - } - this.B_Y_found = true; - } - cursor$1 = this.cursor = v_1; - v_2 = cursor$1; - lab1 = true; -lab1: - while (lab1 === true) { - lab1 = false; - replab2: - while (true) { - v_3 = this.cursor; - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - golab4: - while (true) { - v_4 = this.cursor; - lab5 = true; - lab5: - while (lab5 === true) { - lab5 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, PorterStemmer.g_v, 97, 121)) { - break lab5; - } - this.bra = this.cursor; - if (! BaseStemmer$eq_s$LBaseStemmer$IS(this, 1, "y")) { - break lab5; - } - this.ket = this.cursor; - this.cursor = v_4; - break golab4; - } - cursor$0 = this.cursor = v_4; - if (cursor$0 >= this.limit) { - break lab3; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "Y")) { - return false; - } - this.B_Y_found = true; - continue replab2; - } - this.cursor = v_3; - break replab2; - } - } - cursor$2 = this.cursor = v_2; - this.I_p1 = limit$0 = this.limit; - this.I_p2 = limit$0; - v_5 = cursor$2; - lab6 = true; -lab6: - while (lab6 === true) { - lab6 = false; - golab7: - while (true) { - lab8 = true; - lab8: - while (lab8 === true) { - lab8 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, PorterStemmer.g_v, 97, 121)) { - break lab8; - } - break golab7; - } - if (this.cursor >= this.limit) { - break lab6; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - golab9: - while (true) { - lab10 = true; - lab10: - while (lab10 === true) { - lab10 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII(this, PorterStemmer.g_v, 97, 121)) { - break lab10; - } - break golab9; - } - if (this.cursor >= this.limit) { - break lab6; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - this.I_p1 = this.cursor; - golab11: - while (true) { - lab12 = true; - lab12: - while (lab12 === true) { - lab12 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, PorterStemmer.g_v, 97, 121)) { - break lab12; - } - break golab11; - } - if (this.cursor >= this.limit) { - break lab6; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - golab13: - while (true) { - lab14 = true; - lab14: - while (lab14 === true) { - lab14 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII(this, PorterStemmer.g_v, 97, 121)) { - break lab14; - } - break golab13; - } - if (this.cursor >= this.limit) { - break lab6; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - this.I_p2 = this.cursor; - } - cursor$3 = this.cursor = v_5; - this.limit_backward = cursor$3; - cursor$4 = this.cursor = limit$1 = this.limit; - v_10 = ((limit$1 - cursor$4) | 0); - lab15 = true; -lab15: - while (lab15 === true) { - lab15 = false; - if (! PorterStemmer$r_Step_1a$LPorterStemmer$(this)) { - break lab15; - } - } - cursor$5 = this.cursor = (((limit$2 = this.limit) - v_10) | 0); - v_11 = ((limit$2 - cursor$5) | 0); - lab16 = true; -lab16: - while (lab16 === true) { - lab16 = false; - if (! PorterStemmer$r_Step_1b$LPorterStemmer$(this)) { - break lab16; - } - } - cursor$6 = this.cursor = (((limit$3 = this.limit) - v_11) | 0); - v_12 = ((limit$3 - cursor$6) | 0); - lab17 = true; -lab17: - while (lab17 === true) { - lab17 = false; - if (! PorterStemmer$r_Step_1c$LPorterStemmer$(this)) { - break lab17; - } - } - cursor$7 = this.cursor = (((limit$4 = this.limit) - v_12) | 0); - v_13 = ((limit$4 - cursor$7) | 0); - lab18 = true; -lab18: - while (lab18 === true) { - lab18 = false; - if (! PorterStemmer$r_Step_2$LPorterStemmer$(this)) { - break lab18; - } - } - cursor$8 = this.cursor = (((limit$5 = this.limit) - v_13) | 0); - v_14 = ((limit$5 - cursor$8) | 0); - lab19 = true; -lab19: - while (lab19 === true) { - lab19 = false; - if (! PorterStemmer$r_Step_3$LPorterStemmer$(this)) { - break lab19; - } - } - cursor$9 = this.cursor = (((limit$6 = this.limit) - v_14) | 0); - v_15 = ((limit$6 - cursor$9) | 0); - lab20 = true; -lab20: - while (lab20 === true) { - lab20 = false; - if (! PorterStemmer$r_Step_4$LPorterStemmer$(this)) { - break lab20; - } - } - cursor$10 = this.cursor = (((limit$7 = this.limit) - v_15) | 0); - v_16 = ((limit$7 - cursor$10) | 0); - lab21 = true; -lab21: - while (lab21 === true) { - lab21 = false; - if (! PorterStemmer$r_Step_5a$LPorterStemmer$(this)) { - break lab21; - } - } - this.cursor = ((this.limit - v_16) | 0); - lab22 = true; -lab22: - while (lab22 === true) { - lab22 = false; - if (! PorterStemmer$r_Step_5b$LPorterStemmer$(this)) { - break lab22; - } - } - cursor$12 = this.cursor = this.limit_backward; - v_18 = cursor$12; - lab23 = true; -lab23: - while (lab23 === true) { - lab23 = false; - if (! this.B_Y_found) { - break lab23; - } - replab24: - while (true) { - v_19 = this.cursor; - lab25 = true; - lab25: - while (lab25 === true) { - lab25 = false; - golab26: - while (true) { - v_20 = this.cursor; - lab27 = true; - lab27: - while (lab27 === true) { - lab27 = false; - this.bra = this.cursor; - if (! BaseStemmer$eq_s$LBaseStemmer$IS(this, 1, "Y")) { - break lab27; - } - this.ket = this.cursor; - this.cursor = v_20; - break golab26; - } - cursor$11 = this.cursor = v_20; - if (cursor$11 >= this.limit) { - break lab25; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "y")) { - return false; - } - continue replab24; - } - this.cursor = v_19; - break replab24; - } - } - this.cursor = v_18; - return true; -}; - -PorterStemmer.prototype.stem = PorterStemmer.prototype.stem$; - -PorterStemmer.prototype.equals$X = function (o) { - return o instanceof PorterStemmer; -}; - -PorterStemmer.prototype.equals = PorterStemmer.prototype.equals$X; - -function PorterStemmer$equals$LPorterStemmer$X($this, o) { - return o instanceof PorterStemmer; -}; - -PorterStemmer.equals$LPorterStemmer$X = PorterStemmer$equals$LPorterStemmer$X; - -PorterStemmer.prototype.hashCode$ = function () { - var classname; - var hash; - var i; - var char; - classname = "PorterStemmer"; - hash = 0; - for (i = 0; i < classname.length; i++) { - char = classname.charCodeAt(i); - hash = (hash << 5) - hash + char; - hash = hash & hash; - } - return (hash | 0); -}; - -PorterStemmer.prototype.hashCode = PorterStemmer.prototype.hashCode$; - -function PorterStemmer$hashCode$LPorterStemmer$($this) { - var classname; - var hash; - var i; - var char; - classname = "PorterStemmer"; - hash = 0; - for (i = 0; i < classname.length; i++) { - char = classname.charCodeAt(i); - hash = (hash << 5) - hash + char; - hash = hash & hash; - } - return (hash | 0); -}; - -PorterStemmer.hashCode$LPorterStemmer$ = PorterStemmer$hashCode$LPorterStemmer$; - -PorterStemmer.serialVersionUID = 1; -$__jsx_lazy_init(PorterStemmer, "methodObject", function () { - return new PorterStemmer(); -}); -$__jsx_lazy_init(PorterStemmer, "a_0", function () { - return [ new Among("s", -1, 3), new Among("ies", 0, 2), new Among("sses", 0, 1), new Among("ss", 0, -1) ]; -}); -$__jsx_lazy_init(PorterStemmer, "a_1", function () { - return [ new Among("", -1, 3), new Among("bb", 0, 2), new Among("dd", 0, 2), new Among("ff", 0, 2), new Among("gg", 0, 2), new Among("bl", 0, 1), new Among("mm", 0, 2), new Among("nn", 0, 2), new Among("pp", 0, 2), new Among("rr", 0, 2), new Among("at", 0, 1), new Among("tt", 0, 2), new Among("iz", 0, 1) ]; -}); -$__jsx_lazy_init(PorterStemmer, "a_2", function () { - return [ new Among("ed", -1, 2), new Among("eed", 0, 1), new Among("ing", -1, 2) ]; -}); -$__jsx_lazy_init(PorterStemmer, "a_3", function () { - return [ new Among("anci", -1, 3), new Among("enci", -1, 2), new Among("abli", -1, 4), new Among("eli", -1, 6), new Among("alli", -1, 9), new Among("ousli", -1, 12), new Among("entli", -1, 5), new Among("aliti", -1, 10), new Among("biliti", -1, 14), new Among("iviti", -1, 13), new Among("tional", -1, 1), new Among("ational", 10, 8), new Among("alism", -1, 10), new Among("ation", -1, 8), new Among("ization", 13, 7), new Among("izer", -1, 7), new Among("ator", -1, 8), new Among("iveness", -1, 13), new Among("fulness", -1, 11), new Among("ousness", -1, 12) ]; -}); -$__jsx_lazy_init(PorterStemmer, "a_4", function () { - return [ new Among("icate", -1, 2), new Among("ative", -1, 3), new Among("alize", -1, 1), new Among("iciti", -1, 2), new Among("ical", -1, 2), new Among("ful", -1, 3), new Among("ness", -1, 3) ]; -}); -$__jsx_lazy_init(PorterStemmer, "a_5", function () { - return [ new Among("ic", -1, 1), new Among("ance", -1, 1), new Among("ence", -1, 1), new Among("able", -1, 1), new Among("ible", -1, 1), new Among("ate", -1, 1), new Among("ive", -1, 1), new Among("ize", -1, 1), new Among("iti", -1, 1), new Among("al", -1, 1), new Among("ism", -1, 1), new Among("ion", -1, 2), new Among("er", -1, 1), new Among("ous", -1, 1), new Among("ant", -1, 1), new Among("ent", -1, 1), new Among("ment", 15, 1), new Among("ement", 16, 1), new Among("ou", -1, 1) ]; -}); -PorterStemmer.g_v = [ 17, 65, 16, 1 ]; -PorterStemmer.g_v_WXY = [ 1, 17, 65, 208, 1 ]; - -var $__jsx_classMap = { - "src/among.jsx": { - Among: Among, - Among$SII: Among, - Among$SIIF$LBaseStemmer$B$LBaseStemmer$: Among$0 - }, - "src/stemmer.jsx": { - Stemmer: Stemmer, - Stemmer$: Stemmer - }, - "src/base-stemmer.jsx": { - BaseStemmer: BaseStemmer, - BaseStemmer$: BaseStemmer - }, - "src/porter-stemmer.jsx": { - PorterStemmer: PorterStemmer, - PorterStemmer$: PorterStemmer - } -}; - - -})(JSX); - -var Among = JSX.require("src/among.jsx").Among; -var Among$SII = JSX.require("src/among.jsx").Among$SII; -var Stemmer = JSX.require("src/stemmer.jsx").Stemmer; -var BaseStemmer = JSX.require("src/base-stemmer.jsx").BaseStemmer; -var PorterStemmer = JSX.require("src/porter-stemmer.jsx").PorterStemmer; diff --git a/sphinx/search/non-minified-js/portuguese-stemmer.js b/sphinx/search/non-minified-js/portuguese-stemmer.js index 4042c0aef6e..662b976565a 100644 --- a/sphinx/search/non-minified-js/portuguese-stemmer.js +++ b/sphinx/search/non-minified-js/portuguese-stemmer.js @@ -1,2817 +1,914 @@ -// generatedy by JSX compiler 0.9.89 (2014-05-20 06:01:03 +0900; 8e8c6105f36f3dfe440ea026a3c93a3444977102) -var JSX = {}; -(function (JSX) { -/** - * extends the class - */ -function $__jsx_extend(derivations, base) { - var ctor = function () {}; - ctor.prototype = base.prototype; - var proto = new ctor(); - for (var i in derivations) { - derivations[i].prototype = proto; - } -} - -/** - * copies the implementations from source interface to target - */ -function $__jsx_merge_interface(target, source) { - for (var k in source.prototype) - if (source.prototype.hasOwnProperty(k)) - target.prototype[k] = source.prototype[k]; -} - -/** - * defers the initialization of the property - */ -function $__jsx_lazy_init(obj, prop, func) { - function reset(obj, prop, value) { - delete obj[prop]; - obj[prop] = value; - return value; - } - - Object.defineProperty(obj, prop, { - get: function () { - return reset(obj, prop, func()); - }, - set: function (v) { - reset(obj, prop, v); - }, - enumerable: true, - configurable: true - }); -} - -var $__jsx_imul = Math.imul; -if (typeof $__jsx_imul === "undefined") { - $__jsx_imul = function (a, b) { - var ah = (a >>> 16) & 0xffff; - var al = a & 0xffff; - var bh = (b >>> 16) & 0xffff; - var bl = b & 0xffff; - return ((al * bl) + (((ah * bl + al * bh) << 16) >>> 0)|0); - }; -} - -/** - * fused int-ops with side-effects - */ -function $__jsx_ipadd(o, p, r) { - return o[p] = (o[p] + r) | 0; -} -function $__jsx_ipsub(o, p, r) { - return o[p] = (o[p] - r) | 0; -} -function $__jsx_ipmul(o, p, r) { - return o[p] = $__jsx_imul(o[p], r); -} -function $__jsx_ipdiv(o, p, r) { - return o[p] = (o[p] / r) | 0; -} -function $__jsx_ipmod(o, p, r) { - return o[p] = (o[p] % r) | 0; -} -function $__jsx_ippostinc(o, p) { - var v = o[p]; - o[p] = (v + 1) | 0; - return v; -} -function $__jsx_ippostdec(o, p) { - var v = o[p]; - o[p] = (v - 1) | 0; - return v; -} - -/** - * non-inlined version of Array#each - */ -function $__jsx_forEach(o, f) { - var l = o.length; - for (var i = 0; i < l; ++i) - f(o[i]); -} - -/* - * global functions, renamed to avoid conflict with local variable names - */ -var $__jsx_parseInt = parseInt; -var $__jsx_parseFloat = parseFloat; -function $__jsx_isNaN(n) { return n !== n; } -var $__jsx_isFinite = isFinite; - -var $__jsx_encodeURIComponent = encodeURIComponent; -var $__jsx_decodeURIComponent = decodeURIComponent; -var $__jsx_encodeURI = encodeURI; -var $__jsx_decodeURI = decodeURI; - -var $__jsx_ObjectToString = Object.prototype.toString; -var $__jsx_ObjectHasOwnProperty = Object.prototype.hasOwnProperty; - -/* - * profiler object, initialized afterwards - */ -function $__jsx_profiler() { -} - -/* - * public interface to JSX code - */ -JSX.require = function (path) { - var m = $__jsx_classMap[path]; - return m !== undefined ? m : null; -}; - -JSX.profilerIsRunning = function () { - return $__jsx_profiler.getResults != null; -}; - -JSX.getProfileResults = function () { - return ($__jsx_profiler.getResults || function () { return {}; })(); -}; - -JSX.postProfileResults = function (url, cb) { - if ($__jsx_profiler.postResults == null) - throw new Error("profiler has not been turned on"); - return $__jsx_profiler.postResults(url, cb); -}; - -JSX.resetProfileResults = function () { - if ($__jsx_profiler.resetResults == null) - throw new Error("profiler has not been turned on"); - return $__jsx_profiler.resetResults(); -}; -JSX.DEBUG = false; -var GeneratorFunction$0 = -(function () { - try { - return Function('import {GeneratorFunction} from "std:iteration"; return GeneratorFunction')(); - } catch (e) { - return function GeneratorFunction () {}; - } -})(); -var __jsx_generator_object$0 = -(function () { - function __jsx_generator_object() { - this.__next = 0; - this.__loop = null; - this.__seed = null; - this.__value = undefined; - this.__status = 0; // SUSPENDED: 0, ACTIVE: 1, DEAD: 2 - } - - __jsx_generator_object.prototype.next = function (seed) { - switch (this.__status) { - case 0: - this.__status = 1; - this.__seed = seed; - - // go next! - this.__loop(this.__next); - - var done = false; - if (this.__next != -1) { - this.__status = 0; - } else { - this.__status = 2; - done = true; - } - return { value: this.__value, done: done }; - case 1: - throw new Error("Generator is already running"); - case 2: - throw new Error("Generator is already finished"); - default: - throw new Error("Unexpected generator internal state"); - } - }; - - return __jsx_generator_object; -}()); -function Among(s, substring_i, result) { - this.s_size = s.length; - this.s = s; - this.substring_i = substring_i; - this.result = result; - this.method = null; - this.instance = null; -}; - -function Among$0(s, substring_i, result, method, instance) { - this.s_size = s.length; - this.s = s; - this.substring_i = substring_i; - this.result = result; - this.method = method; - this.instance = instance; -}; - -$__jsx_extend([Among, Among$0], Object); -function Stemmer() { -}; - -$__jsx_extend([Stemmer], Object); -function BaseStemmer() { - var current$0; - var cursor$0; - var limit$0; - this.cache = ({ }); - current$0 = this.current = ""; - cursor$0 = this.cursor = 0; - limit$0 = this.limit = current$0.length; - this.limit_backward = 0; - this.bra = cursor$0; - this.ket = limit$0; -}; - -$__jsx_extend([BaseStemmer], Stemmer); -BaseStemmer.prototype.setCurrent$S = function (value) { - var current$0; - var cursor$0; - var limit$0; - current$0 = this.current = value; - cursor$0 = this.cursor = 0; - limit$0 = this.limit = current$0.length; - this.limit_backward = 0; - this.bra = cursor$0; - this.ket = limit$0; -}; - - -function BaseStemmer$setCurrent$LBaseStemmer$S($this, value) { - var current$0; - var cursor$0; - var limit$0; - current$0 = $this.current = value; - cursor$0 = $this.cursor = 0; - limit$0 = $this.limit = current$0.length; - $this.limit_backward = 0; - $this.bra = cursor$0; - $this.ket = limit$0; -}; - -BaseStemmer.setCurrent$LBaseStemmer$S = BaseStemmer$setCurrent$LBaseStemmer$S; - -BaseStemmer.prototype.getCurrent$ = function () { - return this.current; -}; - - -function BaseStemmer$getCurrent$LBaseStemmer$($this) { - return $this.current; -}; - -BaseStemmer.getCurrent$LBaseStemmer$ = BaseStemmer$getCurrent$LBaseStemmer$; - -BaseStemmer.prototype.copy_from$LBaseStemmer$ = function (other) { - this.current = other.current; - this.cursor = other.cursor; - this.limit = other.limit; - this.limit_backward = other.limit_backward; - this.bra = other.bra; - this.ket = other.ket; -}; - - -function BaseStemmer$copy_from$LBaseStemmer$LBaseStemmer$($this, other) { - $this.current = other.current; - $this.cursor = other.cursor; - $this.limit = other.limit; - $this.limit_backward = other.limit_backward; - $this.bra = other.bra; - $this.ket = other.ket; -}; - -BaseStemmer.copy_from$LBaseStemmer$LBaseStemmer$ = BaseStemmer$copy_from$LBaseStemmer$LBaseStemmer$; - -BaseStemmer.prototype.in_grouping$AIII = function (s, min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor >= this.limit) { - return false; - } - ch = this.current.charCodeAt(this.cursor); - if (ch > max || ch < min) { - return false; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$in_grouping$LBaseStemmer$AIII($this, s, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor >= $this.limit) { - return false; - } - ch = $this.current.charCodeAt($this.cursor); - if (ch > max || ch < min) { - return false; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.in_grouping$LBaseStemmer$AIII = BaseStemmer$in_grouping$LBaseStemmer$AIII; - -BaseStemmer.prototype.in_grouping_b$AIII = function (s, min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor <= this.limit_backward) { - return false; - } - ch = this.current.charCodeAt(this.cursor - 1); - if (ch > max || ch < min) { - return false; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$in_grouping_b$LBaseStemmer$AIII($this, s, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor <= $this.limit_backward) { - return false; - } - ch = $this.current.charCodeAt($this.cursor - 1); - if (ch > max || ch < min) { - return false; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.in_grouping_b$LBaseStemmer$AIII = BaseStemmer$in_grouping_b$LBaseStemmer$AIII; - -BaseStemmer.prototype.out_grouping$AIII = function (s, min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor >= this.limit) { - return false; - } - ch = this.current.charCodeAt(this.cursor); - if (ch > max || ch < min) { - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; - } - ch -= min; - if ((s[ch >>> 3] & 0X1 << (ch & 0x7)) === 0) { - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; - } - return false; -}; - - -function BaseStemmer$out_grouping$LBaseStemmer$AIII($this, s, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor >= $this.limit) { - return false; - } - ch = $this.current.charCodeAt($this.cursor); - if (ch > max || ch < min) { - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; - } - ch -= min; - if ((s[ch >>> 3] & 0X1 << (ch & 0x7)) === 0) { - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; - } - return false; -}; - -BaseStemmer.out_grouping$LBaseStemmer$AIII = BaseStemmer$out_grouping$LBaseStemmer$AIII; - -BaseStemmer.prototype.out_grouping_b$AIII = function (s, min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor <= this.limit_backward) { - return false; - } - ch = this.current.charCodeAt(this.cursor - 1); - if (ch > max || ch < min) { - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; - } - return false; +// Generated by Snowball 2.1.0 - https://snowballstem.org/ + +/**@constructor*/ +PortugueseStemmer = function() { + var base = new BaseStemmer(); + /** @const */ var a_0 = [ + ["", -1, 3], + ["\u00E3", 0, 1], + ["\u00F5", 0, 2] + ]; + + /** @const */ var a_1 = [ + ["", -1, 3], + ["a~", 0, 1], + ["o~", 0, 2] + ]; + + /** @const */ var a_2 = [ + ["ic", -1, -1], + ["ad", -1, -1], + ["os", -1, -1], + ["iv", -1, 1] + ]; + + /** @const */ var a_3 = [ + ["ante", -1, 1], + ["avel", -1, 1], + ["\u00EDvel", -1, 1] + ]; + + /** @const */ var a_4 = [ + ["ic", -1, 1], + ["abil", -1, 1], + ["iv", -1, 1] + ]; + + /** @const */ var a_5 = [ + ["ica", -1, 1], + ["\u00E2ncia", -1, 1], + ["\u00EAncia", -1, 4], + ["logia", -1, 2], + ["ira", -1, 9], + ["adora", -1, 1], + ["osa", -1, 1], + ["ista", -1, 1], + ["iva", -1, 8], + ["eza", -1, 1], + ["idade", -1, 7], + ["ante", -1, 1], + ["mente", -1, 6], + ["amente", 12, 5], + ["\u00E1vel", -1, 1], + ["\u00EDvel", -1, 1], + ["ico", -1, 1], + ["ismo", -1, 1], + ["oso", -1, 1], + ["amento", -1, 1], + ["imento", -1, 1], + ["ivo", -1, 8], + ["a\u00E7a~o", -1, 1], + ["u\u00E7a~o", -1, 3], + ["ador", -1, 1], + ["icas", -1, 1], + ["\u00EAncias", -1, 4], + ["logias", -1, 2], + ["iras", -1, 9], + ["adoras", -1, 1], + ["osas", -1, 1], + ["istas", -1, 1], + ["ivas", -1, 8], + ["ezas", -1, 1], + ["idades", -1, 7], + ["adores", -1, 1], + ["antes", -1, 1], + ["a\u00E7o~es", -1, 1], + ["u\u00E7o~es", -1, 3], + ["icos", -1, 1], + ["ismos", -1, 1], + ["osos", -1, 1], + ["amentos", -1, 1], + ["imentos", -1, 1], + ["ivos", -1, 8] + ]; + + /** @const */ var a_6 = [ + ["ada", -1, 1], + ["ida", -1, 1], + ["ia", -1, 1], + ["aria", 2, 1], + ["eria", 2, 1], + ["iria", 2, 1], + ["ara", -1, 1], + ["era", -1, 1], + ["ira", -1, 1], + ["ava", -1, 1], + ["asse", -1, 1], + ["esse", -1, 1], + ["isse", -1, 1], + ["aste", -1, 1], + ["este", -1, 1], + ["iste", -1, 1], + ["ei", -1, 1], + ["arei", 16, 1], + ["erei", 16, 1], + ["irei", 16, 1], + ["am", -1, 1], + ["iam", 20, 1], + ["ariam", 21, 1], + ["eriam", 21, 1], + ["iriam", 21, 1], + ["aram", 20, 1], + ["eram", 20, 1], + ["iram", 20, 1], + ["avam", 20, 1], + ["em", -1, 1], + ["arem", 29, 1], + ["erem", 29, 1], + ["irem", 29, 1], + ["assem", 29, 1], + ["essem", 29, 1], + ["issem", 29, 1], + ["ado", -1, 1], + ["ido", -1, 1], + ["ando", -1, 1], + ["endo", -1, 1], + ["indo", -1, 1], + ["ara~o", -1, 1], + ["era~o", -1, 1], + ["ira~o", -1, 1], + ["ar", -1, 1], + ["er", -1, 1], + ["ir", -1, 1], + ["as", -1, 1], + ["adas", 47, 1], + ["idas", 47, 1], + ["ias", 47, 1], + ["arias", 50, 1], + ["erias", 50, 1], + ["irias", 50, 1], + ["aras", 47, 1], + ["eras", 47, 1], + ["iras", 47, 1], + ["avas", 47, 1], + ["es", -1, 1], + ["ardes", 58, 1], + ["erdes", 58, 1], + ["irdes", 58, 1], + ["ares", 58, 1], + ["eres", 58, 1], + ["ires", 58, 1], + ["asses", 58, 1], + ["esses", 58, 1], + ["isses", 58, 1], + ["astes", 58, 1], + ["estes", 58, 1], + ["istes", 58, 1], + ["is", -1, 1], + ["ais", 71, 1], + ["eis", 71, 1], + ["areis", 73, 1], + ["ereis", 73, 1], + ["ireis", 73, 1], + ["\u00E1reis", 73, 1], + ["\u00E9reis", 73, 1], + ["\u00EDreis", 73, 1], + ["\u00E1sseis", 73, 1], + ["\u00E9sseis", 73, 1], + ["\u00EDsseis", 73, 1], + ["\u00E1veis", 73, 1], + ["\u00EDeis", 73, 1], + ["ar\u00EDeis", 84, 1], + ["er\u00EDeis", 84, 1], + ["ir\u00EDeis", 84, 1], + ["ados", -1, 1], + ["idos", -1, 1], + ["amos", -1, 1], + ["\u00E1ramos", 90, 1], + ["\u00E9ramos", 90, 1], + ["\u00EDramos", 90, 1], + ["\u00E1vamos", 90, 1], + ["\u00EDamos", 90, 1], + ["ar\u00EDamos", 95, 1], + ["er\u00EDamos", 95, 1], + ["ir\u00EDamos", 95, 1], + ["emos", -1, 1], + ["aremos", 99, 1], + ["eremos", 99, 1], + ["iremos", 99, 1], + ["\u00E1ssemos", 99, 1], + ["\u00EAssemos", 99, 1], + ["\u00EDssemos", 99, 1], + ["imos", -1, 1], + ["armos", -1, 1], + ["ermos", -1, 1], + ["irmos", -1, 1], + ["\u00E1mos", -1, 1], + ["ar\u00E1s", -1, 1], + ["er\u00E1s", -1, 1], + ["ir\u00E1s", -1, 1], + ["eu", -1, 1], + ["iu", -1, 1], + ["ou", -1, 1], + ["ar\u00E1", -1, 1], + ["er\u00E1", -1, 1], + ["ir\u00E1", -1, 1] + ]; + + /** @const */ var a_7 = [ + ["a", -1, 1], + ["i", -1, 1], + ["o", -1, 1], + ["os", -1, 1], + ["\u00E1", -1, 1], + ["\u00ED", -1, 1], + ["\u00F3", -1, 1] + ]; + + /** @const */ var a_8 = [ + ["e", -1, 1], + ["\u00E7", -1, 2], + ["\u00E9", -1, 1], + ["\u00EA", -1, 1] + ]; + + /** @const */ var /** Array */ g_v = [17, 65, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 19, 12, 2]; + + var /** number */ I_p2 = 0; + var /** number */ I_p1 = 0; + var /** number */ I_pV = 0; + + + /** @return {boolean} */ + function r_prelude() { + var /** number */ among_var; + while(true) + { + var /** number */ v_1 = base.cursor; + lab0: { + base.bra = base.cursor; + among_var = base.find_among(a_0); + if (among_var == 0) + { + break lab0; + } + base.ket = base.cursor; + switch (among_var) { + case 1: + if (!base.slice_from("a~")) + { + return false; + } + break; + case 2: + if (!base.slice_from("o~")) + { + return false; + } + break; + case 3: + if (base.cursor >= base.limit) + { + break lab0; + } + base.cursor++; + break; + } + continue; + } + base.cursor = v_1; + break; + } + return true; + }; + + /** @return {boolean} */ + function r_mark_regions() { + I_pV = base.limit; + I_p1 = base.limit; + I_p2 = base.limit; + var /** number */ v_1 = base.cursor; + lab0: { + lab1: { + var /** number */ v_2 = base.cursor; + lab2: { + if (!(base.in_grouping(g_v, 97, 250))) + { + break lab2; + } + lab3: { + var /** number */ v_3 = base.cursor; + lab4: { + if (!(base.out_grouping(g_v, 97, 250))) + { + break lab4; + } + golab5: while(true) + { + lab6: { + if (!(base.in_grouping(g_v, 97, 250))) + { + break lab6; + } + break golab5; + } + if (base.cursor >= base.limit) + { + break lab4; + } + base.cursor++; + } + break lab3; + } + base.cursor = v_3; + if (!(base.in_grouping(g_v, 97, 250))) + { + break lab2; + } + golab7: while(true) + { + lab8: { + if (!(base.out_grouping(g_v, 97, 250))) + { + break lab8; + } + break golab7; + } + if (base.cursor >= base.limit) + { + break lab2; + } + base.cursor++; + } + } + break lab1; + } + base.cursor = v_2; + if (!(base.out_grouping(g_v, 97, 250))) + { + break lab0; + } + lab9: { + var /** number */ v_6 = base.cursor; + lab10: { + if (!(base.out_grouping(g_v, 97, 250))) + { + break lab10; + } + golab11: while(true) + { + lab12: { + if (!(base.in_grouping(g_v, 97, 250))) + { + break lab12; + } + break golab11; + } + if (base.cursor >= base.limit) + { + break lab10; + } + base.cursor++; + } + break lab9; + } + base.cursor = v_6; + if (!(base.in_grouping(g_v, 97, 250))) + { + break lab0; + } + if (base.cursor >= base.limit) + { + break lab0; + } + base.cursor++; + } + } + I_pV = base.cursor; + } + base.cursor = v_1; + var /** number */ v_8 = base.cursor; + lab13: { + golab14: while(true) + { + lab15: { + if (!(base.in_grouping(g_v, 97, 250))) + { + break lab15; + } + break golab14; + } + if (base.cursor >= base.limit) + { + break lab13; + } + base.cursor++; + } + golab16: while(true) + { + lab17: { + if (!(base.out_grouping(g_v, 97, 250))) + { + break lab17; + } + break golab16; + } + if (base.cursor >= base.limit) + { + break lab13; + } + base.cursor++; + } + I_p1 = base.cursor; + golab18: while(true) + { + lab19: { + if (!(base.in_grouping(g_v, 97, 250))) + { + break lab19; + } + break golab18; + } + if (base.cursor >= base.limit) + { + break lab13; + } + base.cursor++; + } + golab20: while(true) + { + lab21: { + if (!(base.out_grouping(g_v, 97, 250))) + { + break lab21; + } + break golab20; + } + if (base.cursor >= base.limit) + { + break lab13; + } + base.cursor++; + } + I_p2 = base.cursor; + } + base.cursor = v_8; + return true; + }; + + /** @return {boolean} */ + function r_postlude() { + var /** number */ among_var; + while(true) + { + var /** number */ v_1 = base.cursor; + lab0: { + base.bra = base.cursor; + among_var = base.find_among(a_1); + if (among_var == 0) + { + break lab0; + } + base.ket = base.cursor; + switch (among_var) { + case 1: + if (!base.slice_from("\u00E3")) + { + return false; + } + break; + case 2: + if (!base.slice_from("\u00F5")) + { + return false; + } + break; + case 3: + if (base.cursor >= base.limit) + { + break lab0; + } + base.cursor++; + break; + } + continue; + } + base.cursor = v_1; + break; + } + return true; + }; + + /** @return {boolean} */ + function r_RV() { + if (!(I_pV <= base.cursor)) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_R1() { + if (!(I_p1 <= base.cursor)) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_R2() { + if (!(I_p2 <= base.cursor)) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_standard_suffix() { + var /** number */ among_var; + base.ket = base.cursor; + among_var = base.find_among_b(a_5); + if (among_var == 0) + { + return false; + } + base.bra = base.cursor; + switch (among_var) { + case 1: + if (!r_R2()) + { + return false; + } + if (!base.slice_del()) + { + return false; + } + break; + case 2: + if (!r_R2()) + { + return false; + } + if (!base.slice_from("log")) + { + return false; + } + break; + case 3: + if (!r_R2()) + { + return false; + } + if (!base.slice_from("u")) + { + return false; + } + break; + case 4: + if (!r_R2()) + { + return false; + } + if (!base.slice_from("ente")) + { + return false; + } + break; + case 5: + if (!r_R1()) + { + return false; + } + if (!base.slice_del()) + { + return false; + } + var /** number */ v_1 = base.limit - base.cursor; + lab0: { + base.ket = base.cursor; + among_var = base.find_among_b(a_2); + if (among_var == 0) + { + base.cursor = base.limit - v_1; + break lab0; + } + base.bra = base.cursor; + if (!r_R2()) + { + base.cursor = base.limit - v_1; + break lab0; + } + if (!base.slice_del()) + { + return false; + } + switch (among_var) { + case 1: + base.ket = base.cursor; + if (!(base.eq_s_b("at"))) + { + base.cursor = base.limit - v_1; + break lab0; + } + base.bra = base.cursor; + if (!r_R2()) + { + base.cursor = base.limit - v_1; + break lab0; + } + if (!base.slice_del()) + { + return false; + } + break; + } + } + break; + case 6: + if (!r_R2()) + { + return false; + } + if (!base.slice_del()) + { + return false; + } + var /** number */ v_2 = base.limit - base.cursor; + lab1: { + base.ket = base.cursor; + if (base.find_among_b(a_3) == 0) + { + base.cursor = base.limit - v_2; + break lab1; + } + base.bra = base.cursor; + if (!r_R2()) + { + base.cursor = base.limit - v_2; + break lab1; + } + if (!base.slice_del()) + { + return false; + } + } + break; + case 7: + if (!r_R2()) + { + return false; + } + if (!base.slice_del()) + { + return false; + } + var /** number */ v_3 = base.limit - base.cursor; + lab2: { + base.ket = base.cursor; + if (base.find_among_b(a_4) == 0) + { + base.cursor = base.limit - v_3; + break lab2; + } + base.bra = base.cursor; + if (!r_R2()) + { + base.cursor = base.limit - v_3; + break lab2; + } + if (!base.slice_del()) + { + return false; + } + } + break; + case 8: + if (!r_R2()) + { + return false; + } + if (!base.slice_del()) + { + return false; + } + var /** number */ v_4 = base.limit - base.cursor; + lab3: { + base.ket = base.cursor; + if (!(base.eq_s_b("at"))) + { + base.cursor = base.limit - v_4; + break lab3; + } + base.bra = base.cursor; + if (!r_R2()) + { + base.cursor = base.limit - v_4; + break lab3; + } + if (!base.slice_del()) + { + return false; + } + } + break; + case 9: + if (!r_RV()) + { + return false; + } + if (!(base.eq_s_b("e"))) + { + return false; + } + if (!base.slice_from("ir")) + { + return false; + } + break; + } + return true; + }; + + /** @return {boolean} */ + function r_verb_suffix() { + if (base.cursor < I_pV) + { + return false; + } + var /** number */ v_2 = base.limit_backward; + base.limit_backward = I_pV; + base.ket = base.cursor; + if (base.find_among_b(a_6) == 0) + { + base.limit_backward = v_2; + return false; + } + base.bra = base.cursor; + if (!base.slice_del()) + { + return false; + } + base.limit_backward = v_2; + return true; + }; + + /** @return {boolean} */ + function r_residual_suffix() { + base.ket = base.cursor; + if (base.find_among_b(a_7) == 0) + { + return false; + } + base.bra = base.cursor; + if (!r_RV()) + { + return false; + } + if (!base.slice_del()) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_residual_form() { + var /** number */ among_var; + base.ket = base.cursor; + among_var = base.find_among_b(a_8); + if (among_var == 0) + { + return false; + } + base.bra = base.cursor; + switch (among_var) { + case 1: + if (!r_RV()) + { + return false; + } + if (!base.slice_del()) + { + return false; + } + base.ket = base.cursor; + lab0: { + var /** number */ v_1 = base.limit - base.cursor; + lab1: { + if (!(base.eq_s_b("u"))) + { + break lab1; + } + base.bra = base.cursor; + var /** number */ v_2 = base.limit - base.cursor; + if (!(base.eq_s_b("g"))) + { + break lab1; + } + base.cursor = base.limit - v_2; + break lab0; + } + base.cursor = base.limit - v_1; + if (!(base.eq_s_b("i"))) + { + return false; + } + base.bra = base.cursor; + var /** number */ v_3 = base.limit - base.cursor; + if (!(base.eq_s_b("c"))) + { + return false; + } + base.cursor = base.limit - v_3; + } + if (!r_RV()) + { + return false; + } + if (!base.slice_del()) + { + return false; + } + break; + case 2: + if (!base.slice_from("c")) + { + return false; + } + break; + } + return true; + }; + + this.stem = /** @return {boolean} */ function() { + var /** number */ v_1 = base.cursor; + r_prelude(); + base.cursor = v_1; + r_mark_regions(); + base.limit_backward = base.cursor; base.cursor = base.limit; + var /** number */ v_3 = base.limit - base.cursor; + lab0: { + lab1: { + var /** number */ v_4 = base.limit - base.cursor; + lab2: { + var /** number */ v_5 = base.limit - base.cursor; + lab3: { + var /** number */ v_6 = base.limit - base.cursor; + lab4: { + if (!r_standard_suffix()) + { + break lab4; + } + break lab3; + } + base.cursor = base.limit - v_6; + if (!r_verb_suffix()) + { + break lab2; + } + } + base.cursor = base.limit - v_5; + var /** number */ v_7 = base.limit - base.cursor; + lab5: { + base.ket = base.cursor; + if (!(base.eq_s_b("i"))) + { + break lab5; + } + base.bra = base.cursor; + var /** number */ v_8 = base.limit - base.cursor; + if (!(base.eq_s_b("c"))) + { + break lab5; + } + base.cursor = base.limit - v_8; + if (!r_RV()) + { + break lab5; + } + if (!base.slice_del()) + { + return false; + } + } + base.cursor = base.limit - v_7; + break lab1; + } + base.cursor = base.limit - v_4; + if (!r_residual_suffix()) + { + break lab0; + } + } + } + base.cursor = base.limit - v_3; + var /** number */ v_9 = base.limit - base.cursor; + r_residual_form(); + base.cursor = base.limit - v_9; + base.cursor = base.limit_backward; + var /** number */ v_10 = base.cursor; + r_postlude(); + base.cursor = v_10; + return true; + }; + + /**@return{string}*/ + this['stemWord'] = function(/**string*/word) { + base.setCurrent(word); + this.stem(); + return base.getCurrent(); + }; }; - - -function BaseStemmer$out_grouping_b$LBaseStemmer$AIII($this, s, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor <= $this.limit_backward) { - return false; - } - ch = $this.current.charCodeAt($this.cursor - 1); - if (ch > max || ch < min) { - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; - } - return false; -}; - -BaseStemmer.out_grouping_b$LBaseStemmer$AIII = BaseStemmer$out_grouping_b$LBaseStemmer$AIII; - -BaseStemmer.prototype.in_range$II = function (min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor >= this.limit) { - return false; - } - ch = this.current.charCodeAt(this.cursor); - if (ch > max || ch < min) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$in_range$LBaseStemmer$II($this, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor >= $this.limit) { - return false; - } - ch = $this.current.charCodeAt($this.cursor); - if (ch > max || ch < min) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.in_range$LBaseStemmer$II = BaseStemmer$in_range$LBaseStemmer$II; - -BaseStemmer.prototype.in_range_b$II = function (min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor <= this.limit_backward) { - return false; - } - ch = this.current.charCodeAt(this.cursor - 1); - if (ch > max || ch < min) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$in_range_b$LBaseStemmer$II($this, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor <= $this.limit_backward) { - return false; - } - ch = $this.current.charCodeAt($this.cursor - 1); - if (ch > max || ch < min) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.in_range_b$LBaseStemmer$II = BaseStemmer$in_range_b$LBaseStemmer$II; - -BaseStemmer.prototype.out_range$II = function (min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor >= this.limit) { - return false; - } - ch = this.current.charCodeAt(this.cursor); - if (! (ch > max || ch < min)) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$out_range$LBaseStemmer$II($this, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor >= $this.limit) { - return false; - } - ch = $this.current.charCodeAt($this.cursor); - if (! (ch > max || ch < min)) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.out_range$LBaseStemmer$II = BaseStemmer$out_range$LBaseStemmer$II; - -BaseStemmer.prototype.out_range_b$II = function (min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor <= this.limit_backward) { - return false; - } - ch = this.current.charCodeAt(this.cursor - 1); - if (! (ch > max || ch < min)) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$out_range_b$LBaseStemmer$II($this, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor <= $this.limit_backward) { - return false; - } - ch = $this.current.charCodeAt($this.cursor - 1); - if (! (ch > max || ch < min)) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.out_range_b$LBaseStemmer$II = BaseStemmer$out_range_b$LBaseStemmer$II; - -BaseStemmer.prototype.eq_s$IS = function (s_size, s) { - var cursor$0; - if (((this.limit - this.cursor) | 0) < s_size) { - return false; - } - if (this.current.slice(cursor$0 = this.cursor, ((cursor$0 + s_size) | 0)) !== s) { - return false; - } - this.cursor = (this.cursor + s_size) | 0; - return true; -}; - - -function BaseStemmer$eq_s$LBaseStemmer$IS($this, s_size, s) { - var cursor$0; - if ((($this.limit - $this.cursor) | 0) < s_size) { - return false; - } - if ($this.current.slice(cursor$0 = $this.cursor, ((cursor$0 + s_size) | 0)) !== s) { - return false; - } - $this.cursor = ($this.cursor + s_size) | 0; - return true; -}; - -BaseStemmer.eq_s$LBaseStemmer$IS = BaseStemmer$eq_s$LBaseStemmer$IS; - -BaseStemmer.prototype.eq_s_b$IS = function (s_size, s) { - var cursor$0; - if (((this.cursor - this.limit_backward) | 0) < s_size) { - return false; - } - if (this.current.slice((((cursor$0 = this.cursor) - s_size) | 0), cursor$0) !== s) { - return false; - } - this.cursor = (this.cursor - s_size) | 0; - return true; -}; - - -function BaseStemmer$eq_s_b$LBaseStemmer$IS($this, s_size, s) { - var cursor$0; - if ((($this.cursor - $this.limit_backward) | 0) < s_size) { - return false; - } - if ($this.current.slice((((cursor$0 = $this.cursor) - s_size) | 0), cursor$0) !== s) { - return false; - } - $this.cursor = ($this.cursor - s_size) | 0; - return true; -}; - -BaseStemmer.eq_s_b$LBaseStemmer$IS = BaseStemmer$eq_s_b$LBaseStemmer$IS; - -BaseStemmer.prototype.eq_v$S = function (s) { - return BaseStemmer$eq_s$LBaseStemmer$IS(this, s.length, s); -}; - - -function BaseStemmer$eq_v$LBaseStemmer$S($this, s) { - return BaseStemmer$eq_s$LBaseStemmer$IS($this, s.length, s); -}; - -BaseStemmer.eq_v$LBaseStemmer$S = BaseStemmer$eq_v$LBaseStemmer$S; - -BaseStemmer.prototype.eq_v_b$S = function (s) { - return BaseStemmer$eq_s_b$LBaseStemmer$IS(this, s.length, s); -}; - - -function BaseStemmer$eq_v_b$LBaseStemmer$S($this, s) { - return BaseStemmer$eq_s_b$LBaseStemmer$IS($this, s.length, s); -}; - -BaseStemmer.eq_v_b$LBaseStemmer$S = BaseStemmer$eq_v_b$LBaseStemmer$S; - -BaseStemmer.prototype.find_among$ALAmong$I = function (v, v_size) { - var i; - var j; - var c; - var l; - var common_i; - var common_j; - var first_key_inspected; - var k; - var diff; - var common; - var w; - var i2; - var res; - i = 0; - j = v_size; - c = this.cursor; - l = this.limit; - common_i = 0; - common_j = 0; - first_key_inspected = false; - while (true) { - k = i + (j - i >>> 1); - diff = 0; - common = (common_i < common_j ? common_i : common_j); - w = v[k]; - for (i2 = common; i2 < w.s_size; i2++) { - if (c + common === l) { - diff = -1; - break; - } - diff = this.current.charCodeAt(c + common) - w.s.charCodeAt(i2); - if (diff !== 0) { - break; - } - common++; - } - if (diff < 0) { - j = k; - common_j = common; - } else { - i = k; - common_i = common; - } - if (j - i <= 1) { - if (i > 0) { - break; - } - if (j === i) { - break; - } - if (first_key_inspected) { - break; - } - first_key_inspected = true; - } - } - while (true) { - w = v[i]; - if (common_i >= w.s_size) { - this.cursor = (c + w.s_size | 0); - if (w.method == null) { - return w.result; - } - res = w.method(w.instance); - this.cursor = (c + w.s_size | 0); - if (res) { - return w.result; - } - } - i = w.substring_i; - if (i < 0) { - return 0; - } - } - return -1; -}; - - -function BaseStemmer$find_among$LBaseStemmer$ALAmong$I($this, v, v_size) { - var i; - var j; - var c; - var l; - var common_i; - var common_j; - var first_key_inspected; - var k; - var diff; - var common; - var w; - var i2; - var res; - i = 0; - j = v_size; - c = $this.cursor; - l = $this.limit; - common_i = 0; - common_j = 0; - first_key_inspected = false; - while (true) { - k = i + (j - i >>> 1); - diff = 0; - common = (common_i < common_j ? common_i : common_j); - w = v[k]; - for (i2 = common; i2 < w.s_size; i2++) { - if (c + common === l) { - diff = -1; - break; - } - diff = $this.current.charCodeAt(c + common) - w.s.charCodeAt(i2); - if (diff !== 0) { - break; - } - common++; - } - if (diff < 0) { - j = k; - common_j = common; - } else { - i = k; - common_i = common; - } - if (j - i <= 1) { - if (i > 0) { - break; - } - if (j === i) { - break; - } - if (first_key_inspected) { - break; - } - first_key_inspected = true; - } - } - while (true) { - w = v[i]; - if (common_i >= w.s_size) { - $this.cursor = (c + w.s_size | 0); - if (w.method == null) { - return w.result; - } - res = w.method(w.instance); - $this.cursor = (c + w.s_size | 0); - if (res) { - return w.result; - } - } - i = w.substring_i; - if (i < 0) { - return 0; - } - } - return -1; -}; - -BaseStemmer.find_among$LBaseStemmer$ALAmong$I = BaseStemmer$find_among$LBaseStemmer$ALAmong$I; - -BaseStemmer.prototype.find_among_b$ALAmong$I = function (v, v_size) { - var i; - var j; - var c; - var lb; - var common_i; - var common_j; - var first_key_inspected; - var k; - var diff; - var common; - var w; - var i2; - var res; - i = 0; - j = v_size; - c = this.cursor; - lb = this.limit_backward; - common_i = 0; - common_j = 0; - first_key_inspected = false; - while (true) { - k = i + (j - i >> 1); - diff = 0; - common = (common_i < common_j ? common_i : common_j); - w = v[k]; - for (i2 = w.s_size - 1 - common; i2 >= 0; i2--) { - if (c - common === lb) { - diff = -1; - break; - } - diff = this.current.charCodeAt(c - 1 - common) - w.s.charCodeAt(i2); - if (diff !== 0) { - break; - } - common++; - } - if (diff < 0) { - j = k; - common_j = common; - } else { - i = k; - common_i = common; - } - if (j - i <= 1) { - if (i > 0) { - break; - } - if (j === i) { - break; - } - if (first_key_inspected) { - break; - } - first_key_inspected = true; - } - } - while (true) { - w = v[i]; - if (common_i >= w.s_size) { - this.cursor = (c - w.s_size | 0); - if (w.method == null) { - return w.result; - } - res = w.method(this); - this.cursor = (c - w.s_size | 0); - if (res) { - return w.result; - } - } - i = w.substring_i; - if (i < 0) { - return 0; - } - } - return -1; -}; - - -function BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, v, v_size) { - var i; - var j; - var c; - var lb; - var common_i; - var common_j; - var first_key_inspected; - var k; - var diff; - var common; - var w; - var i2; - var res; - i = 0; - j = v_size; - c = $this.cursor; - lb = $this.limit_backward; - common_i = 0; - common_j = 0; - first_key_inspected = false; - while (true) { - k = i + (j - i >> 1); - diff = 0; - common = (common_i < common_j ? common_i : common_j); - w = v[k]; - for (i2 = w.s_size - 1 - common; i2 >= 0; i2--) { - if (c - common === lb) { - diff = -1; - break; - } - diff = $this.current.charCodeAt(c - 1 - common) - w.s.charCodeAt(i2); - if (diff !== 0) { - break; - } - common++; - } - if (diff < 0) { - j = k; - common_j = common; - } else { - i = k; - common_i = common; - } - if (j - i <= 1) { - if (i > 0) { - break; - } - if (j === i) { - break; - } - if (first_key_inspected) { - break; - } - first_key_inspected = true; - } - } - while (true) { - w = v[i]; - if (common_i >= w.s_size) { - $this.cursor = (c - w.s_size | 0); - if (w.method == null) { - return w.result; - } - res = w.method($this); - $this.cursor = (c - w.s_size | 0); - if (res) { - return w.result; - } - } - i = w.substring_i; - if (i < 0) { - return 0; - } - } - return -1; -}; - -BaseStemmer.find_among_b$LBaseStemmer$ALAmong$I = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I; - -BaseStemmer.prototype.replace_s$IIS = function (c_bra, c_ket, s) { - var adjustment; - adjustment = ((s.length - (((c_ket - c_bra) | 0))) | 0); - this.current = this.current.slice(0, c_bra) + s + this.current.slice(c_ket); - this.limit = (this.limit + adjustment) | 0; - if (this.cursor >= c_ket) { - this.cursor = (this.cursor + adjustment) | 0; - } else if (this.cursor > c_bra) { - this.cursor = c_bra; - } - return (adjustment | 0); -}; - - -function BaseStemmer$replace_s$LBaseStemmer$IIS($this, c_bra, c_ket, s) { - var adjustment; - adjustment = ((s.length - (((c_ket - c_bra) | 0))) | 0); - $this.current = $this.current.slice(0, c_bra) + s + $this.current.slice(c_ket); - $this.limit = ($this.limit + adjustment) | 0; - if ($this.cursor >= c_ket) { - $this.cursor = ($this.cursor + adjustment) | 0; - } else if ($this.cursor > c_bra) { - $this.cursor = c_bra; - } - return (adjustment | 0); -}; - -BaseStemmer.replace_s$LBaseStemmer$IIS = BaseStemmer$replace_s$LBaseStemmer$IIS; - -BaseStemmer.prototype.slice_check$ = function () { - var bra$0; - var ket$0; - var limit$0; - return ((bra$0 = this.bra) < 0 || bra$0 > (ket$0 = this.ket) || ket$0 > (limit$0 = this.limit) || limit$0 > this.current.length ? false : true); -}; - - -function BaseStemmer$slice_check$LBaseStemmer$($this) { - var bra$0; - var ket$0; - var limit$0; - return ((bra$0 = $this.bra) < 0 || bra$0 > (ket$0 = $this.ket) || ket$0 > (limit$0 = $this.limit) || limit$0 > $this.current.length ? false : true); -}; - -BaseStemmer.slice_check$LBaseStemmer$ = BaseStemmer$slice_check$LBaseStemmer$; - -BaseStemmer.prototype.slice_from$S = function (s) { - var result; - var bra$0; - var ket$0; - var limit$0; - result = false; - if ((bra$0 = this.bra) < 0 || bra$0 > (ket$0 = this.ket) || ket$0 > (limit$0 = this.limit) || limit$0 > this.current.length ? false : true) { - BaseStemmer$replace_s$LBaseStemmer$IIS(this, this.bra, this.ket, s); - result = true; - } - return result; -}; - - -function BaseStemmer$slice_from$LBaseStemmer$S($this, s) { - var result; - var bra$0; - var ket$0; - var limit$0; - result = false; - if ((bra$0 = $this.bra) < 0 || bra$0 > (ket$0 = $this.ket) || ket$0 > (limit$0 = $this.limit) || limit$0 > $this.current.length ? false : true) { - BaseStemmer$replace_s$LBaseStemmer$IIS($this, $this.bra, $this.ket, s); - result = true; - } - return result; -}; - -BaseStemmer.slice_from$LBaseStemmer$S = BaseStemmer$slice_from$LBaseStemmer$S; - -BaseStemmer.prototype.slice_del$ = function () { - return BaseStemmer$slice_from$LBaseStemmer$S(this, ""); -}; - - -function BaseStemmer$slice_del$LBaseStemmer$($this) { - return BaseStemmer$slice_from$LBaseStemmer$S($this, ""); -}; - -BaseStemmer.slice_del$LBaseStemmer$ = BaseStemmer$slice_del$LBaseStemmer$; - -BaseStemmer.prototype.insert$IIS = function (c_bra, c_ket, s) { - var adjustment; - adjustment = BaseStemmer$replace_s$LBaseStemmer$IIS(this, c_bra, c_ket, s); - if (c_bra <= this.bra) { - this.bra = (this.bra + adjustment) | 0; - } - if (c_bra <= this.ket) { - this.ket = (this.ket + adjustment) | 0; - } -}; - - -function BaseStemmer$insert$LBaseStemmer$IIS($this, c_bra, c_ket, s) { - var adjustment; - adjustment = BaseStemmer$replace_s$LBaseStemmer$IIS($this, c_bra, c_ket, s); - if (c_bra <= $this.bra) { - $this.bra = ($this.bra + adjustment) | 0; - } - if (c_bra <= $this.ket) { - $this.ket = ($this.ket + adjustment) | 0; - } -}; - -BaseStemmer.insert$LBaseStemmer$IIS = BaseStemmer$insert$LBaseStemmer$IIS; - -BaseStemmer.prototype.slice_to$S = function (s) { - var result; - var bra$0; - var ket$0; - var limit$0; - result = ''; - if ((bra$0 = this.bra) < 0 || bra$0 > (ket$0 = this.ket) || ket$0 > (limit$0 = this.limit) || limit$0 > this.current.length ? false : true) { - result = this.current.slice(this.bra, this.ket); - } - return result; -}; - - -function BaseStemmer$slice_to$LBaseStemmer$S($this, s) { - var result; - var bra$0; - var ket$0; - var limit$0; - result = ''; - if ((bra$0 = $this.bra) < 0 || bra$0 > (ket$0 = $this.ket) || ket$0 > (limit$0 = $this.limit) || limit$0 > $this.current.length ? false : true) { - result = $this.current.slice($this.bra, $this.ket); - } - return result; -}; - -BaseStemmer.slice_to$LBaseStemmer$S = BaseStemmer$slice_to$LBaseStemmer$S; - -BaseStemmer.prototype.assign_to$S = function (s) { - return this.current.slice(0, this.limit); -}; - - -function BaseStemmer$assign_to$LBaseStemmer$S($this, s) { - return $this.current.slice(0, $this.limit); -}; - -BaseStemmer.assign_to$LBaseStemmer$S = BaseStemmer$assign_to$LBaseStemmer$S; - -BaseStemmer.prototype.stem$ = function () { - return false; -}; - - -BaseStemmer.prototype.stemWord$S = function (word) { - var result; - var current$0; - var cursor$0; - var limit$0; - result = this.cache['.' + word]; - if (result == null) { - current$0 = this.current = word; - cursor$0 = this.cursor = 0; - limit$0 = this.limit = current$0.length; - this.limit_backward = 0; - this.bra = cursor$0; - this.ket = limit$0; - this.stem$(); - result = this.current; - this.cache['.' + word] = result; - } - return result; -}; - -BaseStemmer.prototype.stemWord = BaseStemmer.prototype.stemWord$S; - -BaseStemmer.prototype.stemWords$AS = function (words) { - var results; - var i; - var word; - var result; - var current$0; - var cursor$0; - var limit$0; - results = [ ]; - for (i = 0; i < words.length; i++) { - word = words[i]; - result = this.cache['.' + word]; - if (result == null) { - current$0 = this.current = word; - cursor$0 = this.cursor = 0; - limit$0 = this.limit = current$0.length; - this.limit_backward = 0; - this.bra = cursor$0; - this.ket = limit$0; - this.stem$(); - result = this.current; - this.cache['.' + word] = result; - } - results.push(result); - } - return results; -}; - -BaseStemmer.prototype.stemWords = BaseStemmer.prototype.stemWords$AS; - -function PortugueseStemmer() { - BaseStemmer.call(this); - this.I_p2 = 0; - this.I_p1 = 0; - this.I_pV = 0; -}; - -$__jsx_extend([PortugueseStemmer], BaseStemmer); -PortugueseStemmer.prototype.copy_from$LPortugueseStemmer$ = function (other) { - this.I_p2 = other.I_p2; - this.I_p1 = other.I_p1; - this.I_pV = other.I_pV; - BaseStemmer$copy_from$LBaseStemmer$LBaseStemmer$(this, other); -}; - -PortugueseStemmer.prototype.copy_from = PortugueseStemmer.prototype.copy_from$LPortugueseStemmer$; - -PortugueseStemmer.prototype.r_prelude$ = function () { - var among_var; - var v_1; - var lab1; - var $__jsx_postinc_t; -replab0: - while (true) { - v_1 = this.cursor; - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - this.bra = this.cursor; - among_var = BaseStemmer$find_among$LBaseStemmer$ALAmong$I(this, PortugueseStemmer.a_0, 3); - if (among_var === 0) { - break lab1; - } - this.ket = this.cursor; - switch (among_var) { - case 0: - break lab1; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "a~")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "o~")) { - return false; - } - break; - case 3: - if (this.cursor >= this.limit) { - break lab1; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - break; - } - continue replab0; - } - this.cursor = v_1; - break replab0; - } - return true; -}; - -PortugueseStemmer.prototype.r_prelude = PortugueseStemmer.prototype.r_prelude$; - -function PortugueseStemmer$r_prelude$LPortugueseStemmer$($this) { - var among_var; - var v_1; - var lab1; - var $__jsx_postinc_t; -replab0: - while (true) { - v_1 = $this.cursor; - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - $this.bra = $this.cursor; - among_var = BaseStemmer$find_among$LBaseStemmer$ALAmong$I($this, PortugueseStemmer.a_0, 3); - if (among_var === 0) { - break lab1; - } - $this.ket = $this.cursor; - switch (among_var) { - case 0: - break lab1; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "a~")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "o~")) { - return false; - } - break; - case 3: - if ($this.cursor >= $this.limit) { - break lab1; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - break; - } - continue replab0; - } - $this.cursor = v_1; - break replab0; - } - return true; -}; - -PortugueseStemmer.r_prelude$LPortugueseStemmer$ = PortugueseStemmer$r_prelude$LPortugueseStemmer$; - -PortugueseStemmer.prototype.r_mark_regions$ = function () { - var v_1; - var v_2; - var v_3; - var v_6; - var v_8; - var lab0; - var lab1; - var lab2; - var lab3; - var lab4; - var lab6; - var lab8; - var lab9; - var lab10; - var lab12; - var lab13; - var lab15; - var lab17; - var lab19; - var lab21; - var limit$0; - var cursor$0; - var $__jsx_postinc_t; - this.I_pV = limit$0 = this.limit; - this.I_p1 = limit$0; - this.I_p2 = limit$0; - v_1 = this.cursor; - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - v_2 = this.cursor; - lab2 = true; - lab2: - while (lab2 === true) { - lab2 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, PortugueseStemmer.g_v, 97, 250)) { - break lab2; - } - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - v_3 = this.cursor; - lab4 = true; - lab4: - while (lab4 === true) { - lab4 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII(this, PortugueseStemmer.g_v, 97, 250)) { - break lab4; - } - golab5: - while (true) { - lab6 = true; - lab6: - while (lab6 === true) { - lab6 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, PortugueseStemmer.g_v, 97, 250)) { - break lab6; - } - break golab5; - } - if (this.cursor >= this.limit) { - break lab4; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - break lab3; - } - this.cursor = v_3; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, PortugueseStemmer.g_v, 97, 250)) { - break lab2; - } - golab7: - while (true) { - lab8 = true; - lab8: - while (lab8 === true) { - lab8 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII(this, PortugueseStemmer.g_v, 97, 250)) { - break lab8; - } - break golab7; - } - if (this.cursor >= this.limit) { - break lab2; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - } - break lab1; - } - this.cursor = v_2; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII(this, PortugueseStemmer.g_v, 97, 250)) { - break lab0; - } - lab9 = true; - lab9: - while (lab9 === true) { - lab9 = false; - v_6 = this.cursor; - lab10 = true; - lab10: - while (lab10 === true) { - lab10 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII(this, PortugueseStemmer.g_v, 97, 250)) { - break lab10; - } - golab11: - while (true) { - lab12 = true; - lab12: - while (lab12 === true) { - lab12 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, PortugueseStemmer.g_v, 97, 250)) { - break lab12; - } - break golab11; - } - if (this.cursor >= this.limit) { - break lab10; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - break lab9; - } - this.cursor = v_6; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, PortugueseStemmer.g_v, 97, 250)) { - break lab0; - } - if (this.cursor >= this.limit) { - break lab0; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - } - this.I_pV = this.cursor; - } - cursor$0 = this.cursor = v_1; - v_8 = cursor$0; - lab13 = true; -lab13: - while (lab13 === true) { - lab13 = false; - golab14: - while (true) { - lab15 = true; - lab15: - while (lab15 === true) { - lab15 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, PortugueseStemmer.g_v, 97, 250)) { - break lab15; - } - break golab14; - } - if (this.cursor >= this.limit) { - break lab13; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - golab16: - while (true) { - lab17 = true; - lab17: - while (lab17 === true) { - lab17 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII(this, PortugueseStemmer.g_v, 97, 250)) { - break lab17; - } - break golab16; - } - if (this.cursor >= this.limit) { - break lab13; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - this.I_p1 = this.cursor; - golab18: - while (true) { - lab19 = true; - lab19: - while (lab19 === true) { - lab19 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, PortugueseStemmer.g_v, 97, 250)) { - break lab19; - } - break golab18; - } - if (this.cursor >= this.limit) { - break lab13; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - golab20: - while (true) { - lab21 = true; - lab21: - while (lab21 === true) { - lab21 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII(this, PortugueseStemmer.g_v, 97, 250)) { - break lab21; - } - break golab20; - } - if (this.cursor >= this.limit) { - break lab13; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - this.I_p2 = this.cursor; - } - this.cursor = v_8; - return true; -}; - -PortugueseStemmer.prototype.r_mark_regions = PortugueseStemmer.prototype.r_mark_regions$; - -function PortugueseStemmer$r_mark_regions$LPortugueseStemmer$($this) { - var v_1; - var v_2; - var v_3; - var v_6; - var v_8; - var lab0; - var lab1; - var lab2; - var lab3; - var lab4; - var lab6; - var lab8; - var lab9; - var lab10; - var lab12; - var lab13; - var lab15; - var lab17; - var lab19; - var lab21; - var limit$0; - var cursor$0; - var $__jsx_postinc_t; - $this.I_pV = limit$0 = $this.limit; - $this.I_p1 = limit$0; - $this.I_p2 = limit$0; - v_1 = $this.cursor; - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - v_2 = $this.cursor; - lab2 = true; - lab2: - while (lab2 === true) { - lab2 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII($this, PortugueseStemmer.g_v, 97, 250)) { - break lab2; - } - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - v_3 = $this.cursor; - lab4 = true; - lab4: - while (lab4 === true) { - lab4 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII($this, PortugueseStemmer.g_v, 97, 250)) { - break lab4; - } - golab5: - while (true) { - lab6 = true; - lab6: - while (lab6 === true) { - lab6 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII($this, PortugueseStemmer.g_v, 97, 250)) { - break lab6; - } - break golab5; - } - if ($this.cursor >= $this.limit) { - break lab4; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - break lab3; - } - $this.cursor = v_3; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII($this, PortugueseStemmer.g_v, 97, 250)) { - break lab2; - } - golab7: - while (true) { - lab8 = true; - lab8: - while (lab8 === true) { - lab8 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII($this, PortugueseStemmer.g_v, 97, 250)) { - break lab8; - } - break golab7; - } - if ($this.cursor >= $this.limit) { - break lab2; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - } - break lab1; - } - $this.cursor = v_2; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII($this, PortugueseStemmer.g_v, 97, 250)) { - break lab0; - } - lab9 = true; - lab9: - while (lab9 === true) { - lab9 = false; - v_6 = $this.cursor; - lab10 = true; - lab10: - while (lab10 === true) { - lab10 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII($this, PortugueseStemmer.g_v, 97, 250)) { - break lab10; - } - golab11: - while (true) { - lab12 = true; - lab12: - while (lab12 === true) { - lab12 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII($this, PortugueseStemmer.g_v, 97, 250)) { - break lab12; - } - break golab11; - } - if ($this.cursor >= $this.limit) { - break lab10; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - break lab9; - } - $this.cursor = v_6; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII($this, PortugueseStemmer.g_v, 97, 250)) { - break lab0; - } - if ($this.cursor >= $this.limit) { - break lab0; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - } - $this.I_pV = $this.cursor; - } - cursor$0 = $this.cursor = v_1; - v_8 = cursor$0; - lab13 = true; -lab13: - while (lab13 === true) { - lab13 = false; - golab14: - while (true) { - lab15 = true; - lab15: - while (lab15 === true) { - lab15 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII($this, PortugueseStemmer.g_v, 97, 250)) { - break lab15; - } - break golab14; - } - if ($this.cursor >= $this.limit) { - break lab13; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - golab16: - while (true) { - lab17 = true; - lab17: - while (lab17 === true) { - lab17 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII($this, PortugueseStemmer.g_v, 97, 250)) { - break lab17; - } - break golab16; - } - if ($this.cursor >= $this.limit) { - break lab13; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - $this.I_p1 = $this.cursor; - golab18: - while (true) { - lab19 = true; - lab19: - while (lab19 === true) { - lab19 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII($this, PortugueseStemmer.g_v, 97, 250)) { - break lab19; - } - break golab18; - } - if ($this.cursor >= $this.limit) { - break lab13; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - golab20: - while (true) { - lab21 = true; - lab21: - while (lab21 === true) { - lab21 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII($this, PortugueseStemmer.g_v, 97, 250)) { - break lab21; - } - break golab20; - } - if ($this.cursor >= $this.limit) { - break lab13; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - $this.I_p2 = $this.cursor; - } - $this.cursor = v_8; - return true; -}; - -PortugueseStemmer.r_mark_regions$LPortugueseStemmer$ = PortugueseStemmer$r_mark_regions$LPortugueseStemmer$; - -PortugueseStemmer.prototype.r_postlude$ = function () { - var among_var; - var v_1; - var lab1; - var $__jsx_postinc_t; -replab0: - while (true) { - v_1 = this.cursor; - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - this.bra = this.cursor; - among_var = BaseStemmer$find_among$LBaseStemmer$ALAmong$I(this, PortugueseStemmer.a_1, 3); - if (among_var === 0) { - break lab1; - } - this.ket = this.cursor; - switch (among_var) { - case 0: - break lab1; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "\u00E3")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "\u00F5")) { - return false; - } - break; - case 3: - if (this.cursor >= this.limit) { - break lab1; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - break; - } - continue replab0; - } - this.cursor = v_1; - break replab0; - } - return true; -}; - -PortugueseStemmer.prototype.r_postlude = PortugueseStemmer.prototype.r_postlude$; - -function PortugueseStemmer$r_postlude$LPortugueseStemmer$($this) { - var among_var; - var v_1; - var lab1; - var $__jsx_postinc_t; -replab0: - while (true) { - v_1 = $this.cursor; - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - $this.bra = $this.cursor; - among_var = BaseStemmer$find_among$LBaseStemmer$ALAmong$I($this, PortugueseStemmer.a_1, 3); - if (among_var === 0) { - break lab1; - } - $this.ket = $this.cursor; - switch (among_var) { - case 0: - break lab1; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "\u00E3")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "\u00F5")) { - return false; - } - break; - case 3: - if ($this.cursor >= $this.limit) { - break lab1; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - break; - } - continue replab0; - } - $this.cursor = v_1; - break replab0; - } - return true; -}; - -PortugueseStemmer.r_postlude$LPortugueseStemmer$ = PortugueseStemmer$r_postlude$LPortugueseStemmer$; - -PortugueseStemmer.prototype.r_RV$ = function () { - return (! (this.I_pV <= this.cursor) ? false : true); -}; - -PortugueseStemmer.prototype.r_RV = PortugueseStemmer.prototype.r_RV$; - -function PortugueseStemmer$r_RV$LPortugueseStemmer$($this) { - return (! ($this.I_pV <= $this.cursor) ? false : true); -}; - -PortugueseStemmer.r_RV$LPortugueseStemmer$ = PortugueseStemmer$r_RV$LPortugueseStemmer$; - -PortugueseStemmer.prototype.r_R1$ = function () { - return (! (this.I_p1 <= this.cursor) ? false : true); -}; - -PortugueseStemmer.prototype.r_R1 = PortugueseStemmer.prototype.r_R1$; - -function PortugueseStemmer$r_R1$LPortugueseStemmer$($this) { - return (! ($this.I_p1 <= $this.cursor) ? false : true); -}; - -PortugueseStemmer.r_R1$LPortugueseStemmer$ = PortugueseStemmer$r_R1$LPortugueseStemmer$; - -PortugueseStemmer.prototype.r_R2$ = function () { - return (! (this.I_p2 <= this.cursor) ? false : true); -}; - -PortugueseStemmer.prototype.r_R2 = PortugueseStemmer.prototype.r_R2$; - -function PortugueseStemmer$r_R2$LPortugueseStemmer$($this) { - return (! ($this.I_p2 <= $this.cursor) ? false : true); -}; - -PortugueseStemmer.r_R2$LPortugueseStemmer$ = PortugueseStemmer$r_R2$LPortugueseStemmer$; - -PortugueseStemmer.prototype.r_standard_suffix$ = function () { - var among_var; - var v_1; - var v_2; - var v_3; - var v_4; - var lab0; - var lab1; - var lab2; - var lab3; - var cursor$0; - var cursor$1; - var cursor$2; - this.ket = this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, PortugueseStemmer.a_5, 45); - if (among_var === 0) { - return false; - } - this.bra = this.cursor; - switch (among_var) { - case 0: - return false; - case 1: - if (! (! (this.I_p2 <= this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 2: - if (! (! (this.I_p2 <= this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "log")) { - return false; - } - break; - case 3: - if (! (! (this.I_p2 <= this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "u")) { - return false; - } - break; - case 4: - if (! (! (this.I_p2 <= this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "ente")) { - return false; - } - break; - case 5: - if (! (! (this.I_p1 <= this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - v_1 = ((this.limit - this.cursor) | 0); - lab0 = true; - lab0: - while (lab0 === true) { - lab0 = false; - this.ket = this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, PortugueseStemmer.a_2, 4); - if (among_var === 0) { - this.cursor = ((this.limit - v_1) | 0); - break lab0; - } - this.bra = cursor$0 = this.cursor; - if (! (! (this.I_p2 <= cursor$0) ? false : true)) { - this.cursor = ((this.limit - v_1) | 0); - break lab0; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - switch (among_var) { - case 0: - this.cursor = ((this.limit - v_1) | 0); - break lab0; - case 1: - this.ket = this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 2, "at")) { - this.cursor = ((this.limit - v_1) | 0); - break lab0; - } - this.bra = cursor$1 = this.cursor; - if (! (! (this.I_p2 <= cursor$1) ? false : true)) { - this.cursor = ((this.limit - v_1) | 0); - break lab0; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - } - } - break; - case 6: - if (! (! (this.I_p2 <= this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - v_2 = ((this.limit - this.cursor) | 0); - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - this.ket = this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, PortugueseStemmer.a_3, 3); - if (among_var === 0) { - this.cursor = ((this.limit - v_2) | 0); - break lab1; - } - this.bra = this.cursor; - switch (among_var) { - case 0: - this.cursor = ((this.limit - v_2) | 0); - break lab1; - case 1: - if (! (! (this.I_p2 <= this.cursor) ? false : true)) { - this.cursor = ((this.limit - v_2) | 0); - break lab1; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - } - } - break; - case 7: - if (! (! (this.I_p2 <= this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - v_3 = ((this.limit - this.cursor) | 0); - lab2 = true; - lab2: - while (lab2 === true) { - lab2 = false; - this.ket = this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, PortugueseStemmer.a_4, 3); - if (among_var === 0) { - this.cursor = ((this.limit - v_3) | 0); - break lab2; - } - this.bra = this.cursor; - switch (among_var) { - case 0: - this.cursor = ((this.limit - v_3) | 0); - break lab2; - case 1: - if (! (! (this.I_p2 <= this.cursor) ? false : true)) { - this.cursor = ((this.limit - v_3) | 0); - break lab2; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - } - } - break; - case 8: - if (! (! (this.I_p2 <= this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - v_4 = ((this.limit - this.cursor) | 0); - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - this.ket = this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 2, "at")) { - this.cursor = ((this.limit - v_4) | 0); - break lab3; - } - this.bra = cursor$2 = this.cursor; - if (! (! (this.I_p2 <= cursor$2) ? false : true)) { - this.cursor = ((this.limit - v_4) | 0); - break lab3; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - } - break; - case 9: - if (! (! (this.I_pV <= this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "e")) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "ir")) { - return false; - } - break; - } - return true; -}; - -PortugueseStemmer.prototype.r_standard_suffix = PortugueseStemmer.prototype.r_standard_suffix$; - -function PortugueseStemmer$r_standard_suffix$LPortugueseStemmer$($this) { - var among_var; - var v_1; - var v_2; - var v_3; - var v_4; - var lab0; - var lab1; - var lab2; - var lab3; - var cursor$0; - var cursor$1; - var cursor$2; - $this.ket = $this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, PortugueseStemmer.a_5, 45); - if (among_var === 0) { - return false; - } - $this.bra = $this.cursor; - switch (among_var) { - case 0: - return false; - case 1: - if (! (! ($this.I_p2 <= $this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 2: - if (! (! ($this.I_p2 <= $this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "log")) { - return false; - } - break; - case 3: - if (! (! ($this.I_p2 <= $this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "u")) { - return false; - } - break; - case 4: - if (! (! ($this.I_p2 <= $this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "ente")) { - return false; - } - break; - case 5: - if (! (! ($this.I_p1 <= $this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - v_1 = (($this.limit - $this.cursor) | 0); - lab0 = true; - lab0: - while (lab0 === true) { - lab0 = false; - $this.ket = $this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, PortugueseStemmer.a_2, 4); - if (among_var === 0) { - $this.cursor = (($this.limit - v_1) | 0); - break lab0; - } - $this.bra = cursor$0 = $this.cursor; - if (! (! ($this.I_p2 <= cursor$0) ? false : true)) { - $this.cursor = (($this.limit - v_1) | 0); - break lab0; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - switch (among_var) { - case 0: - $this.cursor = (($this.limit - v_1) | 0); - break lab0; - case 1: - $this.ket = $this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 2, "at")) { - $this.cursor = (($this.limit - v_1) | 0); - break lab0; - } - $this.bra = cursor$1 = $this.cursor; - if (! (! ($this.I_p2 <= cursor$1) ? false : true)) { - $this.cursor = (($this.limit - v_1) | 0); - break lab0; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - } - } - break; - case 6: - if (! (! ($this.I_p2 <= $this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - v_2 = (($this.limit - $this.cursor) | 0); - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - $this.ket = $this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, PortugueseStemmer.a_3, 3); - if (among_var === 0) { - $this.cursor = (($this.limit - v_2) | 0); - break lab1; - } - $this.bra = $this.cursor; - switch (among_var) { - case 0: - $this.cursor = (($this.limit - v_2) | 0); - break lab1; - case 1: - if (! (! ($this.I_p2 <= $this.cursor) ? false : true)) { - $this.cursor = (($this.limit - v_2) | 0); - break lab1; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - } - } - break; - case 7: - if (! (! ($this.I_p2 <= $this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - v_3 = (($this.limit - $this.cursor) | 0); - lab2 = true; - lab2: - while (lab2 === true) { - lab2 = false; - $this.ket = $this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, PortugueseStemmer.a_4, 3); - if (among_var === 0) { - $this.cursor = (($this.limit - v_3) | 0); - break lab2; - } - $this.bra = $this.cursor; - switch (among_var) { - case 0: - $this.cursor = (($this.limit - v_3) | 0); - break lab2; - case 1: - if (! (! ($this.I_p2 <= $this.cursor) ? false : true)) { - $this.cursor = (($this.limit - v_3) | 0); - break lab2; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - } - } - break; - case 8: - if (! (! ($this.I_p2 <= $this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - v_4 = (($this.limit - $this.cursor) | 0); - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - $this.ket = $this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 2, "at")) { - $this.cursor = (($this.limit - v_4) | 0); - break lab3; - } - $this.bra = cursor$2 = $this.cursor; - if (! (! ($this.I_p2 <= cursor$2) ? false : true)) { - $this.cursor = (($this.limit - v_4) | 0); - break lab3; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - } - break; - case 9: - if (! (! ($this.I_pV <= $this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "e")) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "ir")) { - return false; - } - break; - } - return true; -}; - -PortugueseStemmer.r_standard_suffix$LPortugueseStemmer$ = PortugueseStemmer$r_standard_suffix$LPortugueseStemmer$; - -PortugueseStemmer.prototype.r_verb_suffix$ = function () { - var among_var; - var v_1; - var v_2; - var cursor$0; - var cursor$1; - var cursor$2; - v_1 = ((this.limit - (cursor$0 = this.cursor)) | 0); - if (cursor$0 < this.I_pV) { - return false; - } - cursor$1 = this.cursor = this.I_pV; - v_2 = this.limit_backward; - this.limit_backward = cursor$1; - cursor$2 = this.cursor = ((this.limit - v_1) | 0); - this.ket = cursor$2; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, PortugueseStemmer.a_6, 120); - if (among_var === 0) { - this.limit_backward = v_2; - return false; - } - this.bra = this.cursor; - switch (among_var) { - case 0: - this.limit_backward = v_2; - return false; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - } - this.limit_backward = v_2; - return true; -}; - -PortugueseStemmer.prototype.r_verb_suffix = PortugueseStemmer.prototype.r_verb_suffix$; - -function PortugueseStemmer$r_verb_suffix$LPortugueseStemmer$($this) { - var among_var; - var v_1; - var v_2; - var cursor$0; - var cursor$1; - var cursor$2; - v_1 = (($this.limit - (cursor$0 = $this.cursor)) | 0); - if (cursor$0 < $this.I_pV) { - return false; - } - cursor$1 = $this.cursor = $this.I_pV; - v_2 = $this.limit_backward; - $this.limit_backward = cursor$1; - cursor$2 = $this.cursor = (($this.limit - v_1) | 0); - $this.ket = cursor$2; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, PortugueseStemmer.a_6, 120); - if (among_var === 0) { - $this.limit_backward = v_2; - return false; - } - $this.bra = $this.cursor; - switch (among_var) { - case 0: - $this.limit_backward = v_2; - return false; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - } - $this.limit_backward = v_2; - return true; -}; - -PortugueseStemmer.r_verb_suffix$LPortugueseStemmer$ = PortugueseStemmer$r_verb_suffix$LPortugueseStemmer$; - -PortugueseStemmer.prototype.r_residual_suffix$ = function () { - var among_var; - this.ket = this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, PortugueseStemmer.a_7, 7); - if (among_var === 0) { - return false; - } - this.bra = this.cursor; - switch (among_var) { - case 0: - return false; - case 1: - if (! (! (this.I_pV <= this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - } - return true; -}; - -PortugueseStemmer.prototype.r_residual_suffix = PortugueseStemmer.prototype.r_residual_suffix$; - -function PortugueseStemmer$r_residual_suffix$LPortugueseStemmer$($this) { - var among_var; - $this.ket = $this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, PortugueseStemmer.a_7, 7); - if (among_var === 0) { - return false; - } - $this.bra = $this.cursor; - switch (among_var) { - case 0: - return false; - case 1: - if (! (! ($this.I_pV <= $this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - } - return true; -}; - -PortugueseStemmer.r_residual_suffix$LPortugueseStemmer$ = PortugueseStemmer$r_residual_suffix$LPortugueseStemmer$; - -PortugueseStemmer.prototype.r_residual_form$ = function () { - var among_var; - var v_1; - var v_2; - var v_3; - var lab0; - var lab1; - var cursor$0; - var cursor$1; - this.ket = this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, PortugueseStemmer.a_8, 4); - if (among_var === 0) { - return false; - } - this.bra = this.cursor; - switch (among_var) { - case 0: - return false; - case 1: - if (! (! (this.I_pV <= this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - this.ket = this.cursor; - lab0 = true; - lab0: - while (lab0 === true) { - lab0 = false; - v_1 = ((this.limit - this.cursor) | 0); - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "u")) { - break lab1; - } - this.bra = cursor$0 = this.cursor; - v_2 = ((this.limit - cursor$0) | 0); - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "g")) { - break lab1; - } - this.cursor = ((this.limit - v_2) | 0); - break lab0; - } - this.cursor = ((this.limit - v_1) | 0); - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "i")) { - return false; - } - this.bra = cursor$1 = this.cursor; - v_3 = ((this.limit - cursor$1) | 0); - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "c")) { - return false; - } - this.cursor = ((this.limit - v_3) | 0); - } - if (! (! (this.I_pV <= this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "c")) { - return false; - } - break; - } - return true; -}; - -PortugueseStemmer.prototype.r_residual_form = PortugueseStemmer.prototype.r_residual_form$; - -function PortugueseStemmer$r_residual_form$LPortugueseStemmer$($this) { - var among_var; - var v_1; - var v_2; - var v_3; - var lab0; - var lab1; - var cursor$0; - var cursor$1; - $this.ket = $this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, PortugueseStemmer.a_8, 4); - if (among_var === 0) { - return false; - } - $this.bra = $this.cursor; - switch (among_var) { - case 0: - return false; - case 1: - if (! (! ($this.I_pV <= $this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - $this.ket = $this.cursor; - lab0 = true; - lab0: - while (lab0 === true) { - lab0 = false; - v_1 = (($this.limit - $this.cursor) | 0); - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "u")) { - break lab1; - } - $this.bra = cursor$0 = $this.cursor; - v_2 = (($this.limit - cursor$0) | 0); - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "g")) { - break lab1; - } - $this.cursor = (($this.limit - v_2) | 0); - break lab0; - } - $this.cursor = (($this.limit - v_1) | 0); - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "i")) { - return false; - } - $this.bra = cursor$1 = $this.cursor; - v_3 = (($this.limit - cursor$1) | 0); - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "c")) { - return false; - } - $this.cursor = (($this.limit - v_3) | 0); - } - if (! (! ($this.I_pV <= $this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "c")) { - return false; - } - break; - } - return true; -}; - -PortugueseStemmer.r_residual_form$LPortugueseStemmer$ = PortugueseStemmer$r_residual_form$LPortugueseStemmer$; - -PortugueseStemmer.prototype.stem$ = function () { - var v_1; - var v_2; - var v_3; - var v_4; - var v_5; - var v_6; - var v_7; - var v_8; - var v_10; - var lab0; - var lab1; - var lab2; - var lab3; - var lab4; - var lab5; - var lab6; - var lab7; - var lab8; - var lab9; - var cursor$0; - var cursor$1; - var cursor$2; - var limit$0; - var cursor$3; - var cursor$4; - var limit$1; - var cursor$5; - var cursor$6; - v_1 = this.cursor; - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - if (! PortugueseStemmer$r_prelude$LPortugueseStemmer$(this)) { - break lab0; - } - } - cursor$0 = this.cursor = v_1; - v_2 = cursor$0; - lab1 = true; -lab1: - while (lab1 === true) { - lab1 = false; - if (! PortugueseStemmer$r_mark_regions$LPortugueseStemmer$(this)) { - break lab1; - } - } - cursor$4 = this.cursor = v_2; - this.limit_backward = cursor$4; - cursor$5 = this.cursor = limit$1 = this.limit; - v_3 = ((limit$1 - cursor$5) | 0); - lab2 = true; -lab2: - while (lab2 === true) { - lab2 = false; - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - v_4 = ((this.limit - this.cursor) | 0); - lab4 = true; - lab4: - while (lab4 === true) { - lab4 = false; - v_5 = ((this.limit - this.cursor) | 0); - lab5 = true; - lab5: - while (lab5 === true) { - lab5 = false; - v_6 = ((this.limit - this.cursor) | 0); - lab6 = true; - lab6: - while (lab6 === true) { - lab6 = false; - if (! PortugueseStemmer$r_standard_suffix$LPortugueseStemmer$(this)) { - break lab6; - } - break lab5; - } - this.cursor = ((this.limit - v_6) | 0); - if (! PortugueseStemmer$r_verb_suffix$LPortugueseStemmer$(this)) { - break lab4; - } - } - cursor$3 = this.cursor = (((limit$0 = this.limit) - v_5) | 0); - v_7 = ((limit$0 - cursor$3) | 0); - lab7 = true; - lab7: - while (lab7 === true) { - lab7 = false; - this.ket = this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "i")) { - break lab7; - } - this.bra = cursor$1 = this.cursor; - v_8 = ((this.limit - cursor$1) | 0); - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "c")) { - break lab7; - } - cursor$2 = this.cursor = ((this.limit - v_8) | 0); - if (! (! (this.I_pV <= cursor$2) ? false : true)) { - break lab7; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - } - this.cursor = ((this.limit - v_7) | 0); - break lab3; - } - this.cursor = ((this.limit - v_4) | 0); - if (! PortugueseStemmer$r_residual_suffix$LPortugueseStemmer$(this)) { - break lab2; - } - } - } - this.cursor = ((this.limit - v_3) | 0); - lab8 = true; -lab8: - while (lab8 === true) { - lab8 = false; - if (! PortugueseStemmer$r_residual_form$LPortugueseStemmer$(this)) { - break lab8; - } - } - cursor$6 = this.cursor = this.limit_backward; - v_10 = cursor$6; - lab9 = true; -lab9: - while (lab9 === true) { - lab9 = false; - if (! PortugueseStemmer$r_postlude$LPortugueseStemmer$(this)) { - break lab9; - } - } - this.cursor = v_10; - return true; -}; - -PortugueseStemmer.prototype.stem = PortugueseStemmer.prototype.stem$; - -PortugueseStemmer.prototype.equals$X = function (o) { - return o instanceof PortugueseStemmer; -}; - -PortugueseStemmer.prototype.equals = PortugueseStemmer.prototype.equals$X; - -function PortugueseStemmer$equals$LPortugueseStemmer$X($this, o) { - return o instanceof PortugueseStemmer; -}; - -PortugueseStemmer.equals$LPortugueseStemmer$X = PortugueseStemmer$equals$LPortugueseStemmer$X; - -PortugueseStemmer.prototype.hashCode$ = function () { - var classname; - var hash; - var i; - var char; - classname = "PortugueseStemmer"; - hash = 0; - for (i = 0; i < classname.length; i++) { - char = classname.charCodeAt(i); - hash = (hash << 5) - hash + char; - hash = hash & hash; - } - return (hash | 0); -}; - -PortugueseStemmer.prototype.hashCode = PortugueseStemmer.prototype.hashCode$; - -function PortugueseStemmer$hashCode$LPortugueseStemmer$($this) { - var classname; - var hash; - var i; - var char; - classname = "PortugueseStemmer"; - hash = 0; - for (i = 0; i < classname.length; i++) { - char = classname.charCodeAt(i); - hash = (hash << 5) - hash + char; - hash = hash & hash; - } - return (hash | 0); -}; - -PortugueseStemmer.hashCode$LPortugueseStemmer$ = PortugueseStemmer$hashCode$LPortugueseStemmer$; - -PortugueseStemmer.serialVersionUID = 1; -$__jsx_lazy_init(PortugueseStemmer, "methodObject", function () { - return new PortugueseStemmer(); -}); -$__jsx_lazy_init(PortugueseStemmer, "a_0", function () { - return [ new Among("", -1, 3), new Among("\u00E3", 0, 1), new Among("\u00F5", 0, 2) ]; -}); -$__jsx_lazy_init(PortugueseStemmer, "a_1", function () { - return [ new Among("", -1, 3), new Among("a~", 0, 1), new Among("o~", 0, 2) ]; -}); -$__jsx_lazy_init(PortugueseStemmer, "a_2", function () { - return [ new Among("ic", -1, -1), new Among("ad", -1, -1), new Among("os", -1, -1), new Among("iv", -1, 1) ]; -}); -$__jsx_lazy_init(PortugueseStemmer, "a_3", function () { - return [ new Among("ante", -1, 1), new Among("avel", -1, 1), new Among("\u00EDvel", -1, 1) ]; -}); -$__jsx_lazy_init(PortugueseStemmer, "a_4", function () { - return [ new Among("ic", -1, 1), new Among("abil", -1, 1), new Among("iv", -1, 1) ]; -}); -$__jsx_lazy_init(PortugueseStemmer, "a_5", function () { - return [ new Among("ica", -1, 1), new Among("\u00E2ncia", -1, 1), new Among("\u00EAncia", -1, 4), new Among("ira", -1, 9), new Among("adora", -1, 1), new Among("osa", -1, 1), new Among("ista", -1, 1), new Among("iva", -1, 8), new Among("eza", -1, 1), new Among("log\u00EDa", -1, 2), new Among("idade", -1, 7), new Among("ante", -1, 1), new Among("mente", -1, 6), new Among("amente", 12, 5), new Among("\u00E1vel", -1, 1), new Among("\u00EDvel", -1, 1), new Among("uci\u00F3n", -1, 3), new Among("ico", -1, 1), new Among("ismo", -1, 1), new Among("oso", -1, 1), new Among("amento", -1, 1), new Among("imento", -1, 1), new Among("ivo", -1, 8), new Among("a\u00E7a~o", -1, 1), new Among("ador", -1, 1), new Among("icas", -1, 1), new Among("\u00EAncias", -1, 4), new Among("iras", -1, 9), new Among("adoras", -1, 1), new Among("osas", -1, 1), new Among("istas", -1, 1), new Among("ivas", -1, 8), new Among("ezas", -1, 1), new Among("log\u00EDas", -1, 2), new Among("idades", -1, 7), new Among("uciones", -1, 3), new Among("adores", -1, 1), new Among("antes", -1, 1), new Among("a\u00E7o~es", -1, 1), new Among("icos", -1, 1), new Among("ismos", -1, 1), new Among("osos", -1, 1), new Among("amentos", -1, 1), new Among("imentos", -1, 1), new Among("ivos", -1, 8) ]; -}); -$__jsx_lazy_init(PortugueseStemmer, "a_6", function () { - return [ new Among("ada", -1, 1), new Among("ida", -1, 1), new Among("ia", -1, 1), new Among("aria", 2, 1), new Among("eria", 2, 1), new Among("iria", 2, 1), new Among("ara", -1, 1), new Among("era", -1, 1), new Among("ira", -1, 1), new Among("ava", -1, 1), new Among("asse", -1, 1), new Among("esse", -1, 1), new Among("isse", -1, 1), new Among("aste", -1, 1), new Among("este", -1, 1), new Among("iste", -1, 1), new Among("ei", -1, 1), new Among("arei", 16, 1), new Among("erei", 16, 1), new Among("irei", 16, 1), new Among("am", -1, 1), new Among("iam", 20, 1), new Among("ariam", 21, 1), new Among("eriam", 21, 1), new Among("iriam", 21, 1), new Among("aram", 20, 1), new Among("eram", 20, 1), new Among("iram", 20, 1), new Among("avam", 20, 1), new Among("em", -1, 1), new Among("arem", 29, 1), new Among("erem", 29, 1), new Among("irem", 29, 1), new Among("assem", 29, 1), new Among("essem", 29, 1), new Among("issem", 29, 1), new Among("ado", -1, 1), new Among("ido", -1, 1), new Among("ando", -1, 1), new Among("endo", -1, 1), new Among("indo", -1, 1), new Among("ara~o", -1, 1), new Among("era~o", -1, 1), new Among("ira~o", -1, 1), new Among("ar", -1, 1), new Among("er", -1, 1), new Among("ir", -1, 1), new Among("as", -1, 1), new Among("adas", 47, 1), new Among("idas", 47, 1), new Among("ias", 47, 1), new Among("arias", 50, 1), new Among("erias", 50, 1), new Among("irias", 50, 1), new Among("aras", 47, 1), new Among("eras", 47, 1), new Among("iras", 47, 1), new Among("avas", 47, 1), new Among("es", -1, 1), new Among("ardes", 58, 1), new Among("erdes", 58, 1), new Among("irdes", 58, 1), new Among("ares", 58, 1), new Among("eres", 58, 1), new Among("ires", 58, 1), new Among("asses", 58, 1), new Among("esses", 58, 1), new Among("isses", 58, 1), new Among("astes", 58, 1), new Among("estes", 58, 1), new Among("istes", 58, 1), new Among("is", -1, 1), new Among("ais", 71, 1), new Among("eis", 71, 1), new Among("areis", 73, 1), new Among("ereis", 73, 1), new Among("ireis", 73, 1), new Among("\u00E1reis", 73, 1), new Among("\u00E9reis", 73, 1), new Among("\u00EDreis", 73, 1), new Among("\u00E1sseis", 73, 1), new Among("\u00E9sseis", 73, 1), new Among("\u00EDsseis", 73, 1), new Among("\u00E1veis", 73, 1), new Among("\u00EDeis", 73, 1), new Among("ar\u00EDeis", 84, 1), new Among("er\u00EDeis", 84, 1), new Among("ir\u00EDeis", 84, 1), new Among("ados", -1, 1), new Among("idos", -1, 1), new Among("amos", -1, 1), new Among("\u00E1ramos", 90, 1), new Among("\u00E9ramos", 90, 1), new Among("\u00EDramos", 90, 1), new Among("\u00E1vamos", 90, 1), new Among("\u00EDamos", 90, 1), new Among("ar\u00EDamos", 95, 1), new Among("er\u00EDamos", 95, 1), new Among("ir\u00EDamos", 95, 1), new Among("emos", -1, 1), new Among("aremos", 99, 1), new Among("eremos", 99, 1), new Among("iremos", 99, 1), new Among("\u00E1ssemos", 99, 1), new Among("\u00EAssemos", 99, 1), new Among("\u00EDssemos", 99, 1), new Among("imos", -1, 1), new Among("armos", -1, 1), new Among("ermos", -1, 1), new Among("irmos", -1, 1), new Among("\u00E1mos", -1, 1), new Among("ar\u00E1s", -1, 1), new Among("er\u00E1s", -1, 1), new Among("ir\u00E1s", -1, 1), new Among("eu", -1, 1), new Among("iu", -1, 1), new Among("ou", -1, 1), new Among("ar\u00E1", -1, 1), new Among("er\u00E1", -1, 1), new Among("ir\u00E1", -1, 1) ]; -}); -$__jsx_lazy_init(PortugueseStemmer, "a_7", function () { - return [ new Among("a", -1, 1), new Among("i", -1, 1), new Among("o", -1, 1), new Among("os", -1, 1), new Among("\u00E1", -1, 1), new Among("\u00ED", -1, 1), new Among("\u00F3", -1, 1) ]; -}); -$__jsx_lazy_init(PortugueseStemmer, "a_8", function () { - return [ new Among("e", -1, 1), new Among("\u00E7", -1, 2), new Among("\u00E9", -1, 1), new Among("\u00EA", -1, 1) ]; -}); -PortugueseStemmer.g_v = [ 17, 65, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 19, 12, 2 ]; - -var $__jsx_classMap = { - "src/among.jsx": { - Among: Among, - Among$SII: Among, - Among$SIIF$LBaseStemmer$B$LBaseStemmer$: Among$0 - }, - "src/stemmer.jsx": { - Stemmer: Stemmer, - Stemmer$: Stemmer - }, - "src/base-stemmer.jsx": { - BaseStemmer: BaseStemmer, - BaseStemmer$: BaseStemmer - }, - "src/portuguese-stemmer.jsx": { - PortugueseStemmer: PortugueseStemmer, - PortugueseStemmer$: PortugueseStemmer - } -}; - - -})(JSX); - -var Among = JSX.require("src/among.jsx").Among; -var Among$SII = JSX.require("src/among.jsx").Among$SII; -var Stemmer = JSX.require("src/stemmer.jsx").Stemmer; -var BaseStemmer = JSX.require("src/base-stemmer.jsx").BaseStemmer; -var PortugueseStemmer = JSX.require("src/portuguese-stemmer.jsx").PortugueseStemmer; diff --git a/sphinx/search/non-minified-js/romanian-stemmer.js b/sphinx/search/non-minified-js/romanian-stemmer.js index 545d3ee2ee9..67538f1c008 100644 --- a/sphinx/search/non-minified-js/romanian-stemmer.js +++ b/sphinx/search/non-minified-js/romanian-stemmer.js @@ -1,2694 +1,872 @@ -// generatedy by JSX compiler 0.9.89 (2014-05-20 06:01:03 +0900; 8e8c6105f36f3dfe440ea026a3c93a3444977102) -var JSX = {}; -(function (JSX) { -/** - * extends the class - */ -function $__jsx_extend(derivations, base) { - var ctor = function () {}; - ctor.prototype = base.prototype; - var proto = new ctor(); - for (var i in derivations) { - derivations[i].prototype = proto; - } -} - -/** - * copies the implementations from source interface to target - */ -function $__jsx_merge_interface(target, source) { - for (var k in source.prototype) - if (source.prototype.hasOwnProperty(k)) - target.prototype[k] = source.prototype[k]; -} - -/** - * defers the initialization of the property - */ -function $__jsx_lazy_init(obj, prop, func) { - function reset(obj, prop, value) { - delete obj[prop]; - obj[prop] = value; - return value; - } - - Object.defineProperty(obj, prop, { - get: function () { - return reset(obj, prop, func()); - }, - set: function (v) { - reset(obj, prop, v); - }, - enumerable: true, - configurable: true - }); -} - -var $__jsx_imul = Math.imul; -if (typeof $__jsx_imul === "undefined") { - $__jsx_imul = function (a, b) { - var ah = (a >>> 16) & 0xffff; - var al = a & 0xffff; - var bh = (b >>> 16) & 0xffff; - var bl = b & 0xffff; - return ((al * bl) + (((ah * bl + al * bh) << 16) >>> 0)|0); - }; -} - -/** - * fused int-ops with side-effects - */ -function $__jsx_ipadd(o, p, r) { - return o[p] = (o[p] + r) | 0; -} -function $__jsx_ipsub(o, p, r) { - return o[p] = (o[p] - r) | 0; -} -function $__jsx_ipmul(o, p, r) { - return o[p] = $__jsx_imul(o[p], r); -} -function $__jsx_ipdiv(o, p, r) { - return o[p] = (o[p] / r) | 0; -} -function $__jsx_ipmod(o, p, r) { - return o[p] = (o[p] % r) | 0; -} -function $__jsx_ippostinc(o, p) { - var v = o[p]; - o[p] = (v + 1) | 0; - return v; -} -function $__jsx_ippostdec(o, p) { - var v = o[p]; - o[p] = (v - 1) | 0; - return v; -} - -/** - * non-inlined version of Array#each - */ -function $__jsx_forEach(o, f) { - var l = o.length; - for (var i = 0; i < l; ++i) - f(o[i]); -} - -/* - * global functions, renamed to avoid conflict with local variable names - */ -var $__jsx_parseInt = parseInt; -var $__jsx_parseFloat = parseFloat; -function $__jsx_isNaN(n) { return n !== n; } -var $__jsx_isFinite = isFinite; - -var $__jsx_encodeURIComponent = encodeURIComponent; -var $__jsx_decodeURIComponent = decodeURIComponent; -var $__jsx_encodeURI = encodeURI; -var $__jsx_decodeURI = decodeURI; - -var $__jsx_ObjectToString = Object.prototype.toString; -var $__jsx_ObjectHasOwnProperty = Object.prototype.hasOwnProperty; - -/* - * profiler object, initialized afterwards - */ -function $__jsx_profiler() { -} - -/* - * public interface to JSX code - */ -JSX.require = function (path) { - var m = $__jsx_classMap[path]; - return m !== undefined ? m : null; -}; - -JSX.profilerIsRunning = function () { - return $__jsx_profiler.getResults != null; -}; - -JSX.getProfileResults = function () { - return ($__jsx_profiler.getResults || function () { return {}; })(); -}; - -JSX.postProfileResults = function (url, cb) { - if ($__jsx_profiler.postResults == null) - throw new Error("profiler has not been turned on"); - return $__jsx_profiler.postResults(url, cb); -}; - -JSX.resetProfileResults = function () { - if ($__jsx_profiler.resetResults == null) - throw new Error("profiler has not been turned on"); - return $__jsx_profiler.resetResults(); -}; -JSX.DEBUG = false; -var GeneratorFunction$0 = -(function () { - try { - return Function('import {GeneratorFunction} from "std:iteration"; return GeneratorFunction')(); - } catch (e) { - return function GeneratorFunction () {}; - } -})(); -var __jsx_generator_object$0 = -(function () { - function __jsx_generator_object() { - this.__next = 0; - this.__loop = null; - this.__seed = null; - this.__value = undefined; - this.__status = 0; // SUSPENDED: 0, ACTIVE: 1, DEAD: 2 - } - - __jsx_generator_object.prototype.next = function (seed) { - switch (this.__status) { - case 0: - this.__status = 1; - this.__seed = seed; - - // go next! - this.__loop(this.__next); - - var done = false; - if (this.__next != -1) { - this.__status = 0; - } else { - this.__status = 2; - done = true; - } - return { value: this.__value, done: done }; - case 1: - throw new Error("Generator is already running"); - case 2: - throw new Error("Generator is already finished"); - default: - throw new Error("Unexpected generator internal state"); - } - }; - - return __jsx_generator_object; -}()); -function Among(s, substring_i, result) { - this.s_size = s.length; - this.s = s; - this.substring_i = substring_i; - this.result = result; - this.method = null; - this.instance = null; -}; - -function Among$0(s, substring_i, result, method, instance) { - this.s_size = s.length; - this.s = s; - this.substring_i = substring_i; - this.result = result; - this.method = method; - this.instance = instance; -}; - -$__jsx_extend([Among, Among$0], Object); -function Stemmer() { -}; - -$__jsx_extend([Stemmer], Object); -function BaseStemmer() { - var current$0; - var cursor$0; - var limit$0; - this.cache = ({ }); - current$0 = this.current = ""; - cursor$0 = this.cursor = 0; - limit$0 = this.limit = current$0.length; - this.limit_backward = 0; - this.bra = cursor$0; - this.ket = limit$0; -}; - -$__jsx_extend([BaseStemmer], Stemmer); -BaseStemmer.prototype.setCurrent$S = function (value) { - var current$0; - var cursor$0; - var limit$0; - current$0 = this.current = value; - cursor$0 = this.cursor = 0; - limit$0 = this.limit = current$0.length; - this.limit_backward = 0; - this.bra = cursor$0; - this.ket = limit$0; -}; - - -function BaseStemmer$setCurrent$LBaseStemmer$S($this, value) { - var current$0; - var cursor$0; - var limit$0; - current$0 = $this.current = value; - cursor$0 = $this.cursor = 0; - limit$0 = $this.limit = current$0.length; - $this.limit_backward = 0; - $this.bra = cursor$0; - $this.ket = limit$0; -}; - -BaseStemmer.setCurrent$LBaseStemmer$S = BaseStemmer$setCurrent$LBaseStemmer$S; - -BaseStemmer.prototype.getCurrent$ = function () { - return this.current; -}; - - -function BaseStemmer$getCurrent$LBaseStemmer$($this) { - return $this.current; -}; - -BaseStemmer.getCurrent$LBaseStemmer$ = BaseStemmer$getCurrent$LBaseStemmer$; - -BaseStemmer.prototype.copy_from$LBaseStemmer$ = function (other) { - this.current = other.current; - this.cursor = other.cursor; - this.limit = other.limit; - this.limit_backward = other.limit_backward; - this.bra = other.bra; - this.ket = other.ket; -}; - - -function BaseStemmer$copy_from$LBaseStemmer$LBaseStemmer$($this, other) { - $this.current = other.current; - $this.cursor = other.cursor; - $this.limit = other.limit; - $this.limit_backward = other.limit_backward; - $this.bra = other.bra; - $this.ket = other.ket; -}; - -BaseStemmer.copy_from$LBaseStemmer$LBaseStemmer$ = BaseStemmer$copy_from$LBaseStemmer$LBaseStemmer$; - -BaseStemmer.prototype.in_grouping$AIII = function (s, min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor >= this.limit) { - return false; - } - ch = this.current.charCodeAt(this.cursor); - if (ch > max || ch < min) { - return false; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$in_grouping$LBaseStemmer$AIII($this, s, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor >= $this.limit) { - return false; - } - ch = $this.current.charCodeAt($this.cursor); - if (ch > max || ch < min) { - return false; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.in_grouping$LBaseStemmer$AIII = BaseStemmer$in_grouping$LBaseStemmer$AIII; - -BaseStemmer.prototype.in_grouping_b$AIII = function (s, min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor <= this.limit_backward) { - return false; - } - ch = this.current.charCodeAt(this.cursor - 1); - if (ch > max || ch < min) { - return false; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$in_grouping_b$LBaseStemmer$AIII($this, s, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor <= $this.limit_backward) { - return false; - } - ch = $this.current.charCodeAt($this.cursor - 1); - if (ch > max || ch < min) { - return false; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.in_grouping_b$LBaseStemmer$AIII = BaseStemmer$in_grouping_b$LBaseStemmer$AIII; - -BaseStemmer.prototype.out_grouping$AIII = function (s, min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor >= this.limit) { - return false; - } - ch = this.current.charCodeAt(this.cursor); - if (ch > max || ch < min) { - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; - } - ch -= min; - if ((s[ch >>> 3] & 0X1 << (ch & 0x7)) === 0) { - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; - } - return false; -}; - - -function BaseStemmer$out_grouping$LBaseStemmer$AIII($this, s, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor >= $this.limit) { - return false; - } - ch = $this.current.charCodeAt($this.cursor); - if (ch > max || ch < min) { - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; - } - ch -= min; - if ((s[ch >>> 3] & 0X1 << (ch & 0x7)) === 0) { - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; - } - return false; -}; - -BaseStemmer.out_grouping$LBaseStemmer$AIII = BaseStemmer$out_grouping$LBaseStemmer$AIII; - -BaseStemmer.prototype.out_grouping_b$AIII = function (s, min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor <= this.limit_backward) { - return false; - } - ch = this.current.charCodeAt(this.cursor - 1); - if (ch > max || ch < min) { - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; - } - return false; -}; - - -function BaseStemmer$out_grouping_b$LBaseStemmer$AIII($this, s, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor <= $this.limit_backward) { - return false; - } - ch = $this.current.charCodeAt($this.cursor - 1); - if (ch > max || ch < min) { - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; - } - return false; -}; - -BaseStemmer.out_grouping_b$LBaseStemmer$AIII = BaseStemmer$out_grouping_b$LBaseStemmer$AIII; - -BaseStemmer.prototype.in_range$II = function (min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor >= this.limit) { - return false; - } - ch = this.current.charCodeAt(this.cursor); - if (ch > max || ch < min) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$in_range$LBaseStemmer$II($this, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor >= $this.limit) { - return false; - } - ch = $this.current.charCodeAt($this.cursor); - if (ch > max || ch < min) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.in_range$LBaseStemmer$II = BaseStemmer$in_range$LBaseStemmer$II; - -BaseStemmer.prototype.in_range_b$II = function (min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor <= this.limit_backward) { - return false; - } - ch = this.current.charCodeAt(this.cursor - 1); - if (ch > max || ch < min) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$in_range_b$LBaseStemmer$II($this, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor <= $this.limit_backward) { - return false; - } - ch = $this.current.charCodeAt($this.cursor - 1); - if (ch > max || ch < min) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.in_range_b$LBaseStemmer$II = BaseStemmer$in_range_b$LBaseStemmer$II; - -BaseStemmer.prototype.out_range$II = function (min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor >= this.limit) { - return false; - } - ch = this.current.charCodeAt(this.cursor); - if (! (ch > max || ch < min)) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$out_range$LBaseStemmer$II($this, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor >= $this.limit) { - return false; - } - ch = $this.current.charCodeAt($this.cursor); - if (! (ch > max || ch < min)) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.out_range$LBaseStemmer$II = BaseStemmer$out_range$LBaseStemmer$II; - -BaseStemmer.prototype.out_range_b$II = function (min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor <= this.limit_backward) { - return false; - } - ch = this.current.charCodeAt(this.cursor - 1); - if (! (ch > max || ch < min)) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$out_range_b$LBaseStemmer$II($this, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor <= $this.limit_backward) { - return false; - } - ch = $this.current.charCodeAt($this.cursor - 1); - if (! (ch > max || ch < min)) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.out_range_b$LBaseStemmer$II = BaseStemmer$out_range_b$LBaseStemmer$II; - -BaseStemmer.prototype.eq_s$IS = function (s_size, s) { - var cursor$0; - if (((this.limit - this.cursor) | 0) < s_size) { - return false; - } - if (this.current.slice(cursor$0 = this.cursor, ((cursor$0 + s_size) | 0)) !== s) { - return false; - } - this.cursor = (this.cursor + s_size) | 0; - return true; -}; - - -function BaseStemmer$eq_s$LBaseStemmer$IS($this, s_size, s) { - var cursor$0; - if ((($this.limit - $this.cursor) | 0) < s_size) { - return false; - } - if ($this.current.slice(cursor$0 = $this.cursor, ((cursor$0 + s_size) | 0)) !== s) { - return false; - } - $this.cursor = ($this.cursor + s_size) | 0; - return true; -}; - -BaseStemmer.eq_s$LBaseStemmer$IS = BaseStemmer$eq_s$LBaseStemmer$IS; - -BaseStemmer.prototype.eq_s_b$IS = function (s_size, s) { - var cursor$0; - if (((this.cursor - this.limit_backward) | 0) < s_size) { - return false; - } - if (this.current.slice((((cursor$0 = this.cursor) - s_size) | 0), cursor$0) !== s) { - return false; - } - this.cursor = (this.cursor - s_size) | 0; - return true; +// Generated by Snowball 2.1.0 - https://snowballstem.org/ + +/**@constructor*/ +RomanianStemmer = function() { + var base = new BaseStemmer(); + /** @const */ var a_0 = [ + ["", -1, 3], + ["I", 0, 1], + ["U", 0, 2] + ]; + + /** @const */ var a_1 = [ + ["ea", -1, 3], + ["a\u0163ia", -1, 7], + ["aua", -1, 2], + ["iua", -1, 4], + ["a\u0163ie", -1, 7], + ["ele", -1, 3], + ["ile", -1, 5], + ["iile", 6, 4], + ["iei", -1, 4], + ["atei", -1, 6], + ["ii", -1, 4], + ["ului", -1, 1], + ["ul", -1, 1], + ["elor", -1, 3], + ["ilor", -1, 4], + ["iilor", 14, 4] + ]; + + /** @const */ var a_2 = [ + ["icala", -1, 4], + ["iciva", -1, 4], + ["ativa", -1, 5], + ["itiva", -1, 6], + ["icale", -1, 4], + ["a\u0163iune", -1, 5], + ["i\u0163iune", -1, 6], + ["atoare", -1, 5], + ["itoare", -1, 6], + ["\u0103toare", -1, 5], + ["icitate", -1, 4], + ["abilitate", -1, 1], + ["ibilitate", -1, 2], + ["ivitate", -1, 3], + ["icive", -1, 4], + ["ative", -1, 5], + ["itive", -1, 6], + ["icali", -1, 4], + ["atori", -1, 5], + ["icatori", 18, 4], + ["itori", -1, 6], + ["\u0103tori", -1, 5], + ["icitati", -1, 4], + ["abilitati", -1, 1], + ["ivitati", -1, 3], + ["icivi", -1, 4], + ["ativi", -1, 5], + ["itivi", -1, 6], + ["icit\u0103i", -1, 4], + ["abilit\u0103i", -1, 1], + ["ivit\u0103i", -1, 3], + ["icit\u0103\u0163i", -1, 4], + ["abilit\u0103\u0163i", -1, 1], + ["ivit\u0103\u0163i", -1, 3], + ["ical", -1, 4], + ["ator", -1, 5], + ["icator", 35, 4], + ["itor", -1, 6], + ["\u0103tor", -1, 5], + ["iciv", -1, 4], + ["ativ", -1, 5], + ["itiv", -1, 6], + ["ical\u0103", -1, 4], + ["iciv\u0103", -1, 4], + ["ativ\u0103", -1, 5], + ["itiv\u0103", -1, 6] + ]; + + /** @const */ var a_3 = [ + ["ica", -1, 1], + ["abila", -1, 1], + ["ibila", -1, 1], + ["oasa", -1, 1], + ["ata", -1, 1], + ["ita", -1, 1], + ["anta", -1, 1], + ["ista", -1, 3], + ["uta", -1, 1], + ["iva", -1, 1], + ["ic", -1, 1], + ["ice", -1, 1], + ["abile", -1, 1], + ["ibile", -1, 1], + ["isme", -1, 3], + ["iune", -1, 2], + ["oase", -1, 1], + ["ate", -1, 1], + ["itate", 17, 1], + ["ite", -1, 1], + ["ante", -1, 1], + ["iste", -1, 3], + ["ute", -1, 1], + ["ive", -1, 1], + ["ici", -1, 1], + ["abili", -1, 1], + ["ibili", -1, 1], + ["iuni", -1, 2], + ["atori", -1, 1], + ["osi", -1, 1], + ["ati", -1, 1], + ["itati", 30, 1], + ["iti", -1, 1], + ["anti", -1, 1], + ["isti", -1, 3], + ["uti", -1, 1], + ["i\u015Fti", -1, 3], + ["ivi", -1, 1], + ["it\u0103i", -1, 1], + ["o\u015Fi", -1, 1], + ["it\u0103\u0163i", -1, 1], + ["abil", -1, 1], + ["ibil", -1, 1], + ["ism", -1, 3], + ["ator", -1, 1], + ["os", -1, 1], + ["at", -1, 1], + ["it", -1, 1], + ["ant", -1, 1], + ["ist", -1, 3], + ["ut", -1, 1], + ["iv", -1, 1], + ["ic\u0103", -1, 1], + ["abil\u0103", -1, 1], + ["ibil\u0103", -1, 1], + ["oas\u0103", -1, 1], + ["at\u0103", -1, 1], + ["it\u0103", -1, 1], + ["ant\u0103", -1, 1], + ["ist\u0103", -1, 3], + ["ut\u0103", -1, 1], + ["iv\u0103", -1, 1] + ]; + + /** @const */ var a_4 = [ + ["ea", -1, 1], + ["ia", -1, 1], + ["esc", -1, 1], + ["\u0103sc", -1, 1], + ["ind", -1, 1], + ["\u00E2nd", -1, 1], + ["are", -1, 1], + ["ere", -1, 1], + ["ire", -1, 1], + ["\u00E2re", -1, 1], + ["se", -1, 2], + ["ase", 10, 1], + ["sese", 10, 2], + ["ise", 10, 1], + ["use", 10, 1], + ["\u00E2se", 10, 1], + ["e\u015Fte", -1, 1], + ["\u0103\u015Fte", -1, 1], + ["eze", -1, 1], + ["ai", -1, 1], + ["eai", 19, 1], + ["iai", 19, 1], + ["sei", -1, 2], + ["e\u015Fti", -1, 1], + ["\u0103\u015Fti", -1, 1], + ["ui", -1, 1], + ["ezi", -1, 1], + ["\u00E2i", -1, 1], + ["a\u015Fi", -1, 1], + ["se\u015Fi", -1, 2], + ["ase\u015Fi", 29, 1], + ["sese\u015Fi", 29, 2], + ["ise\u015Fi", 29, 1], + ["use\u015Fi", 29, 1], + ["\u00E2se\u015Fi", 29, 1], + ["i\u015Fi", -1, 1], + ["u\u015Fi", -1, 1], + ["\u00E2\u015Fi", -1, 1], + ["a\u0163i", -1, 2], + ["ea\u0163i", 38, 1], + ["ia\u0163i", 38, 1], + ["e\u0163i", -1, 2], + ["i\u0163i", -1, 2], + ["\u00E2\u0163i", -1, 2], + ["ar\u0103\u0163i", -1, 1], + ["ser\u0103\u0163i", -1, 2], + ["aser\u0103\u0163i", 45, 1], + ["seser\u0103\u0163i", 45, 2], + ["iser\u0103\u0163i", 45, 1], + ["user\u0103\u0163i", 45, 1], + ["\u00E2ser\u0103\u0163i", 45, 1], + ["ir\u0103\u0163i", -1, 1], + ["ur\u0103\u0163i", -1, 1], + ["\u00E2r\u0103\u0163i", -1, 1], + ["am", -1, 1], + ["eam", 54, 1], + ["iam", 54, 1], + ["em", -1, 2], + ["asem", 57, 1], + ["sesem", 57, 2], + ["isem", 57, 1], + ["usem", 57, 1], + ["\u00E2sem", 57, 1], + ["im", -1, 2], + ["\u00E2m", -1, 2], + ["\u0103m", -1, 2], + ["ar\u0103m", 65, 1], + ["ser\u0103m", 65, 2], + ["aser\u0103m", 67, 1], + ["seser\u0103m", 67, 2], + ["iser\u0103m", 67, 1], + ["user\u0103m", 67, 1], + ["\u00E2ser\u0103m", 67, 1], + ["ir\u0103m", 65, 1], + ["ur\u0103m", 65, 1], + ["\u00E2r\u0103m", 65, 1], + ["au", -1, 1], + ["eau", 76, 1], + ["iau", 76, 1], + ["indu", -1, 1], + ["\u00E2ndu", -1, 1], + ["ez", -1, 1], + ["easc\u0103", -1, 1], + ["ar\u0103", -1, 1], + ["ser\u0103", -1, 2], + ["aser\u0103", 84, 1], + ["seser\u0103", 84, 2], + ["iser\u0103", 84, 1], + ["user\u0103", 84, 1], + ["\u00E2ser\u0103", 84, 1], + ["ir\u0103", -1, 1], + ["ur\u0103", -1, 1], + ["\u00E2r\u0103", -1, 1], + ["eaz\u0103", -1, 1] + ]; + + /** @const */ var a_5 = [ + ["a", -1, 1], + ["e", -1, 1], + ["ie", 1, 1], + ["i", -1, 1], + ["\u0103", -1, 1] + ]; + + /** @const */ var /** Array */ g_v = [17, 65, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 32, 0, 0, 4]; + + var /** boolean */ B_standard_suffix_removed = false; + var /** number */ I_p2 = 0; + var /** number */ I_p1 = 0; + var /** number */ I_pV = 0; + + + /** @return {boolean} */ + function r_prelude() { + while(true) + { + var /** number */ v_1 = base.cursor; + lab0: { + golab1: while(true) + { + var /** number */ v_2 = base.cursor; + lab2: { + if (!(base.in_grouping(g_v, 97, 259))) + { + break lab2; + } + base.bra = base.cursor; + lab3: { + var /** number */ v_3 = base.cursor; + lab4: { + if (!(base.eq_s("u"))) + { + break lab4; + } + base.ket = base.cursor; + if (!(base.in_grouping(g_v, 97, 259))) + { + break lab4; + } + if (!base.slice_from("U")) + { + return false; + } + break lab3; + } + base.cursor = v_3; + if (!(base.eq_s("i"))) + { + break lab2; + } + base.ket = base.cursor; + if (!(base.in_grouping(g_v, 97, 259))) + { + break lab2; + } + if (!base.slice_from("I")) + { + return false; + } + } + base.cursor = v_2; + break golab1; + } + base.cursor = v_2; + if (base.cursor >= base.limit) + { + break lab0; + } + base.cursor++; + } + continue; + } + base.cursor = v_1; + break; + } + return true; + }; + + /** @return {boolean} */ + function r_mark_regions() { + I_pV = base.limit; + I_p1 = base.limit; + I_p2 = base.limit; + var /** number */ v_1 = base.cursor; + lab0: { + lab1: { + var /** number */ v_2 = base.cursor; + lab2: { + if (!(base.in_grouping(g_v, 97, 259))) + { + break lab2; + } + lab3: { + var /** number */ v_3 = base.cursor; + lab4: { + if (!(base.out_grouping(g_v, 97, 259))) + { + break lab4; + } + golab5: while(true) + { + lab6: { + if (!(base.in_grouping(g_v, 97, 259))) + { + break lab6; + } + break golab5; + } + if (base.cursor >= base.limit) + { + break lab4; + } + base.cursor++; + } + break lab3; + } + base.cursor = v_3; + if (!(base.in_grouping(g_v, 97, 259))) + { + break lab2; + } + golab7: while(true) + { + lab8: { + if (!(base.out_grouping(g_v, 97, 259))) + { + break lab8; + } + break golab7; + } + if (base.cursor >= base.limit) + { + break lab2; + } + base.cursor++; + } + } + break lab1; + } + base.cursor = v_2; + if (!(base.out_grouping(g_v, 97, 259))) + { + break lab0; + } + lab9: { + var /** number */ v_6 = base.cursor; + lab10: { + if (!(base.out_grouping(g_v, 97, 259))) + { + break lab10; + } + golab11: while(true) + { + lab12: { + if (!(base.in_grouping(g_v, 97, 259))) + { + break lab12; + } + break golab11; + } + if (base.cursor >= base.limit) + { + break lab10; + } + base.cursor++; + } + break lab9; + } + base.cursor = v_6; + if (!(base.in_grouping(g_v, 97, 259))) + { + break lab0; + } + if (base.cursor >= base.limit) + { + break lab0; + } + base.cursor++; + } + } + I_pV = base.cursor; + } + base.cursor = v_1; + var /** number */ v_8 = base.cursor; + lab13: { + golab14: while(true) + { + lab15: { + if (!(base.in_grouping(g_v, 97, 259))) + { + break lab15; + } + break golab14; + } + if (base.cursor >= base.limit) + { + break lab13; + } + base.cursor++; + } + golab16: while(true) + { + lab17: { + if (!(base.out_grouping(g_v, 97, 259))) + { + break lab17; + } + break golab16; + } + if (base.cursor >= base.limit) + { + break lab13; + } + base.cursor++; + } + I_p1 = base.cursor; + golab18: while(true) + { + lab19: { + if (!(base.in_grouping(g_v, 97, 259))) + { + break lab19; + } + break golab18; + } + if (base.cursor >= base.limit) + { + break lab13; + } + base.cursor++; + } + golab20: while(true) + { + lab21: { + if (!(base.out_grouping(g_v, 97, 259))) + { + break lab21; + } + break golab20; + } + if (base.cursor >= base.limit) + { + break lab13; + } + base.cursor++; + } + I_p2 = base.cursor; + } + base.cursor = v_8; + return true; + }; + + /** @return {boolean} */ + function r_postlude() { + var /** number */ among_var; + while(true) + { + var /** number */ v_1 = base.cursor; + lab0: { + base.bra = base.cursor; + among_var = base.find_among(a_0); + if (among_var == 0) + { + break lab0; + } + base.ket = base.cursor; + switch (among_var) { + case 1: + if (!base.slice_from("i")) + { + return false; + } + break; + case 2: + if (!base.slice_from("u")) + { + return false; + } + break; + case 3: + if (base.cursor >= base.limit) + { + break lab0; + } + base.cursor++; + break; + } + continue; + } + base.cursor = v_1; + break; + } + return true; + }; + + /** @return {boolean} */ + function r_RV() { + if (!(I_pV <= base.cursor)) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_R1() { + if (!(I_p1 <= base.cursor)) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_R2() { + if (!(I_p2 <= base.cursor)) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_step_0() { + var /** number */ among_var; + base.ket = base.cursor; + among_var = base.find_among_b(a_1); + if (among_var == 0) + { + return false; + } + base.bra = base.cursor; + if (!r_R1()) + { + return false; + } + switch (among_var) { + case 1: + if (!base.slice_del()) + { + return false; + } + break; + case 2: + if (!base.slice_from("a")) + { + return false; + } + break; + case 3: + if (!base.slice_from("e")) + { + return false; + } + break; + case 4: + if (!base.slice_from("i")) + { + return false; + } + break; + case 5: + { + var /** number */ v_1 = base.limit - base.cursor; + lab0: { + if (!(base.eq_s_b("ab"))) + { + break lab0; + } + return false; + } + base.cursor = base.limit - v_1; + } + if (!base.slice_from("i")) + { + return false; + } + break; + case 6: + if (!base.slice_from("at")) + { + return false; + } + break; + case 7: + if (!base.slice_from("a\u0163i")) + { + return false; + } + break; + } + return true; + }; + + /** @return {boolean} */ + function r_combo_suffix() { + var /** number */ among_var; + var /** number */ v_1 = base.limit - base.cursor; + base.ket = base.cursor; + among_var = base.find_among_b(a_2); + if (among_var == 0) + { + return false; + } + base.bra = base.cursor; + if (!r_R1()) + { + return false; + } + switch (among_var) { + case 1: + if (!base.slice_from("abil")) + { + return false; + } + break; + case 2: + if (!base.slice_from("ibil")) + { + return false; + } + break; + case 3: + if (!base.slice_from("iv")) + { + return false; + } + break; + case 4: + if (!base.slice_from("ic")) + { + return false; + } + break; + case 5: + if (!base.slice_from("at")) + { + return false; + } + break; + case 6: + if (!base.slice_from("it")) + { + return false; + } + break; + } + B_standard_suffix_removed = true; + base.cursor = base.limit - v_1; + return true; + }; + + /** @return {boolean} */ + function r_standard_suffix() { + var /** number */ among_var; + B_standard_suffix_removed = false; + while(true) + { + var /** number */ v_1 = base.limit - base.cursor; + lab0: { + if (!r_combo_suffix()) + { + break lab0; + } + continue; + } + base.cursor = base.limit - v_1; + break; + } + base.ket = base.cursor; + among_var = base.find_among_b(a_3); + if (among_var == 0) + { + return false; + } + base.bra = base.cursor; + if (!r_R2()) + { + return false; + } + switch (among_var) { + case 1: + if (!base.slice_del()) + { + return false; + } + break; + case 2: + if (!(base.eq_s_b("\u0163"))) + { + return false; + } + base.bra = base.cursor; + if (!base.slice_from("t")) + { + return false; + } + break; + case 3: + if (!base.slice_from("ist")) + { + return false; + } + break; + } + B_standard_suffix_removed = true; + return true; + }; + + /** @return {boolean} */ + function r_verb_suffix() { + var /** number */ among_var; + if (base.cursor < I_pV) + { + return false; + } + var /** number */ v_2 = base.limit_backward; + base.limit_backward = I_pV; + base.ket = base.cursor; + among_var = base.find_among_b(a_4); + if (among_var == 0) + { + base.limit_backward = v_2; + return false; + } + base.bra = base.cursor; + switch (among_var) { + case 1: + lab0: { + var /** number */ v_3 = base.limit - base.cursor; + lab1: { + if (!(base.out_grouping_b(g_v, 97, 259))) + { + break lab1; + } + break lab0; + } + base.cursor = base.limit - v_3; + if (!(base.eq_s_b("u"))) + { + base.limit_backward = v_2; + return false; + } + } + if (!base.slice_del()) + { + return false; + } + break; + case 2: + if (!base.slice_del()) + { + return false; + } + break; + } + base.limit_backward = v_2; + return true; + }; + + /** @return {boolean} */ + function r_vowel_suffix() { + base.ket = base.cursor; + if (base.find_among_b(a_5) == 0) + { + return false; + } + base.bra = base.cursor; + if (!r_RV()) + { + return false; + } + if (!base.slice_del()) + { + return false; + } + return true; + }; + + this.stem = /** @return {boolean} */ function() { + var /** number */ v_1 = base.cursor; + r_prelude(); + base.cursor = v_1; + r_mark_regions(); + base.limit_backward = base.cursor; base.cursor = base.limit; + var /** number */ v_3 = base.limit - base.cursor; + r_step_0(); + base.cursor = base.limit - v_3; + var /** number */ v_4 = base.limit - base.cursor; + r_standard_suffix(); + base.cursor = base.limit - v_4; + var /** number */ v_5 = base.limit - base.cursor; + lab0: { + lab1: { + var /** number */ v_6 = base.limit - base.cursor; + lab2: { + if (!B_standard_suffix_removed) + { + break lab2; + } + break lab1; + } + base.cursor = base.limit - v_6; + if (!r_verb_suffix()) + { + break lab0; + } + } + } + base.cursor = base.limit - v_5; + var /** number */ v_7 = base.limit - base.cursor; + r_vowel_suffix(); + base.cursor = base.limit - v_7; + base.cursor = base.limit_backward; + var /** number */ v_8 = base.cursor; + r_postlude(); + base.cursor = v_8; + return true; + }; + + /**@return{string}*/ + this['stemWord'] = function(/**string*/word) { + base.setCurrent(word); + this.stem(); + return base.getCurrent(); + }; }; - - -function BaseStemmer$eq_s_b$LBaseStemmer$IS($this, s_size, s) { - var cursor$0; - if ((($this.cursor - $this.limit_backward) | 0) < s_size) { - return false; - } - if ($this.current.slice((((cursor$0 = $this.cursor) - s_size) | 0), cursor$0) !== s) { - return false; - } - $this.cursor = ($this.cursor - s_size) | 0; - return true; -}; - -BaseStemmer.eq_s_b$LBaseStemmer$IS = BaseStemmer$eq_s_b$LBaseStemmer$IS; - -BaseStemmer.prototype.eq_v$S = function (s) { - return BaseStemmer$eq_s$LBaseStemmer$IS(this, s.length, s); -}; - - -function BaseStemmer$eq_v$LBaseStemmer$S($this, s) { - return BaseStemmer$eq_s$LBaseStemmer$IS($this, s.length, s); -}; - -BaseStemmer.eq_v$LBaseStemmer$S = BaseStemmer$eq_v$LBaseStemmer$S; - -BaseStemmer.prototype.eq_v_b$S = function (s) { - return BaseStemmer$eq_s_b$LBaseStemmer$IS(this, s.length, s); -}; - - -function BaseStemmer$eq_v_b$LBaseStemmer$S($this, s) { - return BaseStemmer$eq_s_b$LBaseStemmer$IS($this, s.length, s); -}; - -BaseStemmer.eq_v_b$LBaseStemmer$S = BaseStemmer$eq_v_b$LBaseStemmer$S; - -BaseStemmer.prototype.find_among$ALAmong$I = function (v, v_size) { - var i; - var j; - var c; - var l; - var common_i; - var common_j; - var first_key_inspected; - var k; - var diff; - var common; - var w; - var i2; - var res; - i = 0; - j = v_size; - c = this.cursor; - l = this.limit; - common_i = 0; - common_j = 0; - first_key_inspected = false; - while (true) { - k = i + (j - i >>> 1); - diff = 0; - common = (common_i < common_j ? common_i : common_j); - w = v[k]; - for (i2 = common; i2 < w.s_size; i2++) { - if (c + common === l) { - diff = -1; - break; - } - diff = this.current.charCodeAt(c + common) - w.s.charCodeAt(i2); - if (diff !== 0) { - break; - } - common++; - } - if (diff < 0) { - j = k; - common_j = common; - } else { - i = k; - common_i = common; - } - if (j - i <= 1) { - if (i > 0) { - break; - } - if (j === i) { - break; - } - if (first_key_inspected) { - break; - } - first_key_inspected = true; - } - } - while (true) { - w = v[i]; - if (common_i >= w.s_size) { - this.cursor = (c + w.s_size | 0); - if (w.method == null) { - return w.result; - } - res = w.method(w.instance); - this.cursor = (c + w.s_size | 0); - if (res) { - return w.result; - } - } - i = w.substring_i; - if (i < 0) { - return 0; - } - } - return -1; -}; - - -function BaseStemmer$find_among$LBaseStemmer$ALAmong$I($this, v, v_size) { - var i; - var j; - var c; - var l; - var common_i; - var common_j; - var first_key_inspected; - var k; - var diff; - var common; - var w; - var i2; - var res; - i = 0; - j = v_size; - c = $this.cursor; - l = $this.limit; - common_i = 0; - common_j = 0; - first_key_inspected = false; - while (true) { - k = i + (j - i >>> 1); - diff = 0; - common = (common_i < common_j ? common_i : common_j); - w = v[k]; - for (i2 = common; i2 < w.s_size; i2++) { - if (c + common === l) { - diff = -1; - break; - } - diff = $this.current.charCodeAt(c + common) - w.s.charCodeAt(i2); - if (diff !== 0) { - break; - } - common++; - } - if (diff < 0) { - j = k; - common_j = common; - } else { - i = k; - common_i = common; - } - if (j - i <= 1) { - if (i > 0) { - break; - } - if (j === i) { - break; - } - if (first_key_inspected) { - break; - } - first_key_inspected = true; - } - } - while (true) { - w = v[i]; - if (common_i >= w.s_size) { - $this.cursor = (c + w.s_size | 0); - if (w.method == null) { - return w.result; - } - res = w.method(w.instance); - $this.cursor = (c + w.s_size | 0); - if (res) { - return w.result; - } - } - i = w.substring_i; - if (i < 0) { - return 0; - } - } - return -1; -}; - -BaseStemmer.find_among$LBaseStemmer$ALAmong$I = BaseStemmer$find_among$LBaseStemmer$ALAmong$I; - -BaseStemmer.prototype.find_among_b$ALAmong$I = function (v, v_size) { - var i; - var j; - var c; - var lb; - var common_i; - var common_j; - var first_key_inspected; - var k; - var diff; - var common; - var w; - var i2; - var res; - i = 0; - j = v_size; - c = this.cursor; - lb = this.limit_backward; - common_i = 0; - common_j = 0; - first_key_inspected = false; - while (true) { - k = i + (j - i >> 1); - diff = 0; - common = (common_i < common_j ? common_i : common_j); - w = v[k]; - for (i2 = w.s_size - 1 - common; i2 >= 0; i2--) { - if (c - common === lb) { - diff = -1; - break; - } - diff = this.current.charCodeAt(c - 1 - common) - w.s.charCodeAt(i2); - if (diff !== 0) { - break; - } - common++; - } - if (diff < 0) { - j = k; - common_j = common; - } else { - i = k; - common_i = common; - } - if (j - i <= 1) { - if (i > 0) { - break; - } - if (j === i) { - break; - } - if (first_key_inspected) { - break; - } - first_key_inspected = true; - } - } - while (true) { - w = v[i]; - if (common_i >= w.s_size) { - this.cursor = (c - w.s_size | 0); - if (w.method == null) { - return w.result; - } - res = w.method(this); - this.cursor = (c - w.s_size | 0); - if (res) { - return w.result; - } - } - i = w.substring_i; - if (i < 0) { - return 0; - } - } - return -1; -}; - - -function BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, v, v_size) { - var i; - var j; - var c; - var lb; - var common_i; - var common_j; - var first_key_inspected; - var k; - var diff; - var common; - var w; - var i2; - var res; - i = 0; - j = v_size; - c = $this.cursor; - lb = $this.limit_backward; - common_i = 0; - common_j = 0; - first_key_inspected = false; - while (true) { - k = i + (j - i >> 1); - diff = 0; - common = (common_i < common_j ? common_i : common_j); - w = v[k]; - for (i2 = w.s_size - 1 - common; i2 >= 0; i2--) { - if (c - common === lb) { - diff = -1; - break; - } - diff = $this.current.charCodeAt(c - 1 - common) - w.s.charCodeAt(i2); - if (diff !== 0) { - break; - } - common++; - } - if (diff < 0) { - j = k; - common_j = common; - } else { - i = k; - common_i = common; - } - if (j - i <= 1) { - if (i > 0) { - break; - } - if (j === i) { - break; - } - if (first_key_inspected) { - break; - } - first_key_inspected = true; - } - } - while (true) { - w = v[i]; - if (common_i >= w.s_size) { - $this.cursor = (c - w.s_size | 0); - if (w.method == null) { - return w.result; - } - res = w.method($this); - $this.cursor = (c - w.s_size | 0); - if (res) { - return w.result; - } - } - i = w.substring_i; - if (i < 0) { - return 0; - } - } - return -1; -}; - -BaseStemmer.find_among_b$LBaseStemmer$ALAmong$I = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I; - -BaseStemmer.prototype.replace_s$IIS = function (c_bra, c_ket, s) { - var adjustment; - adjustment = ((s.length - (((c_ket - c_bra) | 0))) | 0); - this.current = this.current.slice(0, c_bra) + s + this.current.slice(c_ket); - this.limit = (this.limit + adjustment) | 0; - if (this.cursor >= c_ket) { - this.cursor = (this.cursor + adjustment) | 0; - } else if (this.cursor > c_bra) { - this.cursor = c_bra; - } - return (adjustment | 0); -}; - - -function BaseStemmer$replace_s$LBaseStemmer$IIS($this, c_bra, c_ket, s) { - var adjustment; - adjustment = ((s.length - (((c_ket - c_bra) | 0))) | 0); - $this.current = $this.current.slice(0, c_bra) + s + $this.current.slice(c_ket); - $this.limit = ($this.limit + adjustment) | 0; - if ($this.cursor >= c_ket) { - $this.cursor = ($this.cursor + adjustment) | 0; - } else if ($this.cursor > c_bra) { - $this.cursor = c_bra; - } - return (adjustment | 0); -}; - -BaseStemmer.replace_s$LBaseStemmer$IIS = BaseStemmer$replace_s$LBaseStemmer$IIS; - -BaseStemmer.prototype.slice_check$ = function () { - var bra$0; - var ket$0; - var limit$0; - return ((bra$0 = this.bra) < 0 || bra$0 > (ket$0 = this.ket) || ket$0 > (limit$0 = this.limit) || limit$0 > this.current.length ? false : true); -}; - - -function BaseStemmer$slice_check$LBaseStemmer$($this) { - var bra$0; - var ket$0; - var limit$0; - return ((bra$0 = $this.bra) < 0 || bra$0 > (ket$0 = $this.ket) || ket$0 > (limit$0 = $this.limit) || limit$0 > $this.current.length ? false : true); -}; - -BaseStemmer.slice_check$LBaseStemmer$ = BaseStemmer$slice_check$LBaseStemmer$; - -BaseStemmer.prototype.slice_from$S = function (s) { - var result; - var bra$0; - var ket$0; - var limit$0; - result = false; - if ((bra$0 = this.bra) < 0 || bra$0 > (ket$0 = this.ket) || ket$0 > (limit$0 = this.limit) || limit$0 > this.current.length ? false : true) { - BaseStemmer$replace_s$LBaseStemmer$IIS(this, this.bra, this.ket, s); - result = true; - } - return result; -}; - - -function BaseStemmer$slice_from$LBaseStemmer$S($this, s) { - var result; - var bra$0; - var ket$0; - var limit$0; - result = false; - if ((bra$0 = $this.bra) < 0 || bra$0 > (ket$0 = $this.ket) || ket$0 > (limit$0 = $this.limit) || limit$0 > $this.current.length ? false : true) { - BaseStemmer$replace_s$LBaseStemmer$IIS($this, $this.bra, $this.ket, s); - result = true; - } - return result; -}; - -BaseStemmer.slice_from$LBaseStemmer$S = BaseStemmer$slice_from$LBaseStemmer$S; - -BaseStemmer.prototype.slice_del$ = function () { - return BaseStemmer$slice_from$LBaseStemmer$S(this, ""); -}; - - -function BaseStemmer$slice_del$LBaseStemmer$($this) { - return BaseStemmer$slice_from$LBaseStemmer$S($this, ""); -}; - -BaseStemmer.slice_del$LBaseStemmer$ = BaseStemmer$slice_del$LBaseStemmer$; - -BaseStemmer.prototype.insert$IIS = function (c_bra, c_ket, s) { - var adjustment; - adjustment = BaseStemmer$replace_s$LBaseStemmer$IIS(this, c_bra, c_ket, s); - if (c_bra <= this.bra) { - this.bra = (this.bra + adjustment) | 0; - } - if (c_bra <= this.ket) { - this.ket = (this.ket + adjustment) | 0; - } -}; - - -function BaseStemmer$insert$LBaseStemmer$IIS($this, c_bra, c_ket, s) { - var adjustment; - adjustment = BaseStemmer$replace_s$LBaseStemmer$IIS($this, c_bra, c_ket, s); - if (c_bra <= $this.bra) { - $this.bra = ($this.bra + adjustment) | 0; - } - if (c_bra <= $this.ket) { - $this.ket = ($this.ket + adjustment) | 0; - } -}; - -BaseStemmer.insert$LBaseStemmer$IIS = BaseStemmer$insert$LBaseStemmer$IIS; - -BaseStemmer.prototype.slice_to$S = function (s) { - var result; - var bra$0; - var ket$0; - var limit$0; - result = ''; - if ((bra$0 = this.bra) < 0 || bra$0 > (ket$0 = this.ket) || ket$0 > (limit$0 = this.limit) || limit$0 > this.current.length ? false : true) { - result = this.current.slice(this.bra, this.ket); - } - return result; -}; - - -function BaseStemmer$slice_to$LBaseStemmer$S($this, s) { - var result; - var bra$0; - var ket$0; - var limit$0; - result = ''; - if ((bra$0 = $this.bra) < 0 || bra$0 > (ket$0 = $this.ket) || ket$0 > (limit$0 = $this.limit) || limit$0 > $this.current.length ? false : true) { - result = $this.current.slice($this.bra, $this.ket); - } - return result; -}; - -BaseStemmer.slice_to$LBaseStemmer$S = BaseStemmer$slice_to$LBaseStemmer$S; - -BaseStemmer.prototype.assign_to$S = function (s) { - return this.current.slice(0, this.limit); -}; - - -function BaseStemmer$assign_to$LBaseStemmer$S($this, s) { - return $this.current.slice(0, $this.limit); -}; - -BaseStemmer.assign_to$LBaseStemmer$S = BaseStemmer$assign_to$LBaseStemmer$S; - -BaseStemmer.prototype.stem$ = function () { - return false; -}; - - -BaseStemmer.prototype.stemWord$S = function (word) { - var result; - var current$0; - var cursor$0; - var limit$0; - result = this.cache['.' + word]; - if (result == null) { - current$0 = this.current = word; - cursor$0 = this.cursor = 0; - limit$0 = this.limit = current$0.length; - this.limit_backward = 0; - this.bra = cursor$0; - this.ket = limit$0; - this.stem$(); - result = this.current; - this.cache['.' + word] = result; - } - return result; -}; - -BaseStemmer.prototype.stemWord = BaseStemmer.prototype.stemWord$S; - -BaseStemmer.prototype.stemWords$AS = function (words) { - var results; - var i; - var word; - var result; - var current$0; - var cursor$0; - var limit$0; - results = [ ]; - for (i = 0; i < words.length; i++) { - word = words[i]; - result = this.cache['.' + word]; - if (result == null) { - current$0 = this.current = word; - cursor$0 = this.cursor = 0; - limit$0 = this.limit = current$0.length; - this.limit_backward = 0; - this.bra = cursor$0; - this.ket = limit$0; - this.stem$(); - result = this.current; - this.cache['.' + word] = result; - } - results.push(result); - } - return results; -}; - -BaseStemmer.prototype.stemWords = BaseStemmer.prototype.stemWords$AS; - -function RomanianStemmer() { - BaseStemmer.call(this); - this.B_standard_suffix_removed = false; - this.I_p2 = 0; - this.I_p1 = 0; - this.I_pV = 0; -}; - -$__jsx_extend([RomanianStemmer], BaseStemmer); -RomanianStemmer.prototype.copy_from$LRomanianStemmer$ = function (other) { - this.B_standard_suffix_removed = other.B_standard_suffix_removed; - this.I_p2 = other.I_p2; - this.I_p1 = other.I_p1; - this.I_pV = other.I_pV; - BaseStemmer$copy_from$LBaseStemmer$LBaseStemmer$(this, other); -}; - -RomanianStemmer.prototype.copy_from = RomanianStemmer.prototype.copy_from$LRomanianStemmer$; - -RomanianStemmer.prototype.r_prelude$ = function () { - var v_1; - var v_2; - var v_3; - var lab1; - var lab3; - var lab4; - var lab5; - var cursor$0; - var $__jsx_postinc_t; -replab0: - while (true) { - v_1 = this.cursor; - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - golab2: - while (true) { - v_2 = this.cursor; - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, RomanianStemmer.g_v, 97, 259)) { - break lab3; - } - this.bra = this.cursor; - lab4 = true; - lab4: - while (lab4 === true) { - lab4 = false; - v_3 = this.cursor; - lab5 = true; - lab5: - while (lab5 === true) { - lab5 = false; - if (! BaseStemmer$eq_s$LBaseStemmer$IS(this, 1, "u")) { - break lab5; - } - this.ket = this.cursor; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, RomanianStemmer.g_v, 97, 259)) { - break lab5; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "U")) { - return false; - } - break lab4; - } - this.cursor = v_3; - if (! BaseStemmer$eq_s$LBaseStemmer$IS(this, 1, "i")) { - break lab3; - } - this.ket = this.cursor; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, RomanianStemmer.g_v, 97, 259)) { - break lab3; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "I")) { - return false; - } - } - this.cursor = v_2; - break golab2; - } - cursor$0 = this.cursor = v_2; - if (cursor$0 >= this.limit) { - break lab1; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - continue replab0; - } - this.cursor = v_1; - break replab0; - } - return true; -}; - -RomanianStemmer.prototype.r_prelude = RomanianStemmer.prototype.r_prelude$; - -function RomanianStemmer$r_prelude$LRomanianStemmer$($this) { - var v_1; - var v_2; - var v_3; - var lab1; - var lab3; - var lab4; - var lab5; - var cursor$0; - var $__jsx_postinc_t; -replab0: - while (true) { - v_1 = $this.cursor; - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - golab2: - while (true) { - v_2 = $this.cursor; - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII($this, RomanianStemmer.g_v, 97, 259)) { - break lab3; - } - $this.bra = $this.cursor; - lab4 = true; - lab4: - while (lab4 === true) { - lab4 = false; - v_3 = $this.cursor; - lab5 = true; - lab5: - while (lab5 === true) { - lab5 = false; - if (! BaseStemmer$eq_s$LBaseStemmer$IS($this, 1, "u")) { - break lab5; - } - $this.ket = $this.cursor; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII($this, RomanianStemmer.g_v, 97, 259)) { - break lab5; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "U")) { - return false; - } - break lab4; - } - $this.cursor = v_3; - if (! BaseStemmer$eq_s$LBaseStemmer$IS($this, 1, "i")) { - break lab3; - } - $this.ket = $this.cursor; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII($this, RomanianStemmer.g_v, 97, 259)) { - break lab3; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "I")) { - return false; - } - } - $this.cursor = v_2; - break golab2; - } - cursor$0 = $this.cursor = v_2; - if (cursor$0 >= $this.limit) { - break lab1; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - continue replab0; - } - $this.cursor = v_1; - break replab0; - } - return true; -}; - -RomanianStemmer.r_prelude$LRomanianStemmer$ = RomanianStemmer$r_prelude$LRomanianStemmer$; - -RomanianStemmer.prototype.r_mark_regions$ = function () { - var v_1; - var v_2; - var v_3; - var v_6; - var v_8; - var lab0; - var lab1; - var lab2; - var lab3; - var lab4; - var lab6; - var lab8; - var lab9; - var lab10; - var lab12; - var lab13; - var lab15; - var lab17; - var lab19; - var lab21; - var limit$0; - var cursor$0; - var $__jsx_postinc_t; - this.I_pV = limit$0 = this.limit; - this.I_p1 = limit$0; - this.I_p2 = limit$0; - v_1 = this.cursor; - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - v_2 = this.cursor; - lab2 = true; - lab2: - while (lab2 === true) { - lab2 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, RomanianStemmer.g_v, 97, 259)) { - break lab2; - } - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - v_3 = this.cursor; - lab4 = true; - lab4: - while (lab4 === true) { - lab4 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII(this, RomanianStemmer.g_v, 97, 259)) { - break lab4; - } - golab5: - while (true) { - lab6 = true; - lab6: - while (lab6 === true) { - lab6 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, RomanianStemmer.g_v, 97, 259)) { - break lab6; - } - break golab5; - } - if (this.cursor >= this.limit) { - break lab4; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - break lab3; - } - this.cursor = v_3; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, RomanianStemmer.g_v, 97, 259)) { - break lab2; - } - golab7: - while (true) { - lab8 = true; - lab8: - while (lab8 === true) { - lab8 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII(this, RomanianStemmer.g_v, 97, 259)) { - break lab8; - } - break golab7; - } - if (this.cursor >= this.limit) { - break lab2; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - } - break lab1; - } - this.cursor = v_2; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII(this, RomanianStemmer.g_v, 97, 259)) { - break lab0; - } - lab9 = true; - lab9: - while (lab9 === true) { - lab9 = false; - v_6 = this.cursor; - lab10 = true; - lab10: - while (lab10 === true) { - lab10 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII(this, RomanianStemmer.g_v, 97, 259)) { - break lab10; - } - golab11: - while (true) { - lab12 = true; - lab12: - while (lab12 === true) { - lab12 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, RomanianStemmer.g_v, 97, 259)) { - break lab12; - } - break golab11; - } - if (this.cursor >= this.limit) { - break lab10; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - break lab9; - } - this.cursor = v_6; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, RomanianStemmer.g_v, 97, 259)) { - break lab0; - } - if (this.cursor >= this.limit) { - break lab0; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - } - this.I_pV = this.cursor; - } - cursor$0 = this.cursor = v_1; - v_8 = cursor$0; - lab13 = true; -lab13: - while (lab13 === true) { - lab13 = false; - golab14: - while (true) { - lab15 = true; - lab15: - while (lab15 === true) { - lab15 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, RomanianStemmer.g_v, 97, 259)) { - break lab15; - } - break golab14; - } - if (this.cursor >= this.limit) { - break lab13; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - golab16: - while (true) { - lab17 = true; - lab17: - while (lab17 === true) { - lab17 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII(this, RomanianStemmer.g_v, 97, 259)) { - break lab17; - } - break golab16; - } - if (this.cursor >= this.limit) { - break lab13; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - this.I_p1 = this.cursor; - golab18: - while (true) { - lab19 = true; - lab19: - while (lab19 === true) { - lab19 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, RomanianStemmer.g_v, 97, 259)) { - break lab19; - } - break golab18; - } - if (this.cursor >= this.limit) { - break lab13; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - golab20: - while (true) { - lab21 = true; - lab21: - while (lab21 === true) { - lab21 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII(this, RomanianStemmer.g_v, 97, 259)) { - break lab21; - } - break golab20; - } - if (this.cursor >= this.limit) { - break lab13; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - this.I_p2 = this.cursor; - } - this.cursor = v_8; - return true; -}; - -RomanianStemmer.prototype.r_mark_regions = RomanianStemmer.prototype.r_mark_regions$; - -function RomanianStemmer$r_mark_regions$LRomanianStemmer$($this) { - var v_1; - var v_2; - var v_3; - var v_6; - var v_8; - var lab0; - var lab1; - var lab2; - var lab3; - var lab4; - var lab6; - var lab8; - var lab9; - var lab10; - var lab12; - var lab13; - var lab15; - var lab17; - var lab19; - var lab21; - var limit$0; - var cursor$0; - var $__jsx_postinc_t; - $this.I_pV = limit$0 = $this.limit; - $this.I_p1 = limit$0; - $this.I_p2 = limit$0; - v_1 = $this.cursor; - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - v_2 = $this.cursor; - lab2 = true; - lab2: - while (lab2 === true) { - lab2 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII($this, RomanianStemmer.g_v, 97, 259)) { - break lab2; - } - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - v_3 = $this.cursor; - lab4 = true; - lab4: - while (lab4 === true) { - lab4 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII($this, RomanianStemmer.g_v, 97, 259)) { - break lab4; - } - golab5: - while (true) { - lab6 = true; - lab6: - while (lab6 === true) { - lab6 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII($this, RomanianStemmer.g_v, 97, 259)) { - break lab6; - } - break golab5; - } - if ($this.cursor >= $this.limit) { - break lab4; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - break lab3; - } - $this.cursor = v_3; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII($this, RomanianStemmer.g_v, 97, 259)) { - break lab2; - } - golab7: - while (true) { - lab8 = true; - lab8: - while (lab8 === true) { - lab8 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII($this, RomanianStemmer.g_v, 97, 259)) { - break lab8; - } - break golab7; - } - if ($this.cursor >= $this.limit) { - break lab2; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - } - break lab1; - } - $this.cursor = v_2; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII($this, RomanianStemmer.g_v, 97, 259)) { - break lab0; - } - lab9 = true; - lab9: - while (lab9 === true) { - lab9 = false; - v_6 = $this.cursor; - lab10 = true; - lab10: - while (lab10 === true) { - lab10 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII($this, RomanianStemmer.g_v, 97, 259)) { - break lab10; - } - golab11: - while (true) { - lab12 = true; - lab12: - while (lab12 === true) { - lab12 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII($this, RomanianStemmer.g_v, 97, 259)) { - break lab12; - } - break golab11; - } - if ($this.cursor >= $this.limit) { - break lab10; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - break lab9; - } - $this.cursor = v_6; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII($this, RomanianStemmer.g_v, 97, 259)) { - break lab0; - } - if ($this.cursor >= $this.limit) { - break lab0; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - } - $this.I_pV = $this.cursor; - } - cursor$0 = $this.cursor = v_1; - v_8 = cursor$0; - lab13 = true; -lab13: - while (lab13 === true) { - lab13 = false; - golab14: - while (true) { - lab15 = true; - lab15: - while (lab15 === true) { - lab15 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII($this, RomanianStemmer.g_v, 97, 259)) { - break lab15; - } - break golab14; - } - if ($this.cursor >= $this.limit) { - break lab13; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - golab16: - while (true) { - lab17 = true; - lab17: - while (lab17 === true) { - lab17 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII($this, RomanianStemmer.g_v, 97, 259)) { - break lab17; - } - break golab16; - } - if ($this.cursor >= $this.limit) { - break lab13; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - $this.I_p1 = $this.cursor; - golab18: - while (true) { - lab19 = true; - lab19: - while (lab19 === true) { - lab19 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII($this, RomanianStemmer.g_v, 97, 259)) { - break lab19; - } - break golab18; - } - if ($this.cursor >= $this.limit) { - break lab13; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - golab20: - while (true) { - lab21 = true; - lab21: - while (lab21 === true) { - lab21 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII($this, RomanianStemmer.g_v, 97, 259)) { - break lab21; - } - break golab20; - } - if ($this.cursor >= $this.limit) { - break lab13; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - $this.I_p2 = $this.cursor; - } - $this.cursor = v_8; - return true; -}; - -RomanianStemmer.r_mark_regions$LRomanianStemmer$ = RomanianStemmer$r_mark_regions$LRomanianStemmer$; - -RomanianStemmer.prototype.r_postlude$ = function () { - var among_var; - var v_1; - var lab1; - var $__jsx_postinc_t; -replab0: - while (true) { - v_1 = this.cursor; - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - this.bra = this.cursor; - among_var = BaseStemmer$find_among$LBaseStemmer$ALAmong$I(this, RomanianStemmer.a_0, 3); - if (among_var === 0) { - break lab1; - } - this.ket = this.cursor; - switch (among_var) { - case 0: - break lab1; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "i")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "u")) { - return false; - } - break; - case 3: - if (this.cursor >= this.limit) { - break lab1; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - break; - } - continue replab0; - } - this.cursor = v_1; - break replab0; - } - return true; -}; - -RomanianStemmer.prototype.r_postlude = RomanianStemmer.prototype.r_postlude$; - -function RomanianStemmer$r_postlude$LRomanianStemmer$($this) { - var among_var; - var v_1; - var lab1; - var $__jsx_postinc_t; -replab0: - while (true) { - v_1 = $this.cursor; - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - $this.bra = $this.cursor; - among_var = BaseStemmer$find_among$LBaseStemmer$ALAmong$I($this, RomanianStemmer.a_0, 3); - if (among_var === 0) { - break lab1; - } - $this.ket = $this.cursor; - switch (among_var) { - case 0: - break lab1; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "i")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "u")) { - return false; - } - break; - case 3: - if ($this.cursor >= $this.limit) { - break lab1; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - break; - } - continue replab0; - } - $this.cursor = v_1; - break replab0; - } - return true; -}; - -RomanianStemmer.r_postlude$LRomanianStemmer$ = RomanianStemmer$r_postlude$LRomanianStemmer$; - -RomanianStemmer.prototype.r_RV$ = function () { - return (! (this.I_pV <= this.cursor) ? false : true); -}; - -RomanianStemmer.prototype.r_RV = RomanianStemmer.prototype.r_RV$; - -function RomanianStemmer$r_RV$LRomanianStemmer$($this) { - return (! ($this.I_pV <= $this.cursor) ? false : true); -}; - -RomanianStemmer.r_RV$LRomanianStemmer$ = RomanianStemmer$r_RV$LRomanianStemmer$; - -RomanianStemmer.prototype.r_R1$ = function () { - return (! (this.I_p1 <= this.cursor) ? false : true); -}; - -RomanianStemmer.prototype.r_R1 = RomanianStemmer.prototype.r_R1$; - -function RomanianStemmer$r_R1$LRomanianStemmer$($this) { - return (! ($this.I_p1 <= $this.cursor) ? false : true); -}; - -RomanianStemmer.r_R1$LRomanianStemmer$ = RomanianStemmer$r_R1$LRomanianStemmer$; - -RomanianStemmer.prototype.r_R2$ = function () { - return (! (this.I_p2 <= this.cursor) ? false : true); -}; - -RomanianStemmer.prototype.r_R2 = RomanianStemmer.prototype.r_R2$; - -function RomanianStemmer$r_R2$LRomanianStemmer$($this) { - return (! ($this.I_p2 <= $this.cursor) ? false : true); -}; - -RomanianStemmer.r_R2$LRomanianStemmer$ = RomanianStemmer$r_R2$LRomanianStemmer$; - -RomanianStemmer.prototype.r_step_0$ = function () { - var among_var; - var v_1; - var lab0; - var cursor$0; - this.ket = this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, RomanianStemmer.a_1, 16); - if (among_var === 0) { - return false; - } - this.bra = cursor$0 = this.cursor; - if (! (! (this.I_p1 <= cursor$0) ? false : true)) { - return false; - } - switch (among_var) { - case 0: - return false; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "a")) { - return false; - } - break; - case 3: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "e")) { - return false; - } - break; - case 4: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "i")) { - return false; - } - break; - case 5: - v_1 = ((this.limit - this.cursor) | 0); - lab0 = true; - lab0: - while (lab0 === true) { - lab0 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 2, "ab")) { - break lab0; - } - return false; - } - this.cursor = ((this.limit - v_1) | 0); - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "i")) { - return false; - } - break; - case 6: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "at")) { - return false; - } - break; - case 7: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "a\u0163i")) { - return false; - } - break; - } - return true; -}; - -RomanianStemmer.prototype.r_step_0 = RomanianStemmer.prototype.r_step_0$; - -function RomanianStemmer$r_step_0$LRomanianStemmer$($this) { - var among_var; - var v_1; - var lab0; - var cursor$0; - $this.ket = $this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, RomanianStemmer.a_1, 16); - if (among_var === 0) { - return false; - } - $this.bra = cursor$0 = $this.cursor; - if (! (! ($this.I_p1 <= cursor$0) ? false : true)) { - return false; - } - switch (among_var) { - case 0: - return false; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "a")) { - return false; - } - break; - case 3: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "e")) { - return false; - } - break; - case 4: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "i")) { - return false; - } - break; - case 5: - v_1 = (($this.limit - $this.cursor) | 0); - lab0 = true; - lab0: - while (lab0 === true) { - lab0 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 2, "ab")) { - break lab0; - } - return false; - } - $this.cursor = (($this.limit - v_1) | 0); - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "i")) { - return false; - } - break; - case 6: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "at")) { - return false; - } - break; - case 7: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "a\u0163i")) { - return false; - } - break; - } - return true; -}; - -RomanianStemmer.r_step_0$LRomanianStemmer$ = RomanianStemmer$r_step_0$LRomanianStemmer$; - -RomanianStemmer.prototype.r_combo_suffix$ = function () { - var among_var; - var v_1; - var cursor$0; - var cursor$1; - v_1 = ((this.limit - (cursor$0 = this.cursor)) | 0); - this.ket = cursor$0; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, RomanianStemmer.a_2, 46); - if (among_var === 0) { - return false; - } - this.bra = cursor$1 = this.cursor; - if (! (! (this.I_p1 <= cursor$1) ? false : true)) { - return false; - } - switch (among_var) { - case 0: - return false; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "abil")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "ibil")) { - return false; - } - break; - case 3: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "iv")) { - return false; - } - break; - case 4: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "ic")) { - return false; - } - break; - case 5: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "at")) { - return false; - } - break; - case 6: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "it")) { - return false; - } - break; - } - this.B_standard_suffix_removed = true; - this.cursor = ((this.limit - v_1) | 0); - return true; -}; - -RomanianStemmer.prototype.r_combo_suffix = RomanianStemmer.prototype.r_combo_suffix$; - -function RomanianStemmer$r_combo_suffix$LRomanianStemmer$($this) { - var among_var; - var v_1; - var cursor$0; - var cursor$1; - v_1 = (($this.limit - (cursor$0 = $this.cursor)) | 0); - $this.ket = cursor$0; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, RomanianStemmer.a_2, 46); - if (among_var === 0) { - return false; - } - $this.bra = cursor$1 = $this.cursor; - if (! (! ($this.I_p1 <= cursor$1) ? false : true)) { - return false; - } - switch (among_var) { - case 0: - return false; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "abil")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "ibil")) { - return false; - } - break; - case 3: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "iv")) { - return false; - } - break; - case 4: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "ic")) { - return false; - } - break; - case 5: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "at")) { - return false; - } - break; - case 6: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "it")) { - return false; - } - break; - } - $this.B_standard_suffix_removed = true; - $this.cursor = (($this.limit - v_1) | 0); - return true; -}; - -RomanianStemmer.r_combo_suffix$LRomanianStemmer$ = RomanianStemmer$r_combo_suffix$LRomanianStemmer$; - -RomanianStemmer.prototype.r_standard_suffix$ = function () { - var among_var; - var v_1; - var lab1; - var cursor$0; - this.B_standard_suffix_removed = false; -replab0: - while (true) { - v_1 = ((this.limit - this.cursor) | 0); - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - if (! RomanianStemmer$r_combo_suffix$LRomanianStemmer$(this)) { - break lab1; - } - continue replab0; - } - this.cursor = ((this.limit - v_1) | 0); - break replab0; - } - this.ket = this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, RomanianStemmer.a_3, 62); - if (among_var === 0) { - return false; - } - this.bra = cursor$0 = this.cursor; - if (! (! (this.I_p2 <= cursor$0) ? false : true)) { - return false; - } - switch (among_var) { - case 0: - return false; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 2: - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "\u0163")) { - return false; - } - this.bra = this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "t")) { - return false; - } - break; - case 3: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "ist")) { - return false; - } - break; - } - this.B_standard_suffix_removed = true; - return true; -}; - -RomanianStemmer.prototype.r_standard_suffix = RomanianStemmer.prototype.r_standard_suffix$; - -function RomanianStemmer$r_standard_suffix$LRomanianStemmer$($this) { - var among_var; - var v_1; - var lab1; - var cursor$0; - $this.B_standard_suffix_removed = false; -replab0: - while (true) { - v_1 = (($this.limit - $this.cursor) | 0); - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - if (! RomanianStemmer$r_combo_suffix$LRomanianStemmer$($this)) { - break lab1; - } - continue replab0; - } - $this.cursor = (($this.limit - v_1) | 0); - break replab0; - } - $this.ket = $this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, RomanianStemmer.a_3, 62); - if (among_var === 0) { - return false; - } - $this.bra = cursor$0 = $this.cursor; - if (! (! ($this.I_p2 <= cursor$0) ? false : true)) { - return false; - } - switch (among_var) { - case 0: - return false; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 2: - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "\u0163")) { - return false; - } - $this.bra = $this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "t")) { - return false; - } - break; - case 3: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "ist")) { - return false; - } - break; - } - $this.B_standard_suffix_removed = true; - return true; -}; - -RomanianStemmer.r_standard_suffix$LRomanianStemmer$ = RomanianStemmer$r_standard_suffix$LRomanianStemmer$; - -RomanianStemmer.prototype.r_verb_suffix$ = function () { - var among_var; - var v_1; - var v_2; - var v_3; - var lab0; - var lab1; - var cursor$0; - var cursor$1; - var cursor$2; - v_1 = ((this.limit - (cursor$0 = this.cursor)) | 0); - if (cursor$0 < this.I_pV) { - return false; - } - cursor$1 = this.cursor = this.I_pV; - v_2 = this.limit_backward; - this.limit_backward = cursor$1; - cursor$2 = this.cursor = ((this.limit - v_1) | 0); - this.ket = cursor$2; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, RomanianStemmer.a_4, 94); - if (among_var === 0) { - this.limit_backward = v_2; - return false; - } - this.bra = this.cursor; - switch (among_var) { - case 0: - this.limit_backward = v_2; - return false; - case 1: - lab0 = true; - lab0: - while (lab0 === true) { - lab0 = false; - v_3 = ((this.limit - this.cursor) | 0); - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - if (! BaseStemmer$out_grouping_b$LBaseStemmer$AIII(this, RomanianStemmer.g_v, 97, 259)) { - break lab1; - } - break lab0; - } - this.cursor = ((this.limit - v_3) | 0); - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "u")) { - this.limit_backward = v_2; - return false; - } - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - } - this.limit_backward = v_2; - return true; -}; - -RomanianStemmer.prototype.r_verb_suffix = RomanianStemmer.prototype.r_verb_suffix$; - -function RomanianStemmer$r_verb_suffix$LRomanianStemmer$($this) { - var among_var; - var v_1; - var v_2; - var v_3; - var lab0; - var lab1; - var cursor$0; - var cursor$1; - var cursor$2; - v_1 = (($this.limit - (cursor$0 = $this.cursor)) | 0); - if (cursor$0 < $this.I_pV) { - return false; - } - cursor$1 = $this.cursor = $this.I_pV; - v_2 = $this.limit_backward; - $this.limit_backward = cursor$1; - cursor$2 = $this.cursor = (($this.limit - v_1) | 0); - $this.ket = cursor$2; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, RomanianStemmer.a_4, 94); - if (among_var === 0) { - $this.limit_backward = v_2; - return false; - } - $this.bra = $this.cursor; - switch (among_var) { - case 0: - $this.limit_backward = v_2; - return false; - case 1: - lab0 = true; - lab0: - while (lab0 === true) { - lab0 = false; - v_3 = (($this.limit - $this.cursor) | 0); - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - if (! BaseStemmer$out_grouping_b$LBaseStemmer$AIII($this, RomanianStemmer.g_v, 97, 259)) { - break lab1; - } - break lab0; - } - $this.cursor = (($this.limit - v_3) | 0); - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "u")) { - $this.limit_backward = v_2; - return false; - } - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - } - $this.limit_backward = v_2; - return true; -}; - -RomanianStemmer.r_verb_suffix$LRomanianStemmer$ = RomanianStemmer$r_verb_suffix$LRomanianStemmer$; - -RomanianStemmer.prototype.r_vowel_suffix$ = function () { - var among_var; - var cursor$0; - this.ket = this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, RomanianStemmer.a_5, 5); - if (among_var === 0) { - return false; - } - this.bra = cursor$0 = this.cursor; - if (! (! (this.I_pV <= cursor$0) ? false : true)) { - return false; - } - switch (among_var) { - case 0: - return false; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - } - return true; -}; - -RomanianStemmer.prototype.r_vowel_suffix = RomanianStemmer.prototype.r_vowel_suffix$; - -function RomanianStemmer$r_vowel_suffix$LRomanianStemmer$($this) { - var among_var; - var cursor$0; - $this.ket = $this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, RomanianStemmer.a_5, 5); - if (among_var === 0) { - return false; - } - $this.bra = cursor$0 = $this.cursor; - if (! (! ($this.I_pV <= cursor$0) ? false : true)) { - return false; - } - switch (among_var) { - case 0: - return false; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - } - return true; -}; - -RomanianStemmer.r_vowel_suffix$LRomanianStemmer$ = RomanianStemmer$r_vowel_suffix$LRomanianStemmer$; - -RomanianStemmer.prototype.stem$ = function () { - var v_1; - var v_2; - var v_3; - var v_4; - var v_5; - var v_6; - var v_8; - var lab0; - var lab1; - var lab2; - var lab3; - var lab4; - var lab5; - var lab6; - var lab7; - var lab8; - var cursor$0; - var cursor$1; - var limit$0; - var cursor$2; - var limit$1; - var cursor$3; - var limit$2; - var cursor$4; - var cursor$5; - v_1 = this.cursor; - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - if (! RomanianStemmer$r_prelude$LRomanianStemmer$(this)) { - break lab0; - } - } - cursor$0 = this.cursor = v_1; - v_2 = cursor$0; - lab1 = true; -lab1: - while (lab1 === true) { - lab1 = false; - if (! RomanianStemmer$r_mark_regions$LRomanianStemmer$(this)) { - break lab1; - } - } - cursor$1 = this.cursor = v_2; - this.limit_backward = cursor$1; - cursor$2 = this.cursor = limit$0 = this.limit; - v_3 = ((limit$0 - cursor$2) | 0); - lab2 = true; -lab2: - while (lab2 === true) { - lab2 = false; - if (! RomanianStemmer$r_step_0$LRomanianStemmer$(this)) { - break lab2; - } - } - cursor$3 = this.cursor = (((limit$1 = this.limit) - v_3) | 0); - v_4 = ((limit$1 - cursor$3) | 0); - lab3 = true; -lab3: - while (lab3 === true) { - lab3 = false; - if (! RomanianStemmer$r_standard_suffix$LRomanianStemmer$(this)) { - break lab3; - } - } - cursor$4 = this.cursor = (((limit$2 = this.limit) - v_4) | 0); - v_5 = ((limit$2 - cursor$4) | 0); - lab4 = true; -lab4: - while (lab4 === true) { - lab4 = false; - lab5 = true; - lab5: - while (lab5 === true) { - lab5 = false; - v_6 = ((this.limit - this.cursor) | 0); - lab6 = true; - lab6: - while (lab6 === true) { - lab6 = false; - if (! this.B_standard_suffix_removed) { - break lab6; - } - break lab5; - } - this.cursor = ((this.limit - v_6) | 0); - if (! RomanianStemmer$r_verb_suffix$LRomanianStemmer$(this)) { - break lab4; - } - } - } - this.cursor = ((this.limit - v_5) | 0); - lab7 = true; -lab7: - while (lab7 === true) { - lab7 = false; - if (! RomanianStemmer$r_vowel_suffix$LRomanianStemmer$(this)) { - break lab7; - } - } - cursor$5 = this.cursor = this.limit_backward; - v_8 = cursor$5; - lab8 = true; -lab8: - while (lab8 === true) { - lab8 = false; - if (! RomanianStemmer$r_postlude$LRomanianStemmer$(this)) { - break lab8; - } - } - this.cursor = v_8; - return true; -}; - -RomanianStemmer.prototype.stem = RomanianStemmer.prototype.stem$; - -RomanianStemmer.prototype.equals$X = function (o) { - return o instanceof RomanianStemmer; -}; - -RomanianStemmer.prototype.equals = RomanianStemmer.prototype.equals$X; - -function RomanianStemmer$equals$LRomanianStemmer$X($this, o) { - return o instanceof RomanianStemmer; -}; - -RomanianStemmer.equals$LRomanianStemmer$X = RomanianStemmer$equals$LRomanianStemmer$X; - -RomanianStemmer.prototype.hashCode$ = function () { - var classname; - var hash; - var i; - var char; - classname = "RomanianStemmer"; - hash = 0; - for (i = 0; i < classname.length; i++) { - char = classname.charCodeAt(i); - hash = (hash << 5) - hash + char; - hash = hash & hash; - } - return (hash | 0); -}; - -RomanianStemmer.prototype.hashCode = RomanianStemmer.prototype.hashCode$; - -function RomanianStemmer$hashCode$LRomanianStemmer$($this) { - var classname; - var hash; - var i; - var char; - classname = "RomanianStemmer"; - hash = 0; - for (i = 0; i < classname.length; i++) { - char = classname.charCodeAt(i); - hash = (hash << 5) - hash + char; - hash = hash & hash; - } - return (hash | 0); -}; - -RomanianStemmer.hashCode$LRomanianStemmer$ = RomanianStemmer$hashCode$LRomanianStemmer$; - -RomanianStemmer.serialVersionUID = 1; -$__jsx_lazy_init(RomanianStemmer, "methodObject", function () { - return new RomanianStemmer(); -}); -$__jsx_lazy_init(RomanianStemmer, "a_0", function () { - return [ new Among("", -1, 3), new Among("I", 0, 1), new Among("U", 0, 2) ]; -}); -$__jsx_lazy_init(RomanianStemmer, "a_1", function () { - return [ new Among("ea", -1, 3), new Among("a\u0163ia", -1, 7), new Among("aua", -1, 2), new Among("iua", -1, 4), new Among("a\u0163ie", -1, 7), new Among("ele", -1, 3), new Among("ile", -1, 5), new Among("iile", 6, 4), new Among("iei", -1, 4), new Among("atei", -1, 6), new Among("ii", -1, 4), new Among("ului", -1, 1), new Among("ul", -1, 1), new Among("elor", -1, 3), new Among("ilor", -1, 4), new Among("iilor", 14, 4) ]; -}); -$__jsx_lazy_init(RomanianStemmer, "a_2", function () { - return [ new Among("icala", -1, 4), new Among("iciva", -1, 4), new Among("ativa", -1, 5), new Among("itiva", -1, 6), new Among("icale", -1, 4), new Among("a\u0163iune", -1, 5), new Among("i\u0163iune", -1, 6), new Among("atoare", -1, 5), new Among("itoare", -1, 6), new Among("\u0103toare", -1, 5), new Among("icitate", -1, 4), new Among("abilitate", -1, 1), new Among("ibilitate", -1, 2), new Among("ivitate", -1, 3), new Among("icive", -1, 4), new Among("ative", -1, 5), new Among("itive", -1, 6), new Among("icali", -1, 4), new Among("atori", -1, 5), new Among("icatori", 18, 4), new Among("itori", -1, 6), new Among("\u0103tori", -1, 5), new Among("icitati", -1, 4), new Among("abilitati", -1, 1), new Among("ivitati", -1, 3), new Among("icivi", -1, 4), new Among("ativi", -1, 5), new Among("itivi", -1, 6), new Among("icit\u0103i", -1, 4), new Among("abilit\u0103i", -1, 1), new Among("ivit\u0103i", -1, 3), new Among("icit\u0103\u0163i", -1, 4), new Among("abilit\u0103\u0163i", -1, 1), new Among("ivit\u0103\u0163i", -1, 3), new Among("ical", -1, 4), new Among("ator", -1, 5), new Among("icator", 35, 4), new Among("itor", -1, 6), new Among("\u0103tor", -1, 5), new Among("iciv", -1, 4), new Among("ativ", -1, 5), new Among("itiv", -1, 6), new Among("ical\u0103", -1, 4), new Among("iciv\u0103", -1, 4), new Among("ativ\u0103", -1, 5), new Among("itiv\u0103", -1, 6) ]; -}); -$__jsx_lazy_init(RomanianStemmer, "a_3", function () { - return [ new Among("ica", -1, 1), new Among("abila", -1, 1), new Among("ibila", -1, 1), new Among("oasa", -1, 1), new Among("ata", -1, 1), new Among("ita", -1, 1), new Among("anta", -1, 1), new Among("ista", -1, 3), new Among("uta", -1, 1), new Among("iva", -1, 1), new Among("ic", -1, 1), new Among("ice", -1, 1), new Among("abile", -1, 1), new Among("ibile", -1, 1), new Among("isme", -1, 3), new Among("iune", -1, 2), new Among("oase", -1, 1), new Among("ate", -1, 1), new Among("itate", 17, 1), new Among("ite", -1, 1), new Among("ante", -1, 1), new Among("iste", -1, 3), new Among("ute", -1, 1), new Among("ive", -1, 1), new Among("ici", -1, 1), new Among("abili", -1, 1), new Among("ibili", -1, 1), new Among("iuni", -1, 2), new Among("atori", -1, 1), new Among("osi", -1, 1), new Among("ati", -1, 1), new Among("itati", 30, 1), new Among("iti", -1, 1), new Among("anti", -1, 1), new Among("isti", -1, 3), new Among("uti", -1, 1), new Among("i\u015Fti", -1, 3), new Among("ivi", -1, 1), new Among("it\u0103i", -1, 1), new Among("o\u015Fi", -1, 1), new Among("it\u0103\u0163i", -1, 1), new Among("abil", -1, 1), new Among("ibil", -1, 1), new Among("ism", -1, 3), new Among("ator", -1, 1), new Among("os", -1, 1), new Among("at", -1, 1), new Among("it", -1, 1), new Among("ant", -1, 1), new Among("ist", -1, 3), new Among("ut", -1, 1), new Among("iv", -1, 1), new Among("ic\u0103", -1, 1), new Among("abil\u0103", -1, 1), new Among("ibil\u0103", -1, 1), new Among("oas\u0103", -1, 1), new Among("at\u0103", -1, 1), new Among("it\u0103", -1, 1), new Among("ant\u0103", -1, 1), new Among("ist\u0103", -1, 3), new Among("ut\u0103", -1, 1), new Among("iv\u0103", -1, 1) ]; -}); -$__jsx_lazy_init(RomanianStemmer, "a_4", function () { - return [ new Among("ea", -1, 1), new Among("ia", -1, 1), new Among("esc", -1, 1), new Among("\u0103sc", -1, 1), new Among("ind", -1, 1), new Among("\u00E2nd", -1, 1), new Among("are", -1, 1), new Among("ere", -1, 1), new Among("ire", -1, 1), new Among("\u00E2re", -1, 1), new Among("se", -1, 2), new Among("ase", 10, 1), new Among("sese", 10, 2), new Among("ise", 10, 1), new Among("use", 10, 1), new Among("\u00E2se", 10, 1), new Among("e\u015Fte", -1, 1), new Among("\u0103\u015Fte", -1, 1), new Among("eze", -1, 1), new Among("ai", -1, 1), new Among("eai", 19, 1), new Among("iai", 19, 1), new Among("sei", -1, 2), new Among("e\u015Fti", -1, 1), new Among("\u0103\u015Fti", -1, 1), new Among("ui", -1, 1), new Among("ezi", -1, 1), new Among("\u00E2i", -1, 1), new Among("a\u015Fi", -1, 1), new Among("se\u015Fi", -1, 2), new Among("ase\u015Fi", 29, 1), new Among("sese\u015Fi", 29, 2), new Among("ise\u015Fi", 29, 1), new Among("use\u015Fi", 29, 1), new Among("\u00E2se\u015Fi", 29, 1), new Among("i\u015Fi", -1, 1), new Among("u\u015Fi", -1, 1), new Among("\u00E2\u015Fi", -1, 1), new Among("a\u0163i", -1, 2), new Among("ea\u0163i", 38, 1), new Among("ia\u0163i", 38, 1), new Among("e\u0163i", -1, 2), new Among("i\u0163i", -1, 2), new Among("\u00E2\u0163i", -1, 2), new Among("ar\u0103\u0163i", -1, 1), new Among("ser\u0103\u0163i", -1, 2), new Among("aser\u0103\u0163i", 45, 1), new Among("seser\u0103\u0163i", 45, 2), new Among("iser\u0103\u0163i", 45, 1), new Among("user\u0103\u0163i", 45, 1), new Among("\u00E2ser\u0103\u0163i", 45, 1), new Among("ir\u0103\u0163i", -1, 1), new Among("ur\u0103\u0163i", -1, 1), new Among("\u00E2r\u0103\u0163i", -1, 1), new Among("am", -1, 1), new Among("eam", 54, 1), new Among("iam", 54, 1), new Among("em", -1, 2), new Among("asem", 57, 1), new Among("sesem", 57, 2), new Among("isem", 57, 1), new Among("usem", 57, 1), new Among("\u00E2sem", 57, 1), new Among("im", -1, 2), new Among("\u00E2m", -1, 2), new Among("\u0103m", -1, 2), new Among("ar\u0103m", 65, 1), new Among("ser\u0103m", 65, 2), new Among("aser\u0103m", 67, 1), new Among("seser\u0103m", 67, 2), new Among("iser\u0103m", 67, 1), new Among("user\u0103m", 67, 1), new Among("\u00E2ser\u0103m", 67, 1), new Among("ir\u0103m", 65, 1), new Among("ur\u0103m", 65, 1), new Among("\u00E2r\u0103m", 65, 1), new Among("au", -1, 1), new Among("eau", 76, 1), new Among("iau", 76, 1), new Among("indu", -1, 1), new Among("\u00E2ndu", -1, 1), new Among("ez", -1, 1), new Among("easc\u0103", -1, 1), new Among("ar\u0103", -1, 1), new Among("ser\u0103", -1, 2), new Among("aser\u0103", 84, 1), new Among("seser\u0103", 84, 2), new Among("iser\u0103", 84, 1), new Among("user\u0103", 84, 1), new Among("\u00E2ser\u0103", 84, 1), new Among("ir\u0103", -1, 1), new Among("ur\u0103", -1, 1), new Among("\u00E2r\u0103", -1, 1), new Among("eaz\u0103", -1, 1) ]; -}); -$__jsx_lazy_init(RomanianStemmer, "a_5", function () { - return [ new Among("a", -1, 1), new Among("e", -1, 1), new Among("ie", 1, 1), new Among("i", -1, 1), new Among("\u0103", -1, 1) ]; -}); -RomanianStemmer.g_v = [ 17, 65, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 32, 0, 0, 4 ]; - -var $__jsx_classMap = { - "src/among.jsx": { - Among: Among, - Among$SII: Among, - Among$SIIF$LBaseStemmer$B$LBaseStemmer$: Among$0 - }, - "src/stemmer.jsx": { - Stemmer: Stemmer, - Stemmer$: Stemmer - }, - "src/base-stemmer.jsx": { - BaseStemmer: BaseStemmer, - BaseStemmer$: BaseStemmer - }, - "src/romanian-stemmer.jsx": { - RomanianStemmer: RomanianStemmer, - RomanianStemmer$: RomanianStemmer - } -}; - - -})(JSX); - -var Among = JSX.require("src/among.jsx").Among; -var Among$SII = JSX.require("src/among.jsx").Among$SII; -var Stemmer = JSX.require("src/stemmer.jsx").Stemmer; -var BaseStemmer = JSX.require("src/base-stemmer.jsx").BaseStemmer; -var RomanianStemmer = JSX.require("src/romanian-stemmer.jsx").RomanianStemmer; diff --git a/sphinx/search/non-minified-js/russian-stemmer.js b/sphinx/search/non-minified-js/russian-stemmer.js index 87f4844e0b9..28ded5fc816 100644 --- a/sphinx/search/non-minified-js/russian-stemmer.js +++ b/sphinx/search/non-minified-js/russian-stemmer.js @@ -1,2232 +1,624 @@ -// generatedy by JSX compiler 0.9.89 (2014-05-20 06:01:03 +0900; 8e8c6105f36f3dfe440ea026a3c93a3444977102) -var JSX = {}; -(function (JSX) { -/** - * extends the class - */ -function $__jsx_extend(derivations, base) { - var ctor = function () {}; - ctor.prototype = base.prototype; - var proto = new ctor(); - for (var i in derivations) { - derivations[i].prototype = proto; - } -} - -/** - * copies the implementations from source interface to target - */ -function $__jsx_merge_interface(target, source) { - for (var k in source.prototype) - if (source.prototype.hasOwnProperty(k)) - target.prototype[k] = source.prototype[k]; -} - -/** - * defers the initialization of the property - */ -function $__jsx_lazy_init(obj, prop, func) { - function reset(obj, prop, value) { - delete obj[prop]; - obj[prop] = value; - return value; - } - - Object.defineProperty(obj, prop, { - get: function () { - return reset(obj, prop, func()); - }, - set: function (v) { - reset(obj, prop, v); - }, - enumerable: true, - configurable: true - }); -} - -var $__jsx_imul = Math.imul; -if (typeof $__jsx_imul === "undefined") { - $__jsx_imul = function (a, b) { - var ah = (a >>> 16) & 0xffff; - var al = a & 0xffff; - var bh = (b >>> 16) & 0xffff; - var bl = b & 0xffff; - return ((al * bl) + (((ah * bl + al * bh) << 16) >>> 0)|0); - }; -} - -/** - * fused int-ops with side-effects - */ -function $__jsx_ipadd(o, p, r) { - return o[p] = (o[p] + r) | 0; -} -function $__jsx_ipsub(o, p, r) { - return o[p] = (o[p] - r) | 0; -} -function $__jsx_ipmul(o, p, r) { - return o[p] = $__jsx_imul(o[p], r); -} -function $__jsx_ipdiv(o, p, r) { - return o[p] = (o[p] / r) | 0; -} -function $__jsx_ipmod(o, p, r) { - return o[p] = (o[p] % r) | 0; -} -function $__jsx_ippostinc(o, p) { - var v = o[p]; - o[p] = (v + 1) | 0; - return v; -} -function $__jsx_ippostdec(o, p) { - var v = o[p]; - o[p] = (v - 1) | 0; - return v; -} - -/** - * non-inlined version of Array#each - */ -function $__jsx_forEach(o, f) { - var l = o.length; - for (var i = 0; i < l; ++i) - f(o[i]); -} - -/* - * global functions, renamed to avoid conflict with local variable names - */ -var $__jsx_parseInt = parseInt; -var $__jsx_parseFloat = parseFloat; -function $__jsx_isNaN(n) { return n !== n; } -var $__jsx_isFinite = isFinite; - -var $__jsx_encodeURIComponent = encodeURIComponent; -var $__jsx_decodeURIComponent = decodeURIComponent; -var $__jsx_encodeURI = encodeURI; -var $__jsx_decodeURI = decodeURI; - -var $__jsx_ObjectToString = Object.prototype.toString; -var $__jsx_ObjectHasOwnProperty = Object.prototype.hasOwnProperty; - -/* - * profiler object, initialized afterwards - */ -function $__jsx_profiler() { -} - -/* - * public interface to JSX code - */ -JSX.require = function (path) { - var m = $__jsx_classMap[path]; - return m !== undefined ? m : null; -}; - -JSX.profilerIsRunning = function () { - return $__jsx_profiler.getResults != null; -}; - -JSX.getProfileResults = function () { - return ($__jsx_profiler.getResults || function () { return {}; })(); -}; - -JSX.postProfileResults = function (url, cb) { - if ($__jsx_profiler.postResults == null) - throw new Error("profiler has not been turned on"); - return $__jsx_profiler.postResults(url, cb); -}; - -JSX.resetProfileResults = function () { - if ($__jsx_profiler.resetResults == null) - throw new Error("profiler has not been turned on"); - return $__jsx_profiler.resetResults(); -}; -JSX.DEBUG = false; -var GeneratorFunction$0 = -(function () { - try { - return Function('import {GeneratorFunction} from "std:iteration"; return GeneratorFunction')(); - } catch (e) { - return function GeneratorFunction () {}; - } -})(); -var __jsx_generator_object$0 = -(function () { - function __jsx_generator_object() { - this.__next = 0; - this.__loop = null; - this.__seed = null; - this.__value = undefined; - this.__status = 0; // SUSPENDED: 0, ACTIVE: 1, DEAD: 2 - } - - __jsx_generator_object.prototype.next = function (seed) { - switch (this.__status) { - case 0: - this.__status = 1; - this.__seed = seed; - - // go next! - this.__loop(this.__next); - - var done = false; - if (this.__next != -1) { - this.__status = 0; - } else { - this.__status = 2; - done = true; - } - return { value: this.__value, done: done }; - case 1: - throw new Error("Generator is already running"); - case 2: - throw new Error("Generator is already finished"); - default: - throw new Error("Unexpected generator internal state"); - } - }; - - return __jsx_generator_object; -}()); -function Among(s, substring_i, result) { - this.s_size = s.length; - this.s = s; - this.substring_i = substring_i; - this.result = result; - this.method = null; - this.instance = null; -}; - -function Among$0(s, substring_i, result, method, instance) { - this.s_size = s.length; - this.s = s; - this.substring_i = substring_i; - this.result = result; - this.method = method; - this.instance = instance; -}; - -$__jsx_extend([Among, Among$0], Object); -function Stemmer() { -}; - -$__jsx_extend([Stemmer], Object); -function BaseStemmer() { - var current$0; - var cursor$0; - var limit$0; - this.cache = ({ }); - current$0 = this.current = ""; - cursor$0 = this.cursor = 0; - limit$0 = this.limit = current$0.length; - this.limit_backward = 0; - this.bra = cursor$0; - this.ket = limit$0; -}; - -$__jsx_extend([BaseStemmer], Stemmer); -BaseStemmer.prototype.setCurrent$S = function (value) { - var current$0; - var cursor$0; - var limit$0; - current$0 = this.current = value; - cursor$0 = this.cursor = 0; - limit$0 = this.limit = current$0.length; - this.limit_backward = 0; - this.bra = cursor$0; - this.ket = limit$0; -}; - - -function BaseStemmer$setCurrent$LBaseStemmer$S($this, value) { - var current$0; - var cursor$0; - var limit$0; - current$0 = $this.current = value; - cursor$0 = $this.cursor = 0; - limit$0 = $this.limit = current$0.length; - $this.limit_backward = 0; - $this.bra = cursor$0; - $this.ket = limit$0; -}; - -BaseStemmer.setCurrent$LBaseStemmer$S = BaseStemmer$setCurrent$LBaseStemmer$S; - -BaseStemmer.prototype.getCurrent$ = function () { - return this.current; -}; - - -function BaseStemmer$getCurrent$LBaseStemmer$($this) { - return $this.current; -}; - -BaseStemmer.getCurrent$LBaseStemmer$ = BaseStemmer$getCurrent$LBaseStemmer$; - -BaseStemmer.prototype.copy_from$LBaseStemmer$ = function (other) { - this.current = other.current; - this.cursor = other.cursor; - this.limit = other.limit; - this.limit_backward = other.limit_backward; - this.bra = other.bra; - this.ket = other.ket; -}; - - -function BaseStemmer$copy_from$LBaseStemmer$LBaseStemmer$($this, other) { - $this.current = other.current; - $this.cursor = other.cursor; - $this.limit = other.limit; - $this.limit_backward = other.limit_backward; - $this.bra = other.bra; - $this.ket = other.ket; -}; - -BaseStemmer.copy_from$LBaseStemmer$LBaseStemmer$ = BaseStemmer$copy_from$LBaseStemmer$LBaseStemmer$; - -BaseStemmer.prototype.in_grouping$AIII = function (s, min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor >= this.limit) { - return false; - } - ch = this.current.charCodeAt(this.cursor); - if (ch > max || ch < min) { - return false; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$in_grouping$LBaseStemmer$AIII($this, s, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor >= $this.limit) { - return false; - } - ch = $this.current.charCodeAt($this.cursor); - if (ch > max || ch < min) { - return false; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.in_grouping$LBaseStemmer$AIII = BaseStemmer$in_grouping$LBaseStemmer$AIII; - -BaseStemmer.prototype.in_grouping_b$AIII = function (s, min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor <= this.limit_backward) { - return false; - } - ch = this.current.charCodeAt(this.cursor - 1); - if (ch > max || ch < min) { - return false; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$in_grouping_b$LBaseStemmer$AIII($this, s, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor <= $this.limit_backward) { - return false; - } - ch = $this.current.charCodeAt($this.cursor - 1); - if (ch > max || ch < min) { - return false; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.in_grouping_b$LBaseStemmer$AIII = BaseStemmer$in_grouping_b$LBaseStemmer$AIII; - -BaseStemmer.prototype.out_grouping$AIII = function (s, min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor >= this.limit) { - return false; - } - ch = this.current.charCodeAt(this.cursor); - if (ch > max || ch < min) { - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; - } - ch -= min; - if ((s[ch >>> 3] & 0X1 << (ch & 0x7)) === 0) { - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; - } - return false; -}; - - -function BaseStemmer$out_grouping$LBaseStemmer$AIII($this, s, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor >= $this.limit) { - return false; - } - ch = $this.current.charCodeAt($this.cursor); - if (ch > max || ch < min) { - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; - } - ch -= min; - if ((s[ch >>> 3] & 0X1 << (ch & 0x7)) === 0) { - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; - } - return false; -}; - -BaseStemmer.out_grouping$LBaseStemmer$AIII = BaseStemmer$out_grouping$LBaseStemmer$AIII; - -BaseStemmer.prototype.out_grouping_b$AIII = function (s, min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor <= this.limit_backward) { - return false; - } - ch = this.current.charCodeAt(this.cursor - 1); - if (ch > max || ch < min) { - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; - } - return false; +// Generated by Snowball 2.1.0 - https://snowballstem.org/ + +/**@constructor*/ +RussianStemmer = function() { + var base = new BaseStemmer(); + /** @const */ var a_0 = [ + ["\u0432", -1, 1], + ["\u0438\u0432", 0, 2], + ["\u044B\u0432", 0, 2], + ["\u0432\u0448\u0438", -1, 1], + ["\u0438\u0432\u0448\u0438", 3, 2], + ["\u044B\u0432\u0448\u0438", 3, 2], + ["\u0432\u0448\u0438\u0441\u044C", -1, 1], + ["\u0438\u0432\u0448\u0438\u0441\u044C", 6, 2], + ["\u044B\u0432\u0448\u0438\u0441\u044C", 6, 2] + ]; + + /** @const */ var a_1 = [ + ["\u0435\u0435", -1, 1], + ["\u0438\u0435", -1, 1], + ["\u043E\u0435", -1, 1], + ["\u044B\u0435", -1, 1], + ["\u0438\u043C\u0438", -1, 1], + ["\u044B\u043C\u0438", -1, 1], + ["\u0435\u0439", -1, 1], + ["\u0438\u0439", -1, 1], + ["\u043E\u0439", -1, 1], + ["\u044B\u0439", -1, 1], + ["\u0435\u043C", -1, 1], + ["\u0438\u043C", -1, 1], + ["\u043E\u043C", -1, 1], + ["\u044B\u043C", -1, 1], + ["\u0435\u0433\u043E", -1, 1], + ["\u043E\u0433\u043E", -1, 1], + ["\u0435\u043C\u0443", -1, 1], + ["\u043E\u043C\u0443", -1, 1], + ["\u0438\u0445", -1, 1], + ["\u044B\u0445", -1, 1], + ["\u0435\u044E", -1, 1], + ["\u043E\u044E", -1, 1], + ["\u0443\u044E", -1, 1], + ["\u044E\u044E", -1, 1], + ["\u0430\u044F", -1, 1], + ["\u044F\u044F", -1, 1] + ]; + + /** @const */ var a_2 = [ + ["\u0435\u043C", -1, 1], + ["\u043D\u043D", -1, 1], + ["\u0432\u0448", -1, 1], + ["\u0438\u0432\u0448", 2, 2], + ["\u044B\u0432\u0448", 2, 2], + ["\u0449", -1, 1], + ["\u044E\u0449", 5, 1], + ["\u0443\u044E\u0449", 6, 2] + ]; + + /** @const */ var a_3 = [ + ["\u0441\u044C", -1, 1], + ["\u0441\u044F", -1, 1] + ]; + + /** @const */ var a_4 = [ + ["\u043B\u0430", -1, 1], + ["\u0438\u043B\u0430", 0, 2], + ["\u044B\u043B\u0430", 0, 2], + ["\u043D\u0430", -1, 1], + ["\u0435\u043D\u0430", 3, 2], + ["\u0435\u0442\u0435", -1, 1], + ["\u0438\u0442\u0435", -1, 2], + ["\u0439\u0442\u0435", -1, 1], + ["\u0435\u0439\u0442\u0435", 7, 2], + ["\u0443\u0439\u0442\u0435", 7, 2], + ["\u043B\u0438", -1, 1], + ["\u0438\u043B\u0438", 10, 2], + ["\u044B\u043B\u0438", 10, 2], + ["\u0439", -1, 1], + ["\u0435\u0439", 13, 2], + ["\u0443\u0439", 13, 2], + ["\u043B", -1, 1], + ["\u0438\u043B", 16, 2], + ["\u044B\u043B", 16, 2], + ["\u0435\u043C", -1, 1], + ["\u0438\u043C", -1, 2], + ["\u044B\u043C", -1, 2], + ["\u043D", -1, 1], + ["\u0435\u043D", 22, 2], + ["\u043B\u043E", -1, 1], + ["\u0438\u043B\u043E", 24, 2], + ["\u044B\u043B\u043E", 24, 2], + ["\u043D\u043E", -1, 1], + ["\u0435\u043D\u043E", 27, 2], + ["\u043D\u043D\u043E", 27, 1], + ["\u0435\u0442", -1, 1], + ["\u0443\u0435\u0442", 30, 2], + ["\u0438\u0442", -1, 2], + ["\u044B\u0442", -1, 2], + ["\u044E\u0442", -1, 1], + ["\u0443\u044E\u0442", 34, 2], + ["\u044F\u0442", -1, 2], + ["\u043D\u044B", -1, 1], + ["\u0435\u043D\u044B", 37, 2], + ["\u0442\u044C", -1, 1], + ["\u0438\u0442\u044C", 39, 2], + ["\u044B\u0442\u044C", 39, 2], + ["\u0435\u0448\u044C", -1, 1], + ["\u0438\u0448\u044C", -1, 2], + ["\u044E", -1, 2], + ["\u0443\u044E", 44, 2] + ]; + + /** @const */ var a_5 = [ + ["\u0430", -1, 1], + ["\u0435\u0432", -1, 1], + ["\u043E\u0432", -1, 1], + ["\u0435", -1, 1], + ["\u0438\u0435", 3, 1], + ["\u044C\u0435", 3, 1], + ["\u0438", -1, 1], + ["\u0435\u0438", 6, 1], + ["\u0438\u0438", 6, 1], + ["\u0430\u043C\u0438", 6, 1], + ["\u044F\u043C\u0438", 6, 1], + ["\u0438\u044F\u043C\u0438", 10, 1], + ["\u0439", -1, 1], + ["\u0435\u0439", 12, 1], + ["\u0438\u0435\u0439", 13, 1], + ["\u0438\u0439", 12, 1], + ["\u043E\u0439", 12, 1], + ["\u0430\u043C", -1, 1], + ["\u0435\u043C", -1, 1], + ["\u0438\u0435\u043C", 18, 1], + ["\u043E\u043C", -1, 1], + ["\u044F\u043C", -1, 1], + ["\u0438\u044F\u043C", 21, 1], + ["\u043E", -1, 1], + ["\u0443", -1, 1], + ["\u0430\u0445", -1, 1], + ["\u044F\u0445", -1, 1], + ["\u0438\u044F\u0445", 26, 1], + ["\u044B", -1, 1], + ["\u044C", -1, 1], + ["\u044E", -1, 1], + ["\u0438\u044E", 30, 1], + ["\u044C\u044E", 30, 1], + ["\u044F", -1, 1], + ["\u0438\u044F", 33, 1], + ["\u044C\u044F", 33, 1] + ]; + + /** @const */ var a_6 = [ + ["\u043E\u0441\u0442", -1, 1], + ["\u043E\u0441\u0442\u044C", -1, 1] + ]; + + /** @const */ var a_7 = [ + ["\u0435\u0439\u0448\u0435", -1, 1], + ["\u043D", -1, 2], + ["\u0435\u0439\u0448", -1, 1], + ["\u044C", -1, 3] + ]; + + /** @const */ var /** Array */ g_v = [33, 65, 8, 232]; + + var /** number */ I_p2 = 0; + var /** number */ I_pV = 0; + + + /** @return {boolean} */ + function r_mark_regions() { + I_pV = base.limit; + I_p2 = base.limit; + var /** number */ v_1 = base.cursor; + lab0: { + golab1: while(true) + { + lab2: { + if (!(base.in_grouping(g_v, 1072, 1103))) + { + break lab2; + } + break golab1; + } + if (base.cursor >= base.limit) + { + break lab0; + } + base.cursor++; + } + I_pV = base.cursor; + golab3: while(true) + { + lab4: { + if (!(base.out_grouping(g_v, 1072, 1103))) + { + break lab4; + } + break golab3; + } + if (base.cursor >= base.limit) + { + break lab0; + } + base.cursor++; + } + golab5: while(true) + { + lab6: { + if (!(base.in_grouping(g_v, 1072, 1103))) + { + break lab6; + } + break golab5; + } + if (base.cursor >= base.limit) + { + break lab0; + } + base.cursor++; + } + golab7: while(true) + { + lab8: { + if (!(base.out_grouping(g_v, 1072, 1103))) + { + break lab8; + } + break golab7; + } + if (base.cursor >= base.limit) + { + break lab0; + } + base.cursor++; + } + I_p2 = base.cursor; + } + base.cursor = v_1; + return true; + }; + + /** @return {boolean} */ + function r_R2() { + if (!(I_p2 <= base.cursor)) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_perfective_gerund() { + var /** number */ among_var; + base.ket = base.cursor; + among_var = base.find_among_b(a_0); + if (among_var == 0) + { + return false; + } + base.bra = base.cursor; + switch (among_var) { + case 1: + lab0: { + var /** number */ v_1 = base.limit - base.cursor; + lab1: { + if (!(base.eq_s_b("\u0430"))) + { + break lab1; + } + break lab0; + } + base.cursor = base.limit - v_1; + if (!(base.eq_s_b("\u044F"))) + { + return false; + } + } + if (!base.slice_del()) + { + return false; + } + break; + case 2: + if (!base.slice_del()) + { + return false; + } + break; + } + return true; + }; + + /** @return {boolean} */ + function r_adjective() { + base.ket = base.cursor; + if (base.find_among_b(a_1) == 0) + { + return false; + } + base.bra = base.cursor; + if (!base.slice_del()) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_adjectival() { + var /** number */ among_var; + if (!r_adjective()) + { + return false; + } + var /** number */ v_1 = base.limit - base.cursor; + lab0: { + base.ket = base.cursor; + among_var = base.find_among_b(a_2); + if (among_var == 0) + { + base.cursor = base.limit - v_1; + break lab0; + } + base.bra = base.cursor; + switch (among_var) { + case 1: + lab1: { + var /** number */ v_2 = base.limit - base.cursor; + lab2: { + if (!(base.eq_s_b("\u0430"))) + { + break lab2; + } + break lab1; + } + base.cursor = base.limit - v_2; + if (!(base.eq_s_b("\u044F"))) + { + base.cursor = base.limit - v_1; + break lab0; + } + } + if (!base.slice_del()) + { + return false; + } + break; + case 2: + if (!base.slice_del()) + { + return false; + } + break; + } + } + return true; + }; + + /** @return {boolean} */ + function r_reflexive() { + base.ket = base.cursor; + if (base.find_among_b(a_3) == 0) + { + return false; + } + base.bra = base.cursor; + if (!base.slice_del()) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_verb() { + var /** number */ among_var; + base.ket = base.cursor; + among_var = base.find_among_b(a_4); + if (among_var == 0) + { + return false; + } + base.bra = base.cursor; + switch (among_var) { + case 1: + lab0: { + var /** number */ v_1 = base.limit - base.cursor; + lab1: { + if (!(base.eq_s_b("\u0430"))) + { + break lab1; + } + break lab0; + } + base.cursor = base.limit - v_1; + if (!(base.eq_s_b("\u044F"))) + { + return false; + } + } + if (!base.slice_del()) + { + return false; + } + break; + case 2: + if (!base.slice_del()) + { + return false; + } + break; + } + return true; + }; + + /** @return {boolean} */ + function r_noun() { + base.ket = base.cursor; + if (base.find_among_b(a_5) == 0) + { + return false; + } + base.bra = base.cursor; + if (!base.slice_del()) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_derivational() { + base.ket = base.cursor; + if (base.find_among_b(a_6) == 0) + { + return false; + } + base.bra = base.cursor; + if (!r_R2()) + { + return false; + } + if (!base.slice_del()) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_tidy_up() { + var /** number */ among_var; + base.ket = base.cursor; + among_var = base.find_among_b(a_7); + if (among_var == 0) + { + return false; + } + base.bra = base.cursor; + switch (among_var) { + case 1: + if (!base.slice_del()) + { + return false; + } + base.ket = base.cursor; + if (!(base.eq_s_b("\u043D"))) + { + return false; + } + base.bra = base.cursor; + if (!(base.eq_s_b("\u043D"))) + { + return false; + } + if (!base.slice_del()) + { + return false; + } + break; + case 2: + if (!(base.eq_s_b("\u043D"))) + { + return false; + } + if (!base.slice_del()) + { + return false; + } + break; + case 3: + if (!base.slice_del()) + { + return false; + } + break; + } + return true; + }; + + this.stem = /** @return {boolean} */ function() { + var /** number */ v_1 = base.cursor; + lab0: { + while(true) + { + var /** number */ v_2 = base.cursor; + lab1: { + golab2: while(true) + { + var /** number */ v_3 = base.cursor; + lab3: { + base.bra = base.cursor; + if (!(base.eq_s("\u0451"))) + { + break lab3; + } + base.ket = base.cursor; + base.cursor = v_3; + break golab2; + } + base.cursor = v_3; + if (base.cursor >= base.limit) + { + break lab1; + } + base.cursor++; + } + if (!base.slice_from("\u0435")) + { + return false; + } + continue; + } + base.cursor = v_2; + break; + } + } + base.cursor = v_1; + r_mark_regions(); + base.limit_backward = base.cursor; base.cursor = base.limit; + if (base.cursor < I_pV) + { + return false; + } + var /** number */ v_6 = base.limit_backward; + base.limit_backward = I_pV; + var /** number */ v_7 = base.limit - base.cursor; + lab4: { + lab5: { + var /** number */ v_8 = base.limit - base.cursor; + lab6: { + if (!r_perfective_gerund()) + { + break lab6; + } + break lab5; + } + base.cursor = base.limit - v_8; + var /** number */ v_9 = base.limit - base.cursor; + lab7: { + if (!r_reflexive()) + { + base.cursor = base.limit - v_9; + break lab7; + } + } + lab8: { + var /** number */ v_10 = base.limit - base.cursor; + lab9: { + if (!r_adjectival()) + { + break lab9; + } + break lab8; + } + base.cursor = base.limit - v_10; + lab10: { + if (!r_verb()) + { + break lab10; + } + break lab8; + } + base.cursor = base.limit - v_10; + if (!r_noun()) + { + break lab4; + } + } + } + } + base.cursor = base.limit - v_7; + var /** number */ v_11 = base.limit - base.cursor; + lab11: { + base.ket = base.cursor; + if (!(base.eq_s_b("\u0438"))) + { + base.cursor = base.limit - v_11; + break lab11; + } + base.bra = base.cursor; + if (!base.slice_del()) + { + return false; + } + } + var /** number */ v_12 = base.limit - base.cursor; + r_derivational(); + base.cursor = base.limit - v_12; + var /** number */ v_13 = base.limit - base.cursor; + r_tidy_up(); + base.cursor = base.limit - v_13; + base.limit_backward = v_6; + base.cursor = base.limit_backward; + return true; + }; + + /**@return{string}*/ + this['stemWord'] = function(/**string*/word) { + base.setCurrent(word); + this.stem(); + return base.getCurrent(); + }; }; - - -function BaseStemmer$out_grouping_b$LBaseStemmer$AIII($this, s, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor <= $this.limit_backward) { - return false; - } - ch = $this.current.charCodeAt($this.cursor - 1); - if (ch > max || ch < min) { - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; - } - return false; -}; - -BaseStemmer.out_grouping_b$LBaseStemmer$AIII = BaseStemmer$out_grouping_b$LBaseStemmer$AIII; - -BaseStemmer.prototype.in_range$II = function (min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor >= this.limit) { - return false; - } - ch = this.current.charCodeAt(this.cursor); - if (ch > max || ch < min) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$in_range$LBaseStemmer$II($this, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor >= $this.limit) { - return false; - } - ch = $this.current.charCodeAt($this.cursor); - if (ch > max || ch < min) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.in_range$LBaseStemmer$II = BaseStemmer$in_range$LBaseStemmer$II; - -BaseStemmer.prototype.in_range_b$II = function (min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor <= this.limit_backward) { - return false; - } - ch = this.current.charCodeAt(this.cursor - 1); - if (ch > max || ch < min) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$in_range_b$LBaseStemmer$II($this, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor <= $this.limit_backward) { - return false; - } - ch = $this.current.charCodeAt($this.cursor - 1); - if (ch > max || ch < min) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.in_range_b$LBaseStemmer$II = BaseStemmer$in_range_b$LBaseStemmer$II; - -BaseStemmer.prototype.out_range$II = function (min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor >= this.limit) { - return false; - } - ch = this.current.charCodeAt(this.cursor); - if (! (ch > max || ch < min)) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$out_range$LBaseStemmer$II($this, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor >= $this.limit) { - return false; - } - ch = $this.current.charCodeAt($this.cursor); - if (! (ch > max || ch < min)) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.out_range$LBaseStemmer$II = BaseStemmer$out_range$LBaseStemmer$II; - -BaseStemmer.prototype.out_range_b$II = function (min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor <= this.limit_backward) { - return false; - } - ch = this.current.charCodeAt(this.cursor - 1); - if (! (ch > max || ch < min)) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$out_range_b$LBaseStemmer$II($this, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor <= $this.limit_backward) { - return false; - } - ch = $this.current.charCodeAt($this.cursor - 1); - if (! (ch > max || ch < min)) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.out_range_b$LBaseStemmer$II = BaseStemmer$out_range_b$LBaseStemmer$II; - -BaseStemmer.prototype.eq_s$IS = function (s_size, s) { - var cursor$0; - if (((this.limit - this.cursor) | 0) < s_size) { - return false; - } - if (this.current.slice(cursor$0 = this.cursor, ((cursor$0 + s_size) | 0)) !== s) { - return false; - } - this.cursor = (this.cursor + s_size) | 0; - return true; -}; - - -function BaseStemmer$eq_s$LBaseStemmer$IS($this, s_size, s) { - var cursor$0; - if ((($this.limit - $this.cursor) | 0) < s_size) { - return false; - } - if ($this.current.slice(cursor$0 = $this.cursor, ((cursor$0 + s_size) | 0)) !== s) { - return false; - } - $this.cursor = ($this.cursor + s_size) | 0; - return true; -}; - -BaseStemmer.eq_s$LBaseStemmer$IS = BaseStemmer$eq_s$LBaseStemmer$IS; - -BaseStemmer.prototype.eq_s_b$IS = function (s_size, s) { - var cursor$0; - if (((this.cursor - this.limit_backward) | 0) < s_size) { - return false; - } - if (this.current.slice((((cursor$0 = this.cursor) - s_size) | 0), cursor$0) !== s) { - return false; - } - this.cursor = (this.cursor - s_size) | 0; - return true; -}; - - -function BaseStemmer$eq_s_b$LBaseStemmer$IS($this, s_size, s) { - var cursor$0; - if ((($this.cursor - $this.limit_backward) | 0) < s_size) { - return false; - } - if ($this.current.slice((((cursor$0 = $this.cursor) - s_size) | 0), cursor$0) !== s) { - return false; - } - $this.cursor = ($this.cursor - s_size) | 0; - return true; -}; - -BaseStemmer.eq_s_b$LBaseStemmer$IS = BaseStemmer$eq_s_b$LBaseStemmer$IS; - -BaseStemmer.prototype.eq_v$S = function (s) { - return BaseStemmer$eq_s$LBaseStemmer$IS(this, s.length, s); -}; - - -function BaseStemmer$eq_v$LBaseStemmer$S($this, s) { - return BaseStemmer$eq_s$LBaseStemmer$IS($this, s.length, s); -}; - -BaseStemmer.eq_v$LBaseStemmer$S = BaseStemmer$eq_v$LBaseStemmer$S; - -BaseStemmer.prototype.eq_v_b$S = function (s) { - return BaseStemmer$eq_s_b$LBaseStemmer$IS(this, s.length, s); -}; - - -function BaseStemmer$eq_v_b$LBaseStemmer$S($this, s) { - return BaseStemmer$eq_s_b$LBaseStemmer$IS($this, s.length, s); -}; - -BaseStemmer.eq_v_b$LBaseStemmer$S = BaseStemmer$eq_v_b$LBaseStemmer$S; - -BaseStemmer.prototype.find_among$ALAmong$I = function (v, v_size) { - var i; - var j; - var c; - var l; - var common_i; - var common_j; - var first_key_inspected; - var k; - var diff; - var common; - var w; - var i2; - var res; - i = 0; - j = v_size; - c = this.cursor; - l = this.limit; - common_i = 0; - common_j = 0; - first_key_inspected = false; - while (true) { - k = i + (j - i >>> 1); - diff = 0; - common = (common_i < common_j ? common_i : common_j); - w = v[k]; - for (i2 = common; i2 < w.s_size; i2++) { - if (c + common === l) { - diff = -1; - break; - } - diff = this.current.charCodeAt(c + common) - w.s.charCodeAt(i2); - if (diff !== 0) { - break; - } - common++; - } - if (diff < 0) { - j = k; - common_j = common; - } else { - i = k; - common_i = common; - } - if (j - i <= 1) { - if (i > 0) { - break; - } - if (j === i) { - break; - } - if (first_key_inspected) { - break; - } - first_key_inspected = true; - } - } - while (true) { - w = v[i]; - if (common_i >= w.s_size) { - this.cursor = (c + w.s_size | 0); - if (w.method == null) { - return w.result; - } - res = w.method(w.instance); - this.cursor = (c + w.s_size | 0); - if (res) { - return w.result; - } - } - i = w.substring_i; - if (i < 0) { - return 0; - } - } - return -1; -}; - - -function BaseStemmer$find_among$LBaseStemmer$ALAmong$I($this, v, v_size) { - var i; - var j; - var c; - var l; - var common_i; - var common_j; - var first_key_inspected; - var k; - var diff; - var common; - var w; - var i2; - var res; - i = 0; - j = v_size; - c = $this.cursor; - l = $this.limit; - common_i = 0; - common_j = 0; - first_key_inspected = false; - while (true) { - k = i + (j - i >>> 1); - diff = 0; - common = (common_i < common_j ? common_i : common_j); - w = v[k]; - for (i2 = common; i2 < w.s_size; i2++) { - if (c + common === l) { - diff = -1; - break; - } - diff = $this.current.charCodeAt(c + common) - w.s.charCodeAt(i2); - if (diff !== 0) { - break; - } - common++; - } - if (diff < 0) { - j = k; - common_j = common; - } else { - i = k; - common_i = common; - } - if (j - i <= 1) { - if (i > 0) { - break; - } - if (j === i) { - break; - } - if (first_key_inspected) { - break; - } - first_key_inspected = true; - } - } - while (true) { - w = v[i]; - if (common_i >= w.s_size) { - $this.cursor = (c + w.s_size | 0); - if (w.method == null) { - return w.result; - } - res = w.method(w.instance); - $this.cursor = (c + w.s_size | 0); - if (res) { - return w.result; - } - } - i = w.substring_i; - if (i < 0) { - return 0; - } - } - return -1; -}; - -BaseStemmer.find_among$LBaseStemmer$ALAmong$I = BaseStemmer$find_among$LBaseStemmer$ALAmong$I; - -BaseStemmer.prototype.find_among_b$ALAmong$I = function (v, v_size) { - var i; - var j; - var c; - var lb; - var common_i; - var common_j; - var first_key_inspected; - var k; - var diff; - var common; - var w; - var i2; - var res; - i = 0; - j = v_size; - c = this.cursor; - lb = this.limit_backward; - common_i = 0; - common_j = 0; - first_key_inspected = false; - while (true) { - k = i + (j - i >> 1); - diff = 0; - common = (common_i < common_j ? common_i : common_j); - w = v[k]; - for (i2 = w.s_size - 1 - common; i2 >= 0; i2--) { - if (c - common === lb) { - diff = -1; - break; - } - diff = this.current.charCodeAt(c - 1 - common) - w.s.charCodeAt(i2); - if (diff !== 0) { - break; - } - common++; - } - if (diff < 0) { - j = k; - common_j = common; - } else { - i = k; - common_i = common; - } - if (j - i <= 1) { - if (i > 0) { - break; - } - if (j === i) { - break; - } - if (first_key_inspected) { - break; - } - first_key_inspected = true; - } - } - while (true) { - w = v[i]; - if (common_i >= w.s_size) { - this.cursor = (c - w.s_size | 0); - if (w.method == null) { - return w.result; - } - res = w.method(this); - this.cursor = (c - w.s_size | 0); - if (res) { - return w.result; - } - } - i = w.substring_i; - if (i < 0) { - return 0; - } - } - return -1; -}; - - -function BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, v, v_size) { - var i; - var j; - var c; - var lb; - var common_i; - var common_j; - var first_key_inspected; - var k; - var diff; - var common; - var w; - var i2; - var res; - i = 0; - j = v_size; - c = $this.cursor; - lb = $this.limit_backward; - common_i = 0; - common_j = 0; - first_key_inspected = false; - while (true) { - k = i + (j - i >> 1); - diff = 0; - common = (common_i < common_j ? common_i : common_j); - w = v[k]; - for (i2 = w.s_size - 1 - common; i2 >= 0; i2--) { - if (c - common === lb) { - diff = -1; - break; - } - diff = $this.current.charCodeAt(c - 1 - common) - w.s.charCodeAt(i2); - if (diff !== 0) { - break; - } - common++; - } - if (diff < 0) { - j = k; - common_j = common; - } else { - i = k; - common_i = common; - } - if (j - i <= 1) { - if (i > 0) { - break; - } - if (j === i) { - break; - } - if (first_key_inspected) { - break; - } - first_key_inspected = true; - } - } - while (true) { - w = v[i]; - if (common_i >= w.s_size) { - $this.cursor = (c - w.s_size | 0); - if (w.method == null) { - return w.result; - } - res = w.method($this); - $this.cursor = (c - w.s_size | 0); - if (res) { - return w.result; - } - } - i = w.substring_i; - if (i < 0) { - return 0; - } - } - return -1; -}; - -BaseStemmer.find_among_b$LBaseStemmer$ALAmong$I = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I; - -BaseStemmer.prototype.replace_s$IIS = function (c_bra, c_ket, s) { - var adjustment; - adjustment = ((s.length - (((c_ket - c_bra) | 0))) | 0); - this.current = this.current.slice(0, c_bra) + s + this.current.slice(c_ket); - this.limit = (this.limit + adjustment) | 0; - if (this.cursor >= c_ket) { - this.cursor = (this.cursor + adjustment) | 0; - } else if (this.cursor > c_bra) { - this.cursor = c_bra; - } - return (adjustment | 0); -}; - - -function BaseStemmer$replace_s$LBaseStemmer$IIS($this, c_bra, c_ket, s) { - var adjustment; - adjustment = ((s.length - (((c_ket - c_bra) | 0))) | 0); - $this.current = $this.current.slice(0, c_bra) + s + $this.current.slice(c_ket); - $this.limit = ($this.limit + adjustment) | 0; - if ($this.cursor >= c_ket) { - $this.cursor = ($this.cursor + adjustment) | 0; - } else if ($this.cursor > c_bra) { - $this.cursor = c_bra; - } - return (adjustment | 0); -}; - -BaseStemmer.replace_s$LBaseStemmer$IIS = BaseStemmer$replace_s$LBaseStemmer$IIS; - -BaseStemmer.prototype.slice_check$ = function () { - var bra$0; - var ket$0; - var limit$0; - return ((bra$0 = this.bra) < 0 || bra$0 > (ket$0 = this.ket) || ket$0 > (limit$0 = this.limit) || limit$0 > this.current.length ? false : true); -}; - - -function BaseStemmer$slice_check$LBaseStemmer$($this) { - var bra$0; - var ket$0; - var limit$0; - return ((bra$0 = $this.bra) < 0 || bra$0 > (ket$0 = $this.ket) || ket$0 > (limit$0 = $this.limit) || limit$0 > $this.current.length ? false : true); -}; - -BaseStemmer.slice_check$LBaseStemmer$ = BaseStemmer$slice_check$LBaseStemmer$; - -BaseStemmer.prototype.slice_from$S = function (s) { - var result; - var bra$0; - var ket$0; - var limit$0; - result = false; - if ((bra$0 = this.bra) < 0 || bra$0 > (ket$0 = this.ket) || ket$0 > (limit$0 = this.limit) || limit$0 > this.current.length ? false : true) { - BaseStemmer$replace_s$LBaseStemmer$IIS(this, this.bra, this.ket, s); - result = true; - } - return result; -}; - - -function BaseStemmer$slice_from$LBaseStemmer$S($this, s) { - var result; - var bra$0; - var ket$0; - var limit$0; - result = false; - if ((bra$0 = $this.bra) < 0 || bra$0 > (ket$0 = $this.ket) || ket$0 > (limit$0 = $this.limit) || limit$0 > $this.current.length ? false : true) { - BaseStemmer$replace_s$LBaseStemmer$IIS($this, $this.bra, $this.ket, s); - result = true; - } - return result; -}; - -BaseStemmer.slice_from$LBaseStemmer$S = BaseStemmer$slice_from$LBaseStemmer$S; - -BaseStemmer.prototype.slice_del$ = function () { - return BaseStemmer$slice_from$LBaseStemmer$S(this, ""); -}; - - -function BaseStemmer$slice_del$LBaseStemmer$($this) { - return BaseStemmer$slice_from$LBaseStemmer$S($this, ""); -}; - -BaseStemmer.slice_del$LBaseStemmer$ = BaseStemmer$slice_del$LBaseStemmer$; - -BaseStemmer.prototype.insert$IIS = function (c_bra, c_ket, s) { - var adjustment; - adjustment = BaseStemmer$replace_s$LBaseStemmer$IIS(this, c_bra, c_ket, s); - if (c_bra <= this.bra) { - this.bra = (this.bra + adjustment) | 0; - } - if (c_bra <= this.ket) { - this.ket = (this.ket + adjustment) | 0; - } -}; - - -function BaseStemmer$insert$LBaseStemmer$IIS($this, c_bra, c_ket, s) { - var adjustment; - adjustment = BaseStemmer$replace_s$LBaseStemmer$IIS($this, c_bra, c_ket, s); - if (c_bra <= $this.bra) { - $this.bra = ($this.bra + adjustment) | 0; - } - if (c_bra <= $this.ket) { - $this.ket = ($this.ket + adjustment) | 0; - } -}; - -BaseStemmer.insert$LBaseStemmer$IIS = BaseStemmer$insert$LBaseStemmer$IIS; - -BaseStemmer.prototype.slice_to$S = function (s) { - var result; - var bra$0; - var ket$0; - var limit$0; - result = ''; - if ((bra$0 = this.bra) < 0 || bra$0 > (ket$0 = this.ket) || ket$0 > (limit$0 = this.limit) || limit$0 > this.current.length ? false : true) { - result = this.current.slice(this.bra, this.ket); - } - return result; -}; - - -function BaseStemmer$slice_to$LBaseStemmer$S($this, s) { - var result; - var bra$0; - var ket$0; - var limit$0; - result = ''; - if ((bra$0 = $this.bra) < 0 || bra$0 > (ket$0 = $this.ket) || ket$0 > (limit$0 = $this.limit) || limit$0 > $this.current.length ? false : true) { - result = $this.current.slice($this.bra, $this.ket); - } - return result; -}; - -BaseStemmer.slice_to$LBaseStemmer$S = BaseStemmer$slice_to$LBaseStemmer$S; - -BaseStemmer.prototype.assign_to$S = function (s) { - return this.current.slice(0, this.limit); -}; - - -function BaseStemmer$assign_to$LBaseStemmer$S($this, s) { - return $this.current.slice(0, $this.limit); -}; - -BaseStemmer.assign_to$LBaseStemmer$S = BaseStemmer$assign_to$LBaseStemmer$S; - -BaseStemmer.prototype.stem$ = function () { - return false; -}; - - -BaseStemmer.prototype.stemWord$S = function (word) { - var result; - var current$0; - var cursor$0; - var limit$0; - result = this.cache['.' + word]; - if (result == null) { - current$0 = this.current = word; - cursor$0 = this.cursor = 0; - limit$0 = this.limit = current$0.length; - this.limit_backward = 0; - this.bra = cursor$0; - this.ket = limit$0; - this.stem$(); - result = this.current; - this.cache['.' + word] = result; - } - return result; -}; - -BaseStemmer.prototype.stemWord = BaseStemmer.prototype.stemWord$S; - -BaseStemmer.prototype.stemWords$AS = function (words) { - var results; - var i; - var word; - var result; - var current$0; - var cursor$0; - var limit$0; - results = [ ]; - for (i = 0; i < words.length; i++) { - word = words[i]; - result = this.cache['.' + word]; - if (result == null) { - current$0 = this.current = word; - cursor$0 = this.cursor = 0; - limit$0 = this.limit = current$0.length; - this.limit_backward = 0; - this.bra = cursor$0; - this.ket = limit$0; - this.stem$(); - result = this.current; - this.cache['.' + word] = result; - } - results.push(result); - } - return results; -}; - -BaseStemmer.prototype.stemWords = BaseStemmer.prototype.stemWords$AS; - -function RussianStemmer() { - BaseStemmer.call(this); - this.I_p2 = 0; - this.I_pV = 0; -}; - -$__jsx_extend([RussianStemmer], BaseStemmer); -RussianStemmer.prototype.copy_from$LRussianStemmer$ = function (other) { - this.I_p2 = other.I_p2; - this.I_pV = other.I_pV; - BaseStemmer$copy_from$LBaseStemmer$LBaseStemmer$(this, other); -}; - -RussianStemmer.prototype.copy_from = RussianStemmer.prototype.copy_from$LRussianStemmer$; - -RussianStemmer.prototype.r_mark_regions$ = function () { - var v_1; - var lab0; - var lab2; - var lab4; - var lab6; - var lab8; - var limit$0; - var $__jsx_postinc_t; - this.I_pV = limit$0 = this.limit; - this.I_p2 = limit$0; - v_1 = this.cursor; - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - golab1: - while (true) { - lab2 = true; - lab2: - while (lab2 === true) { - lab2 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, RussianStemmer.g_v, 1072, 1103)) { - break lab2; - } - break golab1; - } - if (this.cursor >= this.limit) { - break lab0; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - this.I_pV = this.cursor; - golab3: - while (true) { - lab4 = true; - lab4: - while (lab4 === true) { - lab4 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII(this, RussianStemmer.g_v, 1072, 1103)) { - break lab4; - } - break golab3; - } - if (this.cursor >= this.limit) { - break lab0; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - golab5: - while (true) { - lab6 = true; - lab6: - while (lab6 === true) { - lab6 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, RussianStemmer.g_v, 1072, 1103)) { - break lab6; - } - break golab5; - } - if (this.cursor >= this.limit) { - break lab0; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - golab7: - while (true) { - lab8 = true; - lab8: - while (lab8 === true) { - lab8 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII(this, RussianStemmer.g_v, 1072, 1103)) { - break lab8; - } - break golab7; - } - if (this.cursor >= this.limit) { - break lab0; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - this.I_p2 = this.cursor; - } - this.cursor = v_1; - return true; -}; - -RussianStemmer.prototype.r_mark_regions = RussianStemmer.prototype.r_mark_regions$; - -function RussianStemmer$r_mark_regions$LRussianStemmer$($this) { - var v_1; - var lab0; - var lab2; - var lab4; - var lab6; - var lab8; - var limit$0; - var $__jsx_postinc_t; - $this.I_pV = limit$0 = $this.limit; - $this.I_p2 = limit$0; - v_1 = $this.cursor; - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - golab1: - while (true) { - lab2 = true; - lab2: - while (lab2 === true) { - lab2 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII($this, RussianStemmer.g_v, 1072, 1103)) { - break lab2; - } - break golab1; - } - if ($this.cursor >= $this.limit) { - break lab0; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - $this.I_pV = $this.cursor; - golab3: - while (true) { - lab4 = true; - lab4: - while (lab4 === true) { - lab4 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII($this, RussianStemmer.g_v, 1072, 1103)) { - break lab4; - } - break golab3; - } - if ($this.cursor >= $this.limit) { - break lab0; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - golab5: - while (true) { - lab6 = true; - lab6: - while (lab6 === true) { - lab6 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII($this, RussianStemmer.g_v, 1072, 1103)) { - break lab6; - } - break golab5; - } - if ($this.cursor >= $this.limit) { - break lab0; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - golab7: - while (true) { - lab8 = true; - lab8: - while (lab8 === true) { - lab8 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII($this, RussianStemmer.g_v, 1072, 1103)) { - break lab8; - } - break golab7; - } - if ($this.cursor >= $this.limit) { - break lab0; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - $this.I_p2 = $this.cursor; - } - $this.cursor = v_1; - return true; -}; - -RussianStemmer.r_mark_regions$LRussianStemmer$ = RussianStemmer$r_mark_regions$LRussianStemmer$; - -RussianStemmer.prototype.r_R2$ = function () { - return (! (this.I_p2 <= this.cursor) ? false : true); -}; - -RussianStemmer.prototype.r_R2 = RussianStemmer.prototype.r_R2$; - -function RussianStemmer$r_R2$LRussianStemmer$($this) { - return (! ($this.I_p2 <= $this.cursor) ? false : true); -}; - -RussianStemmer.r_R2$LRussianStemmer$ = RussianStemmer$r_R2$LRussianStemmer$; - -RussianStemmer.prototype.r_perfective_gerund$ = function () { - var among_var; - var v_1; - var lab0; - var lab1; - this.ket = this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, RussianStemmer.a_0, 9); - if (among_var === 0) { - return false; - } - this.bra = this.cursor; - switch (among_var) { - case 0: - return false; - case 1: - lab0 = true; - lab0: - while (lab0 === true) { - lab0 = false; - v_1 = ((this.limit - this.cursor) | 0); - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "\u0430")) { - break lab1; - } - break lab0; - } - this.cursor = ((this.limit - v_1) | 0); - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "\u044F")) { - return false; - } - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - } - return true; -}; - -RussianStemmer.prototype.r_perfective_gerund = RussianStemmer.prototype.r_perfective_gerund$; - -function RussianStemmer$r_perfective_gerund$LRussianStemmer$($this) { - var among_var; - var v_1; - var lab0; - var lab1; - $this.ket = $this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, RussianStemmer.a_0, 9); - if (among_var === 0) { - return false; - } - $this.bra = $this.cursor; - switch (among_var) { - case 0: - return false; - case 1: - lab0 = true; - lab0: - while (lab0 === true) { - lab0 = false; - v_1 = (($this.limit - $this.cursor) | 0); - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "\u0430")) { - break lab1; - } - break lab0; - } - $this.cursor = (($this.limit - v_1) | 0); - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "\u044F")) { - return false; - } - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - } - return true; -}; - -RussianStemmer.r_perfective_gerund$LRussianStemmer$ = RussianStemmer$r_perfective_gerund$LRussianStemmer$; - -RussianStemmer.prototype.r_adjective$ = function () { - var among_var; - this.ket = this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, RussianStemmer.a_1, 26); - if (among_var === 0) { - return false; - } - this.bra = this.cursor; - switch (among_var) { - case 0: - return false; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - } - return true; -}; - -RussianStemmer.prototype.r_adjective = RussianStemmer.prototype.r_adjective$; - -function RussianStemmer$r_adjective$LRussianStemmer$($this) { - var among_var; - $this.ket = $this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, RussianStemmer.a_1, 26); - if (among_var === 0) { - return false; - } - $this.bra = $this.cursor; - switch (among_var) { - case 0: - return false; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - } - return true; -}; - -RussianStemmer.r_adjective$LRussianStemmer$ = RussianStemmer$r_adjective$LRussianStemmer$; - -RussianStemmer.prototype.r_adjectival$ = function () { - var among_var; - var v_1; - var v_2; - var lab0; - var lab1; - var lab2; - if (! RussianStemmer$r_adjective$LRussianStemmer$(this)) { - return false; - } - v_1 = ((this.limit - this.cursor) | 0); - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - this.ket = this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, RussianStemmer.a_2, 8); - if (among_var === 0) { - this.cursor = ((this.limit - v_1) | 0); - break lab0; - } - this.bra = this.cursor; - switch (among_var) { - case 0: - this.cursor = ((this.limit - v_1) | 0); - break lab0; - case 1: - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - v_2 = ((this.limit - this.cursor) | 0); - lab2 = true; - lab2: - while (lab2 === true) { - lab2 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "\u0430")) { - break lab2; - } - break lab1; - } - this.cursor = ((this.limit - v_2) | 0); - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "\u044F")) { - this.cursor = ((this.limit - v_1) | 0); - break lab0; - } - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - } - } - return true; -}; - -RussianStemmer.prototype.r_adjectival = RussianStemmer.prototype.r_adjectival$; - -function RussianStemmer$r_adjectival$LRussianStemmer$($this) { - var among_var; - var v_1; - var v_2; - var lab0; - var lab1; - var lab2; - if (! RussianStemmer$r_adjective$LRussianStemmer$($this)) { - return false; - } - v_1 = (($this.limit - $this.cursor) | 0); - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - $this.ket = $this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, RussianStemmer.a_2, 8); - if (among_var === 0) { - $this.cursor = (($this.limit - v_1) | 0); - break lab0; - } - $this.bra = $this.cursor; - switch (among_var) { - case 0: - $this.cursor = (($this.limit - v_1) | 0); - break lab0; - case 1: - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - v_2 = (($this.limit - $this.cursor) | 0); - lab2 = true; - lab2: - while (lab2 === true) { - lab2 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "\u0430")) { - break lab2; - } - break lab1; - } - $this.cursor = (($this.limit - v_2) | 0); - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "\u044F")) { - $this.cursor = (($this.limit - v_1) | 0); - break lab0; - } - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - } - } - return true; -}; - -RussianStemmer.r_adjectival$LRussianStemmer$ = RussianStemmer$r_adjectival$LRussianStemmer$; - -RussianStemmer.prototype.r_reflexive$ = function () { - var among_var; - this.ket = this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, RussianStemmer.a_3, 2); - if (among_var === 0) { - return false; - } - this.bra = this.cursor; - switch (among_var) { - case 0: - return false; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - } - return true; -}; - -RussianStemmer.prototype.r_reflexive = RussianStemmer.prototype.r_reflexive$; - -function RussianStemmer$r_reflexive$LRussianStemmer$($this) { - var among_var; - $this.ket = $this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, RussianStemmer.a_3, 2); - if (among_var === 0) { - return false; - } - $this.bra = $this.cursor; - switch (among_var) { - case 0: - return false; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - } - return true; -}; - -RussianStemmer.r_reflexive$LRussianStemmer$ = RussianStemmer$r_reflexive$LRussianStemmer$; - -RussianStemmer.prototype.r_verb$ = function () { - var among_var; - var v_1; - var lab0; - var lab1; - this.ket = this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, RussianStemmer.a_4, 46); - if (among_var === 0) { - return false; - } - this.bra = this.cursor; - switch (among_var) { - case 0: - return false; - case 1: - lab0 = true; - lab0: - while (lab0 === true) { - lab0 = false; - v_1 = ((this.limit - this.cursor) | 0); - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "\u0430")) { - break lab1; - } - break lab0; - } - this.cursor = ((this.limit - v_1) | 0); - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "\u044F")) { - return false; - } - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - } - return true; -}; - -RussianStemmer.prototype.r_verb = RussianStemmer.prototype.r_verb$; - -function RussianStemmer$r_verb$LRussianStemmer$($this) { - var among_var; - var v_1; - var lab0; - var lab1; - $this.ket = $this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, RussianStemmer.a_4, 46); - if (among_var === 0) { - return false; - } - $this.bra = $this.cursor; - switch (among_var) { - case 0: - return false; - case 1: - lab0 = true; - lab0: - while (lab0 === true) { - lab0 = false; - v_1 = (($this.limit - $this.cursor) | 0); - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "\u0430")) { - break lab1; - } - break lab0; - } - $this.cursor = (($this.limit - v_1) | 0); - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "\u044F")) { - return false; - } - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - } - return true; -}; - -RussianStemmer.r_verb$LRussianStemmer$ = RussianStemmer$r_verb$LRussianStemmer$; - -RussianStemmer.prototype.r_noun$ = function () { - var among_var; - this.ket = this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, RussianStemmer.a_5, 36); - if (among_var === 0) { - return false; - } - this.bra = this.cursor; - switch (among_var) { - case 0: - return false; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - } - return true; -}; - -RussianStemmer.prototype.r_noun = RussianStemmer.prototype.r_noun$; - -function RussianStemmer$r_noun$LRussianStemmer$($this) { - var among_var; - $this.ket = $this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, RussianStemmer.a_5, 36); - if (among_var === 0) { - return false; - } - $this.bra = $this.cursor; - switch (among_var) { - case 0: - return false; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - } - return true; -}; - -RussianStemmer.r_noun$LRussianStemmer$ = RussianStemmer$r_noun$LRussianStemmer$; - -RussianStemmer.prototype.r_derivational$ = function () { - var among_var; - var cursor$0; - this.ket = this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, RussianStemmer.a_6, 2); - if (among_var === 0) { - return false; - } - this.bra = cursor$0 = this.cursor; - if (! (! (this.I_p2 <= cursor$0) ? false : true)) { - return false; - } - switch (among_var) { - case 0: - return false; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - } - return true; -}; - -RussianStemmer.prototype.r_derivational = RussianStemmer.prototype.r_derivational$; - -function RussianStemmer$r_derivational$LRussianStemmer$($this) { - var among_var; - var cursor$0; - $this.ket = $this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, RussianStemmer.a_6, 2); - if (among_var === 0) { - return false; - } - $this.bra = cursor$0 = $this.cursor; - if (! (! ($this.I_p2 <= cursor$0) ? false : true)) { - return false; - } - switch (among_var) { - case 0: - return false; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - } - return true; -}; - -RussianStemmer.r_derivational$LRussianStemmer$ = RussianStemmer$r_derivational$LRussianStemmer$; - -RussianStemmer.prototype.r_tidy_up$ = function () { - var among_var; - this.ket = this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, RussianStemmer.a_7, 4); - if (among_var === 0) { - return false; - } - this.bra = this.cursor; - switch (among_var) { - case 0: - return false; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - this.ket = this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "\u043D")) { - return false; - } - this.bra = this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "\u043D")) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 2: - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "\u043D")) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 3: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - } - return true; -}; - -RussianStemmer.prototype.r_tidy_up = RussianStemmer.prototype.r_tidy_up$; - -function RussianStemmer$r_tidy_up$LRussianStemmer$($this) { - var among_var; - $this.ket = $this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, RussianStemmer.a_7, 4); - if (among_var === 0) { - return false; - } - $this.bra = $this.cursor; - switch (among_var) { - case 0: - return false; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - $this.ket = $this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "\u043D")) { - return false; - } - $this.bra = $this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "\u043D")) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 2: - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "\u043D")) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 3: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - } - return true; -}; - -RussianStemmer.r_tidy_up$LRussianStemmer$ = RussianStemmer$r_tidy_up$LRussianStemmer$; - -RussianStemmer.prototype.stem$ = function () { - var v_1; - var v_2; - var v_3; - var v_4; - var v_5; - var v_6; - var v_7; - var v_8; - var v_9; - var lab0; - var lab1; - var lab2; - var lab3; - var lab4; - var lab5; - var lab6; - var lab7; - var lab8; - var lab9; - var lab10; - var cursor$0; - var limit$0; - var cursor$1; - var limit$1; - var cursor$2; - var cursor$3; - var limit$2; - var cursor$4; - var limit$3; - var cursor$5; - var limit_backward$0; - v_1 = this.cursor; - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - if (! RussianStemmer$r_mark_regions$LRussianStemmer$(this)) { - break lab0; - } - } - cursor$0 = this.cursor = v_1; - this.limit_backward = cursor$0; - cursor$1 = this.cursor = limit$0 = this.limit; - v_2 = ((limit$0 - cursor$1) | 0); - if (cursor$1 < this.I_pV) { - return false; - } - cursor$3 = this.cursor = this.I_pV; - v_3 = this.limit_backward; - this.limit_backward = cursor$3; - cursor$4 = this.cursor = (((limit$2 = this.limit) - v_2) | 0); - v_4 = ((limit$2 - cursor$4) | 0); - lab1 = true; -lab1: - while (lab1 === true) { - lab1 = false; - lab2 = true; - lab2: - while (lab2 === true) { - lab2 = false; - v_5 = ((this.limit - this.cursor) | 0); - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - if (! RussianStemmer$r_perfective_gerund$LRussianStemmer$(this)) { - break lab3; - } - break lab2; - } - cursor$2 = this.cursor = (((limit$1 = this.limit) - v_5) | 0); - v_6 = ((limit$1 - cursor$2) | 0); - lab4 = true; - lab4: - while (lab4 === true) { - lab4 = false; - if (! RussianStemmer$r_reflexive$LRussianStemmer$(this)) { - this.cursor = ((this.limit - v_6) | 0); - break lab4; - } - } - lab5 = true; - lab5: - while (lab5 === true) { - lab5 = false; - v_7 = ((this.limit - this.cursor) | 0); - lab6 = true; - lab6: - while (lab6 === true) { - lab6 = false; - if (! RussianStemmer$r_adjectival$LRussianStemmer$(this)) { - break lab6; - } - break lab5; - } - this.cursor = ((this.limit - v_7) | 0); - lab7 = true; - lab7: - while (lab7 === true) { - lab7 = false; - if (! RussianStemmer$r_verb$LRussianStemmer$(this)) { - break lab7; - } - break lab5; - } - this.cursor = ((this.limit - v_7) | 0); - if (! RussianStemmer$r_noun$LRussianStemmer$(this)) { - break lab1; - } - } - } - } - cursor$5 = this.cursor = (((limit$3 = this.limit) - v_4) | 0); - v_8 = ((limit$3 - cursor$5) | 0); - lab8 = true; -lab8: - while (lab8 === true) { - lab8 = false; - this.ket = this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "\u0438")) { - this.cursor = ((this.limit - v_8) | 0); - break lab8; - } - this.bra = this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - } - v_9 = ((this.limit - this.cursor) | 0); - lab9 = true; -lab9: - while (lab9 === true) { - lab9 = false; - if (! RussianStemmer$r_derivational$LRussianStemmer$(this)) { - break lab9; - } - } - this.cursor = ((this.limit - v_9) | 0); - lab10 = true; -lab10: - while (lab10 === true) { - lab10 = false; - if (! RussianStemmer$r_tidy_up$LRussianStemmer$(this)) { - break lab10; - } - } - limit_backward$0 = this.limit_backward = v_3; - this.cursor = limit_backward$0; - return true; -}; - -RussianStemmer.prototype.stem = RussianStemmer.prototype.stem$; - -RussianStemmer.prototype.equals$X = function (o) { - return o instanceof RussianStemmer; -}; - -RussianStemmer.prototype.equals = RussianStemmer.prototype.equals$X; - -function RussianStemmer$equals$LRussianStemmer$X($this, o) { - return o instanceof RussianStemmer; -}; - -RussianStemmer.equals$LRussianStemmer$X = RussianStemmer$equals$LRussianStemmer$X; - -RussianStemmer.prototype.hashCode$ = function () { - var classname; - var hash; - var i; - var char; - classname = "RussianStemmer"; - hash = 0; - for (i = 0; i < classname.length; i++) { - char = classname.charCodeAt(i); - hash = (hash << 5) - hash + char; - hash = hash & hash; - } - return (hash | 0); -}; - -RussianStemmer.prototype.hashCode = RussianStemmer.prototype.hashCode$; - -function RussianStemmer$hashCode$LRussianStemmer$($this) { - var classname; - var hash; - var i; - var char; - classname = "RussianStemmer"; - hash = 0; - for (i = 0; i < classname.length; i++) { - char = classname.charCodeAt(i); - hash = (hash << 5) - hash + char; - hash = hash & hash; - } - return (hash | 0); -}; - -RussianStemmer.hashCode$LRussianStemmer$ = RussianStemmer$hashCode$LRussianStemmer$; - -RussianStemmer.serialVersionUID = 1; -$__jsx_lazy_init(RussianStemmer, "methodObject", function () { - return new RussianStemmer(); -}); -$__jsx_lazy_init(RussianStemmer, "a_0", function () { - return [ new Among("\u0432", -1, 1), new Among("\u0438\u0432", 0, 2), new Among("\u044B\u0432", 0, 2), new Among("\u0432\u0448\u0438", -1, 1), new Among("\u0438\u0432\u0448\u0438", 3, 2), new Among("\u044B\u0432\u0448\u0438", 3, 2), new Among("\u0432\u0448\u0438\u0441\u044C", -1, 1), new Among("\u0438\u0432\u0448\u0438\u0441\u044C", 6, 2), new Among("\u044B\u0432\u0448\u0438\u0441\u044C", 6, 2) ]; -}); -$__jsx_lazy_init(RussianStemmer, "a_1", function () { - return [ new Among("\u0435\u0435", -1, 1), new Among("\u0438\u0435", -1, 1), new Among("\u043E\u0435", -1, 1), new Among("\u044B\u0435", -1, 1), new Among("\u0438\u043C\u0438", -1, 1), new Among("\u044B\u043C\u0438", -1, 1), new Among("\u0435\u0439", -1, 1), new Among("\u0438\u0439", -1, 1), new Among("\u043E\u0439", -1, 1), new Among("\u044B\u0439", -1, 1), new Among("\u0435\u043C", -1, 1), new Among("\u0438\u043C", -1, 1), new Among("\u043E\u043C", -1, 1), new Among("\u044B\u043C", -1, 1), new Among("\u0435\u0433\u043E", -1, 1), new Among("\u043E\u0433\u043E", -1, 1), new Among("\u0435\u043C\u0443", -1, 1), new Among("\u043E\u043C\u0443", -1, 1), new Among("\u0438\u0445", -1, 1), new Among("\u044B\u0445", -1, 1), new Among("\u0435\u044E", -1, 1), new Among("\u043E\u044E", -1, 1), new Among("\u0443\u044E", -1, 1), new Among("\u044E\u044E", -1, 1), new Among("\u0430\u044F", -1, 1), new Among("\u044F\u044F", -1, 1) ]; -}); -$__jsx_lazy_init(RussianStemmer, "a_2", function () { - return [ new Among("\u0435\u043C", -1, 1), new Among("\u043D\u043D", -1, 1), new Among("\u0432\u0448", -1, 1), new Among("\u0438\u0432\u0448", 2, 2), new Among("\u044B\u0432\u0448", 2, 2), new Among("\u0449", -1, 1), new Among("\u044E\u0449", 5, 1), new Among("\u0443\u044E\u0449", 6, 2) ]; -}); -$__jsx_lazy_init(RussianStemmer, "a_3", function () { - return [ new Among("\u0441\u044C", -1, 1), new Among("\u0441\u044F", -1, 1) ]; -}); -$__jsx_lazy_init(RussianStemmer, "a_4", function () { - return [ new Among("\u043B\u0430", -1, 1), new Among("\u0438\u043B\u0430", 0, 2), new Among("\u044B\u043B\u0430", 0, 2), new Among("\u043D\u0430", -1, 1), new Among("\u0435\u043D\u0430", 3, 2), new Among("\u0435\u0442\u0435", -1, 1), new Among("\u0438\u0442\u0435", -1, 2), new Among("\u0439\u0442\u0435", -1, 1), new Among("\u0435\u0439\u0442\u0435", 7, 2), new Among("\u0443\u0439\u0442\u0435", 7, 2), new Among("\u043B\u0438", -1, 1), new Among("\u0438\u043B\u0438", 10, 2), new Among("\u044B\u043B\u0438", 10, 2), new Among("\u0439", -1, 1), new Among("\u0435\u0439", 13, 2), new Among("\u0443\u0439", 13, 2), new Among("\u043B", -1, 1), new Among("\u0438\u043B", 16, 2), new Among("\u044B\u043B", 16, 2), new Among("\u0435\u043C", -1, 1), new Among("\u0438\u043C", -1, 2), new Among("\u044B\u043C", -1, 2), new Among("\u043D", -1, 1), new Among("\u0435\u043D", 22, 2), new Among("\u043B\u043E", -1, 1), new Among("\u0438\u043B\u043E", 24, 2), new Among("\u044B\u043B\u043E", 24, 2), new Among("\u043D\u043E", -1, 1), new Among("\u0435\u043D\u043E", 27, 2), new Among("\u043D\u043D\u043E", 27, 1), new Among("\u0435\u0442", -1, 1), new Among("\u0443\u0435\u0442", 30, 2), new Among("\u0438\u0442", -1, 2), new Among("\u044B\u0442", -1, 2), new Among("\u044E\u0442", -1, 1), new Among("\u0443\u044E\u0442", 34, 2), new Among("\u044F\u0442", -1, 2), new Among("\u043D\u044B", -1, 1), new Among("\u0435\u043D\u044B", 37, 2), new Among("\u0442\u044C", -1, 1), new Among("\u0438\u0442\u044C", 39, 2), new Among("\u044B\u0442\u044C", 39, 2), new Among("\u0435\u0448\u044C", -1, 1), new Among("\u0438\u0448\u044C", -1, 2), new Among("\u044E", -1, 2), new Among("\u0443\u044E", 44, 2) ]; -}); -$__jsx_lazy_init(RussianStemmer, "a_5", function () { - return [ new Among("\u0430", -1, 1), new Among("\u0435\u0432", -1, 1), new Among("\u043E\u0432", -1, 1), new Among("\u0435", -1, 1), new Among("\u0438\u0435", 3, 1), new Among("\u044C\u0435", 3, 1), new Among("\u0438", -1, 1), new Among("\u0435\u0438", 6, 1), new Among("\u0438\u0438", 6, 1), new Among("\u0430\u043C\u0438", 6, 1), new Among("\u044F\u043C\u0438", 6, 1), new Among("\u0438\u044F\u043C\u0438", 10, 1), new Among("\u0439", -1, 1), new Among("\u0435\u0439", 12, 1), new Among("\u0438\u0435\u0439", 13, 1), new Among("\u0438\u0439", 12, 1), new Among("\u043E\u0439", 12, 1), new Among("\u0430\u043C", -1, 1), new Among("\u0435\u043C", -1, 1), new Among("\u0438\u0435\u043C", 18, 1), new Among("\u043E\u043C", -1, 1), new Among("\u044F\u043C", -1, 1), new Among("\u0438\u044F\u043C", 21, 1), new Among("\u043E", -1, 1), new Among("\u0443", -1, 1), new Among("\u0430\u0445", -1, 1), new Among("\u044F\u0445", -1, 1), new Among("\u0438\u044F\u0445", 26, 1), new Among("\u044B", -1, 1), new Among("\u044C", -1, 1), new Among("\u044E", -1, 1), new Among("\u0438\u044E", 30, 1), new Among("\u044C\u044E", 30, 1), new Among("\u044F", -1, 1), new Among("\u0438\u044F", 33, 1), new Among("\u044C\u044F", 33, 1) ]; -}); -$__jsx_lazy_init(RussianStemmer, "a_6", function () { - return [ new Among("\u043E\u0441\u0442", -1, 1), new Among("\u043E\u0441\u0442\u044C", -1, 1) ]; -}); -$__jsx_lazy_init(RussianStemmer, "a_7", function () { - return [ new Among("\u0435\u0439\u0448\u0435", -1, 1), new Among("\u043D", -1, 2), new Among("\u0435\u0439\u0448", -1, 1), new Among("\u044C", -1, 3) ]; -}); -RussianStemmer.g_v = [ 33, 65, 8, 232 ]; - -var $__jsx_classMap = { - "src/among.jsx": { - Among: Among, - Among$SII: Among, - Among$SIIF$LBaseStemmer$B$LBaseStemmer$: Among$0 - }, - "src/stemmer.jsx": { - Stemmer: Stemmer, - Stemmer$: Stemmer - }, - "src/base-stemmer.jsx": { - BaseStemmer: BaseStemmer, - BaseStemmer$: BaseStemmer - }, - "src/russian-stemmer.jsx": { - RussianStemmer: RussianStemmer, - RussianStemmer$: RussianStemmer - } -}; - - -})(JSX); - -var Among = JSX.require("src/among.jsx").Among; -var Among$SII = JSX.require("src/among.jsx").Among$SII; -var Stemmer = JSX.require("src/stemmer.jsx").Stemmer; -var BaseStemmer = JSX.require("src/base-stemmer.jsx").BaseStemmer; -var RussianStemmer = JSX.require("src/russian-stemmer.jsx").RussianStemmer; diff --git a/sphinx/search/non-minified-js/spanish-stemmer.js b/sphinx/search/non-minified-js/spanish-stemmer.js index 6c5d2da91ea..fffd6160b13 100644 --- a/sphinx/search/non-minified-js/spanish-stemmer.js +++ b/sphinx/search/non-minified-js/spanish-stemmer.js @@ -1,2938 +1,990 @@ -// generatedy by JSX compiler 0.9.89 (2014-05-20 06:01:03 +0900; 8e8c6105f36f3dfe440ea026a3c93a3444977102) -var JSX = {}; -(function (JSX) { -/** - * extends the class - */ -function $__jsx_extend(derivations, base) { - var ctor = function () {}; - ctor.prototype = base.prototype; - var proto = new ctor(); - for (var i in derivations) { - derivations[i].prototype = proto; - } -} - -/** - * copies the implementations from source interface to target - */ -function $__jsx_merge_interface(target, source) { - for (var k in source.prototype) - if (source.prototype.hasOwnProperty(k)) - target.prototype[k] = source.prototype[k]; -} - -/** - * defers the initialization of the property - */ -function $__jsx_lazy_init(obj, prop, func) { - function reset(obj, prop, value) { - delete obj[prop]; - obj[prop] = value; - return value; - } - - Object.defineProperty(obj, prop, { - get: function () { - return reset(obj, prop, func()); - }, - set: function (v) { - reset(obj, prop, v); - }, - enumerable: true, - configurable: true - }); -} - -var $__jsx_imul = Math.imul; -if (typeof $__jsx_imul === "undefined") { - $__jsx_imul = function (a, b) { - var ah = (a >>> 16) & 0xffff; - var al = a & 0xffff; - var bh = (b >>> 16) & 0xffff; - var bl = b & 0xffff; - return ((al * bl) + (((ah * bl + al * bh) << 16) >>> 0)|0); - }; -} - -/** - * fused int-ops with side-effects - */ -function $__jsx_ipadd(o, p, r) { - return o[p] = (o[p] + r) | 0; -} -function $__jsx_ipsub(o, p, r) { - return o[p] = (o[p] - r) | 0; -} -function $__jsx_ipmul(o, p, r) { - return o[p] = $__jsx_imul(o[p], r); -} -function $__jsx_ipdiv(o, p, r) { - return o[p] = (o[p] / r) | 0; -} -function $__jsx_ipmod(o, p, r) { - return o[p] = (o[p] % r) | 0; -} -function $__jsx_ippostinc(o, p) { - var v = o[p]; - o[p] = (v + 1) | 0; - return v; -} -function $__jsx_ippostdec(o, p) { - var v = o[p]; - o[p] = (v - 1) | 0; - return v; -} - -/** - * non-inlined version of Array#each - */ -function $__jsx_forEach(o, f) { - var l = o.length; - for (var i = 0; i < l; ++i) - f(o[i]); -} - -/* - * global functions, renamed to avoid conflict with local variable names - */ -var $__jsx_parseInt = parseInt; -var $__jsx_parseFloat = parseFloat; -function $__jsx_isNaN(n) { return n !== n; } -var $__jsx_isFinite = isFinite; - -var $__jsx_encodeURIComponent = encodeURIComponent; -var $__jsx_decodeURIComponent = decodeURIComponent; -var $__jsx_encodeURI = encodeURI; -var $__jsx_decodeURI = decodeURI; - -var $__jsx_ObjectToString = Object.prototype.toString; -var $__jsx_ObjectHasOwnProperty = Object.prototype.hasOwnProperty; - -/* - * profiler object, initialized afterwards - */ -function $__jsx_profiler() { -} - -/* - * public interface to JSX code - */ -JSX.require = function (path) { - var m = $__jsx_classMap[path]; - return m !== undefined ? m : null; -}; - -JSX.profilerIsRunning = function () { - return $__jsx_profiler.getResults != null; -}; - -JSX.getProfileResults = function () { - return ($__jsx_profiler.getResults || function () { return {}; })(); -}; - -JSX.postProfileResults = function (url, cb) { - if ($__jsx_profiler.postResults == null) - throw new Error("profiler has not been turned on"); - return $__jsx_profiler.postResults(url, cb); -}; - -JSX.resetProfileResults = function () { - if ($__jsx_profiler.resetResults == null) - throw new Error("profiler has not been turned on"); - return $__jsx_profiler.resetResults(); -}; -JSX.DEBUG = false; -var GeneratorFunction$0 = -(function () { - try { - return Function('import {GeneratorFunction} from "std:iteration"; return GeneratorFunction')(); - } catch (e) { - return function GeneratorFunction () {}; - } -})(); -var __jsx_generator_object$0 = -(function () { - function __jsx_generator_object() { - this.__next = 0; - this.__loop = null; - this.__seed = null; - this.__value = undefined; - this.__status = 0; // SUSPENDED: 0, ACTIVE: 1, DEAD: 2 - } - - __jsx_generator_object.prototype.next = function (seed) { - switch (this.__status) { - case 0: - this.__status = 1; - this.__seed = seed; - - // go next! - this.__loop(this.__next); - - var done = false; - if (this.__next != -1) { - this.__status = 0; - } else { - this.__status = 2; - done = true; - } - return { value: this.__value, done: done }; - case 1: - throw new Error("Generator is already running"); - case 2: - throw new Error("Generator is already finished"); - default: - throw new Error("Unexpected generator internal state"); - } - }; - - return __jsx_generator_object; -}()); -function Among(s, substring_i, result) { - this.s_size = s.length; - this.s = s; - this.substring_i = substring_i; - this.result = result; - this.method = null; - this.instance = null; -}; - -function Among$0(s, substring_i, result, method, instance) { - this.s_size = s.length; - this.s = s; - this.substring_i = substring_i; - this.result = result; - this.method = method; - this.instance = instance; -}; - -$__jsx_extend([Among, Among$0], Object); -function Stemmer() { -}; - -$__jsx_extend([Stemmer], Object); -function BaseStemmer() { - var current$0; - var cursor$0; - var limit$0; - this.cache = ({ }); - current$0 = this.current = ""; - cursor$0 = this.cursor = 0; - limit$0 = this.limit = current$0.length; - this.limit_backward = 0; - this.bra = cursor$0; - this.ket = limit$0; -}; - -$__jsx_extend([BaseStemmer], Stemmer); -BaseStemmer.prototype.setCurrent$S = function (value) { - var current$0; - var cursor$0; - var limit$0; - current$0 = this.current = value; - cursor$0 = this.cursor = 0; - limit$0 = this.limit = current$0.length; - this.limit_backward = 0; - this.bra = cursor$0; - this.ket = limit$0; -}; - - -function BaseStemmer$setCurrent$LBaseStemmer$S($this, value) { - var current$0; - var cursor$0; - var limit$0; - current$0 = $this.current = value; - cursor$0 = $this.cursor = 0; - limit$0 = $this.limit = current$0.length; - $this.limit_backward = 0; - $this.bra = cursor$0; - $this.ket = limit$0; -}; - -BaseStemmer.setCurrent$LBaseStemmer$S = BaseStemmer$setCurrent$LBaseStemmer$S; - -BaseStemmer.prototype.getCurrent$ = function () { - return this.current; -}; - - -function BaseStemmer$getCurrent$LBaseStemmer$($this) { - return $this.current; -}; - -BaseStemmer.getCurrent$LBaseStemmer$ = BaseStemmer$getCurrent$LBaseStemmer$; - -BaseStemmer.prototype.copy_from$LBaseStemmer$ = function (other) { - this.current = other.current; - this.cursor = other.cursor; - this.limit = other.limit; - this.limit_backward = other.limit_backward; - this.bra = other.bra; - this.ket = other.ket; -}; - - -function BaseStemmer$copy_from$LBaseStemmer$LBaseStemmer$($this, other) { - $this.current = other.current; - $this.cursor = other.cursor; - $this.limit = other.limit; - $this.limit_backward = other.limit_backward; - $this.bra = other.bra; - $this.ket = other.ket; -}; - -BaseStemmer.copy_from$LBaseStemmer$LBaseStemmer$ = BaseStemmer$copy_from$LBaseStemmer$LBaseStemmer$; - -BaseStemmer.prototype.in_grouping$AIII = function (s, min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor >= this.limit) { - return false; - } - ch = this.current.charCodeAt(this.cursor); - if (ch > max || ch < min) { - return false; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$in_grouping$LBaseStemmer$AIII($this, s, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor >= $this.limit) { - return false; - } - ch = $this.current.charCodeAt($this.cursor); - if (ch > max || ch < min) { - return false; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.in_grouping$LBaseStemmer$AIII = BaseStemmer$in_grouping$LBaseStemmer$AIII; - -BaseStemmer.prototype.in_grouping_b$AIII = function (s, min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor <= this.limit_backward) { - return false; - } - ch = this.current.charCodeAt(this.cursor - 1); - if (ch > max || ch < min) { - return false; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$in_grouping_b$LBaseStemmer$AIII($this, s, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor <= $this.limit_backward) { - return false; - } - ch = $this.current.charCodeAt($this.cursor - 1); - if (ch > max || ch < min) { - return false; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.in_grouping_b$LBaseStemmer$AIII = BaseStemmer$in_grouping_b$LBaseStemmer$AIII; - -BaseStemmer.prototype.out_grouping$AIII = function (s, min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor >= this.limit) { - return false; - } - ch = this.current.charCodeAt(this.cursor); - if (ch > max || ch < min) { - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; - } - ch -= min; - if ((s[ch >>> 3] & 0X1 << (ch & 0x7)) === 0) { - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; - } - return false; -}; - - -function BaseStemmer$out_grouping$LBaseStemmer$AIII($this, s, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor >= $this.limit) { - return false; - } - ch = $this.current.charCodeAt($this.cursor); - if (ch > max || ch < min) { - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; - } - ch -= min; - if ((s[ch >>> 3] & 0X1 << (ch & 0x7)) === 0) { - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; - } - return false; -}; - -BaseStemmer.out_grouping$LBaseStemmer$AIII = BaseStemmer$out_grouping$LBaseStemmer$AIII; - -BaseStemmer.prototype.out_grouping_b$AIII = function (s, min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor <= this.limit_backward) { - return false; - } - ch = this.current.charCodeAt(this.cursor - 1); - if (ch > max || ch < min) { - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; - } - return false; +// Generated by Snowball 2.1.0 - https://snowballstem.org/ + +/**@constructor*/ +SpanishStemmer = function() { + var base = new BaseStemmer(); + /** @const */ var a_0 = [ + ["", -1, 6], + ["\u00E1", 0, 1], + ["\u00E9", 0, 2], + ["\u00ED", 0, 3], + ["\u00F3", 0, 4], + ["\u00FA", 0, 5] + ]; + + /** @const */ var a_1 = [ + ["la", -1, -1], + ["sela", 0, -1], + ["le", -1, -1], + ["me", -1, -1], + ["se", -1, -1], + ["lo", -1, -1], + ["selo", 5, -1], + ["las", -1, -1], + ["selas", 7, -1], + ["les", -1, -1], + ["los", -1, -1], + ["selos", 10, -1], + ["nos", -1, -1] + ]; + + /** @const */ var a_2 = [ + ["ando", -1, 6], + ["iendo", -1, 6], + ["yendo", -1, 7], + ["\u00E1ndo", -1, 2], + ["i\u00E9ndo", -1, 1], + ["ar", -1, 6], + ["er", -1, 6], + ["ir", -1, 6], + ["\u00E1r", -1, 3], + ["\u00E9r", -1, 4], + ["\u00EDr", -1, 5] + ]; + + /** @const */ var a_3 = [ + ["ic", -1, -1], + ["ad", -1, -1], + ["os", -1, -1], + ["iv", -1, 1] + ]; + + /** @const */ var a_4 = [ + ["able", -1, 1], + ["ible", -1, 1], + ["ante", -1, 1] + ]; + + /** @const */ var a_5 = [ + ["ic", -1, 1], + ["abil", -1, 1], + ["iv", -1, 1] + ]; + + /** @const */ var a_6 = [ + ["ica", -1, 1], + ["ancia", -1, 2], + ["encia", -1, 5], + ["adora", -1, 2], + ["osa", -1, 1], + ["ista", -1, 1], + ["iva", -1, 9], + ["anza", -1, 1], + ["log\u00EDa", -1, 3], + ["idad", -1, 8], + ["able", -1, 1], + ["ible", -1, 1], + ["ante", -1, 2], + ["mente", -1, 7], + ["amente", 13, 6], + ["aci\u00F3n", -1, 2], + ["uci\u00F3n", -1, 4], + ["ico", -1, 1], + ["ismo", -1, 1], + ["oso", -1, 1], + ["amiento", -1, 1], + ["imiento", -1, 1], + ["ivo", -1, 9], + ["ador", -1, 2], + ["icas", -1, 1], + ["ancias", -1, 2], + ["encias", -1, 5], + ["adoras", -1, 2], + ["osas", -1, 1], + ["istas", -1, 1], + ["ivas", -1, 9], + ["anzas", -1, 1], + ["log\u00EDas", -1, 3], + ["idades", -1, 8], + ["ables", -1, 1], + ["ibles", -1, 1], + ["aciones", -1, 2], + ["uciones", -1, 4], + ["adores", -1, 2], + ["antes", -1, 2], + ["icos", -1, 1], + ["ismos", -1, 1], + ["osos", -1, 1], + ["amientos", -1, 1], + ["imientos", -1, 1], + ["ivos", -1, 9] + ]; + + /** @const */ var a_7 = [ + ["ya", -1, 1], + ["ye", -1, 1], + ["yan", -1, 1], + ["yen", -1, 1], + ["yeron", -1, 1], + ["yendo", -1, 1], + ["yo", -1, 1], + ["yas", -1, 1], + ["yes", -1, 1], + ["yais", -1, 1], + ["yamos", -1, 1], + ["y\u00F3", -1, 1] + ]; + + /** @const */ var a_8 = [ + ["aba", -1, 2], + ["ada", -1, 2], + ["ida", -1, 2], + ["ara", -1, 2], + ["iera", -1, 2], + ["\u00EDa", -1, 2], + ["ar\u00EDa", 5, 2], + ["er\u00EDa", 5, 2], + ["ir\u00EDa", 5, 2], + ["ad", -1, 2], + ["ed", -1, 2], + ["id", -1, 2], + ["ase", -1, 2], + ["iese", -1, 2], + ["aste", -1, 2], + ["iste", -1, 2], + ["an", -1, 2], + ["aban", 16, 2], + ["aran", 16, 2], + ["ieran", 16, 2], + ["\u00EDan", 16, 2], + ["ar\u00EDan", 20, 2], + ["er\u00EDan", 20, 2], + ["ir\u00EDan", 20, 2], + ["en", -1, 1], + ["asen", 24, 2], + ["iesen", 24, 2], + ["aron", -1, 2], + ["ieron", -1, 2], + ["ar\u00E1n", -1, 2], + ["er\u00E1n", -1, 2], + ["ir\u00E1n", -1, 2], + ["ado", -1, 2], + ["ido", -1, 2], + ["ando", -1, 2], + ["iendo", -1, 2], + ["ar", -1, 2], + ["er", -1, 2], + ["ir", -1, 2], + ["as", -1, 2], + ["abas", 39, 2], + ["adas", 39, 2], + ["idas", 39, 2], + ["aras", 39, 2], + ["ieras", 39, 2], + ["\u00EDas", 39, 2], + ["ar\u00EDas", 45, 2], + ["er\u00EDas", 45, 2], + ["ir\u00EDas", 45, 2], + ["es", -1, 1], + ["ases", 49, 2], + ["ieses", 49, 2], + ["abais", -1, 2], + ["arais", -1, 2], + ["ierais", -1, 2], + ["\u00EDais", -1, 2], + ["ar\u00EDais", 55, 2], + ["er\u00EDais", 55, 2], + ["ir\u00EDais", 55, 2], + ["aseis", -1, 2], + ["ieseis", -1, 2], + ["asteis", -1, 2], + ["isteis", -1, 2], + ["\u00E1is", -1, 2], + ["\u00E9is", -1, 1], + ["ar\u00E9is", 64, 2], + ["er\u00E9is", 64, 2], + ["ir\u00E9is", 64, 2], + ["ados", -1, 2], + ["idos", -1, 2], + ["amos", -1, 2], + ["\u00E1bamos", 70, 2], + ["\u00E1ramos", 70, 2], + ["i\u00E9ramos", 70, 2], + ["\u00EDamos", 70, 2], + ["ar\u00EDamos", 74, 2], + ["er\u00EDamos", 74, 2], + ["ir\u00EDamos", 74, 2], + ["emos", -1, 1], + ["aremos", 78, 2], + ["eremos", 78, 2], + ["iremos", 78, 2], + ["\u00E1semos", 78, 2], + ["i\u00E9semos", 78, 2], + ["imos", -1, 2], + ["ar\u00E1s", -1, 2], + ["er\u00E1s", -1, 2], + ["ir\u00E1s", -1, 2], + ["\u00EDs", -1, 2], + ["ar\u00E1", -1, 2], + ["er\u00E1", -1, 2], + ["ir\u00E1", -1, 2], + ["ar\u00E9", -1, 2], + ["er\u00E9", -1, 2], + ["ir\u00E9", -1, 2], + ["i\u00F3", -1, 2] + ]; + + /** @const */ var a_9 = [ + ["a", -1, 1], + ["e", -1, 2], + ["o", -1, 1], + ["os", -1, 1], + ["\u00E1", -1, 1], + ["\u00E9", -1, 2], + ["\u00ED", -1, 1], + ["\u00F3", -1, 1] + ]; + + /** @const */ var /** Array */ g_v = [17, 65, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 17, 4, 10]; + + var /** number */ I_p2 = 0; + var /** number */ I_p1 = 0; + var /** number */ I_pV = 0; + + + /** @return {boolean} */ + function r_mark_regions() { + I_pV = base.limit; + I_p1 = base.limit; + I_p2 = base.limit; + var /** number */ v_1 = base.cursor; + lab0: { + lab1: { + var /** number */ v_2 = base.cursor; + lab2: { + if (!(base.in_grouping(g_v, 97, 252))) + { + break lab2; + } + lab3: { + var /** number */ v_3 = base.cursor; + lab4: { + if (!(base.out_grouping(g_v, 97, 252))) + { + break lab4; + } + golab5: while(true) + { + lab6: { + if (!(base.in_grouping(g_v, 97, 252))) + { + break lab6; + } + break golab5; + } + if (base.cursor >= base.limit) + { + break lab4; + } + base.cursor++; + } + break lab3; + } + base.cursor = v_3; + if (!(base.in_grouping(g_v, 97, 252))) + { + break lab2; + } + golab7: while(true) + { + lab8: { + if (!(base.out_grouping(g_v, 97, 252))) + { + break lab8; + } + break golab7; + } + if (base.cursor >= base.limit) + { + break lab2; + } + base.cursor++; + } + } + break lab1; + } + base.cursor = v_2; + if (!(base.out_grouping(g_v, 97, 252))) + { + break lab0; + } + lab9: { + var /** number */ v_6 = base.cursor; + lab10: { + if (!(base.out_grouping(g_v, 97, 252))) + { + break lab10; + } + golab11: while(true) + { + lab12: { + if (!(base.in_grouping(g_v, 97, 252))) + { + break lab12; + } + break golab11; + } + if (base.cursor >= base.limit) + { + break lab10; + } + base.cursor++; + } + break lab9; + } + base.cursor = v_6; + if (!(base.in_grouping(g_v, 97, 252))) + { + break lab0; + } + if (base.cursor >= base.limit) + { + break lab0; + } + base.cursor++; + } + } + I_pV = base.cursor; + } + base.cursor = v_1; + var /** number */ v_8 = base.cursor; + lab13: { + golab14: while(true) + { + lab15: { + if (!(base.in_grouping(g_v, 97, 252))) + { + break lab15; + } + break golab14; + } + if (base.cursor >= base.limit) + { + break lab13; + } + base.cursor++; + } + golab16: while(true) + { + lab17: { + if (!(base.out_grouping(g_v, 97, 252))) + { + break lab17; + } + break golab16; + } + if (base.cursor >= base.limit) + { + break lab13; + } + base.cursor++; + } + I_p1 = base.cursor; + golab18: while(true) + { + lab19: { + if (!(base.in_grouping(g_v, 97, 252))) + { + break lab19; + } + break golab18; + } + if (base.cursor >= base.limit) + { + break lab13; + } + base.cursor++; + } + golab20: while(true) + { + lab21: { + if (!(base.out_grouping(g_v, 97, 252))) + { + break lab21; + } + break golab20; + } + if (base.cursor >= base.limit) + { + break lab13; + } + base.cursor++; + } + I_p2 = base.cursor; + } + base.cursor = v_8; + return true; + }; + + /** @return {boolean} */ + function r_postlude() { + var /** number */ among_var; + while(true) + { + var /** number */ v_1 = base.cursor; + lab0: { + base.bra = base.cursor; + among_var = base.find_among(a_0); + if (among_var == 0) + { + break lab0; + } + base.ket = base.cursor; + switch (among_var) { + case 1: + if (!base.slice_from("a")) + { + return false; + } + break; + case 2: + if (!base.slice_from("e")) + { + return false; + } + break; + case 3: + if (!base.slice_from("i")) + { + return false; + } + break; + case 4: + if (!base.slice_from("o")) + { + return false; + } + break; + case 5: + if (!base.slice_from("u")) + { + return false; + } + break; + case 6: + if (base.cursor >= base.limit) + { + break lab0; + } + base.cursor++; + break; + } + continue; + } + base.cursor = v_1; + break; + } + return true; + }; + + /** @return {boolean} */ + function r_RV() { + if (!(I_pV <= base.cursor)) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_R1() { + if (!(I_p1 <= base.cursor)) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_R2() { + if (!(I_p2 <= base.cursor)) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_attached_pronoun() { + var /** number */ among_var; + base.ket = base.cursor; + if (base.find_among_b(a_1) == 0) + { + return false; + } + base.bra = base.cursor; + among_var = base.find_among_b(a_2); + if (among_var == 0) + { + return false; + } + if (!r_RV()) + { + return false; + } + switch (among_var) { + case 1: + base.bra = base.cursor; + if (!base.slice_from("iendo")) + { + return false; + } + break; + case 2: + base.bra = base.cursor; + if (!base.slice_from("ando")) + { + return false; + } + break; + case 3: + base.bra = base.cursor; + if (!base.slice_from("ar")) + { + return false; + } + break; + case 4: + base.bra = base.cursor; + if (!base.slice_from("er")) + { + return false; + } + break; + case 5: + base.bra = base.cursor; + if (!base.slice_from("ir")) + { + return false; + } + break; + case 6: + if (!base.slice_del()) + { + return false; + } + break; + case 7: + if (!(base.eq_s_b("u"))) + { + return false; + } + if (!base.slice_del()) + { + return false; + } + break; + } + return true; + }; + + /** @return {boolean} */ + function r_standard_suffix() { + var /** number */ among_var; + base.ket = base.cursor; + among_var = base.find_among_b(a_6); + if (among_var == 0) + { + return false; + } + base.bra = base.cursor; + switch (among_var) { + case 1: + if (!r_R2()) + { + return false; + } + if (!base.slice_del()) + { + return false; + } + break; + case 2: + if (!r_R2()) + { + return false; + } + if (!base.slice_del()) + { + return false; + } + var /** number */ v_1 = base.limit - base.cursor; + lab0: { + base.ket = base.cursor; + if (!(base.eq_s_b("ic"))) + { + base.cursor = base.limit - v_1; + break lab0; + } + base.bra = base.cursor; + if (!r_R2()) + { + base.cursor = base.limit - v_1; + break lab0; + } + if (!base.slice_del()) + { + return false; + } + } + break; + case 3: + if (!r_R2()) + { + return false; + } + if (!base.slice_from("log")) + { + return false; + } + break; + case 4: + if (!r_R2()) + { + return false; + } + if (!base.slice_from("u")) + { + return false; + } + break; + case 5: + if (!r_R2()) + { + return false; + } + if (!base.slice_from("ente")) + { + return false; + } + break; + case 6: + if (!r_R1()) + { + return false; + } + if (!base.slice_del()) + { + return false; + } + var /** number */ v_2 = base.limit - base.cursor; + lab1: { + base.ket = base.cursor; + among_var = base.find_among_b(a_3); + if (among_var == 0) + { + base.cursor = base.limit - v_2; + break lab1; + } + base.bra = base.cursor; + if (!r_R2()) + { + base.cursor = base.limit - v_2; + break lab1; + } + if (!base.slice_del()) + { + return false; + } + switch (among_var) { + case 1: + base.ket = base.cursor; + if (!(base.eq_s_b("at"))) + { + base.cursor = base.limit - v_2; + break lab1; + } + base.bra = base.cursor; + if (!r_R2()) + { + base.cursor = base.limit - v_2; + break lab1; + } + if (!base.slice_del()) + { + return false; + } + break; + } + } + break; + case 7: + if (!r_R2()) + { + return false; + } + if (!base.slice_del()) + { + return false; + } + var /** number */ v_3 = base.limit - base.cursor; + lab2: { + base.ket = base.cursor; + if (base.find_among_b(a_4) == 0) + { + base.cursor = base.limit - v_3; + break lab2; + } + base.bra = base.cursor; + if (!r_R2()) + { + base.cursor = base.limit - v_3; + break lab2; + } + if (!base.slice_del()) + { + return false; + } + } + break; + case 8: + if (!r_R2()) + { + return false; + } + if (!base.slice_del()) + { + return false; + } + var /** number */ v_4 = base.limit - base.cursor; + lab3: { + base.ket = base.cursor; + if (base.find_among_b(a_5) == 0) + { + base.cursor = base.limit - v_4; + break lab3; + } + base.bra = base.cursor; + if (!r_R2()) + { + base.cursor = base.limit - v_4; + break lab3; + } + if (!base.slice_del()) + { + return false; + } + } + break; + case 9: + if (!r_R2()) + { + return false; + } + if (!base.slice_del()) + { + return false; + } + var /** number */ v_5 = base.limit - base.cursor; + lab4: { + base.ket = base.cursor; + if (!(base.eq_s_b("at"))) + { + base.cursor = base.limit - v_5; + break lab4; + } + base.bra = base.cursor; + if (!r_R2()) + { + base.cursor = base.limit - v_5; + break lab4; + } + if (!base.slice_del()) + { + return false; + } + } + break; + } + return true; + }; + + /** @return {boolean} */ + function r_y_verb_suffix() { + if (base.cursor < I_pV) + { + return false; + } + var /** number */ v_2 = base.limit_backward; + base.limit_backward = I_pV; + base.ket = base.cursor; + if (base.find_among_b(a_7) == 0) + { + base.limit_backward = v_2; + return false; + } + base.bra = base.cursor; + base.limit_backward = v_2; + if (!(base.eq_s_b("u"))) + { + return false; + } + if (!base.slice_del()) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_verb_suffix() { + var /** number */ among_var; + if (base.cursor < I_pV) + { + return false; + } + var /** number */ v_2 = base.limit_backward; + base.limit_backward = I_pV; + base.ket = base.cursor; + among_var = base.find_among_b(a_8); + if (among_var == 0) + { + base.limit_backward = v_2; + return false; + } + base.bra = base.cursor; + base.limit_backward = v_2; + switch (among_var) { + case 1: + var /** number */ v_3 = base.limit - base.cursor; + lab0: { + if (!(base.eq_s_b("u"))) + { + base.cursor = base.limit - v_3; + break lab0; + } + var /** number */ v_4 = base.limit - base.cursor; + if (!(base.eq_s_b("g"))) + { + base.cursor = base.limit - v_3; + break lab0; + } + base.cursor = base.limit - v_4; + } + base.bra = base.cursor; + if (!base.slice_del()) + { + return false; + } + break; + case 2: + if (!base.slice_del()) + { + return false; + } + break; + } + return true; + }; + + /** @return {boolean} */ + function r_residual_suffix() { + var /** number */ among_var; + base.ket = base.cursor; + among_var = base.find_among_b(a_9); + if (among_var == 0) + { + return false; + } + base.bra = base.cursor; + switch (among_var) { + case 1: + if (!r_RV()) + { + return false; + } + if (!base.slice_del()) + { + return false; + } + break; + case 2: + if (!r_RV()) + { + return false; + } + if (!base.slice_del()) + { + return false; + } + var /** number */ v_1 = base.limit - base.cursor; + lab0: { + base.ket = base.cursor; + if (!(base.eq_s_b("u"))) + { + base.cursor = base.limit - v_1; + break lab0; + } + base.bra = base.cursor; + var /** number */ v_2 = base.limit - base.cursor; + if (!(base.eq_s_b("g"))) + { + base.cursor = base.limit - v_1; + break lab0; + } + base.cursor = base.limit - v_2; + if (!r_RV()) + { + base.cursor = base.limit - v_1; + break lab0; + } + if (!base.slice_del()) + { + return false; + } + } + break; + } + return true; + }; + + this.stem = /** @return {boolean} */ function() { + r_mark_regions(); + base.limit_backward = base.cursor; base.cursor = base.limit; + var /** number */ v_2 = base.limit - base.cursor; + r_attached_pronoun(); + base.cursor = base.limit - v_2; + var /** number */ v_3 = base.limit - base.cursor; + lab0: { + lab1: { + var /** number */ v_4 = base.limit - base.cursor; + lab2: { + if (!r_standard_suffix()) + { + break lab2; + } + break lab1; + } + base.cursor = base.limit - v_4; + lab3: { + if (!r_y_verb_suffix()) + { + break lab3; + } + break lab1; + } + base.cursor = base.limit - v_4; + if (!r_verb_suffix()) + { + break lab0; + } + } + } + base.cursor = base.limit - v_3; + var /** number */ v_5 = base.limit - base.cursor; + r_residual_suffix(); + base.cursor = base.limit - v_5; + base.cursor = base.limit_backward; + var /** number */ v_6 = base.cursor; + r_postlude(); + base.cursor = v_6; + return true; + }; + + /**@return{string}*/ + this['stemWord'] = function(/**string*/word) { + base.setCurrent(word); + this.stem(); + return base.getCurrent(); + }; }; - - -function BaseStemmer$out_grouping_b$LBaseStemmer$AIII($this, s, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor <= $this.limit_backward) { - return false; - } - ch = $this.current.charCodeAt($this.cursor - 1); - if (ch > max || ch < min) { - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; - } - return false; -}; - -BaseStemmer.out_grouping_b$LBaseStemmer$AIII = BaseStemmer$out_grouping_b$LBaseStemmer$AIII; - -BaseStemmer.prototype.in_range$II = function (min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor >= this.limit) { - return false; - } - ch = this.current.charCodeAt(this.cursor); - if (ch > max || ch < min) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$in_range$LBaseStemmer$II($this, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor >= $this.limit) { - return false; - } - ch = $this.current.charCodeAt($this.cursor); - if (ch > max || ch < min) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.in_range$LBaseStemmer$II = BaseStemmer$in_range$LBaseStemmer$II; - -BaseStemmer.prototype.in_range_b$II = function (min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor <= this.limit_backward) { - return false; - } - ch = this.current.charCodeAt(this.cursor - 1); - if (ch > max || ch < min) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$in_range_b$LBaseStemmer$II($this, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor <= $this.limit_backward) { - return false; - } - ch = $this.current.charCodeAt($this.cursor - 1); - if (ch > max || ch < min) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.in_range_b$LBaseStemmer$II = BaseStemmer$in_range_b$LBaseStemmer$II; - -BaseStemmer.prototype.out_range$II = function (min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor >= this.limit) { - return false; - } - ch = this.current.charCodeAt(this.cursor); - if (! (ch > max || ch < min)) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$out_range$LBaseStemmer$II($this, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor >= $this.limit) { - return false; - } - ch = $this.current.charCodeAt($this.cursor); - if (! (ch > max || ch < min)) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.out_range$LBaseStemmer$II = BaseStemmer$out_range$LBaseStemmer$II; - -BaseStemmer.prototype.out_range_b$II = function (min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor <= this.limit_backward) { - return false; - } - ch = this.current.charCodeAt(this.cursor - 1); - if (! (ch > max || ch < min)) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$out_range_b$LBaseStemmer$II($this, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor <= $this.limit_backward) { - return false; - } - ch = $this.current.charCodeAt($this.cursor - 1); - if (! (ch > max || ch < min)) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.out_range_b$LBaseStemmer$II = BaseStemmer$out_range_b$LBaseStemmer$II; - -BaseStemmer.prototype.eq_s$IS = function (s_size, s) { - var cursor$0; - if (((this.limit - this.cursor) | 0) < s_size) { - return false; - } - if (this.current.slice(cursor$0 = this.cursor, ((cursor$0 + s_size) | 0)) !== s) { - return false; - } - this.cursor = (this.cursor + s_size) | 0; - return true; -}; - - -function BaseStemmer$eq_s$LBaseStemmer$IS($this, s_size, s) { - var cursor$0; - if ((($this.limit - $this.cursor) | 0) < s_size) { - return false; - } - if ($this.current.slice(cursor$0 = $this.cursor, ((cursor$0 + s_size) | 0)) !== s) { - return false; - } - $this.cursor = ($this.cursor + s_size) | 0; - return true; -}; - -BaseStemmer.eq_s$LBaseStemmer$IS = BaseStemmer$eq_s$LBaseStemmer$IS; - -BaseStemmer.prototype.eq_s_b$IS = function (s_size, s) { - var cursor$0; - if (((this.cursor - this.limit_backward) | 0) < s_size) { - return false; - } - if (this.current.slice((((cursor$0 = this.cursor) - s_size) | 0), cursor$0) !== s) { - return false; - } - this.cursor = (this.cursor - s_size) | 0; - return true; -}; - - -function BaseStemmer$eq_s_b$LBaseStemmer$IS($this, s_size, s) { - var cursor$0; - if ((($this.cursor - $this.limit_backward) | 0) < s_size) { - return false; - } - if ($this.current.slice((((cursor$0 = $this.cursor) - s_size) | 0), cursor$0) !== s) { - return false; - } - $this.cursor = ($this.cursor - s_size) | 0; - return true; -}; - -BaseStemmer.eq_s_b$LBaseStemmer$IS = BaseStemmer$eq_s_b$LBaseStemmer$IS; - -BaseStemmer.prototype.eq_v$S = function (s) { - return BaseStemmer$eq_s$LBaseStemmer$IS(this, s.length, s); -}; - - -function BaseStemmer$eq_v$LBaseStemmer$S($this, s) { - return BaseStemmer$eq_s$LBaseStemmer$IS($this, s.length, s); -}; - -BaseStemmer.eq_v$LBaseStemmer$S = BaseStemmer$eq_v$LBaseStemmer$S; - -BaseStemmer.prototype.eq_v_b$S = function (s) { - return BaseStemmer$eq_s_b$LBaseStemmer$IS(this, s.length, s); -}; - - -function BaseStemmer$eq_v_b$LBaseStemmer$S($this, s) { - return BaseStemmer$eq_s_b$LBaseStemmer$IS($this, s.length, s); -}; - -BaseStemmer.eq_v_b$LBaseStemmer$S = BaseStemmer$eq_v_b$LBaseStemmer$S; - -BaseStemmer.prototype.find_among$ALAmong$I = function (v, v_size) { - var i; - var j; - var c; - var l; - var common_i; - var common_j; - var first_key_inspected; - var k; - var diff; - var common; - var w; - var i2; - var res; - i = 0; - j = v_size; - c = this.cursor; - l = this.limit; - common_i = 0; - common_j = 0; - first_key_inspected = false; - while (true) { - k = i + (j - i >>> 1); - diff = 0; - common = (common_i < common_j ? common_i : common_j); - w = v[k]; - for (i2 = common; i2 < w.s_size; i2++) { - if (c + common === l) { - diff = -1; - break; - } - diff = this.current.charCodeAt(c + common) - w.s.charCodeAt(i2); - if (diff !== 0) { - break; - } - common++; - } - if (diff < 0) { - j = k; - common_j = common; - } else { - i = k; - common_i = common; - } - if (j - i <= 1) { - if (i > 0) { - break; - } - if (j === i) { - break; - } - if (first_key_inspected) { - break; - } - first_key_inspected = true; - } - } - while (true) { - w = v[i]; - if (common_i >= w.s_size) { - this.cursor = (c + w.s_size | 0); - if (w.method == null) { - return w.result; - } - res = w.method(w.instance); - this.cursor = (c + w.s_size | 0); - if (res) { - return w.result; - } - } - i = w.substring_i; - if (i < 0) { - return 0; - } - } - return -1; -}; - - -function BaseStemmer$find_among$LBaseStemmer$ALAmong$I($this, v, v_size) { - var i; - var j; - var c; - var l; - var common_i; - var common_j; - var first_key_inspected; - var k; - var diff; - var common; - var w; - var i2; - var res; - i = 0; - j = v_size; - c = $this.cursor; - l = $this.limit; - common_i = 0; - common_j = 0; - first_key_inspected = false; - while (true) { - k = i + (j - i >>> 1); - diff = 0; - common = (common_i < common_j ? common_i : common_j); - w = v[k]; - for (i2 = common; i2 < w.s_size; i2++) { - if (c + common === l) { - diff = -1; - break; - } - diff = $this.current.charCodeAt(c + common) - w.s.charCodeAt(i2); - if (diff !== 0) { - break; - } - common++; - } - if (diff < 0) { - j = k; - common_j = common; - } else { - i = k; - common_i = common; - } - if (j - i <= 1) { - if (i > 0) { - break; - } - if (j === i) { - break; - } - if (first_key_inspected) { - break; - } - first_key_inspected = true; - } - } - while (true) { - w = v[i]; - if (common_i >= w.s_size) { - $this.cursor = (c + w.s_size | 0); - if (w.method == null) { - return w.result; - } - res = w.method(w.instance); - $this.cursor = (c + w.s_size | 0); - if (res) { - return w.result; - } - } - i = w.substring_i; - if (i < 0) { - return 0; - } - } - return -1; -}; - -BaseStemmer.find_among$LBaseStemmer$ALAmong$I = BaseStemmer$find_among$LBaseStemmer$ALAmong$I; - -BaseStemmer.prototype.find_among_b$ALAmong$I = function (v, v_size) { - var i; - var j; - var c; - var lb; - var common_i; - var common_j; - var first_key_inspected; - var k; - var diff; - var common; - var w; - var i2; - var res; - i = 0; - j = v_size; - c = this.cursor; - lb = this.limit_backward; - common_i = 0; - common_j = 0; - first_key_inspected = false; - while (true) { - k = i + (j - i >> 1); - diff = 0; - common = (common_i < common_j ? common_i : common_j); - w = v[k]; - for (i2 = w.s_size - 1 - common; i2 >= 0; i2--) { - if (c - common === lb) { - diff = -1; - break; - } - diff = this.current.charCodeAt(c - 1 - common) - w.s.charCodeAt(i2); - if (diff !== 0) { - break; - } - common++; - } - if (diff < 0) { - j = k; - common_j = common; - } else { - i = k; - common_i = common; - } - if (j - i <= 1) { - if (i > 0) { - break; - } - if (j === i) { - break; - } - if (first_key_inspected) { - break; - } - first_key_inspected = true; - } - } - while (true) { - w = v[i]; - if (common_i >= w.s_size) { - this.cursor = (c - w.s_size | 0); - if (w.method == null) { - return w.result; - } - res = w.method(this); - this.cursor = (c - w.s_size | 0); - if (res) { - return w.result; - } - } - i = w.substring_i; - if (i < 0) { - return 0; - } - } - return -1; -}; - - -function BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, v, v_size) { - var i; - var j; - var c; - var lb; - var common_i; - var common_j; - var first_key_inspected; - var k; - var diff; - var common; - var w; - var i2; - var res; - i = 0; - j = v_size; - c = $this.cursor; - lb = $this.limit_backward; - common_i = 0; - common_j = 0; - first_key_inspected = false; - while (true) { - k = i + (j - i >> 1); - diff = 0; - common = (common_i < common_j ? common_i : common_j); - w = v[k]; - for (i2 = w.s_size - 1 - common; i2 >= 0; i2--) { - if (c - common === lb) { - diff = -1; - break; - } - diff = $this.current.charCodeAt(c - 1 - common) - w.s.charCodeAt(i2); - if (diff !== 0) { - break; - } - common++; - } - if (diff < 0) { - j = k; - common_j = common; - } else { - i = k; - common_i = common; - } - if (j - i <= 1) { - if (i > 0) { - break; - } - if (j === i) { - break; - } - if (first_key_inspected) { - break; - } - first_key_inspected = true; - } - } - while (true) { - w = v[i]; - if (common_i >= w.s_size) { - $this.cursor = (c - w.s_size | 0); - if (w.method == null) { - return w.result; - } - res = w.method($this); - $this.cursor = (c - w.s_size | 0); - if (res) { - return w.result; - } - } - i = w.substring_i; - if (i < 0) { - return 0; - } - } - return -1; -}; - -BaseStemmer.find_among_b$LBaseStemmer$ALAmong$I = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I; - -BaseStemmer.prototype.replace_s$IIS = function (c_bra, c_ket, s) { - var adjustment; - adjustment = ((s.length - (((c_ket - c_bra) | 0))) | 0); - this.current = this.current.slice(0, c_bra) + s + this.current.slice(c_ket); - this.limit = (this.limit + adjustment) | 0; - if (this.cursor >= c_ket) { - this.cursor = (this.cursor + adjustment) | 0; - } else if (this.cursor > c_bra) { - this.cursor = c_bra; - } - return (adjustment | 0); -}; - - -function BaseStemmer$replace_s$LBaseStemmer$IIS($this, c_bra, c_ket, s) { - var adjustment; - adjustment = ((s.length - (((c_ket - c_bra) | 0))) | 0); - $this.current = $this.current.slice(0, c_bra) + s + $this.current.slice(c_ket); - $this.limit = ($this.limit + adjustment) | 0; - if ($this.cursor >= c_ket) { - $this.cursor = ($this.cursor + adjustment) | 0; - } else if ($this.cursor > c_bra) { - $this.cursor = c_bra; - } - return (adjustment | 0); -}; - -BaseStemmer.replace_s$LBaseStemmer$IIS = BaseStemmer$replace_s$LBaseStemmer$IIS; - -BaseStemmer.prototype.slice_check$ = function () { - var bra$0; - var ket$0; - var limit$0; - return ((bra$0 = this.bra) < 0 || bra$0 > (ket$0 = this.ket) || ket$0 > (limit$0 = this.limit) || limit$0 > this.current.length ? false : true); -}; - - -function BaseStemmer$slice_check$LBaseStemmer$($this) { - var bra$0; - var ket$0; - var limit$0; - return ((bra$0 = $this.bra) < 0 || bra$0 > (ket$0 = $this.ket) || ket$0 > (limit$0 = $this.limit) || limit$0 > $this.current.length ? false : true); -}; - -BaseStemmer.slice_check$LBaseStemmer$ = BaseStemmer$slice_check$LBaseStemmer$; - -BaseStemmer.prototype.slice_from$S = function (s) { - var result; - var bra$0; - var ket$0; - var limit$0; - result = false; - if ((bra$0 = this.bra) < 0 || bra$0 > (ket$0 = this.ket) || ket$0 > (limit$0 = this.limit) || limit$0 > this.current.length ? false : true) { - BaseStemmer$replace_s$LBaseStemmer$IIS(this, this.bra, this.ket, s); - result = true; - } - return result; -}; - - -function BaseStemmer$slice_from$LBaseStemmer$S($this, s) { - var result; - var bra$0; - var ket$0; - var limit$0; - result = false; - if ((bra$0 = $this.bra) < 0 || bra$0 > (ket$0 = $this.ket) || ket$0 > (limit$0 = $this.limit) || limit$0 > $this.current.length ? false : true) { - BaseStemmer$replace_s$LBaseStemmer$IIS($this, $this.bra, $this.ket, s); - result = true; - } - return result; -}; - -BaseStemmer.slice_from$LBaseStemmer$S = BaseStemmer$slice_from$LBaseStemmer$S; - -BaseStemmer.prototype.slice_del$ = function () { - return BaseStemmer$slice_from$LBaseStemmer$S(this, ""); -}; - - -function BaseStemmer$slice_del$LBaseStemmer$($this) { - return BaseStemmer$slice_from$LBaseStemmer$S($this, ""); -}; - -BaseStemmer.slice_del$LBaseStemmer$ = BaseStemmer$slice_del$LBaseStemmer$; - -BaseStemmer.prototype.insert$IIS = function (c_bra, c_ket, s) { - var adjustment; - adjustment = BaseStemmer$replace_s$LBaseStemmer$IIS(this, c_bra, c_ket, s); - if (c_bra <= this.bra) { - this.bra = (this.bra + adjustment) | 0; - } - if (c_bra <= this.ket) { - this.ket = (this.ket + adjustment) | 0; - } -}; - - -function BaseStemmer$insert$LBaseStemmer$IIS($this, c_bra, c_ket, s) { - var adjustment; - adjustment = BaseStemmer$replace_s$LBaseStemmer$IIS($this, c_bra, c_ket, s); - if (c_bra <= $this.bra) { - $this.bra = ($this.bra + adjustment) | 0; - } - if (c_bra <= $this.ket) { - $this.ket = ($this.ket + adjustment) | 0; - } -}; - -BaseStemmer.insert$LBaseStemmer$IIS = BaseStemmer$insert$LBaseStemmer$IIS; - -BaseStemmer.prototype.slice_to$S = function (s) { - var result; - var bra$0; - var ket$0; - var limit$0; - result = ''; - if ((bra$0 = this.bra) < 0 || bra$0 > (ket$0 = this.ket) || ket$0 > (limit$0 = this.limit) || limit$0 > this.current.length ? false : true) { - result = this.current.slice(this.bra, this.ket); - } - return result; -}; - - -function BaseStemmer$slice_to$LBaseStemmer$S($this, s) { - var result; - var bra$0; - var ket$0; - var limit$0; - result = ''; - if ((bra$0 = $this.bra) < 0 || bra$0 > (ket$0 = $this.ket) || ket$0 > (limit$0 = $this.limit) || limit$0 > $this.current.length ? false : true) { - result = $this.current.slice($this.bra, $this.ket); - } - return result; -}; - -BaseStemmer.slice_to$LBaseStemmer$S = BaseStemmer$slice_to$LBaseStemmer$S; - -BaseStemmer.prototype.assign_to$S = function (s) { - return this.current.slice(0, this.limit); -}; - - -function BaseStemmer$assign_to$LBaseStemmer$S($this, s) { - return $this.current.slice(0, $this.limit); -}; - -BaseStemmer.assign_to$LBaseStemmer$S = BaseStemmer$assign_to$LBaseStemmer$S; - -BaseStemmer.prototype.stem$ = function () { - return false; -}; - - -BaseStemmer.prototype.stemWord$S = function (word) { - var result; - var current$0; - var cursor$0; - var limit$0; - result = this.cache['.' + word]; - if (result == null) { - current$0 = this.current = word; - cursor$0 = this.cursor = 0; - limit$0 = this.limit = current$0.length; - this.limit_backward = 0; - this.bra = cursor$0; - this.ket = limit$0; - this.stem$(); - result = this.current; - this.cache['.' + word] = result; - } - return result; -}; - -BaseStemmer.prototype.stemWord = BaseStemmer.prototype.stemWord$S; - -BaseStemmer.prototype.stemWords$AS = function (words) { - var results; - var i; - var word; - var result; - var current$0; - var cursor$0; - var limit$0; - results = [ ]; - for (i = 0; i < words.length; i++) { - word = words[i]; - result = this.cache['.' + word]; - if (result == null) { - current$0 = this.current = word; - cursor$0 = this.cursor = 0; - limit$0 = this.limit = current$0.length; - this.limit_backward = 0; - this.bra = cursor$0; - this.ket = limit$0; - this.stem$(); - result = this.current; - this.cache['.' + word] = result; - } - results.push(result); - } - return results; -}; - -BaseStemmer.prototype.stemWords = BaseStemmer.prototype.stemWords$AS; - -function SpanishStemmer() { - BaseStemmer.call(this); - this.I_p2 = 0; - this.I_p1 = 0; - this.I_pV = 0; -}; - -$__jsx_extend([SpanishStemmer], BaseStemmer); -SpanishStemmer.prototype.copy_from$LSpanishStemmer$ = function (other) { - this.I_p2 = other.I_p2; - this.I_p1 = other.I_p1; - this.I_pV = other.I_pV; - BaseStemmer$copy_from$LBaseStemmer$LBaseStemmer$(this, other); -}; - -SpanishStemmer.prototype.copy_from = SpanishStemmer.prototype.copy_from$LSpanishStemmer$; - -SpanishStemmer.prototype.r_mark_regions$ = function () { - var v_1; - var v_2; - var v_3; - var v_6; - var v_8; - var lab0; - var lab1; - var lab2; - var lab3; - var lab4; - var lab6; - var lab8; - var lab9; - var lab10; - var lab12; - var lab13; - var lab15; - var lab17; - var lab19; - var lab21; - var limit$0; - var cursor$0; - var $__jsx_postinc_t; - this.I_pV = limit$0 = this.limit; - this.I_p1 = limit$0; - this.I_p2 = limit$0; - v_1 = this.cursor; - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - v_2 = this.cursor; - lab2 = true; - lab2: - while (lab2 === true) { - lab2 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, SpanishStemmer.g_v, 97, 252)) { - break lab2; - } - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - v_3 = this.cursor; - lab4 = true; - lab4: - while (lab4 === true) { - lab4 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII(this, SpanishStemmer.g_v, 97, 252)) { - break lab4; - } - golab5: - while (true) { - lab6 = true; - lab6: - while (lab6 === true) { - lab6 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, SpanishStemmer.g_v, 97, 252)) { - break lab6; - } - break golab5; - } - if (this.cursor >= this.limit) { - break lab4; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - break lab3; - } - this.cursor = v_3; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, SpanishStemmer.g_v, 97, 252)) { - break lab2; - } - golab7: - while (true) { - lab8 = true; - lab8: - while (lab8 === true) { - lab8 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII(this, SpanishStemmer.g_v, 97, 252)) { - break lab8; - } - break golab7; - } - if (this.cursor >= this.limit) { - break lab2; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - } - break lab1; - } - this.cursor = v_2; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII(this, SpanishStemmer.g_v, 97, 252)) { - break lab0; - } - lab9 = true; - lab9: - while (lab9 === true) { - lab9 = false; - v_6 = this.cursor; - lab10 = true; - lab10: - while (lab10 === true) { - lab10 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII(this, SpanishStemmer.g_v, 97, 252)) { - break lab10; - } - golab11: - while (true) { - lab12 = true; - lab12: - while (lab12 === true) { - lab12 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, SpanishStemmer.g_v, 97, 252)) { - break lab12; - } - break golab11; - } - if (this.cursor >= this.limit) { - break lab10; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - break lab9; - } - this.cursor = v_6; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, SpanishStemmer.g_v, 97, 252)) { - break lab0; - } - if (this.cursor >= this.limit) { - break lab0; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - } - this.I_pV = this.cursor; - } - cursor$0 = this.cursor = v_1; - v_8 = cursor$0; - lab13 = true; -lab13: - while (lab13 === true) { - lab13 = false; - golab14: - while (true) { - lab15 = true; - lab15: - while (lab15 === true) { - lab15 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, SpanishStemmer.g_v, 97, 252)) { - break lab15; - } - break golab14; - } - if (this.cursor >= this.limit) { - break lab13; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - golab16: - while (true) { - lab17 = true; - lab17: - while (lab17 === true) { - lab17 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII(this, SpanishStemmer.g_v, 97, 252)) { - break lab17; - } - break golab16; - } - if (this.cursor >= this.limit) { - break lab13; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - this.I_p1 = this.cursor; - golab18: - while (true) { - lab19 = true; - lab19: - while (lab19 === true) { - lab19 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, SpanishStemmer.g_v, 97, 252)) { - break lab19; - } - break golab18; - } - if (this.cursor >= this.limit) { - break lab13; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - golab20: - while (true) { - lab21 = true; - lab21: - while (lab21 === true) { - lab21 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII(this, SpanishStemmer.g_v, 97, 252)) { - break lab21; - } - break golab20; - } - if (this.cursor >= this.limit) { - break lab13; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - this.I_p2 = this.cursor; - } - this.cursor = v_8; - return true; -}; - -SpanishStemmer.prototype.r_mark_regions = SpanishStemmer.prototype.r_mark_regions$; - -function SpanishStemmer$r_mark_regions$LSpanishStemmer$($this) { - var v_1; - var v_2; - var v_3; - var v_6; - var v_8; - var lab0; - var lab1; - var lab2; - var lab3; - var lab4; - var lab6; - var lab8; - var lab9; - var lab10; - var lab12; - var lab13; - var lab15; - var lab17; - var lab19; - var lab21; - var limit$0; - var cursor$0; - var $__jsx_postinc_t; - $this.I_pV = limit$0 = $this.limit; - $this.I_p1 = limit$0; - $this.I_p2 = limit$0; - v_1 = $this.cursor; - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - v_2 = $this.cursor; - lab2 = true; - lab2: - while (lab2 === true) { - lab2 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII($this, SpanishStemmer.g_v, 97, 252)) { - break lab2; - } - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - v_3 = $this.cursor; - lab4 = true; - lab4: - while (lab4 === true) { - lab4 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII($this, SpanishStemmer.g_v, 97, 252)) { - break lab4; - } - golab5: - while (true) { - lab6 = true; - lab6: - while (lab6 === true) { - lab6 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII($this, SpanishStemmer.g_v, 97, 252)) { - break lab6; - } - break golab5; - } - if ($this.cursor >= $this.limit) { - break lab4; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - break lab3; - } - $this.cursor = v_3; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII($this, SpanishStemmer.g_v, 97, 252)) { - break lab2; - } - golab7: - while (true) { - lab8 = true; - lab8: - while (lab8 === true) { - lab8 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII($this, SpanishStemmer.g_v, 97, 252)) { - break lab8; - } - break golab7; - } - if ($this.cursor >= $this.limit) { - break lab2; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - } - break lab1; - } - $this.cursor = v_2; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII($this, SpanishStemmer.g_v, 97, 252)) { - break lab0; - } - lab9 = true; - lab9: - while (lab9 === true) { - lab9 = false; - v_6 = $this.cursor; - lab10 = true; - lab10: - while (lab10 === true) { - lab10 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII($this, SpanishStemmer.g_v, 97, 252)) { - break lab10; - } - golab11: - while (true) { - lab12 = true; - lab12: - while (lab12 === true) { - lab12 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII($this, SpanishStemmer.g_v, 97, 252)) { - break lab12; - } - break golab11; - } - if ($this.cursor >= $this.limit) { - break lab10; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - break lab9; - } - $this.cursor = v_6; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII($this, SpanishStemmer.g_v, 97, 252)) { - break lab0; - } - if ($this.cursor >= $this.limit) { - break lab0; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - } - $this.I_pV = $this.cursor; - } - cursor$0 = $this.cursor = v_1; - v_8 = cursor$0; - lab13 = true; -lab13: - while (lab13 === true) { - lab13 = false; - golab14: - while (true) { - lab15 = true; - lab15: - while (lab15 === true) { - lab15 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII($this, SpanishStemmer.g_v, 97, 252)) { - break lab15; - } - break golab14; - } - if ($this.cursor >= $this.limit) { - break lab13; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - golab16: - while (true) { - lab17 = true; - lab17: - while (lab17 === true) { - lab17 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII($this, SpanishStemmer.g_v, 97, 252)) { - break lab17; - } - break golab16; - } - if ($this.cursor >= $this.limit) { - break lab13; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - $this.I_p1 = $this.cursor; - golab18: - while (true) { - lab19 = true; - lab19: - while (lab19 === true) { - lab19 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII($this, SpanishStemmer.g_v, 97, 252)) { - break lab19; - } - break golab18; - } - if ($this.cursor >= $this.limit) { - break lab13; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - golab20: - while (true) { - lab21 = true; - lab21: - while (lab21 === true) { - lab21 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII($this, SpanishStemmer.g_v, 97, 252)) { - break lab21; - } - break golab20; - } - if ($this.cursor >= $this.limit) { - break lab13; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - $this.I_p2 = $this.cursor; - } - $this.cursor = v_8; - return true; -}; - -SpanishStemmer.r_mark_regions$LSpanishStemmer$ = SpanishStemmer$r_mark_regions$LSpanishStemmer$; - -SpanishStemmer.prototype.r_postlude$ = function () { - var among_var; - var v_1; - var lab1; - var $__jsx_postinc_t; -replab0: - while (true) { - v_1 = this.cursor; - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - this.bra = this.cursor; - among_var = BaseStemmer$find_among$LBaseStemmer$ALAmong$I(this, SpanishStemmer.a_0, 6); - if (among_var === 0) { - break lab1; - } - this.ket = this.cursor; - switch (among_var) { - case 0: - break lab1; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "a")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "e")) { - return false; - } - break; - case 3: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "i")) { - return false; - } - break; - case 4: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "o")) { - return false; - } - break; - case 5: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "u")) { - return false; - } - break; - case 6: - if (this.cursor >= this.limit) { - break lab1; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - break; - } - continue replab0; - } - this.cursor = v_1; - break replab0; - } - return true; -}; - -SpanishStemmer.prototype.r_postlude = SpanishStemmer.prototype.r_postlude$; - -function SpanishStemmer$r_postlude$LSpanishStemmer$($this) { - var among_var; - var v_1; - var lab1; - var $__jsx_postinc_t; -replab0: - while (true) { - v_1 = $this.cursor; - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - $this.bra = $this.cursor; - among_var = BaseStemmer$find_among$LBaseStemmer$ALAmong$I($this, SpanishStemmer.a_0, 6); - if (among_var === 0) { - break lab1; - } - $this.ket = $this.cursor; - switch (among_var) { - case 0: - break lab1; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "a")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "e")) { - return false; - } - break; - case 3: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "i")) { - return false; - } - break; - case 4: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "o")) { - return false; - } - break; - case 5: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "u")) { - return false; - } - break; - case 6: - if ($this.cursor >= $this.limit) { - break lab1; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - break; - } - continue replab0; - } - $this.cursor = v_1; - break replab0; - } - return true; -}; - -SpanishStemmer.r_postlude$LSpanishStemmer$ = SpanishStemmer$r_postlude$LSpanishStemmer$; - -SpanishStemmer.prototype.r_RV$ = function () { - return (! (this.I_pV <= this.cursor) ? false : true); -}; - -SpanishStemmer.prototype.r_RV = SpanishStemmer.prototype.r_RV$; - -function SpanishStemmer$r_RV$LSpanishStemmer$($this) { - return (! ($this.I_pV <= $this.cursor) ? false : true); -}; - -SpanishStemmer.r_RV$LSpanishStemmer$ = SpanishStemmer$r_RV$LSpanishStemmer$; - -SpanishStemmer.prototype.r_R1$ = function () { - return (! (this.I_p1 <= this.cursor) ? false : true); -}; - -SpanishStemmer.prototype.r_R1 = SpanishStemmer.prototype.r_R1$; - -function SpanishStemmer$r_R1$LSpanishStemmer$($this) { - return (! ($this.I_p1 <= $this.cursor) ? false : true); -}; - -SpanishStemmer.r_R1$LSpanishStemmer$ = SpanishStemmer$r_R1$LSpanishStemmer$; - -SpanishStemmer.prototype.r_R2$ = function () { - return (! (this.I_p2 <= this.cursor) ? false : true); -}; - -SpanishStemmer.prototype.r_R2 = SpanishStemmer.prototype.r_R2$; - -function SpanishStemmer$r_R2$LSpanishStemmer$($this) { - return (! ($this.I_p2 <= $this.cursor) ? false : true); -}; - -SpanishStemmer.r_R2$LSpanishStemmer$ = SpanishStemmer$r_R2$LSpanishStemmer$; - -SpanishStemmer.prototype.r_attached_pronoun$ = function () { - var among_var; - this.ket = this.cursor; - if (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, SpanishStemmer.a_1, 13) === 0) { - return false; - } - this.bra = this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, SpanishStemmer.a_2, 11); - if (among_var === 0) { - return false; - } - if (! (! (this.I_pV <= this.cursor) ? false : true)) { - return false; - } - switch (among_var) { - case 0: - return false; - case 1: - this.bra = this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "iendo")) { - return false; - } - break; - case 2: - this.bra = this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "ando")) { - return false; - } - break; - case 3: - this.bra = this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "ar")) { - return false; - } - break; - case 4: - this.bra = this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "er")) { - return false; - } - break; - case 5: - this.bra = this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "ir")) { - return false; - } - break; - case 6: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 7: - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "u")) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - } - return true; -}; - -SpanishStemmer.prototype.r_attached_pronoun = SpanishStemmer.prototype.r_attached_pronoun$; - -function SpanishStemmer$r_attached_pronoun$LSpanishStemmer$($this) { - var among_var; - $this.ket = $this.cursor; - if (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, SpanishStemmer.a_1, 13) === 0) { - return false; - } - $this.bra = $this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, SpanishStemmer.a_2, 11); - if (among_var === 0) { - return false; - } - if (! (! ($this.I_pV <= $this.cursor) ? false : true)) { - return false; - } - switch (among_var) { - case 0: - return false; - case 1: - $this.bra = $this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "iendo")) { - return false; - } - break; - case 2: - $this.bra = $this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "ando")) { - return false; - } - break; - case 3: - $this.bra = $this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "ar")) { - return false; - } - break; - case 4: - $this.bra = $this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "er")) { - return false; - } - break; - case 5: - $this.bra = $this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "ir")) { - return false; - } - break; - case 6: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 7: - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "u")) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - } - return true; -}; - -SpanishStemmer.r_attached_pronoun$LSpanishStemmer$ = SpanishStemmer$r_attached_pronoun$LSpanishStemmer$; - -SpanishStemmer.prototype.r_standard_suffix$ = function () { - var among_var; - var v_1; - var v_2; - var v_3; - var v_4; - var v_5; - var lab0; - var lab1; - var lab2; - var lab3; - var lab4; - var cursor$0; - var cursor$1; - var cursor$2; - var cursor$3; - this.ket = this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, SpanishStemmer.a_6, 46); - if (among_var === 0) { - return false; - } - this.bra = this.cursor; - switch (among_var) { - case 0: - return false; - case 1: - if (! (! (this.I_p2 <= this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 2: - if (! (! (this.I_p2 <= this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - v_1 = ((this.limit - this.cursor) | 0); - lab0 = true; - lab0: - while (lab0 === true) { - lab0 = false; - this.ket = this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 2, "ic")) { - this.cursor = ((this.limit - v_1) | 0); - break lab0; - } - this.bra = cursor$0 = this.cursor; - if (! (! (this.I_p2 <= cursor$0) ? false : true)) { - this.cursor = ((this.limit - v_1) | 0); - break lab0; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - } - break; - case 3: - if (! (! (this.I_p2 <= this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "log")) { - return false; - } - break; - case 4: - if (! (! (this.I_p2 <= this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "u")) { - return false; - } - break; - case 5: - if (! (! (this.I_p2 <= this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "ente")) { - return false; - } - break; - case 6: - if (! (! (this.I_p1 <= this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - v_2 = ((this.limit - this.cursor) | 0); - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - this.ket = this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, SpanishStemmer.a_3, 4); - if (among_var === 0) { - this.cursor = ((this.limit - v_2) | 0); - break lab1; - } - this.bra = cursor$1 = this.cursor; - if (! (! (this.I_p2 <= cursor$1) ? false : true)) { - this.cursor = ((this.limit - v_2) | 0); - break lab1; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - switch (among_var) { - case 0: - this.cursor = ((this.limit - v_2) | 0); - break lab1; - case 1: - this.ket = this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 2, "at")) { - this.cursor = ((this.limit - v_2) | 0); - break lab1; - } - this.bra = cursor$2 = this.cursor; - if (! (! (this.I_p2 <= cursor$2) ? false : true)) { - this.cursor = ((this.limit - v_2) | 0); - break lab1; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - } - } - break; - case 7: - if (! (! (this.I_p2 <= this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - v_3 = ((this.limit - this.cursor) | 0); - lab2 = true; - lab2: - while (lab2 === true) { - lab2 = false; - this.ket = this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, SpanishStemmer.a_4, 3); - if (among_var === 0) { - this.cursor = ((this.limit - v_3) | 0); - break lab2; - } - this.bra = this.cursor; - switch (among_var) { - case 0: - this.cursor = ((this.limit - v_3) | 0); - break lab2; - case 1: - if (! (! (this.I_p2 <= this.cursor) ? false : true)) { - this.cursor = ((this.limit - v_3) | 0); - break lab2; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - } - } - break; - case 8: - if (! (! (this.I_p2 <= this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - v_4 = ((this.limit - this.cursor) | 0); - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - this.ket = this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, SpanishStemmer.a_5, 3); - if (among_var === 0) { - this.cursor = ((this.limit - v_4) | 0); - break lab3; - } - this.bra = this.cursor; - switch (among_var) { - case 0: - this.cursor = ((this.limit - v_4) | 0); - break lab3; - case 1: - if (! (! (this.I_p2 <= this.cursor) ? false : true)) { - this.cursor = ((this.limit - v_4) | 0); - break lab3; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - } - } - break; - case 9: - if (! (! (this.I_p2 <= this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - v_5 = ((this.limit - this.cursor) | 0); - lab4 = true; - lab4: - while (lab4 === true) { - lab4 = false; - this.ket = this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 2, "at")) { - this.cursor = ((this.limit - v_5) | 0); - break lab4; - } - this.bra = cursor$3 = this.cursor; - if (! (! (this.I_p2 <= cursor$3) ? false : true)) { - this.cursor = ((this.limit - v_5) | 0); - break lab4; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - } - break; - } - return true; -}; - -SpanishStemmer.prototype.r_standard_suffix = SpanishStemmer.prototype.r_standard_suffix$; - -function SpanishStemmer$r_standard_suffix$LSpanishStemmer$($this) { - var among_var; - var v_1; - var v_2; - var v_3; - var v_4; - var v_5; - var lab0; - var lab1; - var lab2; - var lab3; - var lab4; - var cursor$0; - var cursor$1; - var cursor$2; - var cursor$3; - $this.ket = $this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, SpanishStemmer.a_6, 46); - if (among_var === 0) { - return false; - } - $this.bra = $this.cursor; - switch (among_var) { - case 0: - return false; - case 1: - if (! (! ($this.I_p2 <= $this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 2: - if (! (! ($this.I_p2 <= $this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - v_1 = (($this.limit - $this.cursor) | 0); - lab0 = true; - lab0: - while (lab0 === true) { - lab0 = false; - $this.ket = $this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 2, "ic")) { - $this.cursor = (($this.limit - v_1) | 0); - break lab0; - } - $this.bra = cursor$0 = $this.cursor; - if (! (! ($this.I_p2 <= cursor$0) ? false : true)) { - $this.cursor = (($this.limit - v_1) | 0); - break lab0; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - } - break; - case 3: - if (! (! ($this.I_p2 <= $this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "log")) { - return false; - } - break; - case 4: - if (! (! ($this.I_p2 <= $this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "u")) { - return false; - } - break; - case 5: - if (! (! ($this.I_p2 <= $this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "ente")) { - return false; - } - break; - case 6: - if (! (! ($this.I_p1 <= $this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - v_2 = (($this.limit - $this.cursor) | 0); - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - $this.ket = $this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, SpanishStemmer.a_3, 4); - if (among_var === 0) { - $this.cursor = (($this.limit - v_2) | 0); - break lab1; - } - $this.bra = cursor$1 = $this.cursor; - if (! (! ($this.I_p2 <= cursor$1) ? false : true)) { - $this.cursor = (($this.limit - v_2) | 0); - break lab1; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - switch (among_var) { - case 0: - $this.cursor = (($this.limit - v_2) | 0); - break lab1; - case 1: - $this.ket = $this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 2, "at")) { - $this.cursor = (($this.limit - v_2) | 0); - break lab1; - } - $this.bra = cursor$2 = $this.cursor; - if (! (! ($this.I_p2 <= cursor$2) ? false : true)) { - $this.cursor = (($this.limit - v_2) | 0); - break lab1; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - } - } - break; - case 7: - if (! (! ($this.I_p2 <= $this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - v_3 = (($this.limit - $this.cursor) | 0); - lab2 = true; - lab2: - while (lab2 === true) { - lab2 = false; - $this.ket = $this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, SpanishStemmer.a_4, 3); - if (among_var === 0) { - $this.cursor = (($this.limit - v_3) | 0); - break lab2; - } - $this.bra = $this.cursor; - switch (among_var) { - case 0: - $this.cursor = (($this.limit - v_3) | 0); - break lab2; - case 1: - if (! (! ($this.I_p2 <= $this.cursor) ? false : true)) { - $this.cursor = (($this.limit - v_3) | 0); - break lab2; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - } - } - break; - case 8: - if (! (! ($this.I_p2 <= $this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - v_4 = (($this.limit - $this.cursor) | 0); - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - $this.ket = $this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, SpanishStemmer.a_5, 3); - if (among_var === 0) { - $this.cursor = (($this.limit - v_4) | 0); - break lab3; - } - $this.bra = $this.cursor; - switch (among_var) { - case 0: - $this.cursor = (($this.limit - v_4) | 0); - break lab3; - case 1: - if (! (! ($this.I_p2 <= $this.cursor) ? false : true)) { - $this.cursor = (($this.limit - v_4) | 0); - break lab3; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - } - } - break; - case 9: - if (! (! ($this.I_p2 <= $this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - v_5 = (($this.limit - $this.cursor) | 0); - lab4 = true; - lab4: - while (lab4 === true) { - lab4 = false; - $this.ket = $this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 2, "at")) { - $this.cursor = (($this.limit - v_5) | 0); - break lab4; - } - $this.bra = cursor$3 = $this.cursor; - if (! (! ($this.I_p2 <= cursor$3) ? false : true)) { - $this.cursor = (($this.limit - v_5) | 0); - break lab4; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - } - break; - } - return true; -}; - -SpanishStemmer.r_standard_suffix$LSpanishStemmer$ = SpanishStemmer$r_standard_suffix$LSpanishStemmer$; - -SpanishStemmer.prototype.r_y_verb_suffix$ = function () { - var among_var; - var v_1; - var v_2; - var cursor$0; - var cursor$1; - var cursor$2; - v_1 = ((this.limit - (cursor$0 = this.cursor)) | 0); - if (cursor$0 < this.I_pV) { - return false; - } - cursor$1 = this.cursor = this.I_pV; - v_2 = this.limit_backward; - this.limit_backward = cursor$1; - cursor$2 = this.cursor = ((this.limit - v_1) | 0); - this.ket = cursor$2; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, SpanishStemmer.a_7, 12); - if (among_var === 0) { - this.limit_backward = v_2; - return false; - } - this.bra = this.cursor; - this.limit_backward = v_2; - switch (among_var) { - case 0: - return false; - case 1: - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "u")) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - } - return true; -}; - -SpanishStemmer.prototype.r_y_verb_suffix = SpanishStemmer.prototype.r_y_verb_suffix$; - -function SpanishStemmer$r_y_verb_suffix$LSpanishStemmer$($this) { - var among_var; - var v_1; - var v_2; - var cursor$0; - var cursor$1; - var cursor$2; - v_1 = (($this.limit - (cursor$0 = $this.cursor)) | 0); - if (cursor$0 < $this.I_pV) { - return false; - } - cursor$1 = $this.cursor = $this.I_pV; - v_2 = $this.limit_backward; - $this.limit_backward = cursor$1; - cursor$2 = $this.cursor = (($this.limit - v_1) | 0); - $this.ket = cursor$2; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, SpanishStemmer.a_7, 12); - if (among_var === 0) { - $this.limit_backward = v_2; - return false; - } - $this.bra = $this.cursor; - $this.limit_backward = v_2; - switch (among_var) { - case 0: - return false; - case 1: - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "u")) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - } - return true; -}; - -SpanishStemmer.r_y_verb_suffix$LSpanishStemmer$ = SpanishStemmer$r_y_verb_suffix$LSpanishStemmer$; - -SpanishStemmer.prototype.r_verb_suffix$ = function () { - var among_var; - var v_1; - var v_2; - var v_3; - var v_4; - var lab0; - var cursor$0; - var cursor$1; - var cursor$2; - v_1 = ((this.limit - (cursor$0 = this.cursor)) | 0); - if (cursor$0 < this.I_pV) { - return false; - } - cursor$1 = this.cursor = this.I_pV; - v_2 = this.limit_backward; - this.limit_backward = cursor$1; - cursor$2 = this.cursor = ((this.limit - v_1) | 0); - this.ket = cursor$2; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, SpanishStemmer.a_8, 96); - if (among_var === 0) { - this.limit_backward = v_2; - return false; - } - this.bra = this.cursor; - this.limit_backward = v_2; - switch (among_var) { - case 0: - return false; - case 1: - v_3 = ((this.limit - this.cursor) | 0); - lab0 = true; - lab0: - while (lab0 === true) { - lab0 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "u")) { - this.cursor = ((this.limit - v_3) | 0); - break lab0; - } - v_4 = ((this.limit - this.cursor) | 0); - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "g")) { - this.cursor = ((this.limit - v_3) | 0); - break lab0; - } - this.cursor = ((this.limit - v_4) | 0); - } - this.bra = this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - } - return true; -}; - -SpanishStemmer.prototype.r_verb_suffix = SpanishStemmer.prototype.r_verb_suffix$; - -function SpanishStemmer$r_verb_suffix$LSpanishStemmer$($this) { - var among_var; - var v_1; - var v_2; - var v_3; - var v_4; - var lab0; - var cursor$0; - var cursor$1; - var cursor$2; - v_1 = (($this.limit - (cursor$0 = $this.cursor)) | 0); - if (cursor$0 < $this.I_pV) { - return false; - } - cursor$1 = $this.cursor = $this.I_pV; - v_2 = $this.limit_backward; - $this.limit_backward = cursor$1; - cursor$2 = $this.cursor = (($this.limit - v_1) | 0); - $this.ket = cursor$2; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, SpanishStemmer.a_8, 96); - if (among_var === 0) { - $this.limit_backward = v_2; - return false; - } - $this.bra = $this.cursor; - $this.limit_backward = v_2; - switch (among_var) { - case 0: - return false; - case 1: - v_3 = (($this.limit - $this.cursor) | 0); - lab0 = true; - lab0: - while (lab0 === true) { - lab0 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "u")) { - $this.cursor = (($this.limit - v_3) | 0); - break lab0; - } - v_4 = (($this.limit - $this.cursor) | 0); - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "g")) { - $this.cursor = (($this.limit - v_3) | 0); - break lab0; - } - $this.cursor = (($this.limit - v_4) | 0); - } - $this.bra = $this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - } - return true; -}; - -SpanishStemmer.r_verb_suffix$LSpanishStemmer$ = SpanishStemmer$r_verb_suffix$LSpanishStemmer$; - -SpanishStemmer.prototype.r_residual_suffix$ = function () { - var among_var; - var v_1; - var v_2; - var lab0; - var cursor$0; - var cursor$1; - this.ket = this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, SpanishStemmer.a_9, 8); - if (among_var === 0) { - return false; - } - this.bra = this.cursor; - switch (among_var) { - case 0: - return false; - case 1: - if (! (! (this.I_pV <= this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 2: - if (! (! (this.I_pV <= this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - v_1 = ((this.limit - this.cursor) | 0); - lab0 = true; - lab0: - while (lab0 === true) { - lab0 = false; - this.ket = this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "u")) { - this.cursor = ((this.limit - v_1) | 0); - break lab0; - } - this.bra = cursor$0 = this.cursor; - v_2 = ((this.limit - cursor$0) | 0); - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "g")) { - this.cursor = ((this.limit - v_1) | 0); - break lab0; - } - cursor$1 = this.cursor = ((this.limit - v_2) | 0); - if (! (! (this.I_pV <= cursor$1) ? false : true)) { - this.cursor = ((this.limit - v_1) | 0); - break lab0; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - } - break; - } - return true; -}; - -SpanishStemmer.prototype.r_residual_suffix = SpanishStemmer.prototype.r_residual_suffix$; - -function SpanishStemmer$r_residual_suffix$LSpanishStemmer$($this) { - var among_var; - var v_1; - var v_2; - var lab0; - var cursor$0; - var cursor$1; - $this.ket = $this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, SpanishStemmer.a_9, 8); - if (among_var === 0) { - return false; - } - $this.bra = $this.cursor; - switch (among_var) { - case 0: - return false; - case 1: - if (! (! ($this.I_pV <= $this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 2: - if (! (! ($this.I_pV <= $this.cursor) ? false : true)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - v_1 = (($this.limit - $this.cursor) | 0); - lab0 = true; - lab0: - while (lab0 === true) { - lab0 = false; - $this.ket = $this.cursor; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "u")) { - $this.cursor = (($this.limit - v_1) | 0); - break lab0; - } - $this.bra = cursor$0 = $this.cursor; - v_2 = (($this.limit - cursor$0) | 0); - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "g")) { - $this.cursor = (($this.limit - v_1) | 0); - break lab0; - } - cursor$1 = $this.cursor = (($this.limit - v_2) | 0); - if (! (! ($this.I_pV <= cursor$1) ? false : true)) { - $this.cursor = (($this.limit - v_1) | 0); - break lab0; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - } - break; - } - return true; -}; - -SpanishStemmer.r_residual_suffix$LSpanishStemmer$ = SpanishStemmer$r_residual_suffix$LSpanishStemmer$; - -SpanishStemmer.prototype.stem$ = function () { - var v_1; - var v_2; - var v_3; - var v_4; - var v_6; - var lab0; - var lab1; - var lab2; - var lab3; - var lab4; - var lab5; - var lab6; - var lab7; - var cursor$0; - var limit$0; - var cursor$1; - var limit$1; - var cursor$2; - var cursor$3; - v_1 = this.cursor; - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - if (! SpanishStemmer$r_mark_regions$LSpanishStemmer$(this)) { - break lab0; - } - } - cursor$0 = this.cursor = v_1; - this.limit_backward = cursor$0; - cursor$1 = this.cursor = limit$0 = this.limit; - v_2 = ((limit$0 - cursor$1) | 0); - lab1 = true; -lab1: - while (lab1 === true) { - lab1 = false; - if (! SpanishStemmer$r_attached_pronoun$LSpanishStemmer$(this)) { - break lab1; - } - } - cursor$2 = this.cursor = (((limit$1 = this.limit) - v_2) | 0); - v_3 = ((limit$1 - cursor$2) | 0); - lab2 = true; -lab2: - while (lab2 === true) { - lab2 = false; - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - v_4 = ((this.limit - this.cursor) | 0); - lab4 = true; - lab4: - while (lab4 === true) { - lab4 = false; - if (! SpanishStemmer$r_standard_suffix$LSpanishStemmer$(this)) { - break lab4; - } - break lab3; - } - this.cursor = ((this.limit - v_4) | 0); - lab5 = true; - lab5: - while (lab5 === true) { - lab5 = false; - if (! SpanishStemmer$r_y_verb_suffix$LSpanishStemmer$(this)) { - break lab5; - } - break lab3; - } - this.cursor = ((this.limit - v_4) | 0); - if (! SpanishStemmer$r_verb_suffix$LSpanishStemmer$(this)) { - break lab2; - } - } - } - this.cursor = ((this.limit - v_3) | 0); - lab6 = true; -lab6: - while (lab6 === true) { - lab6 = false; - if (! SpanishStemmer$r_residual_suffix$LSpanishStemmer$(this)) { - break lab6; - } - } - cursor$3 = this.cursor = this.limit_backward; - v_6 = cursor$3; - lab7 = true; -lab7: - while (lab7 === true) { - lab7 = false; - if (! SpanishStemmer$r_postlude$LSpanishStemmer$(this)) { - break lab7; - } - } - this.cursor = v_6; - return true; -}; - -SpanishStemmer.prototype.stem = SpanishStemmer.prototype.stem$; - -SpanishStemmer.prototype.equals$X = function (o) { - return o instanceof SpanishStemmer; -}; - -SpanishStemmer.prototype.equals = SpanishStemmer.prototype.equals$X; - -function SpanishStemmer$equals$LSpanishStemmer$X($this, o) { - return o instanceof SpanishStemmer; -}; - -SpanishStemmer.equals$LSpanishStemmer$X = SpanishStemmer$equals$LSpanishStemmer$X; - -SpanishStemmer.prototype.hashCode$ = function () { - var classname; - var hash; - var i; - var char; - classname = "SpanishStemmer"; - hash = 0; - for (i = 0; i < classname.length; i++) { - char = classname.charCodeAt(i); - hash = (hash << 5) - hash + char; - hash = hash & hash; - } - return (hash | 0); -}; - -SpanishStemmer.prototype.hashCode = SpanishStemmer.prototype.hashCode$; - -function SpanishStemmer$hashCode$LSpanishStemmer$($this) { - var classname; - var hash; - var i; - var char; - classname = "SpanishStemmer"; - hash = 0; - for (i = 0; i < classname.length; i++) { - char = classname.charCodeAt(i); - hash = (hash << 5) - hash + char; - hash = hash & hash; - } - return (hash | 0); -}; - -SpanishStemmer.hashCode$LSpanishStemmer$ = SpanishStemmer$hashCode$LSpanishStemmer$; - -SpanishStemmer.serialVersionUID = 1; -$__jsx_lazy_init(SpanishStemmer, "methodObject", function () { - return new SpanishStemmer(); -}); -$__jsx_lazy_init(SpanishStemmer, "a_0", function () { - return [ new Among("", -1, 6), new Among("\u00E1", 0, 1), new Among("\u00E9", 0, 2), new Among("\u00ED", 0, 3), new Among("\u00F3", 0, 4), new Among("\u00FA", 0, 5) ]; -}); -$__jsx_lazy_init(SpanishStemmer, "a_1", function () { - return [ new Among("la", -1, -1), new Among("sela", 0, -1), new Among("le", -1, -1), new Among("me", -1, -1), new Among("se", -1, -1), new Among("lo", -1, -1), new Among("selo", 5, -1), new Among("las", -1, -1), new Among("selas", 7, -1), new Among("les", -1, -1), new Among("los", -1, -1), new Among("selos", 10, -1), new Among("nos", -1, -1) ]; -}); -$__jsx_lazy_init(SpanishStemmer, "a_2", function () { - return [ new Among("ando", -1, 6), new Among("iendo", -1, 6), new Among("yendo", -1, 7), new Among("\u00E1ndo", -1, 2), new Among("i\u00E9ndo", -1, 1), new Among("ar", -1, 6), new Among("er", -1, 6), new Among("ir", -1, 6), new Among("\u00E1r", -1, 3), new Among("\u00E9r", -1, 4), new Among("\u00EDr", -1, 5) ]; -}); -$__jsx_lazy_init(SpanishStemmer, "a_3", function () { - return [ new Among("ic", -1, -1), new Among("ad", -1, -1), new Among("os", -1, -1), new Among("iv", -1, 1) ]; -}); -$__jsx_lazy_init(SpanishStemmer, "a_4", function () { - return [ new Among("able", -1, 1), new Among("ible", -1, 1), new Among("ante", -1, 1) ]; -}); -$__jsx_lazy_init(SpanishStemmer, "a_5", function () { - return [ new Among("ic", -1, 1), new Among("abil", -1, 1), new Among("iv", -1, 1) ]; -}); -$__jsx_lazy_init(SpanishStemmer, "a_6", function () { - return [ new Among("ica", -1, 1), new Among("ancia", -1, 2), new Among("encia", -1, 5), new Among("adora", -1, 2), new Among("osa", -1, 1), new Among("ista", -1, 1), new Among("iva", -1, 9), new Among("anza", -1, 1), new Among("log\u00EDa", -1, 3), new Among("idad", -1, 8), new Among("able", -1, 1), new Among("ible", -1, 1), new Among("ante", -1, 2), new Among("mente", -1, 7), new Among("amente", 13, 6), new Among("aci\u00F3n", -1, 2), new Among("uci\u00F3n", -1, 4), new Among("ico", -1, 1), new Among("ismo", -1, 1), new Among("oso", -1, 1), new Among("amiento", -1, 1), new Among("imiento", -1, 1), new Among("ivo", -1, 9), new Among("ador", -1, 2), new Among("icas", -1, 1), new Among("ancias", -1, 2), new Among("encias", -1, 5), new Among("adoras", -1, 2), new Among("osas", -1, 1), new Among("istas", -1, 1), new Among("ivas", -1, 9), new Among("anzas", -1, 1), new Among("log\u00EDas", -1, 3), new Among("idades", -1, 8), new Among("ables", -1, 1), new Among("ibles", -1, 1), new Among("aciones", -1, 2), new Among("uciones", -1, 4), new Among("adores", -1, 2), new Among("antes", -1, 2), new Among("icos", -1, 1), new Among("ismos", -1, 1), new Among("osos", -1, 1), new Among("amientos", -1, 1), new Among("imientos", -1, 1), new Among("ivos", -1, 9) ]; -}); -$__jsx_lazy_init(SpanishStemmer, "a_7", function () { - return [ new Among("ya", -1, 1), new Among("ye", -1, 1), new Among("yan", -1, 1), new Among("yen", -1, 1), new Among("yeron", -1, 1), new Among("yendo", -1, 1), new Among("yo", -1, 1), new Among("yas", -1, 1), new Among("yes", -1, 1), new Among("yais", -1, 1), new Among("yamos", -1, 1), new Among("y\u00F3", -1, 1) ]; -}); -$__jsx_lazy_init(SpanishStemmer, "a_8", function () { - return [ new Among("aba", -1, 2), new Among("ada", -1, 2), new Among("ida", -1, 2), new Among("ara", -1, 2), new Among("iera", -1, 2), new Among("\u00EDa", -1, 2), new Among("ar\u00EDa", 5, 2), new Among("er\u00EDa", 5, 2), new Among("ir\u00EDa", 5, 2), new Among("ad", -1, 2), new Among("ed", -1, 2), new Among("id", -1, 2), new Among("ase", -1, 2), new Among("iese", -1, 2), new Among("aste", -1, 2), new Among("iste", -1, 2), new Among("an", -1, 2), new Among("aban", 16, 2), new Among("aran", 16, 2), new Among("ieran", 16, 2), new Among("\u00EDan", 16, 2), new Among("ar\u00EDan", 20, 2), new Among("er\u00EDan", 20, 2), new Among("ir\u00EDan", 20, 2), new Among("en", -1, 1), new Among("asen", 24, 2), new Among("iesen", 24, 2), new Among("aron", -1, 2), new Among("ieron", -1, 2), new Among("ar\u00E1n", -1, 2), new Among("er\u00E1n", -1, 2), new Among("ir\u00E1n", -1, 2), new Among("ado", -1, 2), new Among("ido", -1, 2), new Among("ando", -1, 2), new Among("iendo", -1, 2), new Among("ar", -1, 2), new Among("er", -1, 2), new Among("ir", -1, 2), new Among("as", -1, 2), new Among("abas", 39, 2), new Among("adas", 39, 2), new Among("idas", 39, 2), new Among("aras", 39, 2), new Among("ieras", 39, 2), new Among("\u00EDas", 39, 2), new Among("ar\u00EDas", 45, 2), new Among("er\u00EDas", 45, 2), new Among("ir\u00EDas", 45, 2), new Among("es", -1, 1), new Among("ases", 49, 2), new Among("ieses", 49, 2), new Among("abais", -1, 2), new Among("arais", -1, 2), new Among("ierais", -1, 2), new Among("\u00EDais", -1, 2), new Among("ar\u00EDais", 55, 2), new Among("er\u00EDais", 55, 2), new Among("ir\u00EDais", 55, 2), new Among("aseis", -1, 2), new Among("ieseis", -1, 2), new Among("asteis", -1, 2), new Among("isteis", -1, 2), new Among("\u00E1is", -1, 2), new Among("\u00E9is", -1, 1), new Among("ar\u00E9is", 64, 2), new Among("er\u00E9is", 64, 2), new Among("ir\u00E9is", 64, 2), new Among("ados", -1, 2), new Among("idos", -1, 2), new Among("amos", -1, 2), new Among("\u00E1bamos", 70, 2), new Among("\u00E1ramos", 70, 2), new Among("i\u00E9ramos", 70, 2), new Among("\u00EDamos", 70, 2), new Among("ar\u00EDamos", 74, 2), new Among("er\u00EDamos", 74, 2), new Among("ir\u00EDamos", 74, 2), new Among("emos", -1, 1), new Among("aremos", 78, 2), new Among("eremos", 78, 2), new Among("iremos", 78, 2), new Among("\u00E1semos", 78, 2), new Among("i\u00E9semos", 78, 2), new Among("imos", -1, 2), new Among("ar\u00E1s", -1, 2), new Among("er\u00E1s", -1, 2), new Among("ir\u00E1s", -1, 2), new Among("\u00EDs", -1, 2), new Among("ar\u00E1", -1, 2), new Among("er\u00E1", -1, 2), new Among("ir\u00E1", -1, 2), new Among("ar\u00E9", -1, 2), new Among("er\u00E9", -1, 2), new Among("ir\u00E9", -1, 2), new Among("i\u00F3", -1, 2) ]; -}); -$__jsx_lazy_init(SpanishStemmer, "a_9", function () { - return [ new Among("a", -1, 1), new Among("e", -1, 2), new Among("o", -1, 1), new Among("os", -1, 1), new Among("\u00E1", -1, 1), new Among("\u00E9", -1, 2), new Among("\u00ED", -1, 1), new Among("\u00F3", -1, 1) ]; -}); -SpanishStemmer.g_v = [ 17, 65, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 17, 4, 10 ]; - -var $__jsx_classMap = { - "src/among.jsx": { - Among: Among, - Among$SII: Among, - Among$SIIF$LBaseStemmer$B$LBaseStemmer$: Among$0 - }, - "src/stemmer.jsx": { - Stemmer: Stemmer, - Stemmer$: Stemmer - }, - "src/base-stemmer.jsx": { - BaseStemmer: BaseStemmer, - BaseStemmer$: BaseStemmer - }, - "src/spanish-stemmer.jsx": { - SpanishStemmer: SpanishStemmer, - SpanishStemmer$: SpanishStemmer - } -}; - - -})(JSX); - -var Among = JSX.require("src/among.jsx").Among; -var Among$SII = JSX.require("src/among.jsx").Among$SII; -var Stemmer = JSX.require("src/stemmer.jsx").Stemmer; -var BaseStemmer = JSX.require("src/base-stemmer.jsx").BaseStemmer; -var SpanishStemmer = JSX.require("src/spanish-stemmer.jsx").SpanishStemmer; diff --git a/sphinx/search/non-minified-js/swedish-stemmer.js b/sphinx/search/non-minified-js/swedish-stemmer.js index 1d8aba8f42e..4d7d49fc0e5 100644 --- a/sphinx/search/non-minified-js/swedish-stemmer.js +++ b/sphinx/search/non-minified-js/swedish-stemmer.js @@ -1,1743 +1,265 @@ -// generatedy by JSX compiler 0.9.89 (2014-05-20 06:01:03 +0900; 8e8c6105f36f3dfe440ea026a3c93a3444977102) -var JSX = {}; -(function (JSX) { -/** - * extends the class - */ -function $__jsx_extend(derivations, base) { - var ctor = function () {}; - ctor.prototype = base.prototype; - var proto = new ctor(); - for (var i in derivations) { - derivations[i].prototype = proto; - } -} - -/** - * copies the implementations from source interface to target - */ -function $__jsx_merge_interface(target, source) { - for (var k in source.prototype) - if (source.prototype.hasOwnProperty(k)) - target.prototype[k] = source.prototype[k]; -} - -/** - * defers the initialization of the property - */ -function $__jsx_lazy_init(obj, prop, func) { - function reset(obj, prop, value) { - delete obj[prop]; - obj[prop] = value; - return value; - } - - Object.defineProperty(obj, prop, { - get: function () { - return reset(obj, prop, func()); - }, - set: function (v) { - reset(obj, prop, v); - }, - enumerable: true, - configurable: true - }); -} - -var $__jsx_imul = Math.imul; -if (typeof $__jsx_imul === "undefined") { - $__jsx_imul = function (a, b) { - var ah = (a >>> 16) & 0xffff; - var al = a & 0xffff; - var bh = (b >>> 16) & 0xffff; - var bl = b & 0xffff; - return ((al * bl) + (((ah * bl + al * bh) << 16) >>> 0)|0); - }; -} - -/** - * fused int-ops with side-effects - */ -function $__jsx_ipadd(o, p, r) { - return o[p] = (o[p] + r) | 0; -} -function $__jsx_ipsub(o, p, r) { - return o[p] = (o[p] - r) | 0; -} -function $__jsx_ipmul(o, p, r) { - return o[p] = $__jsx_imul(o[p], r); -} -function $__jsx_ipdiv(o, p, r) { - return o[p] = (o[p] / r) | 0; -} -function $__jsx_ipmod(o, p, r) { - return o[p] = (o[p] % r) | 0; -} -function $__jsx_ippostinc(o, p) { - var v = o[p]; - o[p] = (v + 1) | 0; - return v; -} -function $__jsx_ippostdec(o, p) { - var v = o[p]; - o[p] = (v - 1) | 0; - return v; -} - -/** - * non-inlined version of Array#each - */ -function $__jsx_forEach(o, f) { - var l = o.length; - for (var i = 0; i < l; ++i) - f(o[i]); -} - -/* - * global functions, renamed to avoid conflict with local variable names - */ -var $__jsx_parseInt = parseInt; -var $__jsx_parseFloat = parseFloat; -function $__jsx_isNaN(n) { return n !== n; } -var $__jsx_isFinite = isFinite; - -var $__jsx_encodeURIComponent = encodeURIComponent; -var $__jsx_decodeURIComponent = decodeURIComponent; -var $__jsx_encodeURI = encodeURI; -var $__jsx_decodeURI = decodeURI; - -var $__jsx_ObjectToString = Object.prototype.toString; -var $__jsx_ObjectHasOwnProperty = Object.prototype.hasOwnProperty; - -/* - * profiler object, initialized afterwards - */ -function $__jsx_profiler() { -} - -/* - * public interface to JSX code - */ -JSX.require = function (path) { - var m = $__jsx_classMap[path]; - return m !== undefined ? m : null; -}; - -JSX.profilerIsRunning = function () { - return $__jsx_profiler.getResults != null; -}; - -JSX.getProfileResults = function () { - return ($__jsx_profiler.getResults || function () { return {}; })(); -}; - -JSX.postProfileResults = function (url, cb) { - if ($__jsx_profiler.postResults == null) - throw new Error("profiler has not been turned on"); - return $__jsx_profiler.postResults(url, cb); -}; - -JSX.resetProfileResults = function () { - if ($__jsx_profiler.resetResults == null) - throw new Error("profiler has not been turned on"); - return $__jsx_profiler.resetResults(); -}; -JSX.DEBUG = false; -var GeneratorFunction$0 = -(function () { - try { - return Function('import {GeneratorFunction} from "std:iteration"; return GeneratorFunction')(); - } catch (e) { - return function GeneratorFunction () {}; - } -})(); -var __jsx_generator_object$0 = -(function () { - function __jsx_generator_object() { - this.__next = 0; - this.__loop = null; - this.__seed = null; - this.__value = undefined; - this.__status = 0; // SUSPENDED: 0, ACTIVE: 1, DEAD: 2 - } - - __jsx_generator_object.prototype.next = function (seed) { - switch (this.__status) { - case 0: - this.__status = 1; - this.__seed = seed; - - // go next! - this.__loop(this.__next); - - var done = false; - if (this.__next != -1) { - this.__status = 0; - } else { - this.__status = 2; - done = true; - } - return { value: this.__value, done: done }; - case 1: - throw new Error("Generator is already running"); - case 2: - throw new Error("Generator is already finished"); - default: - throw new Error("Unexpected generator internal state"); - } - }; - - return __jsx_generator_object; -}()); -function Among(s, substring_i, result) { - this.s_size = s.length; - this.s = s; - this.substring_i = substring_i; - this.result = result; - this.method = null; - this.instance = null; -}; - -function Among$0(s, substring_i, result, method, instance) { - this.s_size = s.length; - this.s = s; - this.substring_i = substring_i; - this.result = result; - this.method = method; - this.instance = instance; -}; - -$__jsx_extend([Among, Among$0], Object); -function Stemmer() { -}; - -$__jsx_extend([Stemmer], Object); -function BaseStemmer() { - var current$0; - var cursor$0; - var limit$0; - this.cache = ({ }); - current$0 = this.current = ""; - cursor$0 = this.cursor = 0; - limit$0 = this.limit = current$0.length; - this.limit_backward = 0; - this.bra = cursor$0; - this.ket = limit$0; -}; - -$__jsx_extend([BaseStemmer], Stemmer); -BaseStemmer.prototype.setCurrent$S = function (value) { - var current$0; - var cursor$0; - var limit$0; - current$0 = this.current = value; - cursor$0 = this.cursor = 0; - limit$0 = this.limit = current$0.length; - this.limit_backward = 0; - this.bra = cursor$0; - this.ket = limit$0; -}; - - -function BaseStemmer$setCurrent$LBaseStemmer$S($this, value) { - var current$0; - var cursor$0; - var limit$0; - current$0 = $this.current = value; - cursor$0 = $this.cursor = 0; - limit$0 = $this.limit = current$0.length; - $this.limit_backward = 0; - $this.bra = cursor$0; - $this.ket = limit$0; -}; - -BaseStemmer.setCurrent$LBaseStemmer$S = BaseStemmer$setCurrent$LBaseStemmer$S; - -BaseStemmer.prototype.getCurrent$ = function () { - return this.current; -}; - - -function BaseStemmer$getCurrent$LBaseStemmer$($this) { - return $this.current; -}; - -BaseStemmer.getCurrent$LBaseStemmer$ = BaseStemmer$getCurrent$LBaseStemmer$; - -BaseStemmer.prototype.copy_from$LBaseStemmer$ = function (other) { - this.current = other.current; - this.cursor = other.cursor; - this.limit = other.limit; - this.limit_backward = other.limit_backward; - this.bra = other.bra; - this.ket = other.ket; -}; - - -function BaseStemmer$copy_from$LBaseStemmer$LBaseStemmer$($this, other) { - $this.current = other.current; - $this.cursor = other.cursor; - $this.limit = other.limit; - $this.limit_backward = other.limit_backward; - $this.bra = other.bra; - $this.ket = other.ket; -}; - -BaseStemmer.copy_from$LBaseStemmer$LBaseStemmer$ = BaseStemmer$copy_from$LBaseStemmer$LBaseStemmer$; - -BaseStemmer.prototype.in_grouping$AIII = function (s, min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor >= this.limit) { - return false; - } - ch = this.current.charCodeAt(this.cursor); - if (ch > max || ch < min) { - return false; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$in_grouping$LBaseStemmer$AIII($this, s, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor >= $this.limit) { - return false; - } - ch = $this.current.charCodeAt($this.cursor); - if (ch > max || ch < min) { - return false; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.in_grouping$LBaseStemmer$AIII = BaseStemmer$in_grouping$LBaseStemmer$AIII; - -BaseStemmer.prototype.in_grouping_b$AIII = function (s, min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor <= this.limit_backward) { - return false; - } - ch = this.current.charCodeAt(this.cursor - 1); - if (ch > max || ch < min) { - return false; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$in_grouping_b$LBaseStemmer$AIII($this, s, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor <= $this.limit_backward) { - return false; - } - ch = $this.current.charCodeAt($this.cursor - 1); - if (ch > max || ch < min) { - return false; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; +// Generated by Snowball 2.1.0 - https://snowballstem.org/ + +/**@constructor*/ +SwedishStemmer = function() { + var base = new BaseStemmer(); + /** @const */ var a_0 = [ + ["a", -1, 1], + ["arna", 0, 1], + ["erna", 0, 1], + ["heterna", 2, 1], + ["orna", 0, 1], + ["ad", -1, 1], + ["e", -1, 1], + ["ade", 6, 1], + ["ande", 6, 1], + ["arne", 6, 1], + ["are", 6, 1], + ["aste", 6, 1], + ["en", -1, 1], + ["anden", 12, 1], + ["aren", 12, 1], + ["heten", 12, 1], + ["ern", -1, 1], + ["ar", -1, 1], + ["er", -1, 1], + ["heter", 18, 1], + ["or", -1, 1], + ["s", -1, 2], + ["as", 21, 1], + ["arnas", 22, 1], + ["ernas", 22, 1], + ["ornas", 22, 1], + ["es", 21, 1], + ["ades", 26, 1], + ["andes", 26, 1], + ["ens", 21, 1], + ["arens", 29, 1], + ["hetens", 29, 1], + ["erns", 21, 1], + ["at", -1, 1], + ["andet", -1, 1], + ["het", -1, 1], + ["ast", -1, 1] + ]; + + /** @const */ var a_1 = [ + ["dd", -1, -1], + ["gd", -1, -1], + ["nn", -1, -1], + ["dt", -1, -1], + ["gt", -1, -1], + ["kt", -1, -1], + ["tt", -1, -1] + ]; + + /** @const */ var a_2 = [ + ["ig", -1, 1], + ["lig", 0, 1], + ["els", -1, 1], + ["fullt", -1, 3], + ["l\u00F6st", -1, 2] + ]; + + /** @const */ var /** Array */ g_v = [17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 32]; + + /** @const */ var /** Array */ g_s_ending = [119, 127, 149]; + + var /** number */ I_x = 0; + var /** number */ I_p1 = 0; + + + /** @return {boolean} */ + function r_mark_regions() { + I_p1 = base.limit; + var /** number */ v_1 = base.cursor; + { + var /** number */ c1 = base.cursor + 3; + if (c1 > base.limit) + { + return false; + } + base.cursor = c1; + } + I_x = base.cursor; + base.cursor = v_1; + golab0: while(true) + { + var /** number */ v_2 = base.cursor; + lab1: { + if (!(base.in_grouping(g_v, 97, 246))) + { + break lab1; + } + base.cursor = v_2; + break golab0; + } + base.cursor = v_2; + if (base.cursor >= base.limit) + { + return false; + } + base.cursor++; + } + golab2: while(true) + { + lab3: { + if (!(base.out_grouping(g_v, 97, 246))) + { + break lab3; + } + break golab2; + } + if (base.cursor >= base.limit) + { + return false; + } + base.cursor++; + } + I_p1 = base.cursor; + lab4: { + if (!(I_p1 < I_x)) + { + break lab4; + } + I_p1 = I_x; + } + return true; + }; + + /** @return {boolean} */ + function r_main_suffix() { + var /** number */ among_var; + if (base.cursor < I_p1) + { + return false; + } + var /** number */ v_2 = base.limit_backward; + base.limit_backward = I_p1; + base.ket = base.cursor; + among_var = base.find_among_b(a_0); + if (among_var == 0) + { + base.limit_backward = v_2; + return false; + } + base.bra = base.cursor; + base.limit_backward = v_2; + switch (among_var) { + case 1: + if (!base.slice_del()) + { + return false; + } + break; + case 2: + if (!(base.in_grouping_b(g_s_ending, 98, 121))) + { + return false; + } + if (!base.slice_del()) + { + return false; + } + break; + } + return true; + }; + + /** @return {boolean} */ + function r_consonant_pair() { + if (base.cursor < I_p1) + { + return false; + } + var /** number */ v_2 = base.limit_backward; + base.limit_backward = I_p1; + var /** number */ v_3 = base.limit - base.cursor; + if (base.find_among_b(a_1) == 0) + { + base.limit_backward = v_2; + return false; + } + base.cursor = base.limit - v_3; + base.ket = base.cursor; + if (base.cursor <= base.limit_backward) + { + base.limit_backward = v_2; + return false; + } + base.cursor--; + base.bra = base.cursor; + if (!base.slice_del()) + { + return false; + } + base.limit_backward = v_2; + return true; + }; + + /** @return {boolean} */ + function r_other_suffix() { + var /** number */ among_var; + if (base.cursor < I_p1) + { + return false; + } + var /** number */ v_2 = base.limit_backward; + base.limit_backward = I_p1; + base.ket = base.cursor; + among_var = base.find_among_b(a_2); + if (among_var == 0) + { + base.limit_backward = v_2; + return false; + } + base.bra = base.cursor; + switch (among_var) { + case 1: + if (!base.slice_del()) + { + return false; + } + break; + case 2: + if (!base.slice_from("l\u00F6s")) + { + return false; + } + break; + case 3: + if (!base.slice_from("full")) + { + return false; + } + break; + } + base.limit_backward = v_2; + return true; + }; + + this.stem = /** @return {boolean} */ function() { + var /** number */ v_1 = base.cursor; + r_mark_regions(); + base.cursor = v_1; + base.limit_backward = base.cursor; base.cursor = base.limit; + var /** number */ v_2 = base.limit - base.cursor; + r_main_suffix(); + base.cursor = base.limit - v_2; + var /** number */ v_3 = base.limit - base.cursor; + r_consonant_pair(); + base.cursor = base.limit - v_3; + var /** number */ v_4 = base.limit - base.cursor; + r_other_suffix(); + base.cursor = base.limit - v_4; + base.cursor = base.limit_backward; + return true; + }; + + /**@return{string}*/ + this['stemWord'] = function(/**string*/word) { + base.setCurrent(word); + this.stem(); + return base.getCurrent(); + }; }; - -BaseStemmer.in_grouping_b$LBaseStemmer$AIII = BaseStemmer$in_grouping_b$LBaseStemmer$AIII; - -BaseStemmer.prototype.out_grouping$AIII = function (s, min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor >= this.limit) { - return false; - } - ch = this.current.charCodeAt(this.cursor); - if (ch > max || ch < min) { - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; - } - ch -= min; - if ((s[ch >>> 3] & 0X1 << (ch & 0x7)) === 0) { - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; - } - return false; -}; - - -function BaseStemmer$out_grouping$LBaseStemmer$AIII($this, s, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor >= $this.limit) { - return false; - } - ch = $this.current.charCodeAt($this.cursor); - if (ch > max || ch < min) { - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; - } - ch -= min; - if ((s[ch >>> 3] & 0X1 << (ch & 0x7)) === 0) { - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; - } - return false; -}; - -BaseStemmer.out_grouping$LBaseStemmer$AIII = BaseStemmer$out_grouping$LBaseStemmer$AIII; - -BaseStemmer.prototype.out_grouping_b$AIII = function (s, min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor <= this.limit_backward) { - return false; - } - ch = this.current.charCodeAt(this.cursor - 1); - if (ch > max || ch < min) { - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; - } - return false; -}; - - -function BaseStemmer$out_grouping_b$LBaseStemmer$AIII($this, s, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor <= $this.limit_backward) { - return false; - } - ch = $this.current.charCodeAt($this.cursor - 1); - if (ch > max || ch < min) { - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; - } - return false; -}; - -BaseStemmer.out_grouping_b$LBaseStemmer$AIII = BaseStemmer$out_grouping_b$LBaseStemmer$AIII; - -BaseStemmer.prototype.in_range$II = function (min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor >= this.limit) { - return false; - } - ch = this.current.charCodeAt(this.cursor); - if (ch > max || ch < min) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$in_range$LBaseStemmer$II($this, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor >= $this.limit) { - return false; - } - ch = $this.current.charCodeAt($this.cursor); - if (ch > max || ch < min) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.in_range$LBaseStemmer$II = BaseStemmer$in_range$LBaseStemmer$II; - -BaseStemmer.prototype.in_range_b$II = function (min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor <= this.limit_backward) { - return false; - } - ch = this.current.charCodeAt(this.cursor - 1); - if (ch > max || ch < min) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$in_range_b$LBaseStemmer$II($this, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor <= $this.limit_backward) { - return false; - } - ch = $this.current.charCodeAt($this.cursor - 1); - if (ch > max || ch < min) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.in_range_b$LBaseStemmer$II = BaseStemmer$in_range_b$LBaseStemmer$II; - -BaseStemmer.prototype.out_range$II = function (min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor >= this.limit) { - return false; - } - ch = this.current.charCodeAt(this.cursor); - if (! (ch > max || ch < min)) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$out_range$LBaseStemmer$II($this, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor >= $this.limit) { - return false; - } - ch = $this.current.charCodeAt($this.cursor); - if (! (ch > max || ch < min)) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.out_range$LBaseStemmer$II = BaseStemmer$out_range$LBaseStemmer$II; - -BaseStemmer.prototype.out_range_b$II = function (min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor <= this.limit_backward) { - return false; - } - ch = this.current.charCodeAt(this.cursor - 1); - if (! (ch > max || ch < min)) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$out_range_b$LBaseStemmer$II($this, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor <= $this.limit_backward) { - return false; - } - ch = $this.current.charCodeAt($this.cursor - 1); - if (! (ch > max || ch < min)) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.out_range_b$LBaseStemmer$II = BaseStemmer$out_range_b$LBaseStemmer$II; - -BaseStemmer.prototype.eq_s$IS = function (s_size, s) { - var cursor$0; - if (((this.limit - this.cursor) | 0) < s_size) { - return false; - } - if (this.current.slice(cursor$0 = this.cursor, ((cursor$0 + s_size) | 0)) !== s) { - return false; - } - this.cursor = (this.cursor + s_size) | 0; - return true; -}; - - -function BaseStemmer$eq_s$LBaseStemmer$IS($this, s_size, s) { - var cursor$0; - if ((($this.limit - $this.cursor) | 0) < s_size) { - return false; - } - if ($this.current.slice(cursor$0 = $this.cursor, ((cursor$0 + s_size) | 0)) !== s) { - return false; - } - $this.cursor = ($this.cursor + s_size) | 0; - return true; -}; - -BaseStemmer.eq_s$LBaseStemmer$IS = BaseStemmer$eq_s$LBaseStemmer$IS; - -BaseStemmer.prototype.eq_s_b$IS = function (s_size, s) { - var cursor$0; - if (((this.cursor - this.limit_backward) | 0) < s_size) { - return false; - } - if (this.current.slice((((cursor$0 = this.cursor) - s_size) | 0), cursor$0) !== s) { - return false; - } - this.cursor = (this.cursor - s_size) | 0; - return true; -}; - - -function BaseStemmer$eq_s_b$LBaseStemmer$IS($this, s_size, s) { - var cursor$0; - if ((($this.cursor - $this.limit_backward) | 0) < s_size) { - return false; - } - if ($this.current.slice((((cursor$0 = $this.cursor) - s_size) | 0), cursor$0) !== s) { - return false; - } - $this.cursor = ($this.cursor - s_size) | 0; - return true; -}; - -BaseStemmer.eq_s_b$LBaseStemmer$IS = BaseStemmer$eq_s_b$LBaseStemmer$IS; - -BaseStemmer.prototype.eq_v$S = function (s) { - return BaseStemmer$eq_s$LBaseStemmer$IS(this, s.length, s); -}; - - -function BaseStemmer$eq_v$LBaseStemmer$S($this, s) { - return BaseStemmer$eq_s$LBaseStemmer$IS($this, s.length, s); -}; - -BaseStemmer.eq_v$LBaseStemmer$S = BaseStemmer$eq_v$LBaseStemmer$S; - -BaseStemmer.prototype.eq_v_b$S = function (s) { - return BaseStemmer$eq_s_b$LBaseStemmer$IS(this, s.length, s); -}; - - -function BaseStemmer$eq_v_b$LBaseStemmer$S($this, s) { - return BaseStemmer$eq_s_b$LBaseStemmer$IS($this, s.length, s); -}; - -BaseStemmer.eq_v_b$LBaseStemmer$S = BaseStemmer$eq_v_b$LBaseStemmer$S; - -BaseStemmer.prototype.find_among$ALAmong$I = function (v, v_size) { - var i; - var j; - var c; - var l; - var common_i; - var common_j; - var first_key_inspected; - var k; - var diff; - var common; - var w; - var i2; - var res; - i = 0; - j = v_size; - c = this.cursor; - l = this.limit; - common_i = 0; - common_j = 0; - first_key_inspected = false; - while (true) { - k = i + (j - i >>> 1); - diff = 0; - common = (common_i < common_j ? common_i : common_j); - w = v[k]; - for (i2 = common; i2 < w.s_size; i2++) { - if (c + common === l) { - diff = -1; - break; - } - diff = this.current.charCodeAt(c + common) - w.s.charCodeAt(i2); - if (diff !== 0) { - break; - } - common++; - } - if (diff < 0) { - j = k; - common_j = common; - } else { - i = k; - common_i = common; - } - if (j - i <= 1) { - if (i > 0) { - break; - } - if (j === i) { - break; - } - if (first_key_inspected) { - break; - } - first_key_inspected = true; - } - } - while (true) { - w = v[i]; - if (common_i >= w.s_size) { - this.cursor = (c + w.s_size | 0); - if (w.method == null) { - return w.result; - } - res = w.method(w.instance); - this.cursor = (c + w.s_size | 0); - if (res) { - return w.result; - } - } - i = w.substring_i; - if (i < 0) { - return 0; - } - } - return -1; -}; - - -function BaseStemmer$find_among$LBaseStemmer$ALAmong$I($this, v, v_size) { - var i; - var j; - var c; - var l; - var common_i; - var common_j; - var first_key_inspected; - var k; - var diff; - var common; - var w; - var i2; - var res; - i = 0; - j = v_size; - c = $this.cursor; - l = $this.limit; - common_i = 0; - common_j = 0; - first_key_inspected = false; - while (true) { - k = i + (j - i >>> 1); - diff = 0; - common = (common_i < common_j ? common_i : common_j); - w = v[k]; - for (i2 = common; i2 < w.s_size; i2++) { - if (c + common === l) { - diff = -1; - break; - } - diff = $this.current.charCodeAt(c + common) - w.s.charCodeAt(i2); - if (diff !== 0) { - break; - } - common++; - } - if (diff < 0) { - j = k; - common_j = common; - } else { - i = k; - common_i = common; - } - if (j - i <= 1) { - if (i > 0) { - break; - } - if (j === i) { - break; - } - if (first_key_inspected) { - break; - } - first_key_inspected = true; - } - } - while (true) { - w = v[i]; - if (common_i >= w.s_size) { - $this.cursor = (c + w.s_size | 0); - if (w.method == null) { - return w.result; - } - res = w.method(w.instance); - $this.cursor = (c + w.s_size | 0); - if (res) { - return w.result; - } - } - i = w.substring_i; - if (i < 0) { - return 0; - } - } - return -1; -}; - -BaseStemmer.find_among$LBaseStemmer$ALAmong$I = BaseStemmer$find_among$LBaseStemmer$ALAmong$I; - -BaseStemmer.prototype.find_among_b$ALAmong$I = function (v, v_size) { - var i; - var j; - var c; - var lb; - var common_i; - var common_j; - var first_key_inspected; - var k; - var diff; - var common; - var w; - var i2; - var res; - i = 0; - j = v_size; - c = this.cursor; - lb = this.limit_backward; - common_i = 0; - common_j = 0; - first_key_inspected = false; - while (true) { - k = i + (j - i >> 1); - diff = 0; - common = (common_i < common_j ? common_i : common_j); - w = v[k]; - for (i2 = w.s_size - 1 - common; i2 >= 0; i2--) { - if (c - common === lb) { - diff = -1; - break; - } - diff = this.current.charCodeAt(c - 1 - common) - w.s.charCodeAt(i2); - if (diff !== 0) { - break; - } - common++; - } - if (diff < 0) { - j = k; - common_j = common; - } else { - i = k; - common_i = common; - } - if (j - i <= 1) { - if (i > 0) { - break; - } - if (j === i) { - break; - } - if (first_key_inspected) { - break; - } - first_key_inspected = true; - } - } - while (true) { - w = v[i]; - if (common_i >= w.s_size) { - this.cursor = (c - w.s_size | 0); - if (w.method == null) { - return w.result; - } - res = w.method(this); - this.cursor = (c - w.s_size | 0); - if (res) { - return w.result; - } - } - i = w.substring_i; - if (i < 0) { - return 0; - } - } - return -1; -}; - - -function BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, v, v_size) { - var i; - var j; - var c; - var lb; - var common_i; - var common_j; - var first_key_inspected; - var k; - var diff; - var common; - var w; - var i2; - var res; - i = 0; - j = v_size; - c = $this.cursor; - lb = $this.limit_backward; - common_i = 0; - common_j = 0; - first_key_inspected = false; - while (true) { - k = i + (j - i >> 1); - diff = 0; - common = (common_i < common_j ? common_i : common_j); - w = v[k]; - for (i2 = w.s_size - 1 - common; i2 >= 0; i2--) { - if (c - common === lb) { - diff = -1; - break; - } - diff = $this.current.charCodeAt(c - 1 - common) - w.s.charCodeAt(i2); - if (diff !== 0) { - break; - } - common++; - } - if (diff < 0) { - j = k; - common_j = common; - } else { - i = k; - common_i = common; - } - if (j - i <= 1) { - if (i > 0) { - break; - } - if (j === i) { - break; - } - if (first_key_inspected) { - break; - } - first_key_inspected = true; - } - } - while (true) { - w = v[i]; - if (common_i >= w.s_size) { - $this.cursor = (c - w.s_size | 0); - if (w.method == null) { - return w.result; - } - res = w.method($this); - $this.cursor = (c - w.s_size | 0); - if (res) { - return w.result; - } - } - i = w.substring_i; - if (i < 0) { - return 0; - } - } - return -1; -}; - -BaseStemmer.find_among_b$LBaseStemmer$ALAmong$I = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I; - -BaseStemmer.prototype.replace_s$IIS = function (c_bra, c_ket, s) { - var adjustment; - adjustment = ((s.length - (((c_ket - c_bra) | 0))) | 0); - this.current = this.current.slice(0, c_bra) + s + this.current.slice(c_ket); - this.limit = (this.limit + adjustment) | 0; - if (this.cursor >= c_ket) { - this.cursor = (this.cursor + adjustment) | 0; - } else if (this.cursor > c_bra) { - this.cursor = c_bra; - } - return (adjustment | 0); -}; - - -function BaseStemmer$replace_s$LBaseStemmer$IIS($this, c_bra, c_ket, s) { - var adjustment; - adjustment = ((s.length - (((c_ket - c_bra) | 0))) | 0); - $this.current = $this.current.slice(0, c_bra) + s + $this.current.slice(c_ket); - $this.limit = ($this.limit + adjustment) | 0; - if ($this.cursor >= c_ket) { - $this.cursor = ($this.cursor + adjustment) | 0; - } else if ($this.cursor > c_bra) { - $this.cursor = c_bra; - } - return (adjustment | 0); -}; - -BaseStemmer.replace_s$LBaseStemmer$IIS = BaseStemmer$replace_s$LBaseStemmer$IIS; - -BaseStemmer.prototype.slice_check$ = function () { - var bra$0; - var ket$0; - var limit$0; - return ((bra$0 = this.bra) < 0 || bra$0 > (ket$0 = this.ket) || ket$0 > (limit$0 = this.limit) || limit$0 > this.current.length ? false : true); -}; - - -function BaseStemmer$slice_check$LBaseStemmer$($this) { - var bra$0; - var ket$0; - var limit$0; - return ((bra$0 = $this.bra) < 0 || bra$0 > (ket$0 = $this.ket) || ket$0 > (limit$0 = $this.limit) || limit$0 > $this.current.length ? false : true); -}; - -BaseStemmer.slice_check$LBaseStemmer$ = BaseStemmer$slice_check$LBaseStemmer$; - -BaseStemmer.prototype.slice_from$S = function (s) { - var result; - var bra$0; - var ket$0; - var limit$0; - result = false; - if ((bra$0 = this.bra) < 0 || bra$0 > (ket$0 = this.ket) || ket$0 > (limit$0 = this.limit) || limit$0 > this.current.length ? false : true) { - BaseStemmer$replace_s$LBaseStemmer$IIS(this, this.bra, this.ket, s); - result = true; - } - return result; -}; - - -function BaseStemmer$slice_from$LBaseStemmer$S($this, s) { - var result; - var bra$0; - var ket$0; - var limit$0; - result = false; - if ((bra$0 = $this.bra) < 0 || bra$0 > (ket$0 = $this.ket) || ket$0 > (limit$0 = $this.limit) || limit$0 > $this.current.length ? false : true) { - BaseStemmer$replace_s$LBaseStemmer$IIS($this, $this.bra, $this.ket, s); - result = true; - } - return result; -}; - -BaseStemmer.slice_from$LBaseStemmer$S = BaseStemmer$slice_from$LBaseStemmer$S; - -BaseStemmer.prototype.slice_del$ = function () { - return BaseStemmer$slice_from$LBaseStemmer$S(this, ""); -}; - - -function BaseStemmer$slice_del$LBaseStemmer$($this) { - return BaseStemmer$slice_from$LBaseStemmer$S($this, ""); -}; - -BaseStemmer.slice_del$LBaseStemmer$ = BaseStemmer$slice_del$LBaseStemmer$; - -BaseStemmer.prototype.insert$IIS = function (c_bra, c_ket, s) { - var adjustment; - adjustment = BaseStemmer$replace_s$LBaseStemmer$IIS(this, c_bra, c_ket, s); - if (c_bra <= this.bra) { - this.bra = (this.bra + adjustment) | 0; - } - if (c_bra <= this.ket) { - this.ket = (this.ket + adjustment) | 0; - } -}; - - -function BaseStemmer$insert$LBaseStemmer$IIS($this, c_bra, c_ket, s) { - var adjustment; - adjustment = BaseStemmer$replace_s$LBaseStemmer$IIS($this, c_bra, c_ket, s); - if (c_bra <= $this.bra) { - $this.bra = ($this.bra + adjustment) | 0; - } - if (c_bra <= $this.ket) { - $this.ket = ($this.ket + adjustment) | 0; - } -}; - -BaseStemmer.insert$LBaseStemmer$IIS = BaseStemmer$insert$LBaseStemmer$IIS; - -BaseStemmer.prototype.slice_to$S = function (s) { - var result; - var bra$0; - var ket$0; - var limit$0; - result = ''; - if ((bra$0 = this.bra) < 0 || bra$0 > (ket$0 = this.ket) || ket$0 > (limit$0 = this.limit) || limit$0 > this.current.length ? false : true) { - result = this.current.slice(this.bra, this.ket); - } - return result; -}; - - -function BaseStemmer$slice_to$LBaseStemmer$S($this, s) { - var result; - var bra$0; - var ket$0; - var limit$0; - result = ''; - if ((bra$0 = $this.bra) < 0 || bra$0 > (ket$0 = $this.ket) || ket$0 > (limit$0 = $this.limit) || limit$0 > $this.current.length ? false : true) { - result = $this.current.slice($this.bra, $this.ket); - } - return result; -}; - -BaseStemmer.slice_to$LBaseStemmer$S = BaseStemmer$slice_to$LBaseStemmer$S; - -BaseStemmer.prototype.assign_to$S = function (s) { - return this.current.slice(0, this.limit); -}; - - -function BaseStemmer$assign_to$LBaseStemmer$S($this, s) { - return $this.current.slice(0, $this.limit); -}; - -BaseStemmer.assign_to$LBaseStemmer$S = BaseStemmer$assign_to$LBaseStemmer$S; - -BaseStemmer.prototype.stem$ = function () { - return false; -}; - - -BaseStemmer.prototype.stemWord$S = function (word) { - var result; - var current$0; - var cursor$0; - var limit$0; - result = this.cache['.' + word]; - if (result == null) { - current$0 = this.current = word; - cursor$0 = this.cursor = 0; - limit$0 = this.limit = current$0.length; - this.limit_backward = 0; - this.bra = cursor$0; - this.ket = limit$0; - this.stem$(); - result = this.current; - this.cache['.' + word] = result; - } - return result; -}; - -BaseStemmer.prototype.stemWord = BaseStemmer.prototype.stemWord$S; - -BaseStemmer.prototype.stemWords$AS = function (words) { - var results; - var i; - var word; - var result; - var current$0; - var cursor$0; - var limit$0; - results = [ ]; - for (i = 0; i < words.length; i++) { - word = words[i]; - result = this.cache['.' + word]; - if (result == null) { - current$0 = this.current = word; - cursor$0 = this.cursor = 0; - limit$0 = this.limit = current$0.length; - this.limit_backward = 0; - this.bra = cursor$0; - this.ket = limit$0; - this.stem$(); - result = this.current; - this.cache['.' + word] = result; - } - results.push(result); - } - return results; -}; - -BaseStemmer.prototype.stemWords = BaseStemmer.prototype.stemWords$AS; - -function SwedishStemmer() { - BaseStemmer.call(this); - this.I_x = 0; - this.I_p1 = 0; -}; - -$__jsx_extend([SwedishStemmer], BaseStemmer); -SwedishStemmer.prototype.copy_from$LSwedishStemmer$ = function (other) { - this.I_x = other.I_x; - this.I_p1 = other.I_p1; - BaseStemmer$copy_from$LBaseStemmer$LBaseStemmer$(this, other); -}; - -SwedishStemmer.prototype.copy_from = SwedishStemmer.prototype.copy_from$LSwedishStemmer$; - -SwedishStemmer.prototype.r_mark_regions$ = function () { - var v_1; - var v_2; - var c; - var lab1; - var lab3; - var lab4; - var cursor$0; - var limit$0; - var cursor$1; - var cursor$2; - var $__jsx_postinc_t; - this.I_p1 = limit$0 = this.limit; - v_1 = cursor$0 = this.cursor; - c = (cursor$0 + 3 | 0); - if (0 > c || c > limit$0) { - return false; - } - cursor$2 = this.cursor = c; - this.I_x = cursor$2; - this.cursor = v_1; -golab0: - while (true) { - v_2 = this.cursor; - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, SwedishStemmer.g_v, 97, 246)) { - break lab1; - } - this.cursor = v_2; - break golab0; - } - cursor$1 = this.cursor = v_2; - if (cursor$1 >= this.limit) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } -golab2: - while (true) { - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII(this, SwedishStemmer.g_v, 97, 246)) { - break lab3; - } - break golab2; - } - if (this.cursor >= this.limit) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - this.I_p1 = this.cursor; - lab4 = true; -lab4: - while (lab4 === true) { - lab4 = false; - if (! (this.I_p1 < this.I_x)) { - break lab4; - } - this.I_p1 = this.I_x; - } - return true; -}; - -SwedishStemmer.prototype.r_mark_regions = SwedishStemmer.prototype.r_mark_regions$; - -function SwedishStemmer$r_mark_regions$LSwedishStemmer$($this) { - var v_1; - var v_2; - var c; - var lab1; - var lab3; - var lab4; - var cursor$0; - var limit$0; - var cursor$1; - var cursor$2; - var $__jsx_postinc_t; - $this.I_p1 = limit$0 = $this.limit; - v_1 = cursor$0 = $this.cursor; - c = (cursor$0 + 3 | 0); - if (0 > c || c > limit$0) { - return false; - } - cursor$2 = $this.cursor = c; - $this.I_x = cursor$2; - $this.cursor = v_1; -golab0: - while (true) { - v_2 = $this.cursor; - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII($this, SwedishStemmer.g_v, 97, 246)) { - break lab1; - } - $this.cursor = v_2; - break golab0; - } - cursor$1 = $this.cursor = v_2; - if (cursor$1 >= $this.limit) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } -golab2: - while (true) { - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - if (! BaseStemmer$out_grouping$LBaseStemmer$AIII($this, SwedishStemmer.g_v, 97, 246)) { - break lab3; - } - break golab2; - } - if ($this.cursor >= $this.limit) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - $this.I_p1 = $this.cursor; - lab4 = true; -lab4: - while (lab4 === true) { - lab4 = false; - if (! ($this.I_p1 < $this.I_x)) { - break lab4; - } - $this.I_p1 = $this.I_x; - } - return true; -}; - -SwedishStemmer.r_mark_regions$LSwedishStemmer$ = SwedishStemmer$r_mark_regions$LSwedishStemmer$; - -SwedishStemmer.prototype.r_main_suffix$ = function () { - var among_var; - var v_1; - var v_2; - var cursor$0; - var cursor$1; - var cursor$2; - v_1 = ((this.limit - (cursor$0 = this.cursor)) | 0); - if (cursor$0 < this.I_p1) { - return false; - } - cursor$1 = this.cursor = this.I_p1; - v_2 = this.limit_backward; - this.limit_backward = cursor$1; - cursor$2 = this.cursor = ((this.limit - v_1) | 0); - this.ket = cursor$2; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, SwedishStemmer.a_0, 37); - if (among_var === 0) { - this.limit_backward = v_2; - return false; - } - this.bra = this.cursor; - this.limit_backward = v_2; - switch (among_var) { - case 0: - return false; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 2: - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII(this, SwedishStemmer.g_s_ending, 98, 121)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - } - return true; -}; - -SwedishStemmer.prototype.r_main_suffix = SwedishStemmer.prototype.r_main_suffix$; - -function SwedishStemmer$r_main_suffix$LSwedishStemmer$($this) { - var among_var; - var v_1; - var v_2; - var cursor$0; - var cursor$1; - var cursor$2; - v_1 = (($this.limit - (cursor$0 = $this.cursor)) | 0); - if (cursor$0 < $this.I_p1) { - return false; - } - cursor$1 = $this.cursor = $this.I_p1; - v_2 = $this.limit_backward; - $this.limit_backward = cursor$1; - cursor$2 = $this.cursor = (($this.limit - v_1) | 0); - $this.ket = cursor$2; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, SwedishStemmer.a_0, 37); - if (among_var === 0) { - $this.limit_backward = v_2; - return false; - } - $this.bra = $this.cursor; - $this.limit_backward = v_2; - switch (among_var) { - case 0: - return false; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 2: - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII($this, SwedishStemmer.g_s_ending, 98, 121)) { - return false; - } - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - } - return true; -}; - -SwedishStemmer.r_main_suffix$LSwedishStemmer$ = SwedishStemmer$r_main_suffix$LSwedishStemmer$; - -SwedishStemmer.prototype.r_consonant_pair$ = function () { - var v_1; - var v_2; - var v_3; - var cursor$0; - var cursor$1; - var limit$0; - var cursor$2; - var cursor$3; - var $__jsx_postinc_t; - v_1 = ((this.limit - (cursor$0 = this.cursor)) | 0); - if (cursor$0 < this.I_p1) { - return false; - } - cursor$1 = this.cursor = this.I_p1; - v_2 = this.limit_backward; - this.limit_backward = cursor$1; - cursor$2 = this.cursor = (((limit$0 = this.limit) - v_1) | 0); - v_3 = ((limit$0 - cursor$2) | 0); - if (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, SwedishStemmer.a_1, 7) === 0) { - this.limit_backward = v_2; - return false; - } - cursor$3 = this.cursor = ((this.limit - v_3) | 0); - this.ket = cursor$3; - if (cursor$3 <= this.limit_backward) { - this.limit_backward = v_2; - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - this.bra = this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - this.limit_backward = v_2; - return true; -}; - -SwedishStemmer.prototype.r_consonant_pair = SwedishStemmer.prototype.r_consonant_pair$; - -function SwedishStemmer$r_consonant_pair$LSwedishStemmer$($this) { - var v_1; - var v_2; - var v_3; - var cursor$0; - var cursor$1; - var limit$0; - var cursor$2; - var cursor$3; - var $__jsx_postinc_t; - v_1 = (($this.limit - (cursor$0 = $this.cursor)) | 0); - if (cursor$0 < $this.I_p1) { - return false; - } - cursor$1 = $this.cursor = $this.I_p1; - v_2 = $this.limit_backward; - $this.limit_backward = cursor$1; - cursor$2 = $this.cursor = (((limit$0 = $this.limit) - v_1) | 0); - v_3 = ((limit$0 - cursor$2) | 0); - if (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, SwedishStemmer.a_1, 7) === 0) { - $this.limit_backward = v_2; - return false; - } - cursor$3 = $this.cursor = (($this.limit - v_3) | 0); - $this.ket = cursor$3; - if (cursor$3 <= $this.limit_backward) { - $this.limit_backward = v_2; - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - $this.bra = $this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - $this.limit_backward = v_2; - return true; -}; - -SwedishStemmer.r_consonant_pair$LSwedishStemmer$ = SwedishStemmer$r_consonant_pair$LSwedishStemmer$; - -SwedishStemmer.prototype.r_other_suffix$ = function () { - var among_var; - var v_1; - var v_2; - var cursor$0; - var cursor$1; - var cursor$2; - v_1 = ((this.limit - (cursor$0 = this.cursor)) | 0); - if (cursor$0 < this.I_p1) { - return false; - } - cursor$1 = this.cursor = this.I_p1; - v_2 = this.limit_backward; - this.limit_backward = cursor$1; - cursor$2 = this.cursor = ((this.limit - v_1) | 0); - this.ket = cursor$2; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, SwedishStemmer.a_2, 5); - if (among_var === 0) { - this.limit_backward = v_2; - return false; - } - this.bra = this.cursor; - switch (among_var) { - case 0: - this.limit_backward = v_2; - return false; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "l\u00F6s")) { - return false; - } - break; - case 3: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "full")) { - return false; - } - break; - } - this.limit_backward = v_2; - return true; -}; - -SwedishStemmer.prototype.r_other_suffix = SwedishStemmer.prototype.r_other_suffix$; - -function SwedishStemmer$r_other_suffix$LSwedishStemmer$($this) { - var among_var; - var v_1; - var v_2; - var cursor$0; - var cursor$1; - var cursor$2; - v_1 = (($this.limit - (cursor$0 = $this.cursor)) | 0); - if (cursor$0 < $this.I_p1) { - return false; - } - cursor$1 = $this.cursor = $this.I_p1; - v_2 = $this.limit_backward; - $this.limit_backward = cursor$1; - cursor$2 = $this.cursor = (($this.limit - v_1) | 0); - $this.ket = cursor$2; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, SwedishStemmer.a_2, 5); - if (among_var === 0) { - $this.limit_backward = v_2; - return false; - } - $this.bra = $this.cursor; - switch (among_var) { - case 0: - $this.limit_backward = v_2; - return false; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "l\u00F6s")) { - return false; - } - break; - case 3: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "full")) { - return false; - } - break; - } - $this.limit_backward = v_2; - return true; -}; - -SwedishStemmer.r_other_suffix$LSwedishStemmer$ = SwedishStemmer$r_other_suffix$LSwedishStemmer$; - -SwedishStemmer.prototype.stem$ = function () { - var v_1; - var v_2; - var v_3; - var lab0; - var lab1; - var lab2; - var lab3; - var cursor$0; - var limit$0; - var cursor$1; - var limit$1; - var cursor$2; - v_1 = this.cursor; - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - if (! SwedishStemmer$r_mark_regions$LSwedishStemmer$(this)) { - break lab0; - } - } - cursor$0 = this.cursor = v_1; - this.limit_backward = cursor$0; - cursor$1 = this.cursor = limit$0 = this.limit; - v_2 = ((limit$0 - cursor$1) | 0); - lab1 = true; -lab1: - while (lab1 === true) { - lab1 = false; - if (! SwedishStemmer$r_main_suffix$LSwedishStemmer$(this)) { - break lab1; - } - } - cursor$2 = this.cursor = (((limit$1 = this.limit) - v_2) | 0); - v_3 = ((limit$1 - cursor$2) | 0); - lab2 = true; -lab2: - while (lab2 === true) { - lab2 = false; - if (! SwedishStemmer$r_consonant_pair$LSwedishStemmer$(this)) { - break lab2; - } - } - this.cursor = ((this.limit - v_3) | 0); - lab3 = true; -lab3: - while (lab3 === true) { - lab3 = false; - if (! SwedishStemmer$r_other_suffix$LSwedishStemmer$(this)) { - break lab3; - } - } - this.cursor = this.limit_backward; - return true; -}; - -SwedishStemmer.prototype.stem = SwedishStemmer.prototype.stem$; - -SwedishStemmer.prototype.equals$X = function (o) { - return o instanceof SwedishStemmer; -}; - -SwedishStemmer.prototype.equals = SwedishStemmer.prototype.equals$X; - -function SwedishStemmer$equals$LSwedishStemmer$X($this, o) { - return o instanceof SwedishStemmer; -}; - -SwedishStemmer.equals$LSwedishStemmer$X = SwedishStemmer$equals$LSwedishStemmer$X; - -SwedishStemmer.prototype.hashCode$ = function () { - var classname; - var hash; - var i; - var char; - classname = "SwedishStemmer"; - hash = 0; - for (i = 0; i < classname.length; i++) { - char = classname.charCodeAt(i); - hash = (hash << 5) - hash + char; - hash = hash & hash; - } - return (hash | 0); -}; - -SwedishStemmer.prototype.hashCode = SwedishStemmer.prototype.hashCode$; - -function SwedishStemmer$hashCode$LSwedishStemmer$($this) { - var classname; - var hash; - var i; - var char; - classname = "SwedishStemmer"; - hash = 0; - for (i = 0; i < classname.length; i++) { - char = classname.charCodeAt(i); - hash = (hash << 5) - hash + char; - hash = hash & hash; - } - return (hash | 0); -}; - -SwedishStemmer.hashCode$LSwedishStemmer$ = SwedishStemmer$hashCode$LSwedishStemmer$; - -SwedishStemmer.serialVersionUID = 1; -$__jsx_lazy_init(SwedishStemmer, "methodObject", function () { - return new SwedishStemmer(); -}); -$__jsx_lazy_init(SwedishStemmer, "a_0", function () { - return [ new Among("a", -1, 1), new Among("arna", 0, 1), new Among("erna", 0, 1), new Among("heterna", 2, 1), new Among("orna", 0, 1), new Among("ad", -1, 1), new Among("e", -1, 1), new Among("ade", 6, 1), new Among("ande", 6, 1), new Among("arne", 6, 1), new Among("are", 6, 1), new Among("aste", 6, 1), new Among("en", -1, 1), new Among("anden", 12, 1), new Among("aren", 12, 1), new Among("heten", 12, 1), new Among("ern", -1, 1), new Among("ar", -1, 1), new Among("er", -1, 1), new Among("heter", 18, 1), new Among("or", -1, 1), new Among("s", -1, 2), new Among("as", 21, 1), new Among("arnas", 22, 1), new Among("ernas", 22, 1), new Among("ornas", 22, 1), new Among("es", 21, 1), new Among("ades", 26, 1), new Among("andes", 26, 1), new Among("ens", 21, 1), new Among("arens", 29, 1), new Among("hetens", 29, 1), new Among("erns", 21, 1), new Among("at", -1, 1), new Among("andet", -1, 1), new Among("het", -1, 1), new Among("ast", -1, 1) ]; -}); -$__jsx_lazy_init(SwedishStemmer, "a_1", function () { - return [ new Among("dd", -1, -1), new Among("gd", -1, -1), new Among("nn", -1, -1), new Among("dt", -1, -1), new Among("gt", -1, -1), new Among("kt", -1, -1), new Among("tt", -1, -1) ]; -}); -$__jsx_lazy_init(SwedishStemmer, "a_2", function () { - return [ new Among("ig", -1, 1), new Among("lig", 0, 1), new Among("els", -1, 1), new Among("fullt", -1, 3), new Among("l\u00F6st", -1, 2) ]; -}); -SwedishStemmer.g_v = [ 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 32 ]; -SwedishStemmer.g_s_ending = [ 119, 127, 149 ]; - -var $__jsx_classMap = { - "src/among.jsx": { - Among: Among, - Among$SII: Among, - Among$SIIF$LBaseStemmer$B$LBaseStemmer$: Among$0 - }, - "src/stemmer.jsx": { - Stemmer: Stemmer, - Stemmer$: Stemmer - }, - "src/base-stemmer.jsx": { - BaseStemmer: BaseStemmer, - BaseStemmer$: BaseStemmer - }, - "src/swedish-stemmer.jsx": { - SwedishStemmer: SwedishStemmer, - SwedishStemmer$: SwedishStemmer - } -}; - - -})(JSX); - -var Among = JSX.require("src/among.jsx").Among; -var Among$SII = JSX.require("src/among.jsx").Among$SII; -var Stemmer = JSX.require("src/stemmer.jsx").Stemmer; -var BaseStemmer = JSX.require("src/base-stemmer.jsx").BaseStemmer; -var SwedishStemmer = JSX.require("src/swedish-stemmer.jsx").SwedishStemmer; diff --git a/sphinx/search/non-minified-js/turkish-stemmer.js b/sphinx/search/non-minified-js/turkish-stemmer.js index 22bd7538df1..8ba74b9218e 100644 --- a/sphinx/search/non-minified-js/turkish-stemmer.js +++ b/sphinx/search/non-minified-js/turkish-stemmer.js @@ -1,6721 +1,2439 @@ -// generatedy by JSX compiler 0.9.89 (2014-05-20 06:01:03 +0900; 8e8c6105f36f3dfe440ea026a3c93a3444977102) -var JSX = {}; -(function (JSX) { -/** - * extends the class - */ -function $__jsx_extend(derivations, base) { - var ctor = function () {}; - ctor.prototype = base.prototype; - var proto = new ctor(); - for (var i in derivations) { - derivations[i].prototype = proto; - } -} - -/** - * copies the implementations from source interface to target - */ -function $__jsx_merge_interface(target, source) { - for (var k in source.prototype) - if (source.prototype.hasOwnProperty(k)) - target.prototype[k] = source.prototype[k]; -} - -/** - * defers the initialization of the property - */ -function $__jsx_lazy_init(obj, prop, func) { - function reset(obj, prop, value) { - delete obj[prop]; - obj[prop] = value; - return value; - } - - Object.defineProperty(obj, prop, { - get: function () { - return reset(obj, prop, func()); - }, - set: function (v) { - reset(obj, prop, v); - }, - enumerable: true, - configurable: true - }); -} - -var $__jsx_imul = Math.imul; -if (typeof $__jsx_imul === "undefined") { - $__jsx_imul = function (a, b) { - var ah = (a >>> 16) & 0xffff; - var al = a & 0xffff; - var bh = (b >>> 16) & 0xffff; - var bl = b & 0xffff; - return ((al * bl) + (((ah * bl + al * bh) << 16) >>> 0)|0); - }; -} - -/** - * fused int-ops with side-effects - */ -function $__jsx_ipadd(o, p, r) { - return o[p] = (o[p] + r) | 0; -} -function $__jsx_ipsub(o, p, r) { - return o[p] = (o[p] - r) | 0; -} -function $__jsx_ipmul(o, p, r) { - return o[p] = $__jsx_imul(o[p], r); -} -function $__jsx_ipdiv(o, p, r) { - return o[p] = (o[p] / r) | 0; -} -function $__jsx_ipmod(o, p, r) { - return o[p] = (o[p] % r) | 0; -} -function $__jsx_ippostinc(o, p) { - var v = o[p]; - o[p] = (v + 1) | 0; - return v; -} -function $__jsx_ippostdec(o, p) { - var v = o[p]; - o[p] = (v - 1) | 0; - return v; -} - -/** - * non-inlined version of Array#each - */ -function $__jsx_forEach(o, f) { - var l = o.length; - for (var i = 0; i < l; ++i) - f(o[i]); -} - -/* - * global functions, renamed to avoid conflict with local variable names - */ -var $__jsx_parseInt = parseInt; -var $__jsx_parseFloat = parseFloat; -function $__jsx_isNaN(n) { return n !== n; } -var $__jsx_isFinite = isFinite; - -var $__jsx_encodeURIComponent = encodeURIComponent; -var $__jsx_decodeURIComponent = decodeURIComponent; -var $__jsx_encodeURI = encodeURI; -var $__jsx_decodeURI = decodeURI; - -var $__jsx_ObjectToString = Object.prototype.toString; -var $__jsx_ObjectHasOwnProperty = Object.prototype.hasOwnProperty; - -/* - * profiler object, initialized afterwards - */ -function $__jsx_profiler() { -} - -/* - * public interface to JSX code - */ -JSX.require = function (path) { - var m = $__jsx_classMap[path]; - return m !== undefined ? m : null; -}; - -JSX.profilerIsRunning = function () { - return $__jsx_profiler.getResults != null; -}; - -JSX.getProfileResults = function () { - return ($__jsx_profiler.getResults || function () { return {}; })(); -}; - -JSX.postProfileResults = function (url, cb) { - if ($__jsx_profiler.postResults == null) - throw new Error("profiler has not been turned on"); - return $__jsx_profiler.postResults(url, cb); -}; - -JSX.resetProfileResults = function () { - if ($__jsx_profiler.resetResults == null) - throw new Error("profiler has not been turned on"); - return $__jsx_profiler.resetResults(); -}; -JSX.DEBUG = false; -var GeneratorFunction$0 = -(function () { - try { - return Function('import {GeneratorFunction} from "std:iteration"; return GeneratorFunction')(); - } catch (e) { - return function GeneratorFunction () {}; - } -})(); -var __jsx_generator_object$0 = -(function () { - function __jsx_generator_object() { - this.__next = 0; - this.__loop = null; - this.__seed = null; - this.__value = undefined; - this.__status = 0; // SUSPENDED: 0, ACTIVE: 1, DEAD: 2 - } - - __jsx_generator_object.prototype.next = function (seed) { - switch (this.__status) { - case 0: - this.__status = 1; - this.__seed = seed; - - // go next! - this.__loop(this.__next); - - var done = false; - if (this.__next != -1) { - this.__status = 0; - } else { - this.__status = 2; - done = true; - } - return { value: this.__value, done: done }; - case 1: - throw new Error("Generator is already running"); - case 2: - throw new Error("Generator is already finished"); - default: - throw new Error("Unexpected generator internal state"); - } - }; - - return __jsx_generator_object; -}()); -function Among(s, substring_i, result) { - this.s_size = s.length; - this.s = s; - this.substring_i = substring_i; - this.result = result; - this.method = null; - this.instance = null; -}; - -function Among$0(s, substring_i, result, method, instance) { - this.s_size = s.length; - this.s = s; - this.substring_i = substring_i; - this.result = result; - this.method = method; - this.instance = instance; -}; - -$__jsx_extend([Among, Among$0], Object); -function Stemmer() { -}; - -$__jsx_extend([Stemmer], Object); -function BaseStemmer() { - var current$0; - var cursor$0; - var limit$0; - this.cache = ({ }); - current$0 = this.current = ""; - cursor$0 = this.cursor = 0; - limit$0 = this.limit = current$0.length; - this.limit_backward = 0; - this.bra = cursor$0; - this.ket = limit$0; -}; - -$__jsx_extend([BaseStemmer], Stemmer); -BaseStemmer.prototype.setCurrent$S = function (value) { - var current$0; - var cursor$0; - var limit$0; - current$0 = this.current = value; - cursor$0 = this.cursor = 0; - limit$0 = this.limit = current$0.length; - this.limit_backward = 0; - this.bra = cursor$0; - this.ket = limit$0; -}; - - -function BaseStemmer$setCurrent$LBaseStemmer$S($this, value) { - var current$0; - var cursor$0; - var limit$0; - current$0 = $this.current = value; - cursor$0 = $this.cursor = 0; - limit$0 = $this.limit = current$0.length; - $this.limit_backward = 0; - $this.bra = cursor$0; - $this.ket = limit$0; -}; - -BaseStemmer.setCurrent$LBaseStemmer$S = BaseStemmer$setCurrent$LBaseStemmer$S; - -BaseStemmer.prototype.getCurrent$ = function () { - return this.current; -}; - - -function BaseStemmer$getCurrent$LBaseStemmer$($this) { - return $this.current; -}; - -BaseStemmer.getCurrent$LBaseStemmer$ = BaseStemmer$getCurrent$LBaseStemmer$; - -BaseStemmer.prototype.copy_from$LBaseStemmer$ = function (other) { - this.current = other.current; - this.cursor = other.cursor; - this.limit = other.limit; - this.limit_backward = other.limit_backward; - this.bra = other.bra; - this.ket = other.ket; -}; - - -function BaseStemmer$copy_from$LBaseStemmer$LBaseStemmer$($this, other) { - $this.current = other.current; - $this.cursor = other.cursor; - $this.limit = other.limit; - $this.limit_backward = other.limit_backward; - $this.bra = other.bra; - $this.ket = other.ket; -}; - -BaseStemmer.copy_from$LBaseStemmer$LBaseStemmer$ = BaseStemmer$copy_from$LBaseStemmer$LBaseStemmer$; - -BaseStemmer.prototype.in_grouping$AIII = function (s, min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor >= this.limit) { - return false; - } - ch = this.current.charCodeAt(this.cursor); - if (ch > max || ch < min) { - return false; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$in_grouping$LBaseStemmer$AIII($this, s, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor >= $this.limit) { - return false; - } - ch = $this.current.charCodeAt($this.cursor); - if (ch > max || ch < min) { - return false; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.in_grouping$LBaseStemmer$AIII = BaseStemmer$in_grouping$LBaseStemmer$AIII; - -BaseStemmer.prototype.in_grouping_b$AIII = function (s, min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor <= this.limit_backward) { - return false; - } - ch = this.current.charCodeAt(this.cursor - 1); - if (ch > max || ch < min) { - return false; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$in_grouping_b$LBaseStemmer$AIII($this, s, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor <= $this.limit_backward) { - return false; - } - ch = $this.current.charCodeAt($this.cursor - 1); - if (ch > max || ch < min) { - return false; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.in_grouping_b$LBaseStemmer$AIII = BaseStemmer$in_grouping_b$LBaseStemmer$AIII; - -BaseStemmer.prototype.out_grouping$AIII = function (s, min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor >= this.limit) { - return false; - } - ch = this.current.charCodeAt(this.cursor); - if (ch > max || ch < min) { - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; - } - ch -= min; - if ((s[ch >>> 3] & 0X1 << (ch & 0x7)) === 0) { - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; - } - return false; -}; - - -function BaseStemmer$out_grouping$LBaseStemmer$AIII($this, s, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor >= $this.limit) { - return false; - } - ch = $this.current.charCodeAt($this.cursor); - if (ch > max || ch < min) { - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; - } - ch -= min; - if ((s[ch >>> 3] & 0X1 << (ch & 0x7)) === 0) { - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; - } - return false; -}; - -BaseStemmer.out_grouping$LBaseStemmer$AIII = BaseStemmer$out_grouping$LBaseStemmer$AIII; - -BaseStemmer.prototype.out_grouping_b$AIII = function (s, min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor <= this.limit_backward) { - return false; - } - ch = this.current.charCodeAt(this.cursor - 1); - if (ch > max || ch < min) { - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; - } - return false; -}; - - -function BaseStemmer$out_grouping_b$LBaseStemmer$AIII($this, s, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor <= $this.limit_backward) { - return false; - } - ch = $this.current.charCodeAt($this.cursor - 1); - if (ch > max || ch < min) { - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; - } - ch -= min; - if ((s[ch >>> 3] & 0x1 << (ch & 0x7)) === 0) { - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; - } - return false; -}; - -BaseStemmer.out_grouping_b$LBaseStemmer$AIII = BaseStemmer$out_grouping_b$LBaseStemmer$AIII; - -BaseStemmer.prototype.in_range$II = function (min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor >= this.limit) { - return false; - } - ch = this.current.charCodeAt(this.cursor); - if (ch > max || ch < min) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$in_range$LBaseStemmer$II($this, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor >= $this.limit) { - return false; - } - ch = $this.current.charCodeAt($this.cursor); - if (ch > max || ch < min) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.in_range$LBaseStemmer$II = BaseStemmer$in_range$LBaseStemmer$II; - -BaseStemmer.prototype.in_range_b$II = function (min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor <= this.limit_backward) { - return false; - } - ch = this.current.charCodeAt(this.cursor - 1); - if (ch > max || ch < min) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$in_range_b$LBaseStemmer$II($this, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor <= $this.limit_backward) { - return false; - } - ch = $this.current.charCodeAt($this.cursor - 1); - if (ch > max || ch < min) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.in_range_b$LBaseStemmer$II = BaseStemmer$in_range_b$LBaseStemmer$II; - -BaseStemmer.prototype.out_range$II = function (min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor >= this.limit) { - return false; - } - ch = this.current.charCodeAt(this.cursor); - if (! (ch > max || ch < min)) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$out_range$LBaseStemmer$II($this, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor >= $this.limit) { - return false; - } - ch = $this.current.charCodeAt($this.cursor); - if (! (ch > max || ch < min)) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.out_range$LBaseStemmer$II = BaseStemmer$out_range$LBaseStemmer$II; - -BaseStemmer.prototype.out_range_b$II = function (min, max) { - var ch; - var $__jsx_postinc_t; - if (this.cursor <= this.limit_backward) { - return false; - } - ch = this.current.charCodeAt(this.cursor - 1); - if (! (ch > max || ch < min)) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - - -function BaseStemmer$out_range_b$LBaseStemmer$II($this, min, max) { - var ch; - var $__jsx_postinc_t; - if ($this.cursor <= $this.limit_backward) { - return false; - } - ch = $this.current.charCodeAt($this.cursor - 1); - if (! (ch > max || ch < min)) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - return true; -}; - -BaseStemmer.out_range_b$LBaseStemmer$II = BaseStemmer$out_range_b$LBaseStemmer$II; - -BaseStemmer.prototype.eq_s$IS = function (s_size, s) { - var cursor$0; - if (((this.limit - this.cursor) | 0) < s_size) { - return false; - } - if (this.current.slice(cursor$0 = this.cursor, ((cursor$0 + s_size) | 0)) !== s) { - return false; - } - this.cursor = (this.cursor + s_size) | 0; - return true; -}; - - -function BaseStemmer$eq_s$LBaseStemmer$IS($this, s_size, s) { - var cursor$0; - if ((($this.limit - $this.cursor) | 0) < s_size) { - return false; - } - if ($this.current.slice(cursor$0 = $this.cursor, ((cursor$0 + s_size) | 0)) !== s) { - return false; - } - $this.cursor = ($this.cursor + s_size) | 0; - return true; -}; - -BaseStemmer.eq_s$LBaseStemmer$IS = BaseStemmer$eq_s$LBaseStemmer$IS; - -BaseStemmer.prototype.eq_s_b$IS = function (s_size, s) { - var cursor$0; - if (((this.cursor - this.limit_backward) | 0) < s_size) { - return false; - } - if (this.current.slice((((cursor$0 = this.cursor) - s_size) | 0), cursor$0) !== s) { - return false; - } - this.cursor = (this.cursor - s_size) | 0; - return true; -}; - - -function BaseStemmer$eq_s_b$LBaseStemmer$IS($this, s_size, s) { - var cursor$0; - if ((($this.cursor - $this.limit_backward) | 0) < s_size) { - return false; - } - if ($this.current.slice((((cursor$0 = $this.cursor) - s_size) | 0), cursor$0) !== s) { - return false; - } - $this.cursor = ($this.cursor - s_size) | 0; - return true; -}; - -BaseStemmer.eq_s_b$LBaseStemmer$IS = BaseStemmer$eq_s_b$LBaseStemmer$IS; - -BaseStemmer.prototype.eq_v$S = function (s) { - return BaseStemmer$eq_s$LBaseStemmer$IS(this, s.length, s); -}; - - -function BaseStemmer$eq_v$LBaseStemmer$S($this, s) { - return BaseStemmer$eq_s$LBaseStemmer$IS($this, s.length, s); +// Generated by Snowball 2.1.0 - https://snowballstem.org/ + +/**@constructor*/ +TurkishStemmer = function() { + var base = new BaseStemmer(); + /** @const */ var a_0 = [ + ["m", -1, -1], + ["n", -1, -1], + ["miz", -1, -1], + ["niz", -1, -1], + ["muz", -1, -1], + ["nuz", -1, -1], + ["m\u00FCz", -1, -1], + ["n\u00FCz", -1, -1], + ["m\u0131z", -1, -1], + ["n\u0131z", -1, -1] + ]; + + /** @const */ var a_1 = [ + ["leri", -1, -1], + ["lar\u0131", -1, -1] + ]; + + /** @const */ var a_2 = [ + ["ni", -1, -1], + ["nu", -1, -1], + ["n\u00FC", -1, -1], + ["n\u0131", -1, -1] + ]; + + /** @const */ var a_3 = [ + ["in", -1, -1], + ["un", -1, -1], + ["\u00FCn", -1, -1], + ["\u0131n", -1, -1] + ]; + + /** @const */ var a_4 = [ + ["a", -1, -1], + ["e", -1, -1] + ]; + + /** @const */ var a_5 = [ + ["na", -1, -1], + ["ne", -1, -1] + ]; + + /** @const */ var a_6 = [ + ["da", -1, -1], + ["ta", -1, -1], + ["de", -1, -1], + ["te", -1, -1] + ]; + + /** @const */ var a_7 = [ + ["nda", -1, -1], + ["nde", -1, -1] + ]; + + /** @const */ var a_8 = [ + ["dan", -1, -1], + ["tan", -1, -1], + ["den", -1, -1], + ["ten", -1, -1] + ]; + + /** @const */ var a_9 = [ + ["ndan", -1, -1], + ["nden", -1, -1] + ]; + + /** @const */ var a_10 = [ + ["la", -1, -1], + ["le", -1, -1] + ]; + + /** @const */ var a_11 = [ + ["ca", -1, -1], + ["ce", -1, -1] + ]; + + /** @const */ var a_12 = [ + ["im", -1, -1], + ["um", -1, -1], + ["\u00FCm", -1, -1], + ["\u0131m", -1, -1] + ]; + + /** @const */ var a_13 = [ + ["sin", -1, -1], + ["sun", -1, -1], + ["s\u00FCn", -1, -1], + ["s\u0131n", -1, -1] + ]; + + /** @const */ var a_14 = [ + ["iz", -1, -1], + ["uz", -1, -1], + ["\u00FCz", -1, -1], + ["\u0131z", -1, -1] + ]; + + /** @const */ var a_15 = [ + ["siniz", -1, -1], + ["sunuz", -1, -1], + ["s\u00FCn\u00FCz", -1, -1], + ["s\u0131n\u0131z", -1, -1] + ]; + + /** @const */ var a_16 = [ + ["lar", -1, -1], + ["ler", -1, -1] + ]; + + /** @const */ var a_17 = [ + ["niz", -1, -1], + ["nuz", -1, -1], + ["n\u00FCz", -1, -1], + ["n\u0131z", -1, -1] + ]; + + /** @const */ var a_18 = [ + ["dir", -1, -1], + ["tir", -1, -1], + ["dur", -1, -1], + ["tur", -1, -1], + ["d\u00FCr", -1, -1], + ["t\u00FCr", -1, -1], + ["d\u0131r", -1, -1], + ["t\u0131r", -1, -1] + ]; + + /** @const */ var a_19 = [ + ["cas\u0131na", -1, -1], + ["cesine", -1, -1] + ]; + + /** @const */ var a_20 = [ + ["di", -1, -1], + ["ti", -1, -1], + ["dik", -1, -1], + ["tik", -1, -1], + ["duk", -1, -1], + ["tuk", -1, -1], + ["d\u00FCk", -1, -1], + ["t\u00FCk", -1, -1], + ["d\u0131k", -1, -1], + ["t\u0131k", -1, -1], + ["dim", -1, -1], + ["tim", -1, -1], + ["dum", -1, -1], + ["tum", -1, -1], + ["d\u00FCm", -1, -1], + ["t\u00FCm", -1, -1], + ["d\u0131m", -1, -1], + ["t\u0131m", -1, -1], + ["din", -1, -1], + ["tin", -1, -1], + ["dun", -1, -1], + ["tun", -1, -1], + ["d\u00FCn", -1, -1], + ["t\u00FCn", -1, -1], + ["d\u0131n", -1, -1], + ["t\u0131n", -1, -1], + ["du", -1, -1], + ["tu", -1, -1], + ["d\u00FC", -1, -1], + ["t\u00FC", -1, -1], + ["d\u0131", -1, -1], + ["t\u0131", -1, -1] + ]; + + /** @const */ var a_21 = [ + ["sa", -1, -1], + ["se", -1, -1], + ["sak", -1, -1], + ["sek", -1, -1], + ["sam", -1, -1], + ["sem", -1, -1], + ["san", -1, -1], + ["sen", -1, -1] + ]; + + /** @const */ var a_22 = [ + ["mi\u015F", -1, -1], + ["mu\u015F", -1, -1], + ["m\u00FC\u015F", -1, -1], + ["m\u0131\u015F", -1, -1] + ]; + + /** @const */ var a_23 = [ + ["b", -1, 1], + ["c", -1, 2], + ["d", -1, 3], + ["\u011F", -1, 4] + ]; + + /** @const */ var /** Array */ g_vowel = [17, 65, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 8, 0, 0, 0, 0, 0, 0, 1]; + + /** @const */ var /** Array */ g_U = [1, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 1]; + + /** @const */ var /** Array */ g_vowel1 = [1, 64, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]; + + /** @const */ var /** Array */ g_vowel2 = [17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 130]; + + /** @const */ var /** Array */ g_vowel3 = [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]; + + /** @const */ var /** Array */ g_vowel4 = [17]; + + /** @const */ var /** Array */ g_vowel5 = [65]; + + /** @const */ var /** Array */ g_vowel6 = [65]; + + var /** boolean */ B_continue_stemming_noun_suffixes = false; + + + /** @return {boolean} */ + function r_check_vowel_harmony() { + var /** number */ v_1 = base.limit - base.cursor; + golab0: while(true) + { + var /** number */ v_2 = base.limit - base.cursor; + lab1: { + if (!(base.in_grouping_b(g_vowel, 97, 305))) + { + break lab1; + } + base.cursor = base.limit - v_2; + break golab0; + } + base.cursor = base.limit - v_2; + if (base.cursor <= base.limit_backward) + { + return false; + } + base.cursor--; + } + lab2: { + var /** number */ v_3 = base.limit - base.cursor; + lab3: { + if (!(base.eq_s_b("a"))) + { + break lab3; + } + golab4: while(true) + { + var /** number */ v_4 = base.limit - base.cursor; + lab5: { + if (!(base.in_grouping_b(g_vowel1, 97, 305))) + { + break lab5; + } + base.cursor = base.limit - v_4; + break golab4; + } + base.cursor = base.limit - v_4; + if (base.cursor <= base.limit_backward) + { + break lab3; + } + base.cursor--; + } + break lab2; + } + base.cursor = base.limit - v_3; + lab6: { + if (!(base.eq_s_b("e"))) + { + break lab6; + } + golab7: while(true) + { + var /** number */ v_5 = base.limit - base.cursor; + lab8: { + if (!(base.in_grouping_b(g_vowel2, 101, 252))) + { + break lab8; + } + base.cursor = base.limit - v_5; + break golab7; + } + base.cursor = base.limit - v_5; + if (base.cursor <= base.limit_backward) + { + break lab6; + } + base.cursor--; + } + break lab2; + } + base.cursor = base.limit - v_3; + lab9: { + if (!(base.eq_s_b("\u0131"))) + { + break lab9; + } + golab10: while(true) + { + var /** number */ v_6 = base.limit - base.cursor; + lab11: { + if (!(base.in_grouping_b(g_vowel3, 97, 305))) + { + break lab11; + } + base.cursor = base.limit - v_6; + break golab10; + } + base.cursor = base.limit - v_6; + if (base.cursor <= base.limit_backward) + { + break lab9; + } + base.cursor--; + } + break lab2; + } + base.cursor = base.limit - v_3; + lab12: { + if (!(base.eq_s_b("i"))) + { + break lab12; + } + golab13: while(true) + { + var /** number */ v_7 = base.limit - base.cursor; + lab14: { + if (!(base.in_grouping_b(g_vowel4, 101, 105))) + { + break lab14; + } + base.cursor = base.limit - v_7; + break golab13; + } + base.cursor = base.limit - v_7; + if (base.cursor <= base.limit_backward) + { + break lab12; + } + base.cursor--; + } + break lab2; + } + base.cursor = base.limit - v_3; + lab15: { + if (!(base.eq_s_b("o"))) + { + break lab15; + } + golab16: while(true) + { + var /** number */ v_8 = base.limit - base.cursor; + lab17: { + if (!(base.in_grouping_b(g_vowel5, 111, 117))) + { + break lab17; + } + base.cursor = base.limit - v_8; + break golab16; + } + base.cursor = base.limit - v_8; + if (base.cursor <= base.limit_backward) + { + break lab15; + } + base.cursor--; + } + break lab2; + } + base.cursor = base.limit - v_3; + lab18: { + if (!(base.eq_s_b("\u00F6"))) + { + break lab18; + } + golab19: while(true) + { + var /** number */ v_9 = base.limit - base.cursor; + lab20: { + if (!(base.in_grouping_b(g_vowel6, 246, 252))) + { + break lab20; + } + base.cursor = base.limit - v_9; + break golab19; + } + base.cursor = base.limit - v_9; + if (base.cursor <= base.limit_backward) + { + break lab18; + } + base.cursor--; + } + break lab2; + } + base.cursor = base.limit - v_3; + lab21: { + if (!(base.eq_s_b("u"))) + { + break lab21; + } + golab22: while(true) + { + var /** number */ v_10 = base.limit - base.cursor; + lab23: { + if (!(base.in_grouping_b(g_vowel5, 111, 117))) + { + break lab23; + } + base.cursor = base.limit - v_10; + break golab22; + } + base.cursor = base.limit - v_10; + if (base.cursor <= base.limit_backward) + { + break lab21; + } + base.cursor--; + } + break lab2; + } + base.cursor = base.limit - v_3; + if (!(base.eq_s_b("\u00FC"))) + { + return false; + } + golab24: while(true) + { + var /** number */ v_11 = base.limit - base.cursor; + lab25: { + if (!(base.in_grouping_b(g_vowel6, 246, 252))) + { + break lab25; + } + base.cursor = base.limit - v_11; + break golab24; + } + base.cursor = base.limit - v_11; + if (base.cursor <= base.limit_backward) + { + return false; + } + base.cursor--; + } + } + base.cursor = base.limit - v_1; + return true; + }; + + /** @return {boolean} */ + function r_mark_suffix_with_optional_n_consonant() { + lab0: { + var /** number */ v_1 = base.limit - base.cursor; + lab1: { + if (!(base.eq_s_b("n"))) + { + break lab1; + } + var /** number */ v_2 = base.limit - base.cursor; + if (!(base.in_grouping_b(g_vowel, 97, 305))) + { + break lab1; + } + base.cursor = base.limit - v_2; + break lab0; + } + base.cursor = base.limit - v_1; + { + var /** number */ v_3 = base.limit - base.cursor; + lab2: { + var /** number */ v_4 = base.limit - base.cursor; + if (!(base.eq_s_b("n"))) + { + break lab2; + } + base.cursor = base.limit - v_4; + return false; + } + base.cursor = base.limit - v_3; + } + var /** number */ v_5 = base.limit - base.cursor; + if (base.cursor <= base.limit_backward) + { + return false; + } + base.cursor--; + if (!(base.in_grouping_b(g_vowel, 97, 305))) + { + return false; + } + base.cursor = base.limit - v_5; + } + return true; + }; + + /** @return {boolean} */ + function r_mark_suffix_with_optional_s_consonant() { + lab0: { + var /** number */ v_1 = base.limit - base.cursor; + lab1: { + if (!(base.eq_s_b("s"))) + { + break lab1; + } + var /** number */ v_2 = base.limit - base.cursor; + if (!(base.in_grouping_b(g_vowel, 97, 305))) + { + break lab1; + } + base.cursor = base.limit - v_2; + break lab0; + } + base.cursor = base.limit - v_1; + { + var /** number */ v_3 = base.limit - base.cursor; + lab2: { + var /** number */ v_4 = base.limit - base.cursor; + if (!(base.eq_s_b("s"))) + { + break lab2; + } + base.cursor = base.limit - v_4; + return false; + } + base.cursor = base.limit - v_3; + } + var /** number */ v_5 = base.limit - base.cursor; + if (base.cursor <= base.limit_backward) + { + return false; + } + base.cursor--; + if (!(base.in_grouping_b(g_vowel, 97, 305))) + { + return false; + } + base.cursor = base.limit - v_5; + } + return true; + }; + + /** @return {boolean} */ + function r_mark_suffix_with_optional_y_consonant() { + lab0: { + var /** number */ v_1 = base.limit - base.cursor; + lab1: { + if (!(base.eq_s_b("y"))) + { + break lab1; + } + var /** number */ v_2 = base.limit - base.cursor; + if (!(base.in_grouping_b(g_vowel, 97, 305))) + { + break lab1; + } + base.cursor = base.limit - v_2; + break lab0; + } + base.cursor = base.limit - v_1; + { + var /** number */ v_3 = base.limit - base.cursor; + lab2: { + var /** number */ v_4 = base.limit - base.cursor; + if (!(base.eq_s_b("y"))) + { + break lab2; + } + base.cursor = base.limit - v_4; + return false; + } + base.cursor = base.limit - v_3; + } + var /** number */ v_5 = base.limit - base.cursor; + if (base.cursor <= base.limit_backward) + { + return false; + } + base.cursor--; + if (!(base.in_grouping_b(g_vowel, 97, 305))) + { + return false; + } + base.cursor = base.limit - v_5; + } + return true; + }; + + /** @return {boolean} */ + function r_mark_suffix_with_optional_U_vowel() { + lab0: { + var /** number */ v_1 = base.limit - base.cursor; + lab1: { + if (!(base.in_grouping_b(g_U, 105, 305))) + { + break lab1; + } + var /** number */ v_2 = base.limit - base.cursor; + if (!(base.out_grouping_b(g_vowel, 97, 305))) + { + break lab1; + } + base.cursor = base.limit - v_2; + break lab0; + } + base.cursor = base.limit - v_1; + { + var /** number */ v_3 = base.limit - base.cursor; + lab2: { + var /** number */ v_4 = base.limit - base.cursor; + if (!(base.in_grouping_b(g_U, 105, 305))) + { + break lab2; + } + base.cursor = base.limit - v_4; + return false; + } + base.cursor = base.limit - v_3; + } + var /** number */ v_5 = base.limit - base.cursor; + if (base.cursor <= base.limit_backward) + { + return false; + } + base.cursor--; + if (!(base.out_grouping_b(g_vowel, 97, 305))) + { + return false; + } + base.cursor = base.limit - v_5; + } + return true; + }; + + /** @return {boolean} */ + function r_mark_possessives() { + if (base.find_among_b(a_0) == 0) + { + return false; + } + if (!r_mark_suffix_with_optional_U_vowel()) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_mark_sU() { + if (!r_check_vowel_harmony()) + { + return false; + } + if (!(base.in_grouping_b(g_U, 105, 305))) + { + return false; + } + if (!r_mark_suffix_with_optional_s_consonant()) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_mark_lArI() { + if (base.find_among_b(a_1) == 0) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_mark_yU() { + if (!r_check_vowel_harmony()) + { + return false; + } + if (!(base.in_grouping_b(g_U, 105, 305))) + { + return false; + } + if (!r_mark_suffix_with_optional_y_consonant()) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_mark_nU() { + if (!r_check_vowel_harmony()) + { + return false; + } + if (base.find_among_b(a_2) == 0) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_mark_nUn() { + if (!r_check_vowel_harmony()) + { + return false; + } + if (base.find_among_b(a_3) == 0) + { + return false; + } + if (!r_mark_suffix_with_optional_n_consonant()) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_mark_yA() { + if (!r_check_vowel_harmony()) + { + return false; + } + if (base.find_among_b(a_4) == 0) + { + return false; + } + if (!r_mark_suffix_with_optional_y_consonant()) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_mark_nA() { + if (!r_check_vowel_harmony()) + { + return false; + } + if (base.find_among_b(a_5) == 0) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_mark_DA() { + if (!r_check_vowel_harmony()) + { + return false; + } + if (base.find_among_b(a_6) == 0) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_mark_ndA() { + if (!r_check_vowel_harmony()) + { + return false; + } + if (base.find_among_b(a_7) == 0) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_mark_DAn() { + if (!r_check_vowel_harmony()) + { + return false; + } + if (base.find_among_b(a_8) == 0) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_mark_ndAn() { + if (!r_check_vowel_harmony()) + { + return false; + } + if (base.find_among_b(a_9) == 0) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_mark_ylA() { + if (!r_check_vowel_harmony()) + { + return false; + } + if (base.find_among_b(a_10) == 0) + { + return false; + } + if (!r_mark_suffix_with_optional_y_consonant()) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_mark_ki() { + if (!(base.eq_s_b("ki"))) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_mark_ncA() { + if (!r_check_vowel_harmony()) + { + return false; + } + if (base.find_among_b(a_11) == 0) + { + return false; + } + if (!r_mark_suffix_with_optional_n_consonant()) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_mark_yUm() { + if (!r_check_vowel_harmony()) + { + return false; + } + if (base.find_among_b(a_12) == 0) + { + return false; + } + if (!r_mark_suffix_with_optional_y_consonant()) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_mark_sUn() { + if (!r_check_vowel_harmony()) + { + return false; + } + if (base.find_among_b(a_13) == 0) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_mark_yUz() { + if (!r_check_vowel_harmony()) + { + return false; + } + if (base.find_among_b(a_14) == 0) + { + return false; + } + if (!r_mark_suffix_with_optional_y_consonant()) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_mark_sUnUz() { + if (base.find_among_b(a_15) == 0) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_mark_lAr() { + if (!r_check_vowel_harmony()) + { + return false; + } + if (base.find_among_b(a_16) == 0) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_mark_nUz() { + if (!r_check_vowel_harmony()) + { + return false; + } + if (base.find_among_b(a_17) == 0) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_mark_DUr() { + if (!r_check_vowel_harmony()) + { + return false; + } + if (base.find_among_b(a_18) == 0) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_mark_cAsInA() { + if (base.find_among_b(a_19) == 0) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_mark_yDU() { + if (!r_check_vowel_harmony()) + { + return false; + } + if (base.find_among_b(a_20) == 0) + { + return false; + } + if (!r_mark_suffix_with_optional_y_consonant()) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_mark_ysA() { + if (base.find_among_b(a_21) == 0) + { + return false; + } + if (!r_mark_suffix_with_optional_y_consonant()) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_mark_ymUs_() { + if (!r_check_vowel_harmony()) + { + return false; + } + if (base.find_among_b(a_22) == 0) + { + return false; + } + if (!r_mark_suffix_with_optional_y_consonant()) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_mark_yken() { + if (!(base.eq_s_b("ken"))) + { + return false; + } + if (!r_mark_suffix_with_optional_y_consonant()) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_stem_nominal_verb_suffixes() { + base.ket = base.cursor; + B_continue_stemming_noun_suffixes = true; + lab0: { + var /** number */ v_1 = base.limit - base.cursor; + lab1: { + lab2: { + var /** number */ v_2 = base.limit - base.cursor; + lab3: { + if (!r_mark_ymUs_()) + { + break lab3; + } + break lab2; + } + base.cursor = base.limit - v_2; + lab4: { + if (!r_mark_yDU()) + { + break lab4; + } + break lab2; + } + base.cursor = base.limit - v_2; + lab5: { + if (!r_mark_ysA()) + { + break lab5; + } + break lab2; + } + base.cursor = base.limit - v_2; + if (!r_mark_yken()) + { + break lab1; + } + } + break lab0; + } + base.cursor = base.limit - v_1; + lab6: { + if (!r_mark_cAsInA()) + { + break lab6; + } + lab7: { + var /** number */ v_3 = base.limit - base.cursor; + lab8: { + if (!r_mark_sUnUz()) + { + break lab8; + } + break lab7; + } + base.cursor = base.limit - v_3; + lab9: { + if (!r_mark_lAr()) + { + break lab9; + } + break lab7; + } + base.cursor = base.limit - v_3; + lab10: { + if (!r_mark_yUm()) + { + break lab10; + } + break lab7; + } + base.cursor = base.limit - v_3; + lab11: { + if (!r_mark_sUn()) + { + break lab11; + } + break lab7; + } + base.cursor = base.limit - v_3; + lab12: { + if (!r_mark_yUz()) + { + break lab12; + } + break lab7; + } + base.cursor = base.limit - v_3; + } + if (!r_mark_ymUs_()) + { + break lab6; + } + break lab0; + } + base.cursor = base.limit - v_1; + lab13: { + if (!r_mark_lAr()) + { + break lab13; + } + base.bra = base.cursor; + if (!base.slice_del()) + { + return false; + } + var /** number */ v_4 = base.limit - base.cursor; + lab14: { + base.ket = base.cursor; + lab15: { + var /** number */ v_5 = base.limit - base.cursor; + lab16: { + if (!r_mark_DUr()) + { + break lab16; + } + break lab15; + } + base.cursor = base.limit - v_5; + lab17: { + if (!r_mark_yDU()) + { + break lab17; + } + break lab15; + } + base.cursor = base.limit - v_5; + lab18: { + if (!r_mark_ysA()) + { + break lab18; + } + break lab15; + } + base.cursor = base.limit - v_5; + if (!r_mark_ymUs_()) + { + base.cursor = base.limit - v_4; + break lab14; + } + } + } + B_continue_stemming_noun_suffixes = false; + break lab0; + } + base.cursor = base.limit - v_1; + lab19: { + if (!r_mark_nUz()) + { + break lab19; + } + lab20: { + var /** number */ v_6 = base.limit - base.cursor; + lab21: { + if (!r_mark_yDU()) + { + break lab21; + } + break lab20; + } + base.cursor = base.limit - v_6; + if (!r_mark_ysA()) + { + break lab19; + } + } + break lab0; + } + base.cursor = base.limit - v_1; + lab22: { + lab23: { + var /** number */ v_7 = base.limit - base.cursor; + lab24: { + if (!r_mark_sUnUz()) + { + break lab24; + } + break lab23; + } + base.cursor = base.limit - v_7; + lab25: { + if (!r_mark_yUz()) + { + break lab25; + } + break lab23; + } + base.cursor = base.limit - v_7; + lab26: { + if (!r_mark_sUn()) + { + break lab26; + } + break lab23; + } + base.cursor = base.limit - v_7; + if (!r_mark_yUm()) + { + break lab22; + } + } + base.bra = base.cursor; + if (!base.slice_del()) + { + return false; + } + var /** number */ v_8 = base.limit - base.cursor; + lab27: { + base.ket = base.cursor; + if (!r_mark_ymUs_()) + { + base.cursor = base.limit - v_8; + break lab27; + } + } + break lab0; + } + base.cursor = base.limit - v_1; + if (!r_mark_DUr()) + { + return false; + } + base.bra = base.cursor; + if (!base.slice_del()) + { + return false; + } + var /** number */ v_9 = base.limit - base.cursor; + lab28: { + base.ket = base.cursor; + lab29: { + var /** number */ v_10 = base.limit - base.cursor; + lab30: { + if (!r_mark_sUnUz()) + { + break lab30; + } + break lab29; + } + base.cursor = base.limit - v_10; + lab31: { + if (!r_mark_lAr()) + { + break lab31; + } + break lab29; + } + base.cursor = base.limit - v_10; + lab32: { + if (!r_mark_yUm()) + { + break lab32; + } + break lab29; + } + base.cursor = base.limit - v_10; + lab33: { + if (!r_mark_sUn()) + { + break lab33; + } + break lab29; + } + base.cursor = base.limit - v_10; + lab34: { + if (!r_mark_yUz()) + { + break lab34; + } + break lab29; + } + base.cursor = base.limit - v_10; + } + if (!r_mark_ymUs_()) + { + base.cursor = base.limit - v_9; + break lab28; + } + } + } + base.bra = base.cursor; + if (!base.slice_del()) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_stem_suffix_chain_before_ki() { + base.ket = base.cursor; + if (!r_mark_ki()) + { + return false; + } + lab0: { + var /** number */ v_1 = base.limit - base.cursor; + lab1: { + if (!r_mark_DA()) + { + break lab1; + } + base.bra = base.cursor; + if (!base.slice_del()) + { + return false; + } + var /** number */ v_2 = base.limit - base.cursor; + lab2: { + base.ket = base.cursor; + lab3: { + var /** number */ v_3 = base.limit - base.cursor; + lab4: { + if (!r_mark_lAr()) + { + break lab4; + } + base.bra = base.cursor; + if (!base.slice_del()) + { + return false; + } + var /** number */ v_4 = base.limit - base.cursor; + lab5: { + if (!r_stem_suffix_chain_before_ki()) + { + base.cursor = base.limit - v_4; + break lab5; + } + } + break lab3; + } + base.cursor = base.limit - v_3; + if (!r_mark_possessives()) + { + base.cursor = base.limit - v_2; + break lab2; + } + base.bra = base.cursor; + if (!base.slice_del()) + { + return false; + } + var /** number */ v_5 = base.limit - base.cursor; + lab6: { + base.ket = base.cursor; + if (!r_mark_lAr()) + { + base.cursor = base.limit - v_5; + break lab6; + } + base.bra = base.cursor; + if (!base.slice_del()) + { + return false; + } + if (!r_stem_suffix_chain_before_ki()) + { + base.cursor = base.limit - v_5; + break lab6; + } + } + } + } + break lab0; + } + base.cursor = base.limit - v_1; + lab7: { + if (!r_mark_nUn()) + { + break lab7; + } + base.bra = base.cursor; + if (!base.slice_del()) + { + return false; + } + var /** number */ v_6 = base.limit - base.cursor; + lab8: { + base.ket = base.cursor; + lab9: { + var /** number */ v_7 = base.limit - base.cursor; + lab10: { + if (!r_mark_lArI()) + { + break lab10; + } + base.bra = base.cursor; + if (!base.slice_del()) + { + return false; + } + break lab9; + } + base.cursor = base.limit - v_7; + lab11: { + base.ket = base.cursor; + lab12: { + var /** number */ v_8 = base.limit - base.cursor; + lab13: { + if (!r_mark_possessives()) + { + break lab13; + } + break lab12; + } + base.cursor = base.limit - v_8; + if (!r_mark_sU()) + { + break lab11; + } + } + base.bra = base.cursor; + if (!base.slice_del()) + { + return false; + } + var /** number */ v_9 = base.limit - base.cursor; + lab14: { + base.ket = base.cursor; + if (!r_mark_lAr()) + { + base.cursor = base.limit - v_9; + break lab14; + } + base.bra = base.cursor; + if (!base.slice_del()) + { + return false; + } + if (!r_stem_suffix_chain_before_ki()) + { + base.cursor = base.limit - v_9; + break lab14; + } + } + break lab9; + } + base.cursor = base.limit - v_7; + if (!r_stem_suffix_chain_before_ki()) + { + base.cursor = base.limit - v_6; + break lab8; + } + } + } + break lab0; + } + base.cursor = base.limit - v_1; + if (!r_mark_ndA()) + { + return false; + } + lab15: { + var /** number */ v_10 = base.limit - base.cursor; + lab16: { + if (!r_mark_lArI()) + { + break lab16; + } + base.bra = base.cursor; + if (!base.slice_del()) + { + return false; + } + break lab15; + } + base.cursor = base.limit - v_10; + lab17: { + if (!r_mark_sU()) + { + break lab17; + } + base.bra = base.cursor; + if (!base.slice_del()) + { + return false; + } + var /** number */ v_11 = base.limit - base.cursor; + lab18: { + base.ket = base.cursor; + if (!r_mark_lAr()) + { + base.cursor = base.limit - v_11; + break lab18; + } + base.bra = base.cursor; + if (!base.slice_del()) + { + return false; + } + if (!r_stem_suffix_chain_before_ki()) + { + base.cursor = base.limit - v_11; + break lab18; + } + } + break lab15; + } + base.cursor = base.limit - v_10; + if (!r_stem_suffix_chain_before_ki()) + { + return false; + } + } + } + return true; + }; + + /** @return {boolean} */ + function r_stem_noun_suffixes() { + lab0: { + var /** number */ v_1 = base.limit - base.cursor; + lab1: { + base.ket = base.cursor; + if (!r_mark_lAr()) + { + break lab1; + } + base.bra = base.cursor; + if (!base.slice_del()) + { + return false; + } + var /** number */ v_2 = base.limit - base.cursor; + lab2: { + if (!r_stem_suffix_chain_before_ki()) + { + base.cursor = base.limit - v_2; + break lab2; + } + } + break lab0; + } + base.cursor = base.limit - v_1; + lab3: { + base.ket = base.cursor; + if (!r_mark_ncA()) + { + break lab3; + } + base.bra = base.cursor; + if (!base.slice_del()) + { + return false; + } + var /** number */ v_3 = base.limit - base.cursor; + lab4: { + lab5: { + var /** number */ v_4 = base.limit - base.cursor; + lab6: { + base.ket = base.cursor; + if (!r_mark_lArI()) + { + break lab6; + } + base.bra = base.cursor; + if (!base.slice_del()) + { + return false; + } + break lab5; + } + base.cursor = base.limit - v_4; + lab7: { + base.ket = base.cursor; + lab8: { + var /** number */ v_5 = base.limit - base.cursor; + lab9: { + if (!r_mark_possessives()) + { + break lab9; + } + break lab8; + } + base.cursor = base.limit - v_5; + if (!r_mark_sU()) + { + break lab7; + } + } + base.bra = base.cursor; + if (!base.slice_del()) + { + return false; + } + var /** number */ v_6 = base.limit - base.cursor; + lab10: { + base.ket = base.cursor; + if (!r_mark_lAr()) + { + base.cursor = base.limit - v_6; + break lab10; + } + base.bra = base.cursor; + if (!base.slice_del()) + { + return false; + } + if (!r_stem_suffix_chain_before_ki()) + { + base.cursor = base.limit - v_6; + break lab10; + } + } + break lab5; + } + base.cursor = base.limit - v_4; + base.ket = base.cursor; + if (!r_mark_lAr()) + { + base.cursor = base.limit - v_3; + break lab4; + } + base.bra = base.cursor; + if (!base.slice_del()) + { + return false; + } + if (!r_stem_suffix_chain_before_ki()) + { + base.cursor = base.limit - v_3; + break lab4; + } + } + } + break lab0; + } + base.cursor = base.limit - v_1; + lab11: { + base.ket = base.cursor; + lab12: { + var /** number */ v_7 = base.limit - base.cursor; + lab13: { + if (!r_mark_ndA()) + { + break lab13; + } + break lab12; + } + base.cursor = base.limit - v_7; + if (!r_mark_nA()) + { + break lab11; + } + } + lab14: { + var /** number */ v_8 = base.limit - base.cursor; + lab15: { + if (!r_mark_lArI()) + { + break lab15; + } + base.bra = base.cursor; + if (!base.slice_del()) + { + return false; + } + break lab14; + } + base.cursor = base.limit - v_8; + lab16: { + if (!r_mark_sU()) + { + break lab16; + } + base.bra = base.cursor; + if (!base.slice_del()) + { + return false; + } + var /** number */ v_9 = base.limit - base.cursor; + lab17: { + base.ket = base.cursor; + if (!r_mark_lAr()) + { + base.cursor = base.limit - v_9; + break lab17; + } + base.bra = base.cursor; + if (!base.slice_del()) + { + return false; + } + if (!r_stem_suffix_chain_before_ki()) + { + base.cursor = base.limit - v_9; + break lab17; + } + } + break lab14; + } + base.cursor = base.limit - v_8; + if (!r_stem_suffix_chain_before_ki()) + { + break lab11; + } + } + break lab0; + } + base.cursor = base.limit - v_1; + lab18: { + base.ket = base.cursor; + lab19: { + var /** number */ v_10 = base.limit - base.cursor; + lab20: { + if (!r_mark_ndAn()) + { + break lab20; + } + break lab19; + } + base.cursor = base.limit - v_10; + if (!r_mark_nU()) + { + break lab18; + } + } + lab21: { + var /** number */ v_11 = base.limit - base.cursor; + lab22: { + if (!r_mark_sU()) + { + break lab22; + } + base.bra = base.cursor; + if (!base.slice_del()) + { + return false; + } + var /** number */ v_12 = base.limit - base.cursor; + lab23: { + base.ket = base.cursor; + if (!r_mark_lAr()) + { + base.cursor = base.limit - v_12; + break lab23; + } + base.bra = base.cursor; + if (!base.slice_del()) + { + return false; + } + if (!r_stem_suffix_chain_before_ki()) + { + base.cursor = base.limit - v_12; + break lab23; + } + } + break lab21; + } + base.cursor = base.limit - v_11; + if (!r_mark_lArI()) + { + break lab18; + } + } + break lab0; + } + base.cursor = base.limit - v_1; + lab24: { + base.ket = base.cursor; + if (!r_mark_DAn()) + { + break lab24; + } + base.bra = base.cursor; + if (!base.slice_del()) + { + return false; + } + var /** number */ v_13 = base.limit - base.cursor; + lab25: { + base.ket = base.cursor; + lab26: { + var /** number */ v_14 = base.limit - base.cursor; + lab27: { + if (!r_mark_possessives()) + { + break lab27; + } + base.bra = base.cursor; + if (!base.slice_del()) + { + return false; + } + var /** number */ v_15 = base.limit - base.cursor; + lab28: { + base.ket = base.cursor; + if (!r_mark_lAr()) + { + base.cursor = base.limit - v_15; + break lab28; + } + base.bra = base.cursor; + if (!base.slice_del()) + { + return false; + } + if (!r_stem_suffix_chain_before_ki()) + { + base.cursor = base.limit - v_15; + break lab28; + } + } + break lab26; + } + base.cursor = base.limit - v_14; + lab29: { + if (!r_mark_lAr()) + { + break lab29; + } + base.bra = base.cursor; + if (!base.slice_del()) + { + return false; + } + var /** number */ v_16 = base.limit - base.cursor; + lab30: { + if (!r_stem_suffix_chain_before_ki()) + { + base.cursor = base.limit - v_16; + break lab30; + } + } + break lab26; + } + base.cursor = base.limit - v_14; + if (!r_stem_suffix_chain_before_ki()) + { + base.cursor = base.limit - v_13; + break lab25; + } + } + } + break lab0; + } + base.cursor = base.limit - v_1; + lab31: { + base.ket = base.cursor; + lab32: { + var /** number */ v_17 = base.limit - base.cursor; + lab33: { + if (!r_mark_nUn()) + { + break lab33; + } + break lab32; + } + base.cursor = base.limit - v_17; + if (!r_mark_ylA()) + { + break lab31; + } + } + base.bra = base.cursor; + if (!base.slice_del()) + { + return false; + } + var /** number */ v_18 = base.limit - base.cursor; + lab34: { + lab35: { + var /** number */ v_19 = base.limit - base.cursor; + lab36: { + base.ket = base.cursor; + if (!r_mark_lAr()) + { + break lab36; + } + base.bra = base.cursor; + if (!base.slice_del()) + { + return false; + } + if (!r_stem_suffix_chain_before_ki()) + { + break lab36; + } + break lab35; + } + base.cursor = base.limit - v_19; + lab37: { + base.ket = base.cursor; + lab38: { + var /** number */ v_20 = base.limit - base.cursor; + lab39: { + if (!r_mark_possessives()) + { + break lab39; + } + break lab38; + } + base.cursor = base.limit - v_20; + if (!r_mark_sU()) + { + break lab37; + } + } + base.bra = base.cursor; + if (!base.slice_del()) + { + return false; + } + var /** number */ v_21 = base.limit - base.cursor; + lab40: { + base.ket = base.cursor; + if (!r_mark_lAr()) + { + base.cursor = base.limit - v_21; + break lab40; + } + base.bra = base.cursor; + if (!base.slice_del()) + { + return false; + } + if (!r_stem_suffix_chain_before_ki()) + { + base.cursor = base.limit - v_21; + break lab40; + } + } + break lab35; + } + base.cursor = base.limit - v_19; + if (!r_stem_suffix_chain_before_ki()) + { + base.cursor = base.limit - v_18; + break lab34; + } + } + } + break lab0; + } + base.cursor = base.limit - v_1; + lab41: { + base.ket = base.cursor; + if (!r_mark_lArI()) + { + break lab41; + } + base.bra = base.cursor; + if (!base.slice_del()) + { + return false; + } + break lab0; + } + base.cursor = base.limit - v_1; + lab42: { + if (!r_stem_suffix_chain_before_ki()) + { + break lab42; + } + break lab0; + } + base.cursor = base.limit - v_1; + lab43: { + base.ket = base.cursor; + lab44: { + var /** number */ v_22 = base.limit - base.cursor; + lab45: { + if (!r_mark_DA()) + { + break lab45; + } + break lab44; + } + base.cursor = base.limit - v_22; + lab46: { + if (!r_mark_yU()) + { + break lab46; + } + break lab44; + } + base.cursor = base.limit - v_22; + if (!r_mark_yA()) + { + break lab43; + } + } + base.bra = base.cursor; + if (!base.slice_del()) + { + return false; + } + var /** number */ v_23 = base.limit - base.cursor; + lab47: { + base.ket = base.cursor; + lab48: { + var /** number */ v_24 = base.limit - base.cursor; + lab49: { + if (!r_mark_possessives()) + { + break lab49; + } + base.bra = base.cursor; + if (!base.slice_del()) + { + return false; + } + var /** number */ v_25 = base.limit - base.cursor; + lab50: { + base.ket = base.cursor; + if (!r_mark_lAr()) + { + base.cursor = base.limit - v_25; + break lab50; + } + } + break lab48; + } + base.cursor = base.limit - v_24; + if (!r_mark_lAr()) + { + base.cursor = base.limit - v_23; + break lab47; + } + } + base.bra = base.cursor; + if (!base.slice_del()) + { + return false; + } + base.ket = base.cursor; + if (!r_stem_suffix_chain_before_ki()) + { + base.cursor = base.limit - v_23; + break lab47; + } + } + break lab0; + } + base.cursor = base.limit - v_1; + base.ket = base.cursor; + lab51: { + var /** number */ v_26 = base.limit - base.cursor; + lab52: { + if (!r_mark_possessives()) + { + break lab52; + } + break lab51; + } + base.cursor = base.limit - v_26; + if (!r_mark_sU()) + { + return false; + } + } + base.bra = base.cursor; + if (!base.slice_del()) + { + return false; + } + var /** number */ v_27 = base.limit - base.cursor; + lab53: { + base.ket = base.cursor; + if (!r_mark_lAr()) + { + base.cursor = base.limit - v_27; + break lab53; + } + base.bra = base.cursor; + if (!base.slice_del()) + { + return false; + } + if (!r_stem_suffix_chain_before_ki()) + { + base.cursor = base.limit - v_27; + break lab53; + } + } + } + return true; + }; + + /** @return {boolean} */ + function r_post_process_last_consonants() { + var /** number */ among_var; + base.ket = base.cursor; + among_var = base.find_among_b(a_23); + if (among_var == 0) + { + return false; + } + base.bra = base.cursor; + switch (among_var) { + case 1: + if (!base.slice_from("p")) + { + return false; + } + break; + case 2: + if (!base.slice_from("\u00E7")) + { + return false; + } + break; + case 3: + if (!base.slice_from("t")) + { + return false; + } + break; + case 4: + if (!base.slice_from("k")) + { + return false; + } + break; + } + return true; + }; + + /** @return {boolean} */ + function r_append_U_to_stems_ending_with_d_or_g() { + var /** number */ v_1 = base.limit - base.cursor; + lab0: { + var /** number */ v_2 = base.limit - base.cursor; + lab1: { + if (!(base.eq_s_b("d"))) + { + break lab1; + } + break lab0; + } + base.cursor = base.limit - v_2; + if (!(base.eq_s_b("g"))) + { + return false; + } + } + base.cursor = base.limit - v_1; + lab2: { + var /** number */ v_3 = base.limit - base.cursor; + lab3: { + var /** number */ v_4 = base.limit - base.cursor; + golab4: while(true) + { + var /** number */ v_5 = base.limit - base.cursor; + lab5: { + if (!(base.in_grouping_b(g_vowel, 97, 305))) + { + break lab5; + } + base.cursor = base.limit - v_5; + break golab4; + } + base.cursor = base.limit - v_5; + if (base.cursor <= base.limit_backward) + { + break lab3; + } + base.cursor--; + } + lab6: { + var /** number */ v_6 = base.limit - base.cursor; + lab7: { + if (!(base.eq_s_b("a"))) + { + break lab7; + } + break lab6; + } + base.cursor = base.limit - v_6; + if (!(base.eq_s_b("\u0131"))) + { + break lab3; + } + } + base.cursor = base.limit - v_4; + { + var /** number */ c1 = base.cursor; + base.insert(base.cursor, base.cursor, "\u0131"); + base.cursor = c1; + } + break lab2; + } + base.cursor = base.limit - v_3; + lab8: { + var /** number */ v_7 = base.limit - base.cursor; + golab9: while(true) + { + var /** number */ v_8 = base.limit - base.cursor; + lab10: { + if (!(base.in_grouping_b(g_vowel, 97, 305))) + { + break lab10; + } + base.cursor = base.limit - v_8; + break golab9; + } + base.cursor = base.limit - v_8; + if (base.cursor <= base.limit_backward) + { + break lab8; + } + base.cursor--; + } + lab11: { + var /** number */ v_9 = base.limit - base.cursor; + lab12: { + if (!(base.eq_s_b("e"))) + { + break lab12; + } + break lab11; + } + base.cursor = base.limit - v_9; + if (!(base.eq_s_b("i"))) + { + break lab8; + } + } + base.cursor = base.limit - v_7; + { + var /** number */ c2 = base.cursor; + base.insert(base.cursor, base.cursor, "i"); + base.cursor = c2; + } + break lab2; + } + base.cursor = base.limit - v_3; + lab13: { + var /** number */ v_10 = base.limit - base.cursor; + golab14: while(true) + { + var /** number */ v_11 = base.limit - base.cursor; + lab15: { + if (!(base.in_grouping_b(g_vowel, 97, 305))) + { + break lab15; + } + base.cursor = base.limit - v_11; + break golab14; + } + base.cursor = base.limit - v_11; + if (base.cursor <= base.limit_backward) + { + break lab13; + } + base.cursor--; + } + lab16: { + var /** number */ v_12 = base.limit - base.cursor; + lab17: { + if (!(base.eq_s_b("o"))) + { + break lab17; + } + break lab16; + } + base.cursor = base.limit - v_12; + if (!(base.eq_s_b("u"))) + { + break lab13; + } + } + base.cursor = base.limit - v_10; + { + var /** number */ c3 = base.cursor; + base.insert(base.cursor, base.cursor, "u"); + base.cursor = c3; + } + break lab2; + } + base.cursor = base.limit - v_3; + var /** number */ v_13 = base.limit - base.cursor; + golab18: while(true) + { + var /** number */ v_14 = base.limit - base.cursor; + lab19: { + if (!(base.in_grouping_b(g_vowel, 97, 305))) + { + break lab19; + } + base.cursor = base.limit - v_14; + break golab18; + } + base.cursor = base.limit - v_14; + if (base.cursor <= base.limit_backward) + { + return false; + } + base.cursor--; + } + lab20: { + var /** number */ v_15 = base.limit - base.cursor; + lab21: { + if (!(base.eq_s_b("\u00F6"))) + { + break lab21; + } + break lab20; + } + base.cursor = base.limit - v_15; + if (!(base.eq_s_b("\u00FC"))) + { + return false; + } + } + base.cursor = base.limit - v_13; + { + var /** number */ c4 = base.cursor; + base.insert(base.cursor, base.cursor, "\u00FC"); + base.cursor = c4; + } + } + return true; + }; + + /** @return {boolean} */ + function r_is_reserved_word() { + if (!(base.eq_s_b("ad"))) + { + return false; + } + var /** number */ v_1 = base.limit - base.cursor; + lab0: { + if (!(base.eq_s_b("soy"))) + { + base.cursor = base.limit - v_1; + break lab0; + } + } + if (base.cursor > base.limit_backward) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_more_than_one_syllable_word() { + var /** number */ v_1 = base.cursor; + { + var v_2 = 2; + while(true) + { + var /** number */ v_3 = base.cursor; + lab0: { + golab1: while(true) + { + lab2: { + if (!(base.in_grouping(g_vowel, 97, 305))) + { + break lab2; + } + break golab1; + } + if (base.cursor >= base.limit) + { + break lab0; + } + base.cursor++; + } + v_2--; + continue; + } + base.cursor = v_3; + break; + } + if (v_2 > 0) + { + return false; + } + } + base.cursor = v_1; + return true; + }; + + /** @return {boolean} */ + function r_postlude() { + base.limit_backward = base.cursor; base.cursor = base.limit; + { + var /** number */ v_1 = base.limit - base.cursor; + lab0: { + if (!r_is_reserved_word()) + { + break lab0; + } + return false; + } + base.cursor = base.limit - v_1; + } + var /** number */ v_2 = base.limit - base.cursor; + r_append_U_to_stems_ending_with_d_or_g(); + base.cursor = base.limit - v_2; + var /** number */ v_3 = base.limit - base.cursor; + r_post_process_last_consonants(); + base.cursor = base.limit - v_3; + base.cursor = base.limit_backward; + return true; + }; + + this.stem = /** @return {boolean} */ function() { + if (!r_more_than_one_syllable_word()) + { + return false; + } + base.limit_backward = base.cursor; base.cursor = base.limit; + var /** number */ v_1 = base.limit - base.cursor; + r_stem_nominal_verb_suffixes(); + base.cursor = base.limit - v_1; + if (!B_continue_stemming_noun_suffixes) + { + return false; + } + var /** number */ v_2 = base.limit - base.cursor; + r_stem_noun_suffixes(); + base.cursor = base.limit - v_2; + base.cursor = base.limit_backward; + if (!r_postlude()) + { + return false; + } + return true; + }; + + /**@return{string}*/ + this['stemWord'] = function(/**string*/word) { + base.setCurrent(word); + this.stem(); + return base.getCurrent(); + }; }; - -BaseStemmer.eq_v$LBaseStemmer$S = BaseStemmer$eq_v$LBaseStemmer$S; - -BaseStemmer.prototype.eq_v_b$S = function (s) { - return BaseStemmer$eq_s_b$LBaseStemmer$IS(this, s.length, s); -}; - - -function BaseStemmer$eq_v_b$LBaseStemmer$S($this, s) { - return BaseStemmer$eq_s_b$LBaseStemmer$IS($this, s.length, s); -}; - -BaseStemmer.eq_v_b$LBaseStemmer$S = BaseStemmer$eq_v_b$LBaseStemmer$S; - -BaseStemmer.prototype.find_among$ALAmong$I = function (v, v_size) { - var i; - var j; - var c; - var l; - var common_i; - var common_j; - var first_key_inspected; - var k; - var diff; - var common; - var w; - var i2; - var res; - i = 0; - j = v_size; - c = this.cursor; - l = this.limit; - common_i = 0; - common_j = 0; - first_key_inspected = false; - while (true) { - k = i + (j - i >>> 1); - diff = 0; - common = (common_i < common_j ? common_i : common_j); - w = v[k]; - for (i2 = common; i2 < w.s_size; i2++) { - if (c + common === l) { - diff = -1; - break; - } - diff = this.current.charCodeAt(c + common) - w.s.charCodeAt(i2); - if (diff !== 0) { - break; - } - common++; - } - if (diff < 0) { - j = k; - common_j = common; - } else { - i = k; - common_i = common; - } - if (j - i <= 1) { - if (i > 0) { - break; - } - if (j === i) { - break; - } - if (first_key_inspected) { - break; - } - first_key_inspected = true; - } - } - while (true) { - w = v[i]; - if (common_i >= w.s_size) { - this.cursor = (c + w.s_size | 0); - if (w.method == null) { - return w.result; - } - res = w.method(w.instance); - this.cursor = (c + w.s_size | 0); - if (res) { - return w.result; - } - } - i = w.substring_i; - if (i < 0) { - return 0; - } - } - return -1; -}; - - -function BaseStemmer$find_among$LBaseStemmer$ALAmong$I($this, v, v_size) { - var i; - var j; - var c; - var l; - var common_i; - var common_j; - var first_key_inspected; - var k; - var diff; - var common; - var w; - var i2; - var res; - i = 0; - j = v_size; - c = $this.cursor; - l = $this.limit; - common_i = 0; - common_j = 0; - first_key_inspected = false; - while (true) { - k = i + (j - i >>> 1); - diff = 0; - common = (common_i < common_j ? common_i : common_j); - w = v[k]; - for (i2 = common; i2 < w.s_size; i2++) { - if (c + common === l) { - diff = -1; - break; - } - diff = $this.current.charCodeAt(c + common) - w.s.charCodeAt(i2); - if (diff !== 0) { - break; - } - common++; - } - if (diff < 0) { - j = k; - common_j = common; - } else { - i = k; - common_i = common; - } - if (j - i <= 1) { - if (i > 0) { - break; - } - if (j === i) { - break; - } - if (first_key_inspected) { - break; - } - first_key_inspected = true; - } - } - while (true) { - w = v[i]; - if (common_i >= w.s_size) { - $this.cursor = (c + w.s_size | 0); - if (w.method == null) { - return w.result; - } - res = w.method(w.instance); - $this.cursor = (c + w.s_size | 0); - if (res) { - return w.result; - } - } - i = w.substring_i; - if (i < 0) { - return 0; - } - } - return -1; -}; - -BaseStemmer.find_among$LBaseStemmer$ALAmong$I = BaseStemmer$find_among$LBaseStemmer$ALAmong$I; - -BaseStemmer.prototype.find_among_b$ALAmong$I = function (v, v_size) { - var i; - var j; - var c; - var lb; - var common_i; - var common_j; - var first_key_inspected; - var k; - var diff; - var common; - var w; - var i2; - var res; - i = 0; - j = v_size; - c = this.cursor; - lb = this.limit_backward; - common_i = 0; - common_j = 0; - first_key_inspected = false; - while (true) { - k = i + (j - i >> 1); - diff = 0; - common = (common_i < common_j ? common_i : common_j); - w = v[k]; - for (i2 = w.s_size - 1 - common; i2 >= 0; i2--) { - if (c - common === lb) { - diff = -1; - break; - } - diff = this.current.charCodeAt(c - 1 - common) - w.s.charCodeAt(i2); - if (diff !== 0) { - break; - } - common++; - } - if (diff < 0) { - j = k; - common_j = common; - } else { - i = k; - common_i = common; - } - if (j - i <= 1) { - if (i > 0) { - break; - } - if (j === i) { - break; - } - if (first_key_inspected) { - break; - } - first_key_inspected = true; - } - } - while (true) { - w = v[i]; - if (common_i >= w.s_size) { - this.cursor = (c - w.s_size | 0); - if (w.method == null) { - return w.result; - } - res = w.method(this); - this.cursor = (c - w.s_size | 0); - if (res) { - return w.result; - } - } - i = w.substring_i; - if (i < 0) { - return 0; - } - } - return -1; -}; - - -function BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, v, v_size) { - var i; - var j; - var c; - var lb; - var common_i; - var common_j; - var first_key_inspected; - var k; - var diff; - var common; - var w; - var i2; - var res; - i = 0; - j = v_size; - c = $this.cursor; - lb = $this.limit_backward; - common_i = 0; - common_j = 0; - first_key_inspected = false; - while (true) { - k = i + (j - i >> 1); - diff = 0; - common = (common_i < common_j ? common_i : common_j); - w = v[k]; - for (i2 = w.s_size - 1 - common; i2 >= 0; i2--) { - if (c - common === lb) { - diff = -1; - break; - } - diff = $this.current.charCodeAt(c - 1 - common) - w.s.charCodeAt(i2); - if (diff !== 0) { - break; - } - common++; - } - if (diff < 0) { - j = k; - common_j = common; - } else { - i = k; - common_i = common; - } - if (j - i <= 1) { - if (i > 0) { - break; - } - if (j === i) { - break; - } - if (first_key_inspected) { - break; - } - first_key_inspected = true; - } - } - while (true) { - w = v[i]; - if (common_i >= w.s_size) { - $this.cursor = (c - w.s_size | 0); - if (w.method == null) { - return w.result; - } - res = w.method($this); - $this.cursor = (c - w.s_size | 0); - if (res) { - return w.result; - } - } - i = w.substring_i; - if (i < 0) { - return 0; - } - } - return -1; -}; - -BaseStemmer.find_among_b$LBaseStemmer$ALAmong$I = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I; - -BaseStemmer.prototype.replace_s$IIS = function (c_bra, c_ket, s) { - var adjustment; - adjustment = ((s.length - (((c_ket - c_bra) | 0))) | 0); - this.current = this.current.slice(0, c_bra) + s + this.current.slice(c_ket); - this.limit = (this.limit + adjustment) | 0; - if (this.cursor >= c_ket) { - this.cursor = (this.cursor + adjustment) | 0; - } else if (this.cursor > c_bra) { - this.cursor = c_bra; - } - return (adjustment | 0); -}; - - -function BaseStemmer$replace_s$LBaseStemmer$IIS($this, c_bra, c_ket, s) { - var adjustment; - adjustment = ((s.length - (((c_ket - c_bra) | 0))) | 0); - $this.current = $this.current.slice(0, c_bra) + s + $this.current.slice(c_ket); - $this.limit = ($this.limit + adjustment) | 0; - if ($this.cursor >= c_ket) { - $this.cursor = ($this.cursor + adjustment) | 0; - } else if ($this.cursor > c_bra) { - $this.cursor = c_bra; - } - return (adjustment | 0); -}; - -BaseStemmer.replace_s$LBaseStemmer$IIS = BaseStemmer$replace_s$LBaseStemmer$IIS; - -BaseStemmer.prototype.slice_check$ = function () { - var bra$0; - var ket$0; - var limit$0; - return ((bra$0 = this.bra) < 0 || bra$0 > (ket$0 = this.ket) || ket$0 > (limit$0 = this.limit) || limit$0 > this.current.length ? false : true); -}; - - -function BaseStemmer$slice_check$LBaseStemmer$($this) { - var bra$0; - var ket$0; - var limit$0; - return ((bra$0 = $this.bra) < 0 || bra$0 > (ket$0 = $this.ket) || ket$0 > (limit$0 = $this.limit) || limit$0 > $this.current.length ? false : true); -}; - -BaseStemmer.slice_check$LBaseStemmer$ = BaseStemmer$slice_check$LBaseStemmer$; - -BaseStemmer.prototype.slice_from$S = function (s) { - var result; - var bra$0; - var ket$0; - var limit$0; - result = false; - if ((bra$0 = this.bra) < 0 || bra$0 > (ket$0 = this.ket) || ket$0 > (limit$0 = this.limit) || limit$0 > this.current.length ? false : true) { - BaseStemmer$replace_s$LBaseStemmer$IIS(this, this.bra, this.ket, s); - result = true; - } - return result; -}; - - -function BaseStemmer$slice_from$LBaseStemmer$S($this, s) { - var result; - var bra$0; - var ket$0; - var limit$0; - result = false; - if ((bra$0 = $this.bra) < 0 || bra$0 > (ket$0 = $this.ket) || ket$0 > (limit$0 = $this.limit) || limit$0 > $this.current.length ? false : true) { - BaseStemmer$replace_s$LBaseStemmer$IIS($this, $this.bra, $this.ket, s); - result = true; - } - return result; -}; - -BaseStemmer.slice_from$LBaseStemmer$S = BaseStemmer$slice_from$LBaseStemmer$S; - -BaseStemmer.prototype.slice_del$ = function () { - return BaseStemmer$slice_from$LBaseStemmer$S(this, ""); -}; - - -function BaseStemmer$slice_del$LBaseStemmer$($this) { - return BaseStemmer$slice_from$LBaseStemmer$S($this, ""); -}; - -BaseStemmer.slice_del$LBaseStemmer$ = BaseStemmer$slice_del$LBaseStemmer$; - -BaseStemmer.prototype.insert$IIS = function (c_bra, c_ket, s) { - var adjustment; - adjustment = BaseStemmer$replace_s$LBaseStemmer$IIS(this, c_bra, c_ket, s); - if (c_bra <= this.bra) { - this.bra = (this.bra + adjustment) | 0; - } - if (c_bra <= this.ket) { - this.ket = (this.ket + adjustment) | 0; - } -}; - - -function BaseStemmer$insert$LBaseStemmer$IIS($this, c_bra, c_ket, s) { - var adjustment; - adjustment = BaseStemmer$replace_s$LBaseStemmer$IIS($this, c_bra, c_ket, s); - if (c_bra <= $this.bra) { - $this.bra = ($this.bra + adjustment) | 0; - } - if (c_bra <= $this.ket) { - $this.ket = ($this.ket + adjustment) | 0; - } -}; - -BaseStemmer.insert$LBaseStemmer$IIS = BaseStemmer$insert$LBaseStemmer$IIS; - -BaseStemmer.prototype.slice_to$S = function (s) { - var result; - var bra$0; - var ket$0; - var limit$0; - result = ''; - if ((bra$0 = this.bra) < 0 || bra$0 > (ket$0 = this.ket) || ket$0 > (limit$0 = this.limit) || limit$0 > this.current.length ? false : true) { - result = this.current.slice(this.bra, this.ket); - } - return result; -}; - - -function BaseStemmer$slice_to$LBaseStemmer$S($this, s) { - var result; - var bra$0; - var ket$0; - var limit$0; - result = ''; - if ((bra$0 = $this.bra) < 0 || bra$0 > (ket$0 = $this.ket) || ket$0 > (limit$0 = $this.limit) || limit$0 > $this.current.length ? false : true) { - result = $this.current.slice($this.bra, $this.ket); - } - return result; -}; - -BaseStemmer.slice_to$LBaseStemmer$S = BaseStemmer$slice_to$LBaseStemmer$S; - -BaseStemmer.prototype.assign_to$S = function (s) { - return this.current.slice(0, this.limit); -}; - - -function BaseStemmer$assign_to$LBaseStemmer$S($this, s) { - return $this.current.slice(0, $this.limit); -}; - -BaseStemmer.assign_to$LBaseStemmer$S = BaseStemmer$assign_to$LBaseStemmer$S; - -BaseStemmer.prototype.stem$ = function () { - return false; -}; - - -BaseStemmer.prototype.stemWord$S = function (word) { - var result; - var current$0; - var cursor$0; - var limit$0; - result = this.cache['.' + word]; - if (result == null) { - current$0 = this.current = word; - cursor$0 = this.cursor = 0; - limit$0 = this.limit = current$0.length; - this.limit_backward = 0; - this.bra = cursor$0; - this.ket = limit$0; - this.stem$(); - result = this.current; - this.cache['.' + word] = result; - } - return result; -}; - -BaseStemmer.prototype.stemWord = BaseStemmer.prototype.stemWord$S; - -BaseStemmer.prototype.stemWords$AS = function (words) { - var results; - var i; - var word; - var result; - var current$0; - var cursor$0; - var limit$0; - results = [ ]; - for (i = 0; i < words.length; i++) { - word = words[i]; - result = this.cache['.' + word]; - if (result == null) { - current$0 = this.current = word; - cursor$0 = this.cursor = 0; - limit$0 = this.limit = current$0.length; - this.limit_backward = 0; - this.bra = cursor$0; - this.ket = limit$0; - this.stem$(); - result = this.current; - this.cache['.' + word] = result; - } - results.push(result); - } - return results; -}; - -BaseStemmer.prototype.stemWords = BaseStemmer.prototype.stemWords$AS; - -function TurkishStemmer() { - BaseStemmer.call(this); - this.B_continue_stemming_noun_suffixes = false; - this.I_strlen = 0; -}; - -$__jsx_extend([TurkishStemmer], BaseStemmer); -TurkishStemmer.prototype.copy_from$LTurkishStemmer$ = function (other) { - this.B_continue_stemming_noun_suffixes = other.B_continue_stemming_noun_suffixes; - this.I_strlen = other.I_strlen; - BaseStemmer$copy_from$LBaseStemmer$LBaseStemmer$(this, other); -}; - -TurkishStemmer.prototype.copy_from = TurkishStemmer.prototype.copy_from$LTurkishStemmer$; - -TurkishStemmer.prototype.r_check_vowel_harmony$ = function () { - var v_1; - var v_2; - var v_3; - var v_4; - var v_5; - var v_6; - var v_7; - var v_8; - var v_9; - var v_10; - var v_11; - var lab1; - var lab2; - var lab3; - var lab5; - var lab6; - var lab8; - var lab9; - var lab11; - var lab12; - var lab14; - var lab15; - var lab17; - var lab18; - var lab20; - var lab21; - var lab23; - var lab25; - var cursor$0; - var cursor$1; - var cursor$2; - var cursor$3; - var cursor$4; - var cursor$5; - var cursor$6; - var cursor$7; - var cursor$8; - var $__jsx_postinc_t; - v_1 = ((this.limit - this.cursor) | 0); -golab0: - while (true) { - v_2 = ((this.limit - this.cursor) | 0); - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII(this, TurkishStemmer.g_vowel, 97, 305)) { - break lab1; - } - this.cursor = ((this.limit - v_2) | 0); - break golab0; - } - cursor$0 = this.cursor = ((this.limit - v_2) | 0); - if (cursor$0 <= this.limit_backward) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - } - lab2 = true; -lab2: - while (lab2 === true) { - lab2 = false; - v_3 = ((this.limit - this.cursor) | 0); - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "a")) { - break lab3; - } - golab4: - while (true) { - v_4 = ((this.limit - this.cursor) | 0); - lab5 = true; - lab5: - while (lab5 === true) { - lab5 = false; - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII(this, TurkishStemmer.g_vowel1, 97, 305)) { - break lab5; - } - this.cursor = ((this.limit - v_4) | 0); - break golab4; - } - cursor$1 = this.cursor = ((this.limit - v_4) | 0); - if (cursor$1 <= this.limit_backward) { - break lab3; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - } - break lab2; - } - this.cursor = ((this.limit - v_3) | 0); - lab6 = true; - lab6: - while (lab6 === true) { - lab6 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "e")) { - break lab6; - } - golab7: - while (true) { - v_5 = ((this.limit - this.cursor) | 0); - lab8 = true; - lab8: - while (lab8 === true) { - lab8 = false; - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII(this, TurkishStemmer.g_vowel2, 101, 252)) { - break lab8; - } - this.cursor = ((this.limit - v_5) | 0); - break golab7; - } - cursor$2 = this.cursor = ((this.limit - v_5) | 0); - if (cursor$2 <= this.limit_backward) { - break lab6; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - } - break lab2; - } - this.cursor = ((this.limit - v_3) | 0); - lab9 = true; - lab9: - while (lab9 === true) { - lab9 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "\u0131")) { - break lab9; - } - golab10: - while (true) { - v_6 = ((this.limit - this.cursor) | 0); - lab11 = true; - lab11: - while (lab11 === true) { - lab11 = false; - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII(this, TurkishStemmer.g_vowel3, 97, 305)) { - break lab11; - } - this.cursor = ((this.limit - v_6) | 0); - break golab10; - } - cursor$3 = this.cursor = ((this.limit - v_6) | 0); - if (cursor$3 <= this.limit_backward) { - break lab9; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - } - break lab2; - } - this.cursor = ((this.limit - v_3) | 0); - lab12 = true; - lab12: - while (lab12 === true) { - lab12 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "i")) { - break lab12; - } - golab13: - while (true) { - v_7 = ((this.limit - this.cursor) | 0); - lab14 = true; - lab14: - while (lab14 === true) { - lab14 = false; - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII(this, TurkishStemmer.g_vowel4, 101, 105)) { - break lab14; - } - this.cursor = ((this.limit - v_7) | 0); - break golab13; - } - cursor$4 = this.cursor = ((this.limit - v_7) | 0); - if (cursor$4 <= this.limit_backward) { - break lab12; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - } - break lab2; - } - this.cursor = ((this.limit - v_3) | 0); - lab15 = true; - lab15: - while (lab15 === true) { - lab15 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "o")) { - break lab15; - } - golab16: - while (true) { - v_8 = ((this.limit - this.cursor) | 0); - lab17 = true; - lab17: - while (lab17 === true) { - lab17 = false; - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII(this, TurkishStemmer.g_vowel5, 111, 117)) { - break lab17; - } - this.cursor = ((this.limit - v_8) | 0); - break golab16; - } - cursor$5 = this.cursor = ((this.limit - v_8) | 0); - if (cursor$5 <= this.limit_backward) { - break lab15; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - } - break lab2; - } - this.cursor = ((this.limit - v_3) | 0); - lab18 = true; - lab18: - while (lab18 === true) { - lab18 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "\u00F6")) { - break lab18; - } - golab19: - while (true) { - v_9 = ((this.limit - this.cursor) | 0); - lab20 = true; - lab20: - while (lab20 === true) { - lab20 = false; - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII(this, TurkishStemmer.g_vowel6, 246, 252)) { - break lab20; - } - this.cursor = ((this.limit - v_9) | 0); - break golab19; - } - cursor$6 = this.cursor = ((this.limit - v_9) | 0); - if (cursor$6 <= this.limit_backward) { - break lab18; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - } - break lab2; - } - this.cursor = ((this.limit - v_3) | 0); - lab21 = true; - lab21: - while (lab21 === true) { - lab21 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "u")) { - break lab21; - } - golab22: - while (true) { - v_10 = ((this.limit - this.cursor) | 0); - lab23 = true; - lab23: - while (lab23 === true) { - lab23 = false; - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII(this, TurkishStemmer.g_vowel5, 111, 117)) { - break lab23; - } - this.cursor = ((this.limit - v_10) | 0); - break golab22; - } - cursor$7 = this.cursor = ((this.limit - v_10) | 0); - if (cursor$7 <= this.limit_backward) { - break lab21; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - } - break lab2; - } - this.cursor = ((this.limit - v_3) | 0); - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "\u00FC")) { - return false; - } - golab24: - while (true) { - v_11 = ((this.limit - this.cursor) | 0); - lab25 = true; - lab25: - while (lab25 === true) { - lab25 = false; - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII(this, TurkishStemmer.g_vowel6, 246, 252)) { - break lab25; - } - this.cursor = ((this.limit - v_11) | 0); - break golab24; - } - cursor$8 = this.cursor = ((this.limit - v_11) | 0); - if (cursor$8 <= this.limit_backward) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - } - } - this.cursor = ((this.limit - v_1) | 0); - return true; -}; - -TurkishStemmer.prototype.r_check_vowel_harmony = TurkishStemmer.prototype.r_check_vowel_harmony$; - -function TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) { - var v_1; - var v_2; - var v_3; - var v_4; - var v_5; - var v_6; - var v_7; - var v_8; - var v_9; - var v_10; - var v_11; - var lab1; - var lab2; - var lab3; - var lab5; - var lab6; - var lab8; - var lab9; - var lab11; - var lab12; - var lab14; - var lab15; - var lab17; - var lab18; - var lab20; - var lab21; - var lab23; - var lab25; - var cursor$0; - var cursor$1; - var cursor$2; - var cursor$3; - var cursor$4; - var cursor$5; - var cursor$6; - var cursor$7; - var cursor$8; - var $__jsx_postinc_t; - v_1 = (($this.limit - $this.cursor) | 0); -golab0: - while (true) { - v_2 = (($this.limit - $this.cursor) | 0); - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII($this, TurkishStemmer.g_vowel, 97, 305)) { - break lab1; - } - $this.cursor = (($this.limit - v_2) | 0); - break golab0; - } - cursor$0 = $this.cursor = (($this.limit - v_2) | 0); - if (cursor$0 <= $this.limit_backward) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - } - lab2 = true; -lab2: - while (lab2 === true) { - lab2 = false; - v_3 = (($this.limit - $this.cursor) | 0); - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "a")) { - break lab3; - } - golab4: - while (true) { - v_4 = (($this.limit - $this.cursor) | 0); - lab5 = true; - lab5: - while (lab5 === true) { - lab5 = false; - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII($this, TurkishStemmer.g_vowel1, 97, 305)) { - break lab5; - } - $this.cursor = (($this.limit - v_4) | 0); - break golab4; - } - cursor$1 = $this.cursor = (($this.limit - v_4) | 0); - if (cursor$1 <= $this.limit_backward) { - break lab3; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - } - break lab2; - } - $this.cursor = (($this.limit - v_3) | 0); - lab6 = true; - lab6: - while (lab6 === true) { - lab6 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "e")) { - break lab6; - } - golab7: - while (true) { - v_5 = (($this.limit - $this.cursor) | 0); - lab8 = true; - lab8: - while (lab8 === true) { - lab8 = false; - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII($this, TurkishStemmer.g_vowel2, 101, 252)) { - break lab8; - } - $this.cursor = (($this.limit - v_5) | 0); - break golab7; - } - cursor$2 = $this.cursor = (($this.limit - v_5) | 0); - if (cursor$2 <= $this.limit_backward) { - break lab6; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - } - break lab2; - } - $this.cursor = (($this.limit - v_3) | 0); - lab9 = true; - lab9: - while (lab9 === true) { - lab9 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "\u0131")) { - break lab9; - } - golab10: - while (true) { - v_6 = (($this.limit - $this.cursor) | 0); - lab11 = true; - lab11: - while (lab11 === true) { - lab11 = false; - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII($this, TurkishStemmer.g_vowel3, 97, 305)) { - break lab11; - } - $this.cursor = (($this.limit - v_6) | 0); - break golab10; - } - cursor$3 = $this.cursor = (($this.limit - v_6) | 0); - if (cursor$3 <= $this.limit_backward) { - break lab9; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - } - break lab2; - } - $this.cursor = (($this.limit - v_3) | 0); - lab12 = true; - lab12: - while (lab12 === true) { - lab12 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "i")) { - break lab12; - } - golab13: - while (true) { - v_7 = (($this.limit - $this.cursor) | 0); - lab14 = true; - lab14: - while (lab14 === true) { - lab14 = false; - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII($this, TurkishStemmer.g_vowel4, 101, 105)) { - break lab14; - } - $this.cursor = (($this.limit - v_7) | 0); - break golab13; - } - cursor$4 = $this.cursor = (($this.limit - v_7) | 0); - if (cursor$4 <= $this.limit_backward) { - break lab12; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - } - break lab2; - } - $this.cursor = (($this.limit - v_3) | 0); - lab15 = true; - lab15: - while (lab15 === true) { - lab15 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "o")) { - break lab15; - } - golab16: - while (true) { - v_8 = (($this.limit - $this.cursor) | 0); - lab17 = true; - lab17: - while (lab17 === true) { - lab17 = false; - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII($this, TurkishStemmer.g_vowel5, 111, 117)) { - break lab17; - } - $this.cursor = (($this.limit - v_8) | 0); - break golab16; - } - cursor$5 = $this.cursor = (($this.limit - v_8) | 0); - if (cursor$5 <= $this.limit_backward) { - break lab15; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - } - break lab2; - } - $this.cursor = (($this.limit - v_3) | 0); - lab18 = true; - lab18: - while (lab18 === true) { - lab18 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "\u00F6")) { - break lab18; - } - golab19: - while (true) { - v_9 = (($this.limit - $this.cursor) | 0); - lab20 = true; - lab20: - while (lab20 === true) { - lab20 = false; - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII($this, TurkishStemmer.g_vowel6, 246, 252)) { - break lab20; - } - $this.cursor = (($this.limit - v_9) | 0); - break golab19; - } - cursor$6 = $this.cursor = (($this.limit - v_9) | 0); - if (cursor$6 <= $this.limit_backward) { - break lab18; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - } - break lab2; - } - $this.cursor = (($this.limit - v_3) | 0); - lab21 = true; - lab21: - while (lab21 === true) { - lab21 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "u")) { - break lab21; - } - golab22: - while (true) { - v_10 = (($this.limit - $this.cursor) | 0); - lab23 = true; - lab23: - while (lab23 === true) { - lab23 = false; - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII($this, TurkishStemmer.g_vowel5, 111, 117)) { - break lab23; - } - $this.cursor = (($this.limit - v_10) | 0); - break golab22; - } - cursor$7 = $this.cursor = (($this.limit - v_10) | 0); - if (cursor$7 <= $this.limit_backward) { - break lab21; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - } - break lab2; - } - $this.cursor = (($this.limit - v_3) | 0); - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "\u00FC")) { - return false; - } - golab24: - while (true) { - v_11 = (($this.limit - $this.cursor) | 0); - lab25 = true; - lab25: - while (lab25 === true) { - lab25 = false; - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII($this, TurkishStemmer.g_vowel6, 246, 252)) { - break lab25; - } - $this.cursor = (($this.limit - v_11) | 0); - break golab24; - } - cursor$8 = $this.cursor = (($this.limit - v_11) | 0); - if (cursor$8 <= $this.limit_backward) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - } - } - $this.cursor = (($this.limit - v_1) | 0); - return true; -}; - -TurkishStemmer.r_check_vowel_harmony$LTurkishStemmer$ = TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$; - -TurkishStemmer.prototype.r_mark_suffix_with_optional_n_consonant$ = function () { - var v_1; - var v_2; - var v_3; - var v_4; - var v_5; - var v_6; - var lab0; - var lab1; - var lab2; - var cursor$0; - var limit$0; - var cursor$1; - var limit$1; - var cursor$2; - var $__jsx_postinc_t; - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - v_1 = ((this.limit - this.cursor) | 0); - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - v_2 = ((this.limit - this.cursor) | 0); - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "n")) { - break lab1; - } - cursor$0 = this.cursor = ((this.limit - v_2) | 0); - if (cursor$0 <= this.limit_backward) { - break lab1; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - v_3 = ((this.limit - this.cursor) | 0); - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII(this, TurkishStemmer.g_vowel, 97, 305)) { - break lab1; - } - this.cursor = ((this.limit - v_3) | 0); - break lab0; - } - cursor$1 = this.cursor = (((limit$0 = this.limit) - v_1) | 0); - v_4 = ((limit$0 - cursor$1) | 0); - lab2 = true; - lab2: - while (lab2 === true) { - lab2 = false; - v_5 = ((this.limit - this.cursor) | 0); - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "n")) { - break lab2; - } - this.cursor = ((this.limit - v_5) | 0); - return false; - } - cursor$2 = this.cursor = (((limit$1 = this.limit) - v_4) | 0); - v_6 = ((limit$1 - cursor$2) | 0); - if (cursor$2 <= this.limit_backward) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII(this, TurkishStemmer.g_vowel, 97, 305)) { - return false; - } - this.cursor = ((this.limit - v_6) | 0); - } - return true; -}; - -TurkishStemmer.prototype.r_mark_suffix_with_optional_n_consonant = TurkishStemmer.prototype.r_mark_suffix_with_optional_n_consonant$; - -function TurkishStemmer$r_mark_suffix_with_optional_n_consonant$LTurkishStemmer$($this) { - var v_1; - var v_2; - var v_3; - var v_4; - var v_5; - var v_6; - var lab0; - var lab1; - var lab2; - var cursor$0; - var limit$0; - var cursor$1; - var limit$1; - var cursor$2; - var $__jsx_postinc_t; - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - v_1 = (($this.limit - $this.cursor) | 0); - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - v_2 = (($this.limit - $this.cursor) | 0); - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "n")) { - break lab1; - } - cursor$0 = $this.cursor = (($this.limit - v_2) | 0); - if (cursor$0 <= $this.limit_backward) { - break lab1; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - v_3 = (($this.limit - $this.cursor) | 0); - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII($this, TurkishStemmer.g_vowel, 97, 305)) { - break lab1; - } - $this.cursor = (($this.limit - v_3) | 0); - break lab0; - } - cursor$1 = $this.cursor = (((limit$0 = $this.limit) - v_1) | 0); - v_4 = ((limit$0 - cursor$1) | 0); - lab2 = true; - lab2: - while (lab2 === true) { - lab2 = false; - v_5 = (($this.limit - $this.cursor) | 0); - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "n")) { - break lab2; - } - $this.cursor = (($this.limit - v_5) | 0); - return false; - } - cursor$2 = $this.cursor = (((limit$1 = $this.limit) - v_4) | 0); - v_6 = ((limit$1 - cursor$2) | 0); - if (cursor$2 <= $this.limit_backward) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII($this, TurkishStemmer.g_vowel, 97, 305)) { - return false; - } - $this.cursor = (($this.limit - v_6) | 0); - } - return true; -}; - -TurkishStemmer.r_mark_suffix_with_optional_n_consonant$LTurkishStemmer$ = TurkishStemmer$r_mark_suffix_with_optional_n_consonant$LTurkishStemmer$; - -TurkishStemmer.prototype.r_mark_suffix_with_optional_s_consonant$ = function () { - var v_1; - var v_2; - var v_3; - var v_4; - var v_5; - var v_6; - var lab0; - var lab1; - var lab2; - var cursor$0; - var limit$0; - var cursor$1; - var limit$1; - var cursor$2; - var $__jsx_postinc_t; - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - v_1 = ((this.limit - this.cursor) | 0); - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - v_2 = ((this.limit - this.cursor) | 0); - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "s")) { - break lab1; - } - cursor$0 = this.cursor = ((this.limit - v_2) | 0); - if (cursor$0 <= this.limit_backward) { - break lab1; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - v_3 = ((this.limit - this.cursor) | 0); - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII(this, TurkishStemmer.g_vowel, 97, 305)) { - break lab1; - } - this.cursor = ((this.limit - v_3) | 0); - break lab0; - } - cursor$1 = this.cursor = (((limit$0 = this.limit) - v_1) | 0); - v_4 = ((limit$0 - cursor$1) | 0); - lab2 = true; - lab2: - while (lab2 === true) { - lab2 = false; - v_5 = ((this.limit - this.cursor) | 0); - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "s")) { - break lab2; - } - this.cursor = ((this.limit - v_5) | 0); - return false; - } - cursor$2 = this.cursor = (((limit$1 = this.limit) - v_4) | 0); - v_6 = ((limit$1 - cursor$2) | 0); - if (cursor$2 <= this.limit_backward) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII(this, TurkishStemmer.g_vowel, 97, 305)) { - return false; - } - this.cursor = ((this.limit - v_6) | 0); - } - return true; -}; - -TurkishStemmer.prototype.r_mark_suffix_with_optional_s_consonant = TurkishStemmer.prototype.r_mark_suffix_with_optional_s_consonant$; - -function TurkishStemmer$r_mark_suffix_with_optional_s_consonant$LTurkishStemmer$($this) { - var v_1; - var v_2; - var v_3; - var v_4; - var v_5; - var v_6; - var lab0; - var lab1; - var lab2; - var cursor$0; - var limit$0; - var cursor$1; - var limit$1; - var cursor$2; - var $__jsx_postinc_t; - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - v_1 = (($this.limit - $this.cursor) | 0); - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - v_2 = (($this.limit - $this.cursor) | 0); - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "s")) { - break lab1; - } - cursor$0 = $this.cursor = (($this.limit - v_2) | 0); - if (cursor$0 <= $this.limit_backward) { - break lab1; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - v_3 = (($this.limit - $this.cursor) | 0); - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII($this, TurkishStemmer.g_vowel, 97, 305)) { - break lab1; - } - $this.cursor = (($this.limit - v_3) | 0); - break lab0; - } - cursor$1 = $this.cursor = (((limit$0 = $this.limit) - v_1) | 0); - v_4 = ((limit$0 - cursor$1) | 0); - lab2 = true; - lab2: - while (lab2 === true) { - lab2 = false; - v_5 = (($this.limit - $this.cursor) | 0); - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "s")) { - break lab2; - } - $this.cursor = (($this.limit - v_5) | 0); - return false; - } - cursor$2 = $this.cursor = (((limit$1 = $this.limit) - v_4) | 0); - v_6 = ((limit$1 - cursor$2) | 0); - if (cursor$2 <= $this.limit_backward) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII($this, TurkishStemmer.g_vowel, 97, 305)) { - return false; - } - $this.cursor = (($this.limit - v_6) | 0); - } - return true; -}; - -TurkishStemmer.r_mark_suffix_with_optional_s_consonant$LTurkishStemmer$ = TurkishStemmer$r_mark_suffix_with_optional_s_consonant$LTurkishStemmer$; - -TurkishStemmer.prototype.r_mark_suffix_with_optional_y_consonant$ = function () { - var v_1; - var v_2; - var v_3; - var v_4; - var v_5; - var v_6; - var lab0; - var lab1; - var lab2; - var cursor$0; - var limit$0; - var cursor$1; - var limit$1; - var cursor$2; - var $__jsx_postinc_t; - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - v_1 = ((this.limit - this.cursor) | 0); - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - v_2 = ((this.limit - this.cursor) | 0); - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "y")) { - break lab1; - } - cursor$0 = this.cursor = ((this.limit - v_2) | 0); - if (cursor$0 <= this.limit_backward) { - break lab1; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - v_3 = ((this.limit - this.cursor) | 0); - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII(this, TurkishStemmer.g_vowel, 97, 305)) { - break lab1; - } - this.cursor = ((this.limit - v_3) | 0); - break lab0; - } - cursor$1 = this.cursor = (((limit$0 = this.limit) - v_1) | 0); - v_4 = ((limit$0 - cursor$1) | 0); - lab2 = true; - lab2: - while (lab2 === true) { - lab2 = false; - v_5 = ((this.limit - this.cursor) | 0); - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "y")) { - break lab2; - } - this.cursor = ((this.limit - v_5) | 0); - return false; - } - cursor$2 = this.cursor = (((limit$1 = this.limit) - v_4) | 0); - v_6 = ((limit$1 - cursor$2) | 0); - if (cursor$2 <= this.limit_backward) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII(this, TurkishStemmer.g_vowel, 97, 305)) { - return false; - } - this.cursor = ((this.limit - v_6) | 0); - } - return true; -}; - -TurkishStemmer.prototype.r_mark_suffix_with_optional_y_consonant = TurkishStemmer.prototype.r_mark_suffix_with_optional_y_consonant$; - -function TurkishStemmer$r_mark_suffix_with_optional_y_consonant$LTurkishStemmer$($this) { - var v_1; - var v_2; - var v_3; - var v_4; - var v_5; - var v_6; - var lab0; - var lab1; - var lab2; - var cursor$0; - var limit$0; - var cursor$1; - var limit$1; - var cursor$2; - var $__jsx_postinc_t; - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - v_1 = (($this.limit - $this.cursor) | 0); - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - v_2 = (($this.limit - $this.cursor) | 0); - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "y")) { - break lab1; - } - cursor$0 = $this.cursor = (($this.limit - v_2) | 0); - if (cursor$0 <= $this.limit_backward) { - break lab1; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - v_3 = (($this.limit - $this.cursor) | 0); - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII($this, TurkishStemmer.g_vowel, 97, 305)) { - break lab1; - } - $this.cursor = (($this.limit - v_3) | 0); - break lab0; - } - cursor$1 = $this.cursor = (((limit$0 = $this.limit) - v_1) | 0); - v_4 = ((limit$0 - cursor$1) | 0); - lab2 = true; - lab2: - while (lab2 === true) { - lab2 = false; - v_5 = (($this.limit - $this.cursor) | 0); - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "y")) { - break lab2; - } - $this.cursor = (($this.limit - v_5) | 0); - return false; - } - cursor$2 = $this.cursor = (((limit$1 = $this.limit) - v_4) | 0); - v_6 = ((limit$1 - cursor$2) | 0); - if (cursor$2 <= $this.limit_backward) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII($this, TurkishStemmer.g_vowel, 97, 305)) { - return false; - } - $this.cursor = (($this.limit - v_6) | 0); - } - return true; -}; - -TurkishStemmer.r_mark_suffix_with_optional_y_consonant$LTurkishStemmer$ = TurkishStemmer$r_mark_suffix_with_optional_y_consonant$LTurkishStemmer$; - -TurkishStemmer.prototype.r_mark_suffix_with_optional_U_vowel$ = function () { - var v_1; - var v_2; - var v_3; - var v_4; - var v_5; - var v_6; - var lab0; - var lab1; - var lab2; - var cursor$0; - var limit$0; - var cursor$1; - var limit$1; - var cursor$2; - var $__jsx_postinc_t; - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - v_1 = ((this.limit - this.cursor) | 0); - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - v_2 = ((this.limit - this.cursor) | 0); - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII(this, TurkishStemmer.g_U, 105, 305)) { - break lab1; - } - cursor$0 = this.cursor = ((this.limit - v_2) | 0); - if (cursor$0 <= this.limit_backward) { - break lab1; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - v_3 = ((this.limit - this.cursor) | 0); - if (! BaseStemmer$out_grouping_b$LBaseStemmer$AIII(this, TurkishStemmer.g_vowel, 97, 305)) { - break lab1; - } - this.cursor = ((this.limit - v_3) | 0); - break lab0; - } - cursor$1 = this.cursor = (((limit$0 = this.limit) - v_1) | 0); - v_4 = ((limit$0 - cursor$1) | 0); - lab2 = true; - lab2: - while (lab2 === true) { - lab2 = false; - v_5 = ((this.limit - this.cursor) | 0); - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII(this, TurkishStemmer.g_U, 105, 305)) { - break lab2; - } - this.cursor = ((this.limit - v_5) | 0); - return false; - } - cursor$2 = this.cursor = (((limit$1 = this.limit) - v_4) | 0); - v_6 = ((limit$1 - cursor$2) | 0); - if (cursor$2 <= this.limit_backward) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - if (! BaseStemmer$out_grouping_b$LBaseStemmer$AIII(this, TurkishStemmer.g_vowel, 97, 305)) { - return false; - } - this.cursor = ((this.limit - v_6) | 0); - } - return true; -}; - -TurkishStemmer.prototype.r_mark_suffix_with_optional_U_vowel = TurkishStemmer.prototype.r_mark_suffix_with_optional_U_vowel$; - -function TurkishStemmer$r_mark_suffix_with_optional_U_vowel$LTurkishStemmer$($this) { - var v_1; - var v_2; - var v_3; - var v_4; - var v_5; - var v_6; - var lab0; - var lab1; - var lab2; - var cursor$0; - var limit$0; - var cursor$1; - var limit$1; - var cursor$2; - var $__jsx_postinc_t; - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - v_1 = (($this.limit - $this.cursor) | 0); - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - v_2 = (($this.limit - $this.cursor) | 0); - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII($this, TurkishStemmer.g_U, 105, 305)) { - break lab1; - } - cursor$0 = $this.cursor = (($this.limit - v_2) | 0); - if (cursor$0 <= $this.limit_backward) { - break lab1; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - v_3 = (($this.limit - $this.cursor) | 0); - if (! BaseStemmer$out_grouping_b$LBaseStemmer$AIII($this, TurkishStemmer.g_vowel, 97, 305)) { - break lab1; - } - $this.cursor = (($this.limit - v_3) | 0); - break lab0; - } - cursor$1 = $this.cursor = (((limit$0 = $this.limit) - v_1) | 0); - v_4 = ((limit$0 - cursor$1) | 0); - lab2 = true; - lab2: - while (lab2 === true) { - lab2 = false; - v_5 = (($this.limit - $this.cursor) | 0); - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII($this, TurkishStemmer.g_U, 105, 305)) { - break lab2; - } - $this.cursor = (($this.limit - v_5) | 0); - return false; - } - cursor$2 = $this.cursor = (((limit$1 = $this.limit) - v_4) | 0); - v_6 = ((limit$1 - cursor$2) | 0); - if (cursor$2 <= $this.limit_backward) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - if (! BaseStemmer$out_grouping_b$LBaseStemmer$AIII($this, TurkishStemmer.g_vowel, 97, 305)) { - return false; - } - $this.cursor = (($this.limit - v_6) | 0); - } - return true; -}; - -TurkishStemmer.r_mark_suffix_with_optional_U_vowel$LTurkishStemmer$ = TurkishStemmer$r_mark_suffix_with_optional_U_vowel$LTurkishStemmer$; - -TurkishStemmer.prototype.r_mark_possessives$ = function () { - return (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_0, 10) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_U_vowel$LTurkishStemmer$(this) ? false : true); -}; - -TurkishStemmer.prototype.r_mark_possessives = TurkishStemmer.prototype.r_mark_possessives$; - -function TurkishStemmer$r_mark_possessives$LTurkishStemmer$($this) { - return (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_0, 10) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_U_vowel$LTurkishStemmer$($this) ? false : true); -}; - -TurkishStemmer.r_mark_possessives$LTurkishStemmer$ = TurkishStemmer$r_mark_possessives$LTurkishStemmer$; - -TurkishStemmer.prototype.r_mark_sU$ = function () { - return (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : ! BaseStemmer$in_grouping_b$LBaseStemmer$AIII(this, TurkishStemmer.g_U, 105, 305) ? false : ! TurkishStemmer$r_mark_suffix_with_optional_s_consonant$LTurkishStemmer$(this) ? false : true); -}; - -TurkishStemmer.prototype.r_mark_sU = TurkishStemmer.prototype.r_mark_sU$; - -function TurkishStemmer$r_mark_sU$LTurkishStemmer$($this) { - return (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : ! BaseStemmer$in_grouping_b$LBaseStemmer$AIII($this, TurkishStemmer.g_U, 105, 305) ? false : ! TurkishStemmer$r_mark_suffix_with_optional_s_consonant$LTurkishStemmer$($this) ? false : true); -}; - -TurkishStemmer.r_mark_sU$LTurkishStemmer$ = TurkishStemmer$r_mark_sU$LTurkishStemmer$; - -TurkishStemmer.prototype.r_mark_lArI$ = function () { - return (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_1, 2) === 0 ? false : true); -}; - -TurkishStemmer.prototype.r_mark_lArI = TurkishStemmer.prototype.r_mark_lArI$; - -function TurkishStemmer$r_mark_lArI$LTurkishStemmer$($this) { - return (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_1, 2) === 0 ? false : true); -}; - -TurkishStemmer.r_mark_lArI$LTurkishStemmer$ = TurkishStemmer$r_mark_lArI$LTurkishStemmer$; - -TurkishStemmer.prototype.r_mark_yU$ = function () { - return (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : ! BaseStemmer$in_grouping_b$LBaseStemmer$AIII(this, TurkishStemmer.g_U, 105, 305) ? false : ! TurkishStemmer$r_mark_suffix_with_optional_y_consonant$LTurkishStemmer$(this) ? false : true); -}; - -TurkishStemmer.prototype.r_mark_yU = TurkishStemmer.prototype.r_mark_yU$; - -function TurkishStemmer$r_mark_yU$LTurkishStemmer$($this) { - return (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : ! BaseStemmer$in_grouping_b$LBaseStemmer$AIII($this, TurkishStemmer.g_U, 105, 305) ? false : ! TurkishStemmer$r_mark_suffix_with_optional_y_consonant$LTurkishStemmer$($this) ? false : true); -}; - -TurkishStemmer.r_mark_yU$LTurkishStemmer$ = TurkishStemmer$r_mark_yU$LTurkishStemmer$; - -TurkishStemmer.prototype.r_mark_nU$ = function () { - return (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_2, 4) === 0 ? false : true); -}; - -TurkishStemmer.prototype.r_mark_nU = TurkishStemmer.prototype.r_mark_nU$; - -function TurkishStemmer$r_mark_nU$LTurkishStemmer$($this) { - return (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_2, 4) === 0 ? false : true); -}; - -TurkishStemmer.r_mark_nU$LTurkishStemmer$ = TurkishStemmer$r_mark_nU$LTurkishStemmer$; - -TurkishStemmer.prototype.r_mark_nUn$ = function () { - return (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_3, 4) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_n_consonant$LTurkishStemmer$(this) ? false : true); -}; - -TurkishStemmer.prototype.r_mark_nUn = TurkishStemmer.prototype.r_mark_nUn$; - -function TurkishStemmer$r_mark_nUn$LTurkishStemmer$($this) { - return (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_3, 4) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_n_consonant$LTurkishStemmer$($this) ? false : true); -}; - -TurkishStemmer.r_mark_nUn$LTurkishStemmer$ = TurkishStemmer$r_mark_nUn$LTurkishStemmer$; - -TurkishStemmer.prototype.r_mark_yA$ = function () { - return (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_4, 2) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_y_consonant$LTurkishStemmer$(this) ? false : true); -}; - -TurkishStemmer.prototype.r_mark_yA = TurkishStemmer.prototype.r_mark_yA$; - -function TurkishStemmer$r_mark_yA$LTurkishStemmer$($this) { - return (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_4, 2) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_y_consonant$LTurkishStemmer$($this) ? false : true); -}; - -TurkishStemmer.r_mark_yA$LTurkishStemmer$ = TurkishStemmer$r_mark_yA$LTurkishStemmer$; - -TurkishStemmer.prototype.r_mark_nA$ = function () { - return (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_5, 2) === 0 ? false : true); -}; - -TurkishStemmer.prototype.r_mark_nA = TurkishStemmer.prototype.r_mark_nA$; - -function TurkishStemmer$r_mark_nA$LTurkishStemmer$($this) { - return (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_5, 2) === 0 ? false : true); -}; - -TurkishStemmer.r_mark_nA$LTurkishStemmer$ = TurkishStemmer$r_mark_nA$LTurkishStemmer$; - -TurkishStemmer.prototype.r_mark_DA$ = function () { - return (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_6, 4) === 0 ? false : true); -}; - -TurkishStemmer.prototype.r_mark_DA = TurkishStemmer.prototype.r_mark_DA$; - -function TurkishStemmer$r_mark_DA$LTurkishStemmer$($this) { - return (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_6, 4) === 0 ? false : true); -}; - -TurkishStemmer.r_mark_DA$LTurkishStemmer$ = TurkishStemmer$r_mark_DA$LTurkishStemmer$; - -TurkishStemmer.prototype.r_mark_ndA$ = function () { - return (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_7, 2) === 0 ? false : true); -}; - -TurkishStemmer.prototype.r_mark_ndA = TurkishStemmer.prototype.r_mark_ndA$; - -function TurkishStemmer$r_mark_ndA$LTurkishStemmer$($this) { - return (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_7, 2) === 0 ? false : true); -}; - -TurkishStemmer.r_mark_ndA$LTurkishStemmer$ = TurkishStemmer$r_mark_ndA$LTurkishStemmer$; - -TurkishStemmer.prototype.r_mark_DAn$ = function () { - return (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_8, 4) === 0 ? false : true); -}; - -TurkishStemmer.prototype.r_mark_DAn = TurkishStemmer.prototype.r_mark_DAn$; - -function TurkishStemmer$r_mark_DAn$LTurkishStemmer$($this) { - return (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_8, 4) === 0 ? false : true); -}; - -TurkishStemmer.r_mark_DAn$LTurkishStemmer$ = TurkishStemmer$r_mark_DAn$LTurkishStemmer$; - -TurkishStemmer.prototype.r_mark_ndAn$ = function () { - return (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_9, 2) === 0 ? false : true); -}; - -TurkishStemmer.prototype.r_mark_ndAn = TurkishStemmer.prototype.r_mark_ndAn$; - -function TurkishStemmer$r_mark_ndAn$LTurkishStemmer$($this) { - return (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_9, 2) === 0 ? false : true); -}; - -TurkishStemmer.r_mark_ndAn$LTurkishStemmer$ = TurkishStemmer$r_mark_ndAn$LTurkishStemmer$; - -TurkishStemmer.prototype.r_mark_ylA$ = function () { - return (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_10, 2) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_y_consonant$LTurkishStemmer$(this) ? false : true); -}; - -TurkishStemmer.prototype.r_mark_ylA = TurkishStemmer.prototype.r_mark_ylA$; - -function TurkishStemmer$r_mark_ylA$LTurkishStemmer$($this) { - return (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_10, 2) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_y_consonant$LTurkishStemmer$($this) ? false : true); -}; - -TurkishStemmer.r_mark_ylA$LTurkishStemmer$ = TurkishStemmer$r_mark_ylA$LTurkishStemmer$; - -TurkishStemmer.prototype.r_mark_ki$ = function () { - return (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 2, "ki") ? false : true); -}; - -TurkishStemmer.prototype.r_mark_ki = TurkishStemmer.prototype.r_mark_ki$; - -function TurkishStemmer$r_mark_ki$LTurkishStemmer$($this) { - return (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 2, "ki") ? false : true); -}; - -TurkishStemmer.r_mark_ki$LTurkishStemmer$ = TurkishStemmer$r_mark_ki$LTurkishStemmer$; - -TurkishStemmer.prototype.r_mark_ncA$ = function () { - return (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_11, 2) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_n_consonant$LTurkishStemmer$(this) ? false : true); -}; - -TurkishStemmer.prototype.r_mark_ncA = TurkishStemmer.prototype.r_mark_ncA$; - -function TurkishStemmer$r_mark_ncA$LTurkishStemmer$($this) { - return (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_11, 2) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_n_consonant$LTurkishStemmer$($this) ? false : true); -}; - -TurkishStemmer.r_mark_ncA$LTurkishStemmer$ = TurkishStemmer$r_mark_ncA$LTurkishStemmer$; - -TurkishStemmer.prototype.r_mark_yUm$ = function () { - return (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_12, 4) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_y_consonant$LTurkishStemmer$(this) ? false : true); -}; - -TurkishStemmer.prototype.r_mark_yUm = TurkishStemmer.prototype.r_mark_yUm$; - -function TurkishStemmer$r_mark_yUm$LTurkishStemmer$($this) { - return (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_12, 4) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_y_consonant$LTurkishStemmer$($this) ? false : true); -}; - -TurkishStemmer.r_mark_yUm$LTurkishStemmer$ = TurkishStemmer$r_mark_yUm$LTurkishStemmer$; - -TurkishStemmer.prototype.r_mark_sUn$ = function () { - return (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_13, 4) === 0 ? false : true); -}; - -TurkishStemmer.prototype.r_mark_sUn = TurkishStemmer.prototype.r_mark_sUn$; - -function TurkishStemmer$r_mark_sUn$LTurkishStemmer$($this) { - return (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_13, 4) === 0 ? false : true); -}; - -TurkishStemmer.r_mark_sUn$LTurkishStemmer$ = TurkishStemmer$r_mark_sUn$LTurkishStemmer$; - -TurkishStemmer.prototype.r_mark_yUz$ = function () { - return (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_14, 4) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_y_consonant$LTurkishStemmer$(this) ? false : true); -}; - -TurkishStemmer.prototype.r_mark_yUz = TurkishStemmer.prototype.r_mark_yUz$; - -function TurkishStemmer$r_mark_yUz$LTurkishStemmer$($this) { - return (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_14, 4) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_y_consonant$LTurkishStemmer$($this) ? false : true); -}; - -TurkishStemmer.r_mark_yUz$LTurkishStemmer$ = TurkishStemmer$r_mark_yUz$LTurkishStemmer$; - -TurkishStemmer.prototype.r_mark_sUnUz$ = function () { - return (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_15, 4) === 0 ? false : true); -}; - -TurkishStemmer.prototype.r_mark_sUnUz = TurkishStemmer.prototype.r_mark_sUnUz$; - -function TurkishStemmer$r_mark_sUnUz$LTurkishStemmer$($this) { - return (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_15, 4) === 0 ? false : true); -}; - -TurkishStemmer.r_mark_sUnUz$LTurkishStemmer$ = TurkishStemmer$r_mark_sUnUz$LTurkishStemmer$; - -TurkishStemmer.prototype.r_mark_lAr$ = function () { - return (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_16, 2) === 0 ? false : true); -}; - -TurkishStemmer.prototype.r_mark_lAr = TurkishStemmer.prototype.r_mark_lAr$; - -function TurkishStemmer$r_mark_lAr$LTurkishStemmer$($this) { - return (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_16, 2) === 0 ? false : true); -}; - -TurkishStemmer.r_mark_lAr$LTurkishStemmer$ = TurkishStemmer$r_mark_lAr$LTurkishStemmer$; - -TurkishStemmer.prototype.r_mark_nUz$ = function () { - return (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_17, 4) === 0 ? false : true); -}; - -TurkishStemmer.prototype.r_mark_nUz = TurkishStemmer.prototype.r_mark_nUz$; - -function TurkishStemmer$r_mark_nUz$LTurkishStemmer$($this) { - return (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_17, 4) === 0 ? false : true); -}; - -TurkishStemmer.r_mark_nUz$LTurkishStemmer$ = TurkishStemmer$r_mark_nUz$LTurkishStemmer$; - -TurkishStemmer.prototype.r_mark_DUr$ = function () { - return (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_18, 8) === 0 ? false : true); -}; - -TurkishStemmer.prototype.r_mark_DUr = TurkishStemmer.prototype.r_mark_DUr$; - -function TurkishStemmer$r_mark_DUr$LTurkishStemmer$($this) { - return (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_18, 8) === 0 ? false : true); -}; - -TurkishStemmer.r_mark_DUr$LTurkishStemmer$ = TurkishStemmer$r_mark_DUr$LTurkishStemmer$; - -TurkishStemmer.prototype.r_mark_cAsInA$ = function () { - return (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_19, 2) === 0 ? false : true); -}; - -TurkishStemmer.prototype.r_mark_cAsInA = TurkishStemmer.prototype.r_mark_cAsInA$; - -function TurkishStemmer$r_mark_cAsInA$LTurkishStemmer$($this) { - return (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_19, 2) === 0 ? false : true); -}; - -TurkishStemmer.r_mark_cAsInA$LTurkishStemmer$ = TurkishStemmer$r_mark_cAsInA$LTurkishStemmer$; - -TurkishStemmer.prototype.r_mark_yDU$ = function () { - return (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_20, 32) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_y_consonant$LTurkishStemmer$(this) ? false : true); -}; - -TurkishStemmer.prototype.r_mark_yDU = TurkishStemmer.prototype.r_mark_yDU$; - -function TurkishStemmer$r_mark_yDU$LTurkishStemmer$($this) { - return (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_20, 32) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_y_consonant$LTurkishStemmer$($this) ? false : true); -}; - -TurkishStemmer.r_mark_yDU$LTurkishStemmer$ = TurkishStemmer$r_mark_yDU$LTurkishStemmer$; - -TurkishStemmer.prototype.r_mark_ysA$ = function () { - return (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_21, 8) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_y_consonant$LTurkishStemmer$(this) ? false : true); -}; - -TurkishStemmer.prototype.r_mark_ysA = TurkishStemmer.prototype.r_mark_ysA$; - -function TurkishStemmer$r_mark_ysA$LTurkishStemmer$($this) { - return (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_21, 8) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_y_consonant$LTurkishStemmer$($this) ? false : true); -}; - -TurkishStemmer.r_mark_ysA$LTurkishStemmer$ = TurkishStemmer$r_mark_ysA$LTurkishStemmer$; - -TurkishStemmer.prototype.r_mark_ymUs_$ = function () { - return (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_22, 4) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_y_consonant$LTurkishStemmer$(this) ? false : true); -}; - -TurkishStemmer.prototype.r_mark_ymUs_ = TurkishStemmer.prototype.r_mark_ymUs_$; - -function TurkishStemmer$r_mark_ymUs_$LTurkishStemmer$($this) { - return (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_22, 4) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_y_consonant$LTurkishStemmer$($this) ? false : true); -}; - -TurkishStemmer.r_mark_ymUs_$LTurkishStemmer$ = TurkishStemmer$r_mark_ymUs_$LTurkishStemmer$; - -TurkishStemmer.prototype.r_mark_yken$ = function () { - return (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 3, "ken") ? false : ! TurkishStemmer$r_mark_suffix_with_optional_y_consonant$LTurkishStemmer$(this) ? false : true); -}; - -TurkishStemmer.prototype.r_mark_yken = TurkishStemmer.prototype.r_mark_yken$; - -function TurkishStemmer$r_mark_yken$LTurkishStemmer$($this) { - return (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 3, "ken") ? false : ! TurkishStemmer$r_mark_suffix_with_optional_y_consonant$LTurkishStemmer$($this) ? false : true); -}; - -TurkishStemmer.r_mark_yken$LTurkishStemmer$ = TurkishStemmer$r_mark_yken$LTurkishStemmer$; - -TurkishStemmer.prototype.r_stem_nominal_verb_suffixes$ = function () { - var v_1; - var v_2; - var v_3; - var v_4; - var v_5; - var v_6; - var v_7; - var v_8; - var v_9; - var v_10; - var lab0; - var lab1; - var lab2; - var lab3; - var lab4; - var lab5; - var lab6; - var lab7; - var lab8; - var lab9; - var lab10; - var lab11; - var lab12; - var lab13; - var lab14; - var lab15; - var lab16; - var lab17; - var lab18; - var lab19; - var lab20; - var lab21; - var lab22; - var lab23; - var lab24; - var lab25; - var lab26; - var lab27; - var lab28; - var lab29; - var lab30; - var lab31; - var lab32; - var lab33; - var lab34; - this.ket = this.cursor; - this.B_continue_stemming_noun_suffixes = true; - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - v_1 = ((this.limit - this.cursor) | 0); - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - lab2 = true; - lab2: - while (lab2 === true) { - lab2 = false; - v_2 = ((this.limit - this.cursor) | 0); - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_22, 4) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_y_consonant$LTurkishStemmer$(this) ? false : true)) { - break lab3; - } - break lab2; - } - this.cursor = ((this.limit - v_2) | 0); - lab4 = true; - lab4: - while (lab4 === true) { - lab4 = false; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_20, 32) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_y_consonant$LTurkishStemmer$(this) ? false : true)) { - break lab4; - } - break lab2; - } - this.cursor = ((this.limit - v_2) | 0); - lab5 = true; - lab5: - while (lab5 === true) { - lab5 = false; - if (! (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_21, 8) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_y_consonant$LTurkishStemmer$(this) ? false : true)) { - break lab5; - } - break lab2; - } - this.cursor = ((this.limit - v_2) | 0); - if (! (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 3, "ken") ? false : ! TurkishStemmer$r_mark_suffix_with_optional_y_consonant$LTurkishStemmer$(this) ? false : true)) { - break lab1; - } - } - break lab0; - } - this.cursor = ((this.limit - v_1) | 0); - lab6 = true; - lab6: - while (lab6 === true) { - lab6 = false; - if (! (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_19, 2) === 0 ? false : true)) { - break lab6; - } - lab7 = true; - lab7: - while (lab7 === true) { - lab7 = false; - v_3 = ((this.limit - this.cursor) | 0); - lab8 = true; - lab8: - while (lab8 === true) { - lab8 = false; - if (! (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_15, 4) === 0 ? false : true)) { - break lab8; - } - break lab7; - } - this.cursor = ((this.limit - v_3) | 0); - lab9 = true; - lab9: - while (lab9 === true) { - lab9 = false; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_16, 2) === 0 ? false : true)) { - break lab9; - } - break lab7; - } - this.cursor = ((this.limit - v_3) | 0); - lab10 = true; - lab10: - while (lab10 === true) { - lab10 = false; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_12, 4) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_y_consonant$LTurkishStemmer$(this) ? false : true)) { - break lab10; - } - break lab7; - } - this.cursor = ((this.limit - v_3) | 0); - lab11 = true; - lab11: - while (lab11 === true) { - lab11 = false; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_13, 4) === 0 ? false : true)) { - break lab11; - } - break lab7; - } - this.cursor = ((this.limit - v_3) | 0); - lab12 = true; - lab12: - while (lab12 === true) { - lab12 = false; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_14, 4) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_y_consonant$LTurkishStemmer$(this) ? false : true)) { - break lab12; - } - break lab7; - } - this.cursor = ((this.limit - v_3) | 0); - } - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_22, 4) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_y_consonant$LTurkishStemmer$(this) ? false : true)) { - break lab6; - } - break lab0; - } - this.cursor = ((this.limit - v_1) | 0); - lab13 = true; - lab13: - while (lab13 === true) { - lab13 = false; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_16, 2) === 0 ? false : true)) { - break lab13; - } - this.bra = this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - v_4 = ((this.limit - this.cursor) | 0); - lab14 = true; - lab14: - while (lab14 === true) { - lab14 = false; - this.ket = this.cursor; - lab15 = true; - lab15: - while (lab15 === true) { - lab15 = false; - v_5 = ((this.limit - this.cursor) | 0); - lab16 = true; - lab16: - while (lab16 === true) { - lab16 = false; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_18, 8) === 0 ? false : true)) { - break lab16; - } - break lab15; - } - this.cursor = ((this.limit - v_5) | 0); - lab17 = true; - lab17: - while (lab17 === true) { - lab17 = false; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_20, 32) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_y_consonant$LTurkishStemmer$(this) ? false : true)) { - break lab17; - } - break lab15; - } - this.cursor = ((this.limit - v_5) | 0); - lab18 = true; - lab18: - while (lab18 === true) { - lab18 = false; - if (! (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_21, 8) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_y_consonant$LTurkishStemmer$(this) ? false : true)) { - break lab18; - } - break lab15; - } - this.cursor = ((this.limit - v_5) | 0); - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_22, 4) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_y_consonant$LTurkishStemmer$(this) ? false : true)) { - this.cursor = ((this.limit - v_4) | 0); - break lab14; - } - } - } - this.B_continue_stemming_noun_suffixes = false; - break lab0; - } - this.cursor = ((this.limit - v_1) | 0); - lab19 = true; - lab19: - while (lab19 === true) { - lab19 = false; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_17, 4) === 0 ? false : true)) { - break lab19; - } - lab20 = true; - lab20: - while (lab20 === true) { - lab20 = false; - v_6 = ((this.limit - this.cursor) | 0); - lab21 = true; - lab21: - while (lab21 === true) { - lab21 = false; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_20, 32) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_y_consonant$LTurkishStemmer$(this) ? false : true)) { - break lab21; - } - break lab20; - } - this.cursor = ((this.limit - v_6) | 0); - if (! (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_21, 8) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_y_consonant$LTurkishStemmer$(this) ? false : true)) { - break lab19; - } - } - break lab0; - } - this.cursor = ((this.limit - v_1) | 0); - lab22 = true; - lab22: - while (lab22 === true) { - lab22 = false; - lab23 = true; - lab23: - while (lab23 === true) { - lab23 = false; - v_7 = ((this.limit - this.cursor) | 0); - lab24 = true; - lab24: - while (lab24 === true) { - lab24 = false; - if (! (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_15, 4) === 0 ? false : true)) { - break lab24; - } - break lab23; - } - this.cursor = ((this.limit - v_7) | 0); - lab25 = true; - lab25: - while (lab25 === true) { - lab25 = false; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_14, 4) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_y_consonant$LTurkishStemmer$(this) ? false : true)) { - break lab25; - } - break lab23; - } - this.cursor = ((this.limit - v_7) | 0); - lab26 = true; - lab26: - while (lab26 === true) { - lab26 = false; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_13, 4) === 0 ? false : true)) { - break lab26; - } - break lab23; - } - this.cursor = ((this.limit - v_7) | 0); - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_12, 4) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_y_consonant$LTurkishStemmer$(this) ? false : true)) { - break lab22; - } - } - this.bra = this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - v_8 = ((this.limit - this.cursor) | 0); - lab27 = true; - lab27: - while (lab27 === true) { - lab27 = false; - this.ket = this.cursor; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_22, 4) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_y_consonant$LTurkishStemmer$(this) ? false : true)) { - this.cursor = ((this.limit - v_8) | 0); - break lab27; - } - } - break lab0; - } - this.cursor = ((this.limit - v_1) | 0); - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_18, 8) === 0 ? false : true)) { - return false; - } - this.bra = this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - v_9 = ((this.limit - this.cursor) | 0); - lab28 = true; - lab28: - while (lab28 === true) { - lab28 = false; - this.ket = this.cursor; - lab29 = true; - lab29: - while (lab29 === true) { - lab29 = false; - v_10 = ((this.limit - this.cursor) | 0); - lab30 = true; - lab30: - while (lab30 === true) { - lab30 = false; - if (! (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_15, 4) === 0 ? false : true)) { - break lab30; - } - break lab29; - } - this.cursor = ((this.limit - v_10) | 0); - lab31 = true; - lab31: - while (lab31 === true) { - lab31 = false; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_16, 2) === 0 ? false : true)) { - break lab31; - } - break lab29; - } - this.cursor = ((this.limit - v_10) | 0); - lab32 = true; - lab32: - while (lab32 === true) { - lab32 = false; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_12, 4) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_y_consonant$LTurkishStemmer$(this) ? false : true)) { - break lab32; - } - break lab29; - } - this.cursor = ((this.limit - v_10) | 0); - lab33 = true; - lab33: - while (lab33 === true) { - lab33 = false; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_13, 4) === 0 ? false : true)) { - break lab33; - } - break lab29; - } - this.cursor = ((this.limit - v_10) | 0); - lab34 = true; - lab34: - while (lab34 === true) { - lab34 = false; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_14, 4) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_y_consonant$LTurkishStemmer$(this) ? false : true)) { - break lab34; - } - break lab29; - } - this.cursor = ((this.limit - v_10) | 0); - } - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_22, 4) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_y_consonant$LTurkishStemmer$(this) ? false : true)) { - this.cursor = ((this.limit - v_9) | 0); - break lab28; - } - } - } - this.bra = this.cursor; - return (! BaseStemmer$slice_from$LBaseStemmer$S(this, "") ? false : true); -}; - -TurkishStemmer.prototype.r_stem_nominal_verb_suffixes = TurkishStemmer.prototype.r_stem_nominal_verb_suffixes$; - -function TurkishStemmer$r_stem_nominal_verb_suffixes$LTurkishStemmer$($this) { - var v_1; - var v_2; - var v_3; - var v_4; - var v_5; - var v_6; - var v_7; - var v_8; - var v_9; - var v_10; - var lab0; - var lab1; - var lab2; - var lab3; - var lab4; - var lab5; - var lab6; - var lab7; - var lab8; - var lab9; - var lab10; - var lab11; - var lab12; - var lab13; - var lab14; - var lab15; - var lab16; - var lab17; - var lab18; - var lab19; - var lab20; - var lab21; - var lab22; - var lab23; - var lab24; - var lab25; - var lab26; - var lab27; - var lab28; - var lab29; - var lab30; - var lab31; - var lab32; - var lab33; - var lab34; - $this.ket = $this.cursor; - $this.B_continue_stemming_noun_suffixes = true; - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - v_1 = (($this.limit - $this.cursor) | 0); - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - lab2 = true; - lab2: - while (lab2 === true) { - lab2 = false; - v_2 = (($this.limit - $this.cursor) | 0); - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_22, 4) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_y_consonant$LTurkishStemmer$($this) ? false : true)) { - break lab3; - } - break lab2; - } - $this.cursor = (($this.limit - v_2) | 0); - lab4 = true; - lab4: - while (lab4 === true) { - lab4 = false; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_20, 32) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_y_consonant$LTurkishStemmer$($this) ? false : true)) { - break lab4; - } - break lab2; - } - $this.cursor = (($this.limit - v_2) | 0); - lab5 = true; - lab5: - while (lab5 === true) { - lab5 = false; - if (! (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_21, 8) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_y_consonant$LTurkishStemmer$($this) ? false : true)) { - break lab5; - } - break lab2; - } - $this.cursor = (($this.limit - v_2) | 0); - if (! (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 3, "ken") ? false : ! TurkishStemmer$r_mark_suffix_with_optional_y_consonant$LTurkishStemmer$($this) ? false : true)) { - break lab1; - } - } - break lab0; - } - $this.cursor = (($this.limit - v_1) | 0); - lab6 = true; - lab6: - while (lab6 === true) { - lab6 = false; - if (! (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_19, 2) === 0 ? false : true)) { - break lab6; - } - lab7 = true; - lab7: - while (lab7 === true) { - lab7 = false; - v_3 = (($this.limit - $this.cursor) | 0); - lab8 = true; - lab8: - while (lab8 === true) { - lab8 = false; - if (! (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_15, 4) === 0 ? false : true)) { - break lab8; - } - break lab7; - } - $this.cursor = (($this.limit - v_3) | 0); - lab9 = true; - lab9: - while (lab9 === true) { - lab9 = false; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_16, 2) === 0 ? false : true)) { - break lab9; - } - break lab7; - } - $this.cursor = (($this.limit - v_3) | 0); - lab10 = true; - lab10: - while (lab10 === true) { - lab10 = false; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_12, 4) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_y_consonant$LTurkishStemmer$($this) ? false : true)) { - break lab10; - } - break lab7; - } - $this.cursor = (($this.limit - v_3) | 0); - lab11 = true; - lab11: - while (lab11 === true) { - lab11 = false; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_13, 4) === 0 ? false : true)) { - break lab11; - } - break lab7; - } - $this.cursor = (($this.limit - v_3) | 0); - lab12 = true; - lab12: - while (lab12 === true) { - lab12 = false; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_14, 4) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_y_consonant$LTurkishStemmer$($this) ? false : true)) { - break lab12; - } - break lab7; - } - $this.cursor = (($this.limit - v_3) | 0); - } - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_22, 4) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_y_consonant$LTurkishStemmer$($this) ? false : true)) { - break lab6; - } - break lab0; - } - $this.cursor = (($this.limit - v_1) | 0); - lab13 = true; - lab13: - while (lab13 === true) { - lab13 = false; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_16, 2) === 0 ? false : true)) { - break lab13; - } - $this.bra = $this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - v_4 = (($this.limit - $this.cursor) | 0); - lab14 = true; - lab14: - while (lab14 === true) { - lab14 = false; - $this.ket = $this.cursor; - lab15 = true; - lab15: - while (lab15 === true) { - lab15 = false; - v_5 = (($this.limit - $this.cursor) | 0); - lab16 = true; - lab16: - while (lab16 === true) { - lab16 = false; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_18, 8) === 0 ? false : true)) { - break lab16; - } - break lab15; - } - $this.cursor = (($this.limit - v_5) | 0); - lab17 = true; - lab17: - while (lab17 === true) { - lab17 = false; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_20, 32) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_y_consonant$LTurkishStemmer$($this) ? false : true)) { - break lab17; - } - break lab15; - } - $this.cursor = (($this.limit - v_5) | 0); - lab18 = true; - lab18: - while (lab18 === true) { - lab18 = false; - if (! (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_21, 8) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_y_consonant$LTurkishStemmer$($this) ? false : true)) { - break lab18; - } - break lab15; - } - $this.cursor = (($this.limit - v_5) | 0); - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_22, 4) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_y_consonant$LTurkishStemmer$($this) ? false : true)) { - $this.cursor = (($this.limit - v_4) | 0); - break lab14; - } - } - } - $this.B_continue_stemming_noun_suffixes = false; - break lab0; - } - $this.cursor = (($this.limit - v_1) | 0); - lab19 = true; - lab19: - while (lab19 === true) { - lab19 = false; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_17, 4) === 0 ? false : true)) { - break lab19; - } - lab20 = true; - lab20: - while (lab20 === true) { - lab20 = false; - v_6 = (($this.limit - $this.cursor) | 0); - lab21 = true; - lab21: - while (lab21 === true) { - lab21 = false; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_20, 32) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_y_consonant$LTurkishStemmer$($this) ? false : true)) { - break lab21; - } - break lab20; - } - $this.cursor = (($this.limit - v_6) | 0); - if (! (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_21, 8) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_y_consonant$LTurkishStemmer$($this) ? false : true)) { - break lab19; - } - } - break lab0; - } - $this.cursor = (($this.limit - v_1) | 0); - lab22 = true; - lab22: - while (lab22 === true) { - lab22 = false; - lab23 = true; - lab23: - while (lab23 === true) { - lab23 = false; - v_7 = (($this.limit - $this.cursor) | 0); - lab24 = true; - lab24: - while (lab24 === true) { - lab24 = false; - if (! (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_15, 4) === 0 ? false : true)) { - break lab24; - } - break lab23; - } - $this.cursor = (($this.limit - v_7) | 0); - lab25 = true; - lab25: - while (lab25 === true) { - lab25 = false; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_14, 4) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_y_consonant$LTurkishStemmer$($this) ? false : true)) { - break lab25; - } - break lab23; - } - $this.cursor = (($this.limit - v_7) | 0); - lab26 = true; - lab26: - while (lab26 === true) { - lab26 = false; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_13, 4) === 0 ? false : true)) { - break lab26; - } - break lab23; - } - $this.cursor = (($this.limit - v_7) | 0); - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_12, 4) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_y_consonant$LTurkishStemmer$($this) ? false : true)) { - break lab22; - } - } - $this.bra = $this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - v_8 = (($this.limit - $this.cursor) | 0); - lab27 = true; - lab27: - while (lab27 === true) { - lab27 = false; - $this.ket = $this.cursor; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_22, 4) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_y_consonant$LTurkishStemmer$($this) ? false : true)) { - $this.cursor = (($this.limit - v_8) | 0); - break lab27; - } - } - break lab0; - } - $this.cursor = (($this.limit - v_1) | 0); - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_18, 8) === 0 ? false : true)) { - return false; - } - $this.bra = $this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - v_9 = (($this.limit - $this.cursor) | 0); - lab28 = true; - lab28: - while (lab28 === true) { - lab28 = false; - $this.ket = $this.cursor; - lab29 = true; - lab29: - while (lab29 === true) { - lab29 = false; - v_10 = (($this.limit - $this.cursor) | 0); - lab30 = true; - lab30: - while (lab30 === true) { - lab30 = false; - if (! (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_15, 4) === 0 ? false : true)) { - break lab30; - } - break lab29; - } - $this.cursor = (($this.limit - v_10) | 0); - lab31 = true; - lab31: - while (lab31 === true) { - lab31 = false; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_16, 2) === 0 ? false : true)) { - break lab31; - } - break lab29; - } - $this.cursor = (($this.limit - v_10) | 0); - lab32 = true; - lab32: - while (lab32 === true) { - lab32 = false; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_12, 4) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_y_consonant$LTurkishStemmer$($this) ? false : true)) { - break lab32; - } - break lab29; - } - $this.cursor = (($this.limit - v_10) | 0); - lab33 = true; - lab33: - while (lab33 === true) { - lab33 = false; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_13, 4) === 0 ? false : true)) { - break lab33; - } - break lab29; - } - $this.cursor = (($this.limit - v_10) | 0); - lab34 = true; - lab34: - while (lab34 === true) { - lab34 = false; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_14, 4) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_y_consonant$LTurkishStemmer$($this) ? false : true)) { - break lab34; - } - break lab29; - } - $this.cursor = (($this.limit - v_10) | 0); - } - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_22, 4) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_y_consonant$LTurkishStemmer$($this) ? false : true)) { - $this.cursor = (($this.limit - v_9) | 0); - break lab28; - } - } - } - $this.bra = $this.cursor; - return (! BaseStemmer$slice_from$LBaseStemmer$S($this, "") ? false : true); -}; - -TurkishStemmer.r_stem_nominal_verb_suffixes$LTurkishStemmer$ = TurkishStemmer$r_stem_nominal_verb_suffixes$LTurkishStemmer$; - -TurkishStemmer.prototype.r_stem_suffix_chain_before_ki$ = function () { - var v_1; - var v_2; - var v_3; - var v_4; - var v_5; - var v_6; - var v_7; - var v_8; - var v_9; - var v_10; - var v_11; - var lab0; - var lab1; - var lab2; - var lab3; - var lab4; - var lab5; - var lab6; - var lab7; - var lab8; - var lab9; - var lab10; - var lab11; - var lab12; - var lab13; - var lab14; - var lab15; - var lab16; - var lab17; - var lab18; - this.ket = this.cursor; - if (! (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 2, "ki") ? false : true)) { - return false; - } - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - v_1 = ((this.limit - this.cursor) | 0); - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_6, 4) === 0 ? false : true)) { - break lab1; - } - this.bra = this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - v_2 = ((this.limit - this.cursor) | 0); - lab2 = true; - lab2: - while (lab2 === true) { - lab2 = false; - this.ket = this.cursor; - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - v_3 = ((this.limit - this.cursor) | 0); - lab4 = true; - lab4: - while (lab4 === true) { - lab4 = false; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_16, 2) === 0 ? false : true)) { - break lab4; - } - this.bra = this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - v_4 = ((this.limit - this.cursor) | 0); - lab5 = true; - lab5: - while (lab5 === true) { - lab5 = false; - if (! TurkishStemmer$r_stem_suffix_chain_before_ki$LTurkishStemmer$(this)) { - this.cursor = ((this.limit - v_4) | 0); - break lab5; - } - } - break lab3; - } - this.cursor = ((this.limit - v_3) | 0); - if (! (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_0, 10) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_U_vowel$LTurkishStemmer$(this) ? false : true)) { - this.cursor = ((this.limit - v_2) | 0); - break lab2; - } - this.bra = this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - v_5 = ((this.limit - this.cursor) | 0); - lab6 = true; - lab6: - while (lab6 === true) { - lab6 = false; - this.ket = this.cursor; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_16, 2) === 0 ? false : true)) { - this.cursor = ((this.limit - v_5) | 0); - break lab6; - } - this.bra = this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - if (! TurkishStemmer$r_stem_suffix_chain_before_ki$LTurkishStemmer$(this)) { - this.cursor = ((this.limit - v_5) | 0); - break lab6; - } - } - } - } - break lab0; - } - this.cursor = ((this.limit - v_1) | 0); - lab7 = true; - lab7: - while (lab7 === true) { - lab7 = false; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_3, 4) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_n_consonant$LTurkishStemmer$(this) ? false : true)) { - break lab7; - } - this.bra = this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - v_6 = ((this.limit - this.cursor) | 0); - lab8 = true; - lab8: - while (lab8 === true) { - lab8 = false; - this.ket = this.cursor; - lab9 = true; - lab9: - while (lab9 === true) { - lab9 = false; - v_7 = ((this.limit - this.cursor) | 0); - lab10 = true; - lab10: - while (lab10 === true) { - lab10 = false; - if (! (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_1, 2) === 0 ? false : true)) { - break lab10; - } - this.bra = this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break lab9; - } - this.cursor = ((this.limit - v_7) | 0); - lab11 = true; - lab11: - while (lab11 === true) { - lab11 = false; - this.ket = this.cursor; - lab12 = true; - lab12: - while (lab12 === true) { - lab12 = false; - v_8 = ((this.limit - this.cursor) | 0); - lab13 = true; - lab13: - while (lab13 === true) { - lab13 = false; - if (! (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_0, 10) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_U_vowel$LTurkishStemmer$(this) ? false : true)) { - break lab13; - } - break lab12; - } - this.cursor = ((this.limit - v_8) | 0); - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : ! BaseStemmer$in_grouping_b$LBaseStemmer$AIII(this, TurkishStemmer.g_U, 105, 305) ? false : ! TurkishStemmer$r_mark_suffix_with_optional_s_consonant$LTurkishStemmer$(this) ? false : true)) { - break lab11; - } - } - this.bra = this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - v_9 = ((this.limit - this.cursor) | 0); - lab14 = true; - lab14: - while (lab14 === true) { - lab14 = false; - this.ket = this.cursor; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_16, 2) === 0 ? false : true)) { - this.cursor = ((this.limit - v_9) | 0); - break lab14; - } - this.bra = this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - if (! TurkishStemmer$r_stem_suffix_chain_before_ki$LTurkishStemmer$(this)) { - this.cursor = ((this.limit - v_9) | 0); - break lab14; - } - } - break lab9; - } - this.cursor = ((this.limit - v_7) | 0); - if (! TurkishStemmer$r_stem_suffix_chain_before_ki$LTurkishStemmer$(this)) { - this.cursor = ((this.limit - v_6) | 0); - break lab8; - } - } - } - break lab0; - } - this.cursor = ((this.limit - v_1) | 0); - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_7, 2) === 0 ? false : true)) { - return false; - } - lab15 = true; - lab15: - while (lab15 === true) { - lab15 = false; - v_10 = ((this.limit - this.cursor) | 0); - lab16 = true; - lab16: - while (lab16 === true) { - lab16 = false; - if (! (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_1, 2) === 0 ? false : true)) { - break lab16; - } - this.bra = this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break lab15; - } - this.cursor = ((this.limit - v_10) | 0); - lab17 = true; - lab17: - while (lab17 === true) { - lab17 = false; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : ! BaseStemmer$in_grouping_b$LBaseStemmer$AIII(this, TurkishStemmer.g_U, 105, 305) ? false : ! TurkishStemmer$r_mark_suffix_with_optional_s_consonant$LTurkishStemmer$(this) ? false : true)) { - break lab17; - } - this.bra = this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - v_11 = ((this.limit - this.cursor) | 0); - lab18 = true; - lab18: - while (lab18 === true) { - lab18 = false; - this.ket = this.cursor; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_16, 2) === 0 ? false : true)) { - this.cursor = ((this.limit - v_11) | 0); - break lab18; - } - this.bra = this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - if (! TurkishStemmer$r_stem_suffix_chain_before_ki$LTurkishStemmer$(this)) { - this.cursor = ((this.limit - v_11) | 0); - break lab18; - } - } - break lab15; - } - this.cursor = ((this.limit - v_10) | 0); - if (! TurkishStemmer$r_stem_suffix_chain_before_ki$LTurkishStemmer$(this)) { - return false; - } - } - } - return true; -}; - -TurkishStemmer.prototype.r_stem_suffix_chain_before_ki = TurkishStemmer.prototype.r_stem_suffix_chain_before_ki$; - -function TurkishStemmer$r_stem_suffix_chain_before_ki$LTurkishStemmer$($this) { - var v_1; - var v_2; - var v_3; - var v_4; - var v_5; - var v_6; - var v_7; - var v_8; - var v_9; - var v_10; - var v_11; - var lab0; - var lab1; - var lab2; - var lab3; - var lab4; - var lab5; - var lab6; - var lab7; - var lab8; - var lab9; - var lab10; - var lab11; - var lab12; - var lab13; - var lab14; - var lab15; - var lab16; - var lab17; - var lab18; - $this.ket = $this.cursor; - if (! (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 2, "ki") ? false : true)) { - return false; - } - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - v_1 = (($this.limit - $this.cursor) | 0); - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_6, 4) === 0 ? false : true)) { - break lab1; - } - $this.bra = $this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - v_2 = (($this.limit - $this.cursor) | 0); - lab2 = true; - lab2: - while (lab2 === true) { - lab2 = false; - $this.ket = $this.cursor; - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - v_3 = (($this.limit - $this.cursor) | 0); - lab4 = true; - lab4: - while (lab4 === true) { - lab4 = false; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_16, 2) === 0 ? false : true)) { - break lab4; - } - $this.bra = $this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - v_4 = (($this.limit - $this.cursor) | 0); - lab5 = true; - lab5: - while (lab5 === true) { - lab5 = false; - if (! TurkishStemmer$r_stem_suffix_chain_before_ki$LTurkishStemmer$($this)) { - $this.cursor = (($this.limit - v_4) | 0); - break lab5; - } - } - break lab3; - } - $this.cursor = (($this.limit - v_3) | 0); - if (! (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_0, 10) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_U_vowel$LTurkishStemmer$($this) ? false : true)) { - $this.cursor = (($this.limit - v_2) | 0); - break lab2; - } - $this.bra = $this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - v_5 = (($this.limit - $this.cursor) | 0); - lab6 = true; - lab6: - while (lab6 === true) { - lab6 = false; - $this.ket = $this.cursor; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_16, 2) === 0 ? false : true)) { - $this.cursor = (($this.limit - v_5) | 0); - break lab6; - } - $this.bra = $this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - if (! TurkishStemmer$r_stem_suffix_chain_before_ki$LTurkishStemmer$($this)) { - $this.cursor = (($this.limit - v_5) | 0); - break lab6; - } - } - } - } - break lab0; - } - $this.cursor = (($this.limit - v_1) | 0); - lab7 = true; - lab7: - while (lab7 === true) { - lab7 = false; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_3, 4) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_n_consonant$LTurkishStemmer$($this) ? false : true)) { - break lab7; - } - $this.bra = $this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - v_6 = (($this.limit - $this.cursor) | 0); - lab8 = true; - lab8: - while (lab8 === true) { - lab8 = false; - $this.ket = $this.cursor; - lab9 = true; - lab9: - while (lab9 === true) { - lab9 = false; - v_7 = (($this.limit - $this.cursor) | 0); - lab10 = true; - lab10: - while (lab10 === true) { - lab10 = false; - if (! (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_1, 2) === 0 ? false : true)) { - break lab10; - } - $this.bra = $this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break lab9; - } - $this.cursor = (($this.limit - v_7) | 0); - lab11 = true; - lab11: - while (lab11 === true) { - lab11 = false; - $this.ket = $this.cursor; - lab12 = true; - lab12: - while (lab12 === true) { - lab12 = false; - v_8 = (($this.limit - $this.cursor) | 0); - lab13 = true; - lab13: - while (lab13 === true) { - lab13 = false; - if (! (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_0, 10) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_U_vowel$LTurkishStemmer$($this) ? false : true)) { - break lab13; - } - break lab12; - } - $this.cursor = (($this.limit - v_8) | 0); - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : ! BaseStemmer$in_grouping_b$LBaseStemmer$AIII($this, TurkishStemmer.g_U, 105, 305) ? false : ! TurkishStemmer$r_mark_suffix_with_optional_s_consonant$LTurkishStemmer$($this) ? false : true)) { - break lab11; - } - } - $this.bra = $this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - v_9 = (($this.limit - $this.cursor) | 0); - lab14 = true; - lab14: - while (lab14 === true) { - lab14 = false; - $this.ket = $this.cursor; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_16, 2) === 0 ? false : true)) { - $this.cursor = (($this.limit - v_9) | 0); - break lab14; - } - $this.bra = $this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - if (! TurkishStemmer$r_stem_suffix_chain_before_ki$LTurkishStemmer$($this)) { - $this.cursor = (($this.limit - v_9) | 0); - break lab14; - } - } - break lab9; - } - $this.cursor = (($this.limit - v_7) | 0); - if (! TurkishStemmer$r_stem_suffix_chain_before_ki$LTurkishStemmer$($this)) { - $this.cursor = (($this.limit - v_6) | 0); - break lab8; - } - } - } - break lab0; - } - $this.cursor = (($this.limit - v_1) | 0); - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_7, 2) === 0 ? false : true)) { - return false; - } - lab15 = true; - lab15: - while (lab15 === true) { - lab15 = false; - v_10 = (($this.limit - $this.cursor) | 0); - lab16 = true; - lab16: - while (lab16 === true) { - lab16 = false; - if (! (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_1, 2) === 0 ? false : true)) { - break lab16; - } - $this.bra = $this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break lab15; - } - $this.cursor = (($this.limit - v_10) | 0); - lab17 = true; - lab17: - while (lab17 === true) { - lab17 = false; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : ! BaseStemmer$in_grouping_b$LBaseStemmer$AIII($this, TurkishStemmer.g_U, 105, 305) ? false : ! TurkishStemmer$r_mark_suffix_with_optional_s_consonant$LTurkishStemmer$($this) ? false : true)) { - break lab17; - } - $this.bra = $this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - v_11 = (($this.limit - $this.cursor) | 0); - lab18 = true; - lab18: - while (lab18 === true) { - lab18 = false; - $this.ket = $this.cursor; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_16, 2) === 0 ? false : true)) { - $this.cursor = (($this.limit - v_11) | 0); - break lab18; - } - $this.bra = $this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - if (! TurkishStemmer$r_stem_suffix_chain_before_ki$LTurkishStemmer$($this)) { - $this.cursor = (($this.limit - v_11) | 0); - break lab18; - } - } - break lab15; - } - $this.cursor = (($this.limit - v_10) | 0); - if (! TurkishStemmer$r_stem_suffix_chain_before_ki$LTurkishStemmer$($this)) { - return false; - } - } - } - return true; -}; - -TurkishStemmer.r_stem_suffix_chain_before_ki$LTurkishStemmer$ = TurkishStemmer$r_stem_suffix_chain_before_ki$LTurkishStemmer$; - -TurkishStemmer.prototype.r_stem_noun_suffixes$ = function () { - var v_1; - var v_2; - var v_3; - var v_4; - var v_5; - var v_6; - var v_7; - var v_8; - var v_9; - var v_10; - var v_11; - var v_12; - var v_13; - var v_14; - var v_15; - var v_16; - var v_17; - var v_18; - var v_19; - var v_20; - var v_21; - var v_22; - var v_23; - var v_24; - var v_25; - var v_26; - var v_27; - var lab0; - var lab1; - var lab2; - var lab3; - var lab4; - var lab5; - var lab6; - var lab7; - var lab8; - var lab9; - var lab10; - var lab11; - var lab12; - var lab13; - var lab14; - var lab15; - var lab16; - var lab17; - var lab18; - var lab19; - var lab20; - var lab21; - var lab22; - var lab23; - var lab24; - var lab25; - var lab26; - var lab27; - var lab28; - var lab29; - var lab30; - var lab31; - var lab32; - var lab33; - var lab34; - var lab35; - var lab36; - var lab37; - var lab38; - var lab39; - var lab40; - var lab41; - var lab42; - var lab43; - var lab44; - var lab45; - var lab46; - var lab47; - var lab48; - var lab49; - var lab50; - var lab51; - var lab52; - var lab53; - var cursor$0; - var cursor$1; - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - v_1 = ((this.limit - this.cursor) | 0); - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - this.ket = this.cursor; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_16, 2) === 0 ? false : true)) { - break lab1; - } - this.bra = this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - v_2 = ((this.limit - this.cursor) | 0); - lab2 = true; - lab2: - while (lab2 === true) { - lab2 = false; - if (! TurkishStemmer$r_stem_suffix_chain_before_ki$LTurkishStemmer$(this)) { - this.cursor = ((this.limit - v_2) | 0); - break lab2; - } - } - break lab0; - } - this.cursor = ((this.limit - v_1) | 0); - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - this.ket = this.cursor; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_11, 2) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_n_consonant$LTurkishStemmer$(this) ? false : true)) { - break lab3; - } - this.bra = this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - v_3 = ((this.limit - this.cursor) | 0); - lab4 = true; - lab4: - while (lab4 === true) { - lab4 = false; - lab5 = true; - lab5: - while (lab5 === true) { - lab5 = false; - v_4 = ((this.limit - this.cursor) | 0); - lab6 = true; - lab6: - while (lab6 === true) { - lab6 = false; - this.ket = this.cursor; - if (! (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_1, 2) === 0 ? false : true)) { - break lab6; - } - this.bra = this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break lab5; - } - this.cursor = ((this.limit - v_4) | 0); - lab7 = true; - lab7: - while (lab7 === true) { - lab7 = false; - this.ket = this.cursor; - lab8 = true; - lab8: - while (lab8 === true) { - lab8 = false; - v_5 = ((this.limit - this.cursor) | 0); - lab9 = true; - lab9: - while (lab9 === true) { - lab9 = false; - if (! (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_0, 10) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_U_vowel$LTurkishStemmer$(this) ? false : true)) { - break lab9; - } - break lab8; - } - this.cursor = ((this.limit - v_5) | 0); - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : ! BaseStemmer$in_grouping_b$LBaseStemmer$AIII(this, TurkishStemmer.g_U, 105, 305) ? false : ! TurkishStemmer$r_mark_suffix_with_optional_s_consonant$LTurkishStemmer$(this) ? false : true)) { - break lab7; - } - } - this.bra = this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - v_6 = ((this.limit - this.cursor) | 0); - lab10 = true; - lab10: - while (lab10 === true) { - lab10 = false; - this.ket = this.cursor; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_16, 2) === 0 ? false : true)) { - this.cursor = ((this.limit - v_6) | 0); - break lab10; - } - this.bra = this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - if (! TurkishStemmer$r_stem_suffix_chain_before_ki$LTurkishStemmer$(this)) { - this.cursor = ((this.limit - v_6) | 0); - break lab10; - } - } - break lab5; - } - cursor$0 = this.cursor = ((this.limit - v_4) | 0); - this.ket = cursor$0; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_16, 2) === 0 ? false : true)) { - this.cursor = ((this.limit - v_3) | 0); - break lab4; - } - this.bra = this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - if (! TurkishStemmer$r_stem_suffix_chain_before_ki$LTurkishStemmer$(this)) { - this.cursor = ((this.limit - v_3) | 0); - break lab4; - } - } - } - break lab0; - } - this.cursor = ((this.limit - v_1) | 0); - lab11 = true; - lab11: - while (lab11 === true) { - lab11 = false; - this.ket = this.cursor; - lab12 = true; - lab12: - while (lab12 === true) { - lab12 = false; - v_7 = ((this.limit - this.cursor) | 0); - lab13 = true; - lab13: - while (lab13 === true) { - lab13 = false; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_7, 2) === 0 ? false : true)) { - break lab13; - } - break lab12; - } - this.cursor = ((this.limit - v_7) | 0); - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_5, 2) === 0 ? false : true)) { - break lab11; - } - } - lab14 = true; - lab14: - while (lab14 === true) { - lab14 = false; - v_8 = ((this.limit - this.cursor) | 0); - lab15 = true; - lab15: - while (lab15 === true) { - lab15 = false; - if (! (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_1, 2) === 0 ? false : true)) { - break lab15; - } - this.bra = this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break lab14; - } - this.cursor = ((this.limit - v_8) | 0); - lab16 = true; - lab16: - while (lab16 === true) { - lab16 = false; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : ! BaseStemmer$in_grouping_b$LBaseStemmer$AIII(this, TurkishStemmer.g_U, 105, 305) ? false : ! TurkishStemmer$r_mark_suffix_with_optional_s_consonant$LTurkishStemmer$(this) ? false : true)) { - break lab16; - } - this.bra = this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - v_9 = ((this.limit - this.cursor) | 0); - lab17 = true; - lab17: - while (lab17 === true) { - lab17 = false; - this.ket = this.cursor; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_16, 2) === 0 ? false : true)) { - this.cursor = ((this.limit - v_9) | 0); - break lab17; - } - this.bra = this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - if (! TurkishStemmer$r_stem_suffix_chain_before_ki$LTurkishStemmer$(this)) { - this.cursor = ((this.limit - v_9) | 0); - break lab17; - } - } - break lab14; - } - this.cursor = ((this.limit - v_8) | 0); - if (! TurkishStemmer$r_stem_suffix_chain_before_ki$LTurkishStemmer$(this)) { - break lab11; - } - } - break lab0; - } - this.cursor = ((this.limit - v_1) | 0); - lab18 = true; - lab18: - while (lab18 === true) { - lab18 = false; - this.ket = this.cursor; - lab19 = true; - lab19: - while (lab19 === true) { - lab19 = false; - v_10 = ((this.limit - this.cursor) | 0); - lab20 = true; - lab20: - while (lab20 === true) { - lab20 = false; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_9, 2) === 0 ? false : true)) { - break lab20; - } - break lab19; - } - this.cursor = ((this.limit - v_10) | 0); - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_2, 4) === 0 ? false : true)) { - break lab18; - } - } - lab21 = true; - lab21: - while (lab21 === true) { - lab21 = false; - v_11 = ((this.limit - this.cursor) | 0); - lab22 = true; - lab22: - while (lab22 === true) { - lab22 = false; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : ! BaseStemmer$in_grouping_b$LBaseStemmer$AIII(this, TurkishStemmer.g_U, 105, 305) ? false : ! TurkishStemmer$r_mark_suffix_with_optional_s_consonant$LTurkishStemmer$(this) ? false : true)) { - break lab22; - } - this.bra = this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - v_12 = ((this.limit - this.cursor) | 0); - lab23 = true; - lab23: - while (lab23 === true) { - lab23 = false; - this.ket = this.cursor; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_16, 2) === 0 ? false : true)) { - this.cursor = ((this.limit - v_12) | 0); - break lab23; - } - this.bra = this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - if (! TurkishStemmer$r_stem_suffix_chain_before_ki$LTurkishStemmer$(this)) { - this.cursor = ((this.limit - v_12) | 0); - break lab23; - } - } - break lab21; - } - this.cursor = ((this.limit - v_11) | 0); - if (! (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_1, 2) === 0 ? false : true)) { - break lab18; - } - } - break lab0; - } - this.cursor = ((this.limit - v_1) | 0); - lab24 = true; - lab24: - while (lab24 === true) { - lab24 = false; - this.ket = this.cursor; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_8, 4) === 0 ? false : true)) { - break lab24; - } - this.bra = this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - v_13 = ((this.limit - this.cursor) | 0); - lab25 = true; - lab25: - while (lab25 === true) { - lab25 = false; - this.ket = this.cursor; - lab26 = true; - lab26: - while (lab26 === true) { - lab26 = false; - v_14 = ((this.limit - this.cursor) | 0); - lab27 = true; - lab27: - while (lab27 === true) { - lab27 = false; - if (! (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_0, 10) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_U_vowel$LTurkishStemmer$(this) ? false : true)) { - break lab27; - } - this.bra = this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - v_15 = ((this.limit - this.cursor) | 0); - lab28 = true; - lab28: - while (lab28 === true) { - lab28 = false; - this.ket = this.cursor; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_16, 2) === 0 ? false : true)) { - this.cursor = ((this.limit - v_15) | 0); - break lab28; - } - this.bra = this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - if (! TurkishStemmer$r_stem_suffix_chain_before_ki$LTurkishStemmer$(this)) { - this.cursor = ((this.limit - v_15) | 0); - break lab28; - } - } - break lab26; - } - this.cursor = ((this.limit - v_14) | 0); - lab29 = true; - lab29: - while (lab29 === true) { - lab29 = false; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_16, 2) === 0 ? false : true)) { - break lab29; - } - this.bra = this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - v_16 = ((this.limit - this.cursor) | 0); - lab30 = true; - lab30: - while (lab30 === true) { - lab30 = false; - if (! TurkishStemmer$r_stem_suffix_chain_before_ki$LTurkishStemmer$(this)) { - this.cursor = ((this.limit - v_16) | 0); - break lab30; - } - } - break lab26; - } - this.cursor = ((this.limit - v_14) | 0); - if (! TurkishStemmer$r_stem_suffix_chain_before_ki$LTurkishStemmer$(this)) { - this.cursor = ((this.limit - v_13) | 0); - break lab25; - } - } - } - break lab0; - } - this.cursor = ((this.limit - v_1) | 0); - lab31 = true; - lab31: - while (lab31 === true) { - lab31 = false; - this.ket = this.cursor; - lab32 = true; - lab32: - while (lab32 === true) { - lab32 = false; - v_17 = ((this.limit - this.cursor) | 0); - lab33 = true; - lab33: - while (lab33 === true) { - lab33 = false; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_3, 4) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_n_consonant$LTurkishStemmer$(this) ? false : true)) { - break lab33; - } - break lab32; - } - this.cursor = ((this.limit - v_17) | 0); - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_10, 2) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_y_consonant$LTurkishStemmer$(this) ? false : true)) { - break lab31; - } - } - this.bra = this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - v_18 = ((this.limit - this.cursor) | 0); - lab34 = true; - lab34: - while (lab34 === true) { - lab34 = false; - lab35 = true; - lab35: - while (lab35 === true) { - lab35 = false; - v_19 = ((this.limit - this.cursor) | 0); - lab36 = true; - lab36: - while (lab36 === true) { - lab36 = false; - this.ket = this.cursor; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_16, 2) === 0 ? false : true)) { - break lab36; - } - this.bra = this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - if (! TurkishStemmer$r_stem_suffix_chain_before_ki$LTurkishStemmer$(this)) { - break lab36; - } - break lab35; - } - this.cursor = ((this.limit - v_19) | 0); - lab37 = true; - lab37: - while (lab37 === true) { - lab37 = false; - this.ket = this.cursor; - lab38 = true; - lab38: - while (lab38 === true) { - lab38 = false; - v_20 = ((this.limit - this.cursor) | 0); - lab39 = true; - lab39: - while (lab39 === true) { - lab39 = false; - if (! (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_0, 10) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_U_vowel$LTurkishStemmer$(this) ? false : true)) { - break lab39; - } - break lab38; - } - this.cursor = ((this.limit - v_20) | 0); - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : ! BaseStemmer$in_grouping_b$LBaseStemmer$AIII(this, TurkishStemmer.g_U, 105, 305) ? false : ! TurkishStemmer$r_mark_suffix_with_optional_s_consonant$LTurkishStemmer$(this) ? false : true)) { - break lab37; - } - } - this.bra = this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - v_21 = ((this.limit - this.cursor) | 0); - lab40 = true; - lab40: - while (lab40 === true) { - lab40 = false; - this.ket = this.cursor; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_16, 2) === 0 ? false : true)) { - this.cursor = ((this.limit - v_21) | 0); - break lab40; - } - this.bra = this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - if (! TurkishStemmer$r_stem_suffix_chain_before_ki$LTurkishStemmer$(this)) { - this.cursor = ((this.limit - v_21) | 0); - break lab40; - } - } - break lab35; - } - this.cursor = ((this.limit - v_19) | 0); - if (! TurkishStemmer$r_stem_suffix_chain_before_ki$LTurkishStemmer$(this)) { - this.cursor = ((this.limit - v_18) | 0); - break lab34; - } - } - } - break lab0; - } - this.cursor = ((this.limit - v_1) | 0); - lab41 = true; - lab41: - while (lab41 === true) { - lab41 = false; - this.ket = this.cursor; - if (! (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_1, 2) === 0 ? false : true)) { - break lab41; - } - this.bra = this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - break lab0; - } - this.cursor = ((this.limit - v_1) | 0); - lab42 = true; - lab42: - while (lab42 === true) { - lab42 = false; - if (! TurkishStemmer$r_stem_suffix_chain_before_ki$LTurkishStemmer$(this)) { - break lab42; - } - break lab0; - } - this.cursor = ((this.limit - v_1) | 0); - lab43 = true; - lab43: - while (lab43 === true) { - lab43 = false; - this.ket = this.cursor; - lab44 = true; - lab44: - while (lab44 === true) { - lab44 = false; - v_22 = ((this.limit - this.cursor) | 0); - lab45 = true; - lab45: - while (lab45 === true) { - lab45 = false; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_6, 4) === 0 ? false : true)) { - break lab45; - } - break lab44; - } - this.cursor = ((this.limit - v_22) | 0); - lab46 = true; - lab46: - while (lab46 === true) { - lab46 = false; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : ! BaseStemmer$in_grouping_b$LBaseStemmer$AIII(this, TurkishStemmer.g_U, 105, 305) ? false : ! TurkishStemmer$r_mark_suffix_with_optional_y_consonant$LTurkishStemmer$(this) ? false : true)) { - break lab46; - } - break lab44; - } - this.cursor = ((this.limit - v_22) | 0); - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_4, 2) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_y_consonant$LTurkishStemmer$(this) ? false : true)) { - break lab43; - } - } - this.bra = this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - v_23 = ((this.limit - this.cursor) | 0); - lab47 = true; - lab47: - while (lab47 === true) { - lab47 = false; - this.ket = this.cursor; - lab48 = true; - lab48: - while (lab48 === true) { - lab48 = false; - v_24 = ((this.limit - this.cursor) | 0); - lab49 = true; - lab49: - while (lab49 === true) { - lab49 = false; - if (! (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_0, 10) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_U_vowel$LTurkishStemmer$(this) ? false : true)) { - break lab49; - } - this.bra = this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - v_25 = ((this.limit - this.cursor) | 0); - lab50 = true; - lab50: - while (lab50 === true) { - lab50 = false; - this.ket = this.cursor; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_16, 2) === 0 ? false : true)) { - this.cursor = ((this.limit - v_25) | 0); - break lab50; - } - } - break lab48; - } - this.cursor = ((this.limit - v_24) | 0); - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_16, 2) === 0 ? false : true)) { - this.cursor = ((this.limit - v_23) | 0); - break lab47; - } - } - this.bra = this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - this.ket = this.cursor; - if (! TurkishStemmer$r_stem_suffix_chain_before_ki$LTurkishStemmer$(this)) { - this.cursor = ((this.limit - v_23) | 0); - break lab47; - } - } - break lab0; - } - cursor$1 = this.cursor = ((this.limit - v_1) | 0); - this.ket = cursor$1; - lab51 = true; - lab51: - while (lab51 === true) { - lab51 = false; - v_26 = ((this.limit - this.cursor) | 0); - lab52 = true; - lab52: - while (lab52 === true) { - lab52 = false; - if (! (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_0, 10) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_U_vowel$LTurkishStemmer$(this) ? false : true)) { - break lab52; - } - break lab51; - } - this.cursor = ((this.limit - v_26) | 0); - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : ! BaseStemmer$in_grouping_b$LBaseStemmer$AIII(this, TurkishStemmer.g_U, 105, 305) ? false : ! TurkishStemmer$r_mark_suffix_with_optional_s_consonant$LTurkishStemmer$(this) ? false : true)) { - return false; - } - } - this.bra = this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - v_27 = ((this.limit - this.cursor) | 0); - lab53 = true; - lab53: - while (lab53 === true) { - lab53 = false; - this.ket = this.cursor; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$(this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_16, 2) === 0 ? false : true)) { - this.cursor = ((this.limit - v_27) | 0); - break lab53; - } - this.bra = this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "")) { - return false; - } - if (! TurkishStemmer$r_stem_suffix_chain_before_ki$LTurkishStemmer$(this)) { - this.cursor = ((this.limit - v_27) | 0); - break lab53; - } - } - } - return true; -}; - -TurkishStemmer.prototype.r_stem_noun_suffixes = TurkishStemmer.prototype.r_stem_noun_suffixes$; - -function TurkishStemmer$r_stem_noun_suffixes$LTurkishStemmer$($this) { - var v_1; - var v_2; - var v_3; - var v_4; - var v_5; - var v_6; - var v_7; - var v_8; - var v_9; - var v_10; - var v_11; - var v_12; - var v_13; - var v_14; - var v_15; - var v_16; - var v_17; - var v_18; - var v_19; - var v_20; - var v_21; - var v_22; - var v_23; - var v_24; - var v_25; - var v_26; - var v_27; - var lab0; - var lab1; - var lab2; - var lab3; - var lab4; - var lab5; - var lab6; - var lab7; - var lab8; - var lab9; - var lab10; - var lab11; - var lab12; - var lab13; - var lab14; - var lab15; - var lab16; - var lab17; - var lab18; - var lab19; - var lab20; - var lab21; - var lab22; - var lab23; - var lab24; - var lab25; - var lab26; - var lab27; - var lab28; - var lab29; - var lab30; - var lab31; - var lab32; - var lab33; - var lab34; - var lab35; - var lab36; - var lab37; - var lab38; - var lab39; - var lab40; - var lab41; - var lab42; - var lab43; - var lab44; - var lab45; - var lab46; - var lab47; - var lab48; - var lab49; - var lab50; - var lab51; - var lab52; - var lab53; - var cursor$0; - var cursor$1; - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - v_1 = (($this.limit - $this.cursor) | 0); - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - $this.ket = $this.cursor; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_16, 2) === 0 ? false : true)) { - break lab1; - } - $this.bra = $this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - v_2 = (($this.limit - $this.cursor) | 0); - lab2 = true; - lab2: - while (lab2 === true) { - lab2 = false; - if (! TurkishStemmer$r_stem_suffix_chain_before_ki$LTurkishStemmer$($this)) { - $this.cursor = (($this.limit - v_2) | 0); - break lab2; - } - } - break lab0; - } - $this.cursor = (($this.limit - v_1) | 0); - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - $this.ket = $this.cursor; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_11, 2) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_n_consonant$LTurkishStemmer$($this) ? false : true)) { - break lab3; - } - $this.bra = $this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - v_3 = (($this.limit - $this.cursor) | 0); - lab4 = true; - lab4: - while (lab4 === true) { - lab4 = false; - lab5 = true; - lab5: - while (lab5 === true) { - lab5 = false; - v_4 = (($this.limit - $this.cursor) | 0); - lab6 = true; - lab6: - while (lab6 === true) { - lab6 = false; - $this.ket = $this.cursor; - if (! (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_1, 2) === 0 ? false : true)) { - break lab6; - } - $this.bra = $this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break lab5; - } - $this.cursor = (($this.limit - v_4) | 0); - lab7 = true; - lab7: - while (lab7 === true) { - lab7 = false; - $this.ket = $this.cursor; - lab8 = true; - lab8: - while (lab8 === true) { - lab8 = false; - v_5 = (($this.limit - $this.cursor) | 0); - lab9 = true; - lab9: - while (lab9 === true) { - lab9 = false; - if (! (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_0, 10) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_U_vowel$LTurkishStemmer$($this) ? false : true)) { - break lab9; - } - break lab8; - } - $this.cursor = (($this.limit - v_5) | 0); - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : ! BaseStemmer$in_grouping_b$LBaseStemmer$AIII($this, TurkishStemmer.g_U, 105, 305) ? false : ! TurkishStemmer$r_mark_suffix_with_optional_s_consonant$LTurkishStemmer$($this) ? false : true)) { - break lab7; - } - } - $this.bra = $this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - v_6 = (($this.limit - $this.cursor) | 0); - lab10 = true; - lab10: - while (lab10 === true) { - lab10 = false; - $this.ket = $this.cursor; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_16, 2) === 0 ? false : true)) { - $this.cursor = (($this.limit - v_6) | 0); - break lab10; - } - $this.bra = $this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - if (! TurkishStemmer$r_stem_suffix_chain_before_ki$LTurkishStemmer$($this)) { - $this.cursor = (($this.limit - v_6) | 0); - break lab10; - } - } - break lab5; - } - cursor$0 = $this.cursor = (($this.limit - v_4) | 0); - $this.ket = cursor$0; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_16, 2) === 0 ? false : true)) { - $this.cursor = (($this.limit - v_3) | 0); - break lab4; - } - $this.bra = $this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - if (! TurkishStemmer$r_stem_suffix_chain_before_ki$LTurkishStemmer$($this)) { - $this.cursor = (($this.limit - v_3) | 0); - break lab4; - } - } - } - break lab0; - } - $this.cursor = (($this.limit - v_1) | 0); - lab11 = true; - lab11: - while (lab11 === true) { - lab11 = false; - $this.ket = $this.cursor; - lab12 = true; - lab12: - while (lab12 === true) { - lab12 = false; - v_7 = (($this.limit - $this.cursor) | 0); - lab13 = true; - lab13: - while (lab13 === true) { - lab13 = false; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_7, 2) === 0 ? false : true)) { - break lab13; - } - break lab12; - } - $this.cursor = (($this.limit - v_7) | 0); - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_5, 2) === 0 ? false : true)) { - break lab11; - } - } - lab14 = true; - lab14: - while (lab14 === true) { - lab14 = false; - v_8 = (($this.limit - $this.cursor) | 0); - lab15 = true; - lab15: - while (lab15 === true) { - lab15 = false; - if (! (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_1, 2) === 0 ? false : true)) { - break lab15; - } - $this.bra = $this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break lab14; - } - $this.cursor = (($this.limit - v_8) | 0); - lab16 = true; - lab16: - while (lab16 === true) { - lab16 = false; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : ! BaseStemmer$in_grouping_b$LBaseStemmer$AIII($this, TurkishStemmer.g_U, 105, 305) ? false : ! TurkishStemmer$r_mark_suffix_with_optional_s_consonant$LTurkishStemmer$($this) ? false : true)) { - break lab16; - } - $this.bra = $this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - v_9 = (($this.limit - $this.cursor) | 0); - lab17 = true; - lab17: - while (lab17 === true) { - lab17 = false; - $this.ket = $this.cursor; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_16, 2) === 0 ? false : true)) { - $this.cursor = (($this.limit - v_9) | 0); - break lab17; - } - $this.bra = $this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - if (! TurkishStemmer$r_stem_suffix_chain_before_ki$LTurkishStemmer$($this)) { - $this.cursor = (($this.limit - v_9) | 0); - break lab17; - } - } - break lab14; - } - $this.cursor = (($this.limit - v_8) | 0); - if (! TurkishStemmer$r_stem_suffix_chain_before_ki$LTurkishStemmer$($this)) { - break lab11; - } - } - break lab0; - } - $this.cursor = (($this.limit - v_1) | 0); - lab18 = true; - lab18: - while (lab18 === true) { - lab18 = false; - $this.ket = $this.cursor; - lab19 = true; - lab19: - while (lab19 === true) { - lab19 = false; - v_10 = (($this.limit - $this.cursor) | 0); - lab20 = true; - lab20: - while (lab20 === true) { - lab20 = false; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_9, 2) === 0 ? false : true)) { - break lab20; - } - break lab19; - } - $this.cursor = (($this.limit - v_10) | 0); - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_2, 4) === 0 ? false : true)) { - break lab18; - } - } - lab21 = true; - lab21: - while (lab21 === true) { - lab21 = false; - v_11 = (($this.limit - $this.cursor) | 0); - lab22 = true; - lab22: - while (lab22 === true) { - lab22 = false; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : ! BaseStemmer$in_grouping_b$LBaseStemmer$AIII($this, TurkishStemmer.g_U, 105, 305) ? false : ! TurkishStemmer$r_mark_suffix_with_optional_s_consonant$LTurkishStemmer$($this) ? false : true)) { - break lab22; - } - $this.bra = $this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - v_12 = (($this.limit - $this.cursor) | 0); - lab23 = true; - lab23: - while (lab23 === true) { - lab23 = false; - $this.ket = $this.cursor; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_16, 2) === 0 ? false : true)) { - $this.cursor = (($this.limit - v_12) | 0); - break lab23; - } - $this.bra = $this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - if (! TurkishStemmer$r_stem_suffix_chain_before_ki$LTurkishStemmer$($this)) { - $this.cursor = (($this.limit - v_12) | 0); - break lab23; - } - } - break lab21; - } - $this.cursor = (($this.limit - v_11) | 0); - if (! (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_1, 2) === 0 ? false : true)) { - break lab18; - } - } - break lab0; - } - $this.cursor = (($this.limit - v_1) | 0); - lab24 = true; - lab24: - while (lab24 === true) { - lab24 = false; - $this.ket = $this.cursor; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_8, 4) === 0 ? false : true)) { - break lab24; - } - $this.bra = $this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - v_13 = (($this.limit - $this.cursor) | 0); - lab25 = true; - lab25: - while (lab25 === true) { - lab25 = false; - $this.ket = $this.cursor; - lab26 = true; - lab26: - while (lab26 === true) { - lab26 = false; - v_14 = (($this.limit - $this.cursor) | 0); - lab27 = true; - lab27: - while (lab27 === true) { - lab27 = false; - if (! (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_0, 10) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_U_vowel$LTurkishStemmer$($this) ? false : true)) { - break lab27; - } - $this.bra = $this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - v_15 = (($this.limit - $this.cursor) | 0); - lab28 = true; - lab28: - while (lab28 === true) { - lab28 = false; - $this.ket = $this.cursor; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_16, 2) === 0 ? false : true)) { - $this.cursor = (($this.limit - v_15) | 0); - break lab28; - } - $this.bra = $this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - if (! TurkishStemmer$r_stem_suffix_chain_before_ki$LTurkishStemmer$($this)) { - $this.cursor = (($this.limit - v_15) | 0); - break lab28; - } - } - break lab26; - } - $this.cursor = (($this.limit - v_14) | 0); - lab29 = true; - lab29: - while (lab29 === true) { - lab29 = false; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_16, 2) === 0 ? false : true)) { - break lab29; - } - $this.bra = $this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - v_16 = (($this.limit - $this.cursor) | 0); - lab30 = true; - lab30: - while (lab30 === true) { - lab30 = false; - if (! TurkishStemmer$r_stem_suffix_chain_before_ki$LTurkishStemmer$($this)) { - $this.cursor = (($this.limit - v_16) | 0); - break lab30; - } - } - break lab26; - } - $this.cursor = (($this.limit - v_14) | 0); - if (! TurkishStemmer$r_stem_suffix_chain_before_ki$LTurkishStemmer$($this)) { - $this.cursor = (($this.limit - v_13) | 0); - break lab25; - } - } - } - break lab0; - } - $this.cursor = (($this.limit - v_1) | 0); - lab31 = true; - lab31: - while (lab31 === true) { - lab31 = false; - $this.ket = $this.cursor; - lab32 = true; - lab32: - while (lab32 === true) { - lab32 = false; - v_17 = (($this.limit - $this.cursor) | 0); - lab33 = true; - lab33: - while (lab33 === true) { - lab33 = false; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_3, 4) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_n_consonant$LTurkishStemmer$($this) ? false : true)) { - break lab33; - } - break lab32; - } - $this.cursor = (($this.limit - v_17) | 0); - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_10, 2) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_y_consonant$LTurkishStemmer$($this) ? false : true)) { - break lab31; - } - } - $this.bra = $this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - v_18 = (($this.limit - $this.cursor) | 0); - lab34 = true; - lab34: - while (lab34 === true) { - lab34 = false; - lab35 = true; - lab35: - while (lab35 === true) { - lab35 = false; - v_19 = (($this.limit - $this.cursor) | 0); - lab36 = true; - lab36: - while (lab36 === true) { - lab36 = false; - $this.ket = $this.cursor; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_16, 2) === 0 ? false : true)) { - break lab36; - } - $this.bra = $this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - if (! TurkishStemmer$r_stem_suffix_chain_before_ki$LTurkishStemmer$($this)) { - break lab36; - } - break lab35; - } - $this.cursor = (($this.limit - v_19) | 0); - lab37 = true; - lab37: - while (lab37 === true) { - lab37 = false; - $this.ket = $this.cursor; - lab38 = true; - lab38: - while (lab38 === true) { - lab38 = false; - v_20 = (($this.limit - $this.cursor) | 0); - lab39 = true; - lab39: - while (lab39 === true) { - lab39 = false; - if (! (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_0, 10) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_U_vowel$LTurkishStemmer$($this) ? false : true)) { - break lab39; - } - break lab38; - } - $this.cursor = (($this.limit - v_20) | 0); - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : ! BaseStemmer$in_grouping_b$LBaseStemmer$AIII($this, TurkishStemmer.g_U, 105, 305) ? false : ! TurkishStemmer$r_mark_suffix_with_optional_s_consonant$LTurkishStemmer$($this) ? false : true)) { - break lab37; - } - } - $this.bra = $this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - v_21 = (($this.limit - $this.cursor) | 0); - lab40 = true; - lab40: - while (lab40 === true) { - lab40 = false; - $this.ket = $this.cursor; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_16, 2) === 0 ? false : true)) { - $this.cursor = (($this.limit - v_21) | 0); - break lab40; - } - $this.bra = $this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - if (! TurkishStemmer$r_stem_suffix_chain_before_ki$LTurkishStemmer$($this)) { - $this.cursor = (($this.limit - v_21) | 0); - break lab40; - } - } - break lab35; - } - $this.cursor = (($this.limit - v_19) | 0); - if (! TurkishStemmer$r_stem_suffix_chain_before_ki$LTurkishStemmer$($this)) { - $this.cursor = (($this.limit - v_18) | 0); - break lab34; - } - } - } - break lab0; - } - $this.cursor = (($this.limit - v_1) | 0); - lab41 = true; - lab41: - while (lab41 === true) { - lab41 = false; - $this.ket = $this.cursor; - if (! (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_1, 2) === 0 ? false : true)) { - break lab41; - } - $this.bra = $this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - break lab0; - } - $this.cursor = (($this.limit - v_1) | 0); - lab42 = true; - lab42: - while (lab42 === true) { - lab42 = false; - if (! TurkishStemmer$r_stem_suffix_chain_before_ki$LTurkishStemmer$($this)) { - break lab42; - } - break lab0; - } - $this.cursor = (($this.limit - v_1) | 0); - lab43 = true; - lab43: - while (lab43 === true) { - lab43 = false; - $this.ket = $this.cursor; - lab44 = true; - lab44: - while (lab44 === true) { - lab44 = false; - v_22 = (($this.limit - $this.cursor) | 0); - lab45 = true; - lab45: - while (lab45 === true) { - lab45 = false; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_6, 4) === 0 ? false : true)) { - break lab45; - } - break lab44; - } - $this.cursor = (($this.limit - v_22) | 0); - lab46 = true; - lab46: - while (lab46 === true) { - lab46 = false; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : ! BaseStemmer$in_grouping_b$LBaseStemmer$AIII($this, TurkishStemmer.g_U, 105, 305) ? false : ! TurkishStemmer$r_mark_suffix_with_optional_y_consonant$LTurkishStemmer$($this) ? false : true)) { - break lab46; - } - break lab44; - } - $this.cursor = (($this.limit - v_22) | 0); - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_4, 2) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_y_consonant$LTurkishStemmer$($this) ? false : true)) { - break lab43; - } - } - $this.bra = $this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - v_23 = (($this.limit - $this.cursor) | 0); - lab47 = true; - lab47: - while (lab47 === true) { - lab47 = false; - $this.ket = $this.cursor; - lab48 = true; - lab48: - while (lab48 === true) { - lab48 = false; - v_24 = (($this.limit - $this.cursor) | 0); - lab49 = true; - lab49: - while (lab49 === true) { - lab49 = false; - if (! (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_0, 10) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_U_vowel$LTurkishStemmer$($this) ? false : true)) { - break lab49; - } - $this.bra = $this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - v_25 = (($this.limit - $this.cursor) | 0); - lab50 = true; - lab50: - while (lab50 === true) { - lab50 = false; - $this.ket = $this.cursor; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_16, 2) === 0 ? false : true)) { - $this.cursor = (($this.limit - v_25) | 0); - break lab50; - } - } - break lab48; - } - $this.cursor = (($this.limit - v_24) | 0); - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_16, 2) === 0 ? false : true)) { - $this.cursor = (($this.limit - v_23) | 0); - break lab47; - } - } - $this.bra = $this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - $this.ket = $this.cursor; - if (! TurkishStemmer$r_stem_suffix_chain_before_ki$LTurkishStemmer$($this)) { - $this.cursor = (($this.limit - v_23) | 0); - break lab47; - } - } - break lab0; - } - cursor$1 = $this.cursor = (($this.limit - v_1) | 0); - $this.ket = cursor$1; - lab51 = true; - lab51: - while (lab51 === true) { - lab51 = false; - v_26 = (($this.limit - $this.cursor) | 0); - lab52 = true; - lab52: - while (lab52 === true) { - lab52 = false; - if (! (BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_0, 10) === 0 ? false : ! TurkishStemmer$r_mark_suffix_with_optional_U_vowel$LTurkishStemmer$($this) ? false : true)) { - break lab52; - } - break lab51; - } - $this.cursor = (($this.limit - v_26) | 0); - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : ! BaseStemmer$in_grouping_b$LBaseStemmer$AIII($this, TurkishStemmer.g_U, 105, 305) ? false : ! TurkishStemmer$r_mark_suffix_with_optional_s_consonant$LTurkishStemmer$($this) ? false : true)) { - return false; - } - } - $this.bra = $this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - v_27 = (($this.limit - $this.cursor) | 0); - lab53 = true; - lab53: - while (lab53 === true) { - lab53 = false; - $this.ket = $this.cursor; - if (! (! TurkishStemmer$r_check_vowel_harmony$LTurkishStemmer$($this) ? false : BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_16, 2) === 0 ? false : true)) { - $this.cursor = (($this.limit - v_27) | 0); - break lab53; - } - $this.bra = $this.cursor; - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "")) { - return false; - } - if (! TurkishStemmer$r_stem_suffix_chain_before_ki$LTurkishStemmer$($this)) { - $this.cursor = (($this.limit - v_27) | 0); - break lab53; - } - } - } - return true; -}; - -TurkishStemmer.r_stem_noun_suffixes$LTurkishStemmer$ = TurkishStemmer$r_stem_noun_suffixes$LTurkishStemmer$; - -TurkishStemmer.prototype.r_post_process_last_consonants$ = function () { - var among_var; - this.ket = this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I(this, TurkishStemmer.a_23, 4); - if (among_var === 0) { - return false; - } - this.bra = this.cursor; - switch (among_var) { - case 0: - return false; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "p")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "\u00E7")) { - return false; - } - break; - case 3: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "t")) { - return false; - } - break; - case 4: - if (! BaseStemmer$slice_from$LBaseStemmer$S(this, "k")) { - return false; - } - break; - } - return true; -}; - -TurkishStemmer.prototype.r_post_process_last_consonants = TurkishStemmer.prototype.r_post_process_last_consonants$; - -function TurkishStemmer$r_post_process_last_consonants$LTurkishStemmer$($this) { - var among_var; - $this.ket = $this.cursor; - among_var = BaseStemmer$find_among_b$LBaseStemmer$ALAmong$I($this, TurkishStemmer.a_23, 4); - if (among_var === 0) { - return false; - } - $this.bra = $this.cursor; - switch (among_var) { - case 0: - return false; - case 1: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "p")) { - return false; - } - break; - case 2: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "\u00E7")) { - return false; - } - break; - case 3: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "t")) { - return false; - } - break; - case 4: - if (! BaseStemmer$slice_from$LBaseStemmer$S($this, "k")) { - return false; - } - break; - } - return true; -}; - -TurkishStemmer.r_post_process_last_consonants$LTurkishStemmer$ = TurkishStemmer$r_post_process_last_consonants$LTurkishStemmer$; - -TurkishStemmer.prototype.r_append_U_to_stems_ending_with_d_or_g$ = function () { - var v_1; - var v_2; - var v_3; - var v_4; - var v_5; - var v_6; - var v_7; - var v_8; - var v_9; - var v_10; - var v_11; - var v_12; - var v_13; - var v_14; - var v_15; - var lab0; - var lab1; - var lab2; - var lab3; - var lab5; - var lab6; - var lab7; - var c; - var lab8; - var lab10; - var lab11; - var lab12; - var lab13; - var lab15; - var lab16; - var lab17; - var lab19; - var lab20; - var lab21; - var c_bra$0; - var adjustment$0; - var c_bra$1; - var adjustment$1; - var c_bra$2; - var adjustment$2; - var c_bra$3; - var adjustment$3; - var cursor$0; - var cursor$1; - var cursor$2; - var cursor$3; - var cursor$4; - var cursor$5; - var cursor$6; - var limit$0; - var cursor$7; - var cursor$8; - var $__jsx_postinc_t; - v_1 = ((this.limit - this.cursor) | 0); - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - v_2 = ((this.limit - this.cursor) | 0); - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "d")) { - break lab1; - } - break lab0; - } - this.cursor = ((this.limit - v_2) | 0); - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "g")) { - return false; - } - } - this.cursor = ((this.limit - v_1) | 0); - lab2 = true; -lab2: - while (lab2 === true) { - lab2 = false; - v_3 = ((this.limit - this.cursor) | 0); - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - v_4 = ((this.limit - this.cursor) | 0); - golab4: - while (true) { - v_5 = ((this.limit - this.cursor) | 0); - lab5 = true; - lab5: - while (lab5 === true) { - lab5 = false; - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII(this, TurkishStemmer.g_vowel, 97, 305)) { - break lab5; - } - this.cursor = ((this.limit - v_5) | 0); - break golab4; - } - cursor$0 = this.cursor = ((this.limit - v_5) | 0); - if (cursor$0 <= this.limit_backward) { - break lab3; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - } - lab6 = true; - lab6: - while (lab6 === true) { - lab6 = false; - v_6 = ((this.limit - this.cursor) | 0); - lab7 = true; - lab7: - while (lab7 === true) { - lab7 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "a")) { - break lab7; - } - break lab6; - } - this.cursor = ((this.limit - v_6) | 0); - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "\u0131")) { - break lab3; - } - } - cursor$1 = this.cursor = ((this.limit - v_4) | 0); - c = cursor$1; - c_bra$0 = cursor$1; - adjustment$0 = BaseStemmer$replace_s$LBaseStemmer$IIS(this, cursor$1, cursor$1, "\u0131"); - if (cursor$1 <= this.bra) { - this.bra = (this.bra + adjustment$0) | 0; - } - if (c_bra$0 <= this.ket) { - this.ket = (this.ket + adjustment$0) | 0; - } - this.cursor = c; - break lab2; - } - this.cursor = ((this.limit - v_3) | 0); - lab8 = true; - lab8: - while (lab8 === true) { - lab8 = false; - v_7 = ((this.limit - this.cursor) | 0); - golab9: - while (true) { - v_8 = ((this.limit - this.cursor) | 0); - lab10 = true; - lab10: - while (lab10 === true) { - lab10 = false; - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII(this, TurkishStemmer.g_vowel, 97, 305)) { - break lab10; - } - this.cursor = ((this.limit - v_8) | 0); - break golab9; - } - cursor$2 = this.cursor = ((this.limit - v_8) | 0); - if (cursor$2 <= this.limit_backward) { - break lab8; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - } - lab11 = true; - lab11: - while (lab11 === true) { - lab11 = false; - v_9 = ((this.limit - this.cursor) | 0); - lab12 = true; - lab12: - while (lab12 === true) { - lab12 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "e")) { - break lab12; - } - break lab11; - } - this.cursor = ((this.limit - v_9) | 0); - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "i")) { - break lab8; - } - } - cursor$3 = this.cursor = ((this.limit - v_7) | 0); - c = cursor$3; - c_bra$1 = cursor$3; - adjustment$1 = BaseStemmer$replace_s$LBaseStemmer$IIS(this, cursor$3, cursor$3, "i"); - if (cursor$3 <= this.bra) { - this.bra = (this.bra + adjustment$1) | 0; - } - if (c_bra$1 <= this.ket) { - this.ket = (this.ket + adjustment$1) | 0; - } - this.cursor = c; - break lab2; - } - this.cursor = ((this.limit - v_3) | 0); - lab13 = true; - lab13: - while (lab13 === true) { - lab13 = false; - v_10 = ((this.limit - this.cursor) | 0); - golab14: - while (true) { - v_11 = ((this.limit - this.cursor) | 0); - lab15 = true; - lab15: - while (lab15 === true) { - lab15 = false; - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII(this, TurkishStemmer.g_vowel, 97, 305)) { - break lab15; - } - this.cursor = ((this.limit - v_11) | 0); - break golab14; - } - cursor$4 = this.cursor = ((this.limit - v_11) | 0); - if (cursor$4 <= this.limit_backward) { - break lab13; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - } - lab16 = true; - lab16: - while (lab16 === true) { - lab16 = false; - v_12 = ((this.limit - this.cursor) | 0); - lab17 = true; - lab17: - while (lab17 === true) { - lab17 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "o")) { - break lab17; - } - break lab16; - } - this.cursor = ((this.limit - v_12) | 0); - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "u")) { - break lab13; - } - } - cursor$5 = this.cursor = ((this.limit - v_10) | 0); - c = cursor$5; - c_bra$2 = cursor$5; - adjustment$2 = BaseStemmer$replace_s$LBaseStemmer$IIS(this, cursor$5, cursor$5, "u"); - if (cursor$5 <= this.bra) { - this.bra = (this.bra + adjustment$2) | 0; - } - if (c_bra$2 <= this.ket) { - this.ket = (this.ket + adjustment$2) | 0; - } - this.cursor = c; - break lab2; - } - cursor$7 = this.cursor = (((limit$0 = this.limit) - v_3) | 0); - v_13 = ((limit$0 - cursor$7) | 0); - golab18: - while (true) { - v_14 = ((this.limit - this.cursor) | 0); - lab19 = true; - lab19: - while (lab19 === true) { - lab19 = false; - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII(this, TurkishStemmer.g_vowel, 97, 305)) { - break lab19; - } - this.cursor = ((this.limit - v_14) | 0); - break golab18; - } - cursor$6 = this.cursor = ((this.limit - v_14) | 0); - if (cursor$6 <= this.limit_backward) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - } - lab20 = true; - lab20: - while (lab20 === true) { - lab20 = false; - v_15 = ((this.limit - this.cursor) | 0); - lab21 = true; - lab21: - while (lab21 === true) { - lab21 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "\u00F6")) { - break lab21; - } - break lab20; - } - this.cursor = ((this.limit - v_15) | 0); - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS(this, 1, "\u00FC")) { - return false; - } - } - cursor$8 = this.cursor = ((this.limit - v_13) | 0); - c = cursor$8; - c_bra$3 = cursor$8; - adjustment$3 = BaseStemmer$replace_s$LBaseStemmer$IIS(this, cursor$8, cursor$8, "\u00FC"); - if (cursor$8 <= this.bra) { - this.bra = (this.bra + adjustment$3) | 0; - } - if (c_bra$3 <= this.ket) { - this.ket = (this.ket + adjustment$3) | 0; - } - this.cursor = c; - } - return true; -}; - -TurkishStemmer.prototype.r_append_U_to_stems_ending_with_d_or_g = TurkishStemmer.prototype.r_append_U_to_stems_ending_with_d_or_g$; - -function TurkishStemmer$r_append_U_to_stems_ending_with_d_or_g$LTurkishStemmer$($this) { - var v_1; - var v_2; - var v_3; - var v_4; - var v_5; - var v_6; - var v_7; - var v_8; - var v_9; - var v_10; - var v_11; - var v_12; - var v_13; - var v_14; - var v_15; - var lab0; - var lab1; - var lab2; - var lab3; - var lab5; - var lab6; - var lab7; - var c; - var lab8; - var lab10; - var lab11; - var lab12; - var lab13; - var lab15; - var lab16; - var lab17; - var lab19; - var lab20; - var lab21; - var c_bra$0; - var adjustment$0; - var c_bra$1; - var adjustment$1; - var c_bra$2; - var adjustment$2; - var c_bra$3; - var adjustment$3; - var cursor$0; - var cursor$1; - var cursor$2; - var cursor$3; - var cursor$4; - var cursor$5; - var cursor$6; - var limit$0; - var cursor$7; - var cursor$8; - var $__jsx_postinc_t; - v_1 = (($this.limit - $this.cursor) | 0); - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - v_2 = (($this.limit - $this.cursor) | 0); - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "d")) { - break lab1; - } - break lab0; - } - $this.cursor = (($this.limit - v_2) | 0); - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "g")) { - return false; - } - } - $this.cursor = (($this.limit - v_1) | 0); - lab2 = true; -lab2: - while (lab2 === true) { - lab2 = false; - v_3 = (($this.limit - $this.cursor) | 0); - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - v_4 = (($this.limit - $this.cursor) | 0); - golab4: - while (true) { - v_5 = (($this.limit - $this.cursor) | 0); - lab5 = true; - lab5: - while (lab5 === true) { - lab5 = false; - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII($this, TurkishStemmer.g_vowel, 97, 305)) { - break lab5; - } - $this.cursor = (($this.limit - v_5) | 0); - break golab4; - } - cursor$0 = $this.cursor = (($this.limit - v_5) | 0); - if (cursor$0 <= $this.limit_backward) { - break lab3; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - } - lab6 = true; - lab6: - while (lab6 === true) { - lab6 = false; - v_6 = (($this.limit - $this.cursor) | 0); - lab7 = true; - lab7: - while (lab7 === true) { - lab7 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "a")) { - break lab7; - } - break lab6; - } - $this.cursor = (($this.limit - v_6) | 0); - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "\u0131")) { - break lab3; - } - } - cursor$1 = $this.cursor = (($this.limit - v_4) | 0); - c = cursor$1; - c_bra$0 = cursor$1; - adjustment$0 = BaseStemmer$replace_s$LBaseStemmer$IIS($this, cursor$1, cursor$1, "\u0131"); - if (cursor$1 <= $this.bra) { - $this.bra = ($this.bra + adjustment$0) | 0; - } - if (c_bra$0 <= $this.ket) { - $this.ket = ($this.ket + adjustment$0) | 0; - } - $this.cursor = c; - break lab2; - } - $this.cursor = (($this.limit - v_3) | 0); - lab8 = true; - lab8: - while (lab8 === true) { - lab8 = false; - v_7 = (($this.limit - $this.cursor) | 0); - golab9: - while (true) { - v_8 = (($this.limit - $this.cursor) | 0); - lab10 = true; - lab10: - while (lab10 === true) { - lab10 = false; - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII($this, TurkishStemmer.g_vowel, 97, 305)) { - break lab10; - } - $this.cursor = (($this.limit - v_8) | 0); - break golab9; - } - cursor$2 = $this.cursor = (($this.limit - v_8) | 0); - if (cursor$2 <= $this.limit_backward) { - break lab8; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - } - lab11 = true; - lab11: - while (lab11 === true) { - lab11 = false; - v_9 = (($this.limit - $this.cursor) | 0); - lab12 = true; - lab12: - while (lab12 === true) { - lab12 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "e")) { - break lab12; - } - break lab11; - } - $this.cursor = (($this.limit - v_9) | 0); - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "i")) { - break lab8; - } - } - cursor$3 = $this.cursor = (($this.limit - v_7) | 0); - c = cursor$3; - c_bra$1 = cursor$3; - adjustment$1 = BaseStemmer$replace_s$LBaseStemmer$IIS($this, cursor$3, cursor$3, "i"); - if (cursor$3 <= $this.bra) { - $this.bra = ($this.bra + adjustment$1) | 0; - } - if (c_bra$1 <= $this.ket) { - $this.ket = ($this.ket + adjustment$1) | 0; - } - $this.cursor = c; - break lab2; - } - $this.cursor = (($this.limit - v_3) | 0); - lab13 = true; - lab13: - while (lab13 === true) { - lab13 = false; - v_10 = (($this.limit - $this.cursor) | 0); - golab14: - while (true) { - v_11 = (($this.limit - $this.cursor) | 0); - lab15 = true; - lab15: - while (lab15 === true) { - lab15 = false; - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII($this, TurkishStemmer.g_vowel, 97, 305)) { - break lab15; - } - $this.cursor = (($this.limit - v_11) | 0); - break golab14; - } - cursor$4 = $this.cursor = (($this.limit - v_11) | 0); - if (cursor$4 <= $this.limit_backward) { - break lab13; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - } - lab16 = true; - lab16: - while (lab16 === true) { - lab16 = false; - v_12 = (($this.limit - $this.cursor) | 0); - lab17 = true; - lab17: - while (lab17 === true) { - lab17 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "o")) { - break lab17; - } - break lab16; - } - $this.cursor = (($this.limit - v_12) | 0); - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "u")) { - break lab13; - } - } - cursor$5 = $this.cursor = (($this.limit - v_10) | 0); - c = cursor$5; - c_bra$2 = cursor$5; - adjustment$2 = BaseStemmer$replace_s$LBaseStemmer$IIS($this, cursor$5, cursor$5, "u"); - if (cursor$5 <= $this.bra) { - $this.bra = ($this.bra + adjustment$2) | 0; - } - if (c_bra$2 <= $this.ket) { - $this.ket = ($this.ket + adjustment$2) | 0; - } - $this.cursor = c; - break lab2; - } - cursor$7 = $this.cursor = (((limit$0 = $this.limit) - v_3) | 0); - v_13 = ((limit$0 - cursor$7) | 0); - golab18: - while (true) { - v_14 = (($this.limit - $this.cursor) | 0); - lab19 = true; - lab19: - while (lab19 === true) { - lab19 = false; - if (! BaseStemmer$in_grouping_b$LBaseStemmer$AIII($this, TurkishStemmer.g_vowel, 97, 305)) { - break lab19; - } - $this.cursor = (($this.limit - v_14) | 0); - break golab18; - } - cursor$6 = $this.cursor = (($this.limit - v_14) | 0); - if (cursor$6 <= $this.limit_backward) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t - 1) | 0, $__jsx_postinc_t); - } - lab20 = true; - lab20: - while (lab20 === true) { - lab20 = false; - v_15 = (($this.limit - $this.cursor) | 0); - lab21 = true; - lab21: - while (lab21 === true) { - lab21 = false; - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "\u00F6")) { - break lab21; - } - break lab20; - } - $this.cursor = (($this.limit - v_15) | 0); - if (! BaseStemmer$eq_s_b$LBaseStemmer$IS($this, 1, "\u00FC")) { - return false; - } - } - cursor$8 = $this.cursor = (($this.limit - v_13) | 0); - c = cursor$8; - c_bra$3 = cursor$8; - adjustment$3 = BaseStemmer$replace_s$LBaseStemmer$IIS($this, cursor$8, cursor$8, "\u00FC"); - if (cursor$8 <= $this.bra) { - $this.bra = ($this.bra + adjustment$3) | 0; - } - if (c_bra$3 <= $this.ket) { - $this.ket = ($this.ket + adjustment$3) | 0; - } - $this.cursor = c; - } - return true; -}; - -TurkishStemmer.r_append_U_to_stems_ending_with_d_or_g$LTurkishStemmer$ = TurkishStemmer$r_append_U_to_stems_ending_with_d_or_g$LTurkishStemmer$; - -TurkishStemmer.prototype.r_more_than_one_syllable_word$ = function () { - var v_1; - var v_3; - var v_2; - var lab1; - var lab3; - var $__jsx_postinc_t; - v_1 = this.cursor; - v_2 = 2; -replab0: - while (true) { - v_3 = this.cursor; - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - golab2: - while (true) { - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII(this, TurkishStemmer.g_vowel, 97, 305)) { - break lab3; - } - break golab2; - } - if (this.cursor >= this.limit) { - break lab1; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - v_2--; - continue replab0; - } - this.cursor = v_3; - break replab0; - } - if (v_2 > 0) { - return false; - } - this.cursor = v_1; - return true; -}; - -TurkishStemmer.prototype.r_more_than_one_syllable_word = TurkishStemmer.prototype.r_more_than_one_syllable_word$; - -function TurkishStemmer$r_more_than_one_syllable_word$LTurkishStemmer$($this) { - var v_1; - var v_3; - var v_2; - var lab1; - var lab3; - var $__jsx_postinc_t; - v_1 = $this.cursor; - v_2 = 2; -replab0: - while (true) { - v_3 = $this.cursor; - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - golab2: - while (true) { - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - if (! BaseStemmer$in_grouping$LBaseStemmer$AIII($this, TurkishStemmer.g_vowel, 97, 305)) { - break lab3; - } - break golab2; - } - if ($this.cursor >= $this.limit) { - break lab1; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - v_2--; - continue replab0; - } - $this.cursor = v_3; - break replab0; - } - if (v_2 > 0) { - return false; - } - $this.cursor = v_1; - return true; -}; - -TurkishStemmer.r_more_than_one_syllable_word$LTurkishStemmer$ = TurkishStemmer$r_more_than_one_syllable_word$LTurkishStemmer$; - -TurkishStemmer.prototype.r_is_reserved_word$ = function () { - var v_1; - var v_2; - var v_4; - var lab0; - var lab1; - var lab3; - var lab5; - var I_strlen$0; - var cursor$0; - var I_strlen$1; - var $__jsx_postinc_t; - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - v_1 = this.cursor; - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - v_2 = this.cursor; - golab2: - while (true) { - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - if (! BaseStemmer$eq_s$LBaseStemmer$IS(this, 2, "ad")) { - break lab3; - } - break golab2; - } - if (this.cursor >= this.limit) { - break lab1; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - I_strlen$0 = this.I_strlen = 2; - if (! (I_strlen$0 === this.limit)) { - break lab1; - } - this.cursor = v_2; - break lab0; - } - cursor$0 = this.cursor = v_1; - v_4 = cursor$0; - golab4: - while (true) { - lab5 = true; - lab5: - while (lab5 === true) { - lab5 = false; - if (! BaseStemmer$eq_s$LBaseStemmer$IS(this, 5, "soyad")) { - break lab5; - } - break golab4; - } - if (this.cursor >= this.limit) { - return false; - } - ($__jsx_postinc_t = this.cursor, this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - I_strlen$1 = this.I_strlen = 5; - if (! (I_strlen$1 === this.limit)) { - return false; - } - this.cursor = v_4; - } - return true; -}; - -TurkishStemmer.prototype.r_is_reserved_word = TurkishStemmer.prototype.r_is_reserved_word$; - -function TurkishStemmer$r_is_reserved_word$LTurkishStemmer$($this) { - var v_1; - var v_2; - var v_4; - var lab0; - var lab1; - var lab3; - var lab5; - var I_strlen$0; - var cursor$0; - var I_strlen$1; - var $__jsx_postinc_t; - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - v_1 = $this.cursor; - lab1 = true; - lab1: - while (lab1 === true) { - lab1 = false; - v_2 = $this.cursor; - golab2: - while (true) { - lab3 = true; - lab3: - while (lab3 === true) { - lab3 = false; - if (! BaseStemmer$eq_s$LBaseStemmer$IS($this, 2, "ad")) { - break lab3; - } - break golab2; - } - if ($this.cursor >= $this.limit) { - break lab1; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - I_strlen$0 = $this.I_strlen = 2; - if (! (I_strlen$0 === $this.limit)) { - break lab1; - } - $this.cursor = v_2; - break lab0; - } - cursor$0 = $this.cursor = v_1; - v_4 = cursor$0; - golab4: - while (true) { - lab5 = true; - lab5: - while (lab5 === true) { - lab5 = false; - if (! BaseStemmer$eq_s$LBaseStemmer$IS($this, 5, "soyad")) { - break lab5; - } - break golab4; - } - if ($this.cursor >= $this.limit) { - return false; - } - ($__jsx_postinc_t = $this.cursor, $this.cursor = ($__jsx_postinc_t + 1) | 0, $__jsx_postinc_t); - } - I_strlen$1 = $this.I_strlen = 5; - if (! (I_strlen$1 === $this.limit)) { - return false; - } - $this.cursor = v_4; - } - return true; -}; - -TurkishStemmer.r_is_reserved_word$LTurkishStemmer$ = TurkishStemmer$r_is_reserved_word$LTurkishStemmer$; - -TurkishStemmer.prototype.r_postlude$ = function () { - var v_1; - var v_2; - var lab0; - var lab1; - var lab2; - var cursor$0; - var limit$0; - var cursor$1; - v_1 = this.cursor; - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - if (! TurkishStemmer$r_is_reserved_word$LTurkishStemmer$(this)) { - break lab0; - } - return false; - } - cursor$0 = this.cursor = v_1; - this.limit_backward = cursor$0; - cursor$1 = this.cursor = limit$0 = this.limit; - v_2 = ((limit$0 - cursor$1) | 0); - lab1 = true; -lab1: - while (lab1 === true) { - lab1 = false; - if (! TurkishStemmer$r_append_U_to_stems_ending_with_d_or_g$LTurkishStemmer$(this)) { - break lab1; - } - } - this.cursor = ((this.limit - v_2) | 0); - lab2 = true; -lab2: - while (lab2 === true) { - lab2 = false; - if (! TurkishStemmer$r_post_process_last_consonants$LTurkishStemmer$(this)) { - break lab2; - } - } - this.cursor = this.limit_backward; - return true; -}; - -TurkishStemmer.prototype.r_postlude = TurkishStemmer.prototype.r_postlude$; - -function TurkishStemmer$r_postlude$LTurkishStemmer$($this) { - var v_1; - var v_2; - var lab0; - var lab1; - var lab2; - var cursor$0; - var limit$0; - var cursor$1; - v_1 = $this.cursor; - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - if (! TurkishStemmer$r_is_reserved_word$LTurkishStemmer$($this)) { - break lab0; - } - return false; - } - cursor$0 = $this.cursor = v_1; - $this.limit_backward = cursor$0; - cursor$1 = $this.cursor = limit$0 = $this.limit; - v_2 = ((limit$0 - cursor$1) | 0); - lab1 = true; -lab1: - while (lab1 === true) { - lab1 = false; - if (! TurkishStemmer$r_append_U_to_stems_ending_with_d_or_g$LTurkishStemmer$($this)) { - break lab1; - } - } - $this.cursor = (($this.limit - v_2) | 0); - lab2 = true; -lab2: - while (lab2 === true) { - lab2 = false; - if (! TurkishStemmer$r_post_process_last_consonants$LTurkishStemmer$($this)) { - break lab2; - } - } - $this.cursor = $this.limit_backward; - return true; -}; - -TurkishStemmer.r_postlude$LTurkishStemmer$ = TurkishStemmer$r_postlude$LTurkishStemmer$; - -TurkishStemmer.prototype.stem$ = function () { - var v_1; - var lab0; - var lab1; - var limit$0; - var cursor$0; - if (! TurkishStemmer$r_more_than_one_syllable_word$LTurkishStemmer$(this)) { - return false; - } - this.limit_backward = this.cursor; - cursor$0 = this.cursor = limit$0 = this.limit; - v_1 = ((limit$0 - cursor$0) | 0); - lab0 = true; -lab0: - while (lab0 === true) { - lab0 = false; - if (! TurkishStemmer$r_stem_nominal_verb_suffixes$LTurkishStemmer$(this)) { - break lab0; - } - } - this.cursor = ((this.limit - v_1) | 0); - if (! this.B_continue_stemming_noun_suffixes) { - return false; - } - lab1 = true; -lab1: - while (lab1 === true) { - lab1 = false; - if (! TurkishStemmer$r_stem_noun_suffixes$LTurkishStemmer$(this)) { - break lab1; - } - } - this.cursor = this.limit_backward; - return (! TurkishStemmer$r_postlude$LTurkishStemmer$(this) ? false : true); -}; - -TurkishStemmer.prototype.stem = TurkishStemmer.prototype.stem$; - -TurkishStemmer.prototype.equals$X = function (o) { - return o instanceof TurkishStemmer; -}; - -TurkishStemmer.prototype.equals = TurkishStemmer.prototype.equals$X; - -function TurkishStemmer$equals$LTurkishStemmer$X($this, o) { - return o instanceof TurkishStemmer; -}; - -TurkishStemmer.equals$LTurkishStemmer$X = TurkishStemmer$equals$LTurkishStemmer$X; - -TurkishStemmer.prototype.hashCode$ = function () { - var classname; - var hash; - var i; - var char; - classname = "TurkishStemmer"; - hash = 0; - for (i = 0; i < classname.length; i++) { - char = classname.charCodeAt(i); - hash = (hash << 5) - hash + char; - hash = hash & hash; - } - return (hash | 0); -}; - -TurkishStemmer.prototype.hashCode = TurkishStemmer.prototype.hashCode$; - -function TurkishStemmer$hashCode$LTurkishStemmer$($this) { - var classname; - var hash; - var i; - var char; - classname = "TurkishStemmer"; - hash = 0; - for (i = 0; i < classname.length; i++) { - char = classname.charCodeAt(i); - hash = (hash << 5) - hash + char; - hash = hash & hash; - } - return (hash | 0); -}; - -TurkishStemmer.hashCode$LTurkishStemmer$ = TurkishStemmer$hashCode$LTurkishStemmer$; - -TurkishStemmer.serialVersionUID = 1; -$__jsx_lazy_init(TurkishStemmer, "methodObject", function () { - return new TurkishStemmer(); -}); -$__jsx_lazy_init(TurkishStemmer, "a_0", function () { - return [ new Among("m", -1, -1), new Among("n", -1, -1), new Among("miz", -1, -1), new Among("niz", -1, -1), new Among("muz", -1, -1), new Among("nuz", -1, -1), new Among("m\u00FCz", -1, -1), new Among("n\u00FCz", -1, -1), new Among("m\u0131z", -1, -1), new Among("n\u0131z", -1, -1) ]; -}); -$__jsx_lazy_init(TurkishStemmer, "a_1", function () { - return [ new Among("leri", -1, -1), new Among("lar\u0131", -1, -1) ]; -}); -$__jsx_lazy_init(TurkishStemmer, "a_2", function () { - return [ new Among("ni", -1, -1), new Among("nu", -1, -1), new Among("n\u00FC", -1, -1), new Among("n\u0131", -1, -1) ]; -}); -$__jsx_lazy_init(TurkishStemmer, "a_3", function () { - return [ new Among("in", -1, -1), new Among("un", -1, -1), new Among("\u00FCn", -1, -1), new Among("\u0131n", -1, -1) ]; -}); -$__jsx_lazy_init(TurkishStemmer, "a_4", function () { - return [ new Among("a", -1, -1), new Among("e", -1, -1) ]; -}); -$__jsx_lazy_init(TurkishStemmer, "a_5", function () { - return [ new Among("na", -1, -1), new Among("ne", -1, -1) ]; -}); -$__jsx_lazy_init(TurkishStemmer, "a_6", function () { - return [ new Among("da", -1, -1), new Among("ta", -1, -1), new Among("de", -1, -1), new Among("te", -1, -1) ]; -}); -$__jsx_lazy_init(TurkishStemmer, "a_7", function () { - return [ new Among("nda", -1, -1), new Among("nde", -1, -1) ]; -}); -$__jsx_lazy_init(TurkishStemmer, "a_8", function () { - return [ new Among("dan", -1, -1), new Among("tan", -1, -1), new Among("den", -1, -1), new Among("ten", -1, -1) ]; -}); -$__jsx_lazy_init(TurkishStemmer, "a_9", function () { - return [ new Among("ndan", -1, -1), new Among("nden", -1, -1) ]; -}); -$__jsx_lazy_init(TurkishStemmer, "a_10", function () { - return [ new Among("la", -1, -1), new Among("le", -1, -1) ]; -}); -$__jsx_lazy_init(TurkishStemmer, "a_11", function () { - return [ new Among("ca", -1, -1), new Among("ce", -1, -1) ]; -}); -$__jsx_lazy_init(TurkishStemmer, "a_12", function () { - return [ new Among("im", -1, -1), new Among("um", -1, -1), new Among("\u00FCm", -1, -1), new Among("\u0131m", -1, -1) ]; -}); -$__jsx_lazy_init(TurkishStemmer, "a_13", function () { - return [ new Among("sin", -1, -1), new Among("sun", -1, -1), new Among("s\u00FCn", -1, -1), new Among("s\u0131n", -1, -1) ]; -}); -$__jsx_lazy_init(TurkishStemmer, "a_14", function () { - return [ new Among("iz", -1, -1), new Among("uz", -1, -1), new Among("\u00FCz", -1, -1), new Among("\u0131z", -1, -1) ]; -}); -$__jsx_lazy_init(TurkishStemmer, "a_15", function () { - return [ new Among("siniz", -1, -1), new Among("sunuz", -1, -1), new Among("s\u00FCn\u00FCz", -1, -1), new Among("s\u0131n\u0131z", -1, -1) ]; -}); -$__jsx_lazy_init(TurkishStemmer, "a_16", function () { - return [ new Among("lar", -1, -1), new Among("ler", -1, -1) ]; -}); -$__jsx_lazy_init(TurkishStemmer, "a_17", function () { - return [ new Among("niz", -1, -1), new Among("nuz", -1, -1), new Among("n\u00FCz", -1, -1), new Among("n\u0131z", -1, -1) ]; -}); -$__jsx_lazy_init(TurkishStemmer, "a_18", function () { - return [ new Among("dir", -1, -1), new Among("tir", -1, -1), new Among("dur", -1, -1), new Among("tur", -1, -1), new Among("d\u00FCr", -1, -1), new Among("t\u00FCr", -1, -1), new Among("d\u0131r", -1, -1), new Among("t\u0131r", -1, -1) ]; -}); -$__jsx_lazy_init(TurkishStemmer, "a_19", function () { - return [ new Among("cas\u0131na", -1, -1), new Among("cesine", -1, -1) ]; -}); -$__jsx_lazy_init(TurkishStemmer, "a_20", function () { - return [ new Among("di", -1, -1), new Among("ti", -1, -1), new Among("dik", -1, -1), new Among("tik", -1, -1), new Among("duk", -1, -1), new Among("tuk", -1, -1), new Among("d\u00FCk", -1, -1), new Among("t\u00FCk", -1, -1), new Among("d\u0131k", -1, -1), new Among("t\u0131k", -1, -1), new Among("dim", -1, -1), new Among("tim", -1, -1), new Among("dum", -1, -1), new Among("tum", -1, -1), new Among("d\u00FCm", -1, -1), new Among("t\u00FCm", -1, -1), new Among("d\u0131m", -1, -1), new Among("t\u0131m", -1, -1), new Among("din", -1, -1), new Among("tin", -1, -1), new Among("dun", -1, -1), new Among("tun", -1, -1), new Among("d\u00FCn", -1, -1), new Among("t\u00FCn", -1, -1), new Among("d\u0131n", -1, -1), new Among("t\u0131n", -1, -1), new Among("du", -1, -1), new Among("tu", -1, -1), new Among("d\u00FC", -1, -1), new Among("t\u00FC", -1, -1), new Among("d\u0131", -1, -1), new Among("t\u0131", -1, -1) ]; -}); -$__jsx_lazy_init(TurkishStemmer, "a_21", function () { - return [ new Among("sa", -1, -1), new Among("se", -1, -1), new Among("sak", -1, -1), new Among("sek", -1, -1), new Among("sam", -1, -1), new Among("sem", -1, -1), new Among("san", -1, -1), new Among("sen", -1, -1) ]; -}); -$__jsx_lazy_init(TurkishStemmer, "a_22", function () { - return [ new Among("mi\u015F", -1, -1), new Among("mu\u015F", -1, -1), new Among("m\u00FC\u015F", -1, -1), new Among("m\u0131\u015F", -1, -1) ]; -}); -$__jsx_lazy_init(TurkishStemmer, "a_23", function () { - return [ new Among("b", -1, 1), new Among("c", -1, 2), new Among("d", -1, 3), new Among("\u011F", -1, 4) ]; -}); -TurkishStemmer.g_vowel = [ 17, 65, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 8, 0, 0, 0, 0, 0, 0, 1 ]; -TurkishStemmer.g_U = [ 1, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 1 ]; -TurkishStemmer.g_vowel1 = [ 1, 64, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 ]; -TurkishStemmer.g_vowel2 = [ 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 130 ]; -TurkishStemmer.g_vowel3 = [ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 ]; -TurkishStemmer.g_vowel4 = [ 17 ]; -TurkishStemmer.g_vowel5 = [ 65 ]; -TurkishStemmer.g_vowel6 = [ 65 ]; - -var $__jsx_classMap = { - "src/among.jsx": { - Among: Among, - Among$SII: Among, - Among$SIIF$LBaseStemmer$B$LBaseStemmer$: Among$0 - }, - "src/stemmer.jsx": { - Stemmer: Stemmer, - Stemmer$: Stemmer - }, - "src/base-stemmer.jsx": { - BaseStemmer: BaseStemmer, - BaseStemmer$: BaseStemmer - }, - "src/turkish-stemmer.jsx": { - TurkishStemmer: TurkishStemmer, - TurkishStemmer$: TurkishStemmer - } -}; - - -})(JSX); - -var Among = JSX.require("src/among.jsx").Among; -var Among$SII = JSX.require("src/among.jsx").Among$SII; -var Stemmer = JSX.require("src/stemmer.jsx").Stemmer; -var BaseStemmer = JSX.require("src/base-stemmer.jsx").BaseStemmer; -var TurkishStemmer = JSX.require("src/turkish-stemmer.jsx").TurkishStemmer; diff --git a/sphinx/search/pt.py b/sphinx/search/pt.py index a7d99cde38e..501c6e4e79d 100644 --- a/sphinx/search/pt.py +++ b/sphinx/search/pt.py @@ -253,18 +253,11 @@ teriam ''') -js_stemmer = """ - -var JSX={};(function(j){function l(b,e){var a=function(){};a.prototype=e.prototype;var c=new a;for(var d in b){b[d].prototype=c}}function I(c,b){for(var a in b.prototype)if(b.prototype.hasOwnProperty(a))c.prototype[a]=b.prototype[a]}function h(a,b,d){function c(a,b,c){delete a[b];a[b]=c;return c}Object.defineProperty(a,b,{get:function(){return c(a,b,d())},set:function(d){c(a,b,d)},enumerable:true,configurable:true})}function J(a,b,c){return a[b]=a[b]/c|0}var p=parseInt;var z=parseFloat;function K(a){return a!==a}var x=isFinite;var w=encodeURIComponent;var u=decodeURIComponent;var t=encodeURI;var s=decodeURI;var A=Object.prototype.toString;var q=Object.prototype.hasOwnProperty;function k(){}j.require=function(b){var a=o[b];return a!==undefined?a:null};j.profilerIsRunning=function(){return k.getResults!=null};j.getProfileResults=function(){return(k.getResults||function(){return{}})()};j.postProfileResults=function(a,b){if(k.postResults==null)throw new Error('profiler has not been turned on');return k.postResults(a,b)};j.resetProfileResults=function(){if(k.resetResults==null)throw new Error('profiler has not been turned on');return k.resetResults()};j.DEBUG=false;function r(){};l([r],Error);function a(a,b,c){this.F=a.length;this.K=a;this.L=b;this.I=c;this.H=null;this.P=null};l([a],Object);function n(){};l([n],Object);function i(){var a;var b;var c;this.G={};a=this.E='';b=this._=0;c=this.A=a.length;this.D=0;this.B=b;this.C=c};l([i],n);function v(a,b){a.E=b.E;a._=b._;a.A=b.A;a.D=b.D;a.B=b.B;a.C=b.C};function f(b,d,c,e){var a;if(b._>=b.A){return false}a=b.E.charCodeAt(b._);if(a>e||a>>3]&1<<(a&7))===0){return false}b._++;return true};function g(a,d,c,e){var b;if(a._>=a.A){return false}b=a.E.charCodeAt(a._);if(b>e||b>>3]&1<<(b&7))===0){a._++;return true}return false};function d(a,b,d){var c;if(a._-a.D>>1);h=0;c=g0){break}if(d===b){break}if(l){break}l=true}}while(true){a=m[b];if(g>=a.F){f._=e+a.F|0;if(a.H==null){return a.I}o=a.H(a.P);f._=e+a.F|0;if(o){return a.I}}b=a.L;if(b<0){return 0}}return-1};function e(d,m,p){var b;var g;var e;var n;var f;var k;var l;var i;var h;var c;var a;var j;var o;b=0;g=p;e=d._;n=d.D;f=0;k=0;l=false;while(true){i=b+(g-b>>1);h=0;c=f=0;j--){if(e-c===n){h=-1;break}h=d.E.charCodeAt(e-1-c)-a.K.charCodeAt(j);if(h!==0){break}c++}if(h<0){g=i;k=c}else{b=i;f=c}if(g-b<=1){if(b>0){break}if(g===b){break}if(l){break}l=true}}while(true){a=m[b];if(f>=a.F){d._=e-a.F|0;if(a.H==null){return a.I}o=a.H(d);d._=e-a.F|0;if(o){return a.I}}b=a.L;if(b<0){return 0}}return-1};function B(a,b,d,e){var c;c=e.length-(d-b);a.E=a.E.slice(0,b)+e+a.E.slice(d);a.A+=c|0;if(a._>=d){a._+=c|0}else if(a._>b){a._=b}return c|0};function c(a,f){var b;var c;var d;var e;b=false;if((c=a.B)<0||c>(d=a.C)||d>(e=a.A)||e>a.E.length?false:true){B(a,a.B,a.C,f);b=true}return b};i.prototype.J=function(){return false};i.prototype.a=function(b){var a;var c;var d;var e;a=this.G['.'+b];if(a==null){c=this.E=b;d=this._=0;e=this.A=c.length;this.D=0;this.B=d;this.C=e;this.J();a=this.E;this.G['.'+b]=a}return a};i.prototype.stemWord=i.prototype.a;i.prototype.b=function(e){var d;var b;var c;var a;var f;var g;var h;d=[];for(b=0;b=this.A){break a}this._++;break}continue b}this._=e;break b}return true};b.prototype.r_prelude=b.prototype.V;function E(a){var d;var f;var e;b:while(true){f=a._;e=true;a:while(e===true){e=false;a.B=a._;d=m(a,b.a_0,3);if(d===0){break a}a.C=a._;switch(d){case 0:break a;case 1:if(!c(a,'a~')){return false}break;case 2:if(!c(a,'o~')){return false}break;case 3:if(a._>=a.A){break a}a._++;break}continue b}a._=f;break b}return true};b.prototype.T=function(){var u;var w;var x;var y;var t;var l;var d;var e;var h;var i;var c;var j;var k;var a;var m;var n;var o;var p;var q;var r;var s;var v;this.I_pV=s=this.A;this.I_p1=s;this.I_p2=s;u=this._;l=true;a:while(l===true){l=false;d=true;g:while(d===true){d=false;w=this._;e=true;b:while(e===true){e=false;if(!f(this,b.g_v,97,250)){break b}h=true;f:while(h===true){h=false;x=this._;i=true;c:while(i===true){i=false;if(!g(this,b.g_v,97,250)){break c}d:while(true){c=true;e:while(c===true){c=false;if(!f(this,b.g_v,97,250)){break e}break d}if(this._>=this.A){break c}this._++}break f}this._=x;if(!f(this,b.g_v,97,250)){break b}c:while(true){j=true;d:while(j===true){j=false;if(!g(this,b.g_v,97,250)){break d}break c}if(this._>=this.A){break b}this._++}}break g}this._=w;if(!g(this,b.g_v,97,250)){break a}k=true;c:while(k===true){k=false;y=this._;a=true;b:while(a===true){a=false;if(!g(this,b.g_v,97,250)){break b}e:while(true){m=true;d:while(m===true){m=false;if(!f(this,b.g_v,97,250)){break d}break e}if(this._>=this.A){break b}this._++}break c}this._=y;if(!f(this,b.g_v,97,250)){break a}if(this._>=this.A){break a}this._++}}this.I_pV=this._}v=this._=u;t=v;n=true;a:while(n===true){n=false;b:while(true){o=true;c:while(o===true){o=false;if(!f(this,b.g_v,97,250)){break c}break b}if(this._>=this.A){break a}this._++}b:while(true){p=true;c:while(p===true){p=false;if(!g(this,b.g_v,97,250)){break c}break b}if(this._>=this.A){break a}this._++}this.I_p1=this._;b:while(true){q=true;c:while(q===true){q=false;if(!f(this,b.g_v,97,250)){break c}break b}if(this._>=this.A){break a}this._++}c:while(true){r=true;b:while(r===true){r=false;if(!g(this,b.g_v,97,250)){break b}break c}if(this._>=this.A){break a}this._++}this.I_p2=this._}this._=t;return true};b.prototype.r_mark_regions=b.prototype.T;function F(a){var x;var y;var z;var u;var v;var l;var d;var e;var h;var i;var j;var k;var c;var m;var n;var o;var p;var q;var r;var s;var t;var w;a.I_pV=t=a.A;a.I_p1=t;a.I_p2=t;x=a._;l=true;a:while(l===true){l=false;d=true;g:while(d===true){d=false;y=a._;e=true;b:while(e===true){e=false;if(!f(a,b.g_v,97,250)){break b}h=true;f:while(h===true){h=false;z=a._;i=true;c:while(i===true){i=false;if(!g(a,b.g_v,97,250)){break c}d:while(true){j=true;e:while(j===true){j=false;if(!f(a,b.g_v,97,250)){break e}break d}if(a._>=a.A){break c}a._++}break f}a._=z;if(!f(a,b.g_v,97,250)){break b}c:while(true){k=true;d:while(k===true){k=false;if(!g(a,b.g_v,97,250)){break d}break c}if(a._>=a.A){break b}a._++}}break g}a._=y;if(!g(a,b.g_v,97,250)){break a}c=true;c:while(c===true){c=false;u=a._;m=true;b:while(m===true){m=false;if(!g(a,b.g_v,97,250)){break b}e:while(true){n=true;d:while(n===true){n=false;if(!f(a,b.g_v,97,250)){break d}break e}if(a._>=a.A){break b}a._++}break c}a._=u;if(!f(a,b.g_v,97,250)){break a}if(a._>=a.A){break a}a._++}}a.I_pV=a._}w=a._=x;v=w;o=true;a:while(o===true){o=false;b:while(true){p=true;c:while(p===true){p=false;if(!f(a,b.g_v,97,250)){break c}break b}if(a._>=a.A){break a}a._++}b:while(true){q=true;c:while(q===true){q=false;if(!g(a,b.g_v,97,250)){break c}break b}if(a._>=a.A){break a}a._++}a.I_p1=a._;b:while(true){r=true;c:while(r===true){r=false;if(!f(a,b.g_v,97,250)){break c}break b}if(a._>=a.A){break a}a._++}c:while(true){s=true;b:while(s===true){s=false;if(!g(a,b.g_v,97,250)){break b}break c}if(a._>=a.A){break a}a._++}a.I_p2=a._}a._=v;return true};b.prototype.U=function(){var a;var e;var d;b:while(true){e=this._;d=true;a:while(d===true){d=false;this.B=this._;a=m(this,b.a_1,3);if(a===0){break a}this.C=this._;switch(a){case 0:break a;case 1:if(!c(this,'ã')){return false}break;case 2:if(!c(this,'õ')){return false}break;case 3:if(this._>=this.A){break a}this._++;break}continue b}this._=e;break b}return true};b.prototype.r_postlude=b.prototype.U;function G(a){var d;var f;var e;b:while(true){f=a._;e=true;a:while(e===true){e=false;a.B=a._;d=m(a,b.a_1,3);if(d===0){break a}a.C=a._;switch(d){case 0:break a;case 1:if(!c(a,'ã')){return false}break;case 2:if(!c(a,'õ')){return false}break;case 3:if(a._>=a.A){break a}a._++;break}continue b}a._=f;break b}return true};b.prototype.S=function(){return!(this.I_pV<=this._)?false:true};b.prototype.r_RV=b.prototype.S;b.prototype.Q=function(){return!(this.I_p1<=this._)?false:true};b.prototype.r_R1=b.prototype.Q;b.prototype.R=function(){return!(this.I_p2<=this._)?false:true};b.prototype.r_R2=b.prototype.R;b.prototype.Y=function(){var a;var f;var g;var h;var j;var i;var k;var l;var m;var o;var p;var n;this.C=this._;a=e(this,b.a_5,45);if(a===0){return false}this.B=this._;switch(a){case 0:return false;case 1:if(!(!(this.I_p2<=this._)?false:true)){return false}if(!c(this,'')){return false}break;case 2:if(!(!(this.I_p2<=this._)?false:true)){return false}if(!c(this,'log')){return false}break;case 3:if(!(!(this.I_p2<=this._)?false:true)){return false}if(!c(this,'u')){return false}break;case 4:if(!(!(this.I_p2<=this._)?false:true)){return false}if(!c(this,'ente')){return false}break;case 5:if(!(!(this.I_p1<=this._)?false:true)){return false}if(!c(this,'')){return false}f=this.A-this._;i=true;a:while(i===true){i=false;this.C=this._;a=e(this,b.a_2,4);if(a===0){this._=this.A-f;break a}this.B=o=this._;if(!(!(this.I_p2<=o)?false:true)){this._=this.A-f;break a}if(!c(this,'')){return false}switch(a){case 0:this._=this.A-f;break a;case 1:this.C=this._;if(!d(this,2,'at')){this._=this.A-f;break a}this.B=p=this._;if(!(!(this.I_p2<=p)?false:true)){this._=this.A-f;break a}if(!c(this,'')){return false}break}}break;case 6:if(!(!(this.I_p2<=this._)?false:true)){return false}if(!c(this,'')){return false}g=this.A-this._;k=true;a:while(k===true){k=false;this.C=this._;a=e(this,b.a_3,3);if(a===0){this._=this.A-g;break a}this.B=this._;switch(a){case 0:this._=this.A-g;break a;case 1:if(!(!(this.I_p2<=this._)?false:true)){this._=this.A-g;break a}if(!c(this,'')){return false}break}}break;case 7:if(!(!(this.I_p2<=this._)?false:true)){return false}if(!c(this,'')){return false}h=this.A-this._;l=true;a:while(l===true){l=false;this.C=this._;a=e(this,b.a_4,3);if(a===0){this._=this.A-h;break a}this.B=this._;switch(a){case 0:this._=this.A-h;break a;case 1:if(!(!(this.I_p2<=this._)?false:true)){this._=this.A-h;break a}if(!c(this,'')){return false}break}}break;case 8:if(!(!(this.I_p2<=this._)?false:true)){return false}if(!c(this,'')){return false}j=this.A-this._;m=true;a:while(m===true){m=false;this.C=this._;if(!d(this,2,'at')){this._=this.A-j;break a}this.B=n=this._;if(!(!(this.I_p2<=n)?false:true)){this._=this.A-j;break a}if(!c(this,'')){return false}}break;case 9:if(!(!(this.I_pV<=this._)?false:true)){return false}if(!d(this,1,'e')){return false}if(!c(this,'ir')){return false}break}return true};b.prototype.r_standard_suffix=b.prototype.Y;function H(a){var f;var g;var h;var i;var k;var j;var l;var m;var n;var p;var q;var o;a.C=a._;f=e(a,b.a_5,45);if(f===0){return false}a.B=a._;switch(f){case 0:return false;case 1:if(!(!(a.I_p2<=a._)?false:true)){return false}if(!c(a,'')){return false}break;case 2:if(!(!(a.I_p2<=a._)?false:true)){return false}if(!c(a,'log')){return false}break;case 3:if(!(!(a.I_p2<=a._)?false:true)){return false}if(!c(a,'u')){return false}break;case 4:if(!(!(a.I_p2<=a._)?false:true)){return false}if(!c(a,'ente')){return false}break;case 5:if(!(!(a.I_p1<=a._)?false:true)){return false}if(!c(a,'')){return false}g=a.A-a._;j=true;a:while(j===true){j=false;a.C=a._;f=e(a,b.a_2,4);if(f===0){a._=a.A-g;break a}a.B=p=a._;if(!(!(a.I_p2<=p)?false:true)){a._=a.A-g;break a}if(!c(a,'')){return false}switch(f){case 0:a._=a.A-g;break a;case 1:a.C=a._;if(!d(a,2,'at')){a._=a.A-g;break a}a.B=q=a._;if(!(!(a.I_p2<=q)?false:true)){a._=a.A-g;break a}if(!c(a,'')){return false}break}}break;case 6:if(!(!(a.I_p2<=a._)?false:true)){return false}if(!c(a,'')){return false}h=a.A-a._;l=true;a:while(l===true){l=false;a.C=a._;f=e(a,b.a_3,3);if(f===0){a._=a.A-h;break a}a.B=a._;switch(f){case 0:a._=a.A-h;break a;case 1:if(!(!(a.I_p2<=a._)?false:true)){a._=a.A-h;break a}if(!c(a,'')){return false}break}}break;case 7:if(!(!(a.I_p2<=a._)?false:true)){return false}if(!c(a,'')){return false}i=a.A-a._;m=true;a:while(m===true){m=false;a.C=a._;f=e(a,b.a_4,3);if(f===0){a._=a.A-i;break a}a.B=a._;switch(f){case 0:a._=a.A-i;break a;case 1:if(!(!(a.I_p2<=a._)?false:true)){a._=a.A-i;break a}if(!c(a,'')){return false}break}}break;case 8:if(!(!(a.I_p2<=a._)?false:true)){return false}if(!c(a,'')){return false}k=a.A-a._;n=true;a:while(n===true){n=false;a.C=a._;if(!d(a,2,'at')){a._=a.A-k;break a}a.B=o=a._;if(!(!(a.I_p2<=o)?false:true)){a._=a.A-k;break a}if(!c(a,'')){return false}}break;case 9:if(!(!(a.I_pV<=a._)?false:true)){return false}if(!d(a,1,'e')){return false}if(!c(a,'ir')){return false}break}return true};b.prototype.Z=function(){var d;var f;var a;var g;var h;var i;f=this.A-(g=this._);if(g None: diff --git a/sphinx/search/ro.py b/sphinx/search/ro.py index 6400967c66a..721f888cc4b 100644 --- a/sphinx/search/ro.py +++ b/sphinx/search/ro.py @@ -14,17 +14,11 @@ from sphinx.search import SearchLanguage -js_stemmer = """ -var JSX={};(function(j){function l(b,e){var a=function(){};a.prototype=e.prototype;var c=new a;for(var d in b){b[d].prototype=c}}function L(c,b){for(var a in b.prototype)if(b.prototype.hasOwnProperty(a))c.prototype[a]=b.prototype[a]}function h(a,b,d){function c(a,b,c){delete a[b];a[b]=c;return c}Object.defineProperty(a,b,{get:function(){return c(a,b,d())},set:function(d){c(a,b,d)},enumerable:true,configurable:true})}function M(a,b,c){return a[b]=a[b]/c|0}var E=parseInt;var C=parseFloat;function N(a){return a!==a}var A=isFinite;var z=encodeURIComponent;var y=decodeURIComponent;var x=encodeURI;var w=decodeURI;var u=Object.prototype.toString;var D=Object.prototype.hasOwnProperty;function k(){}j.require=function(b){var a=r[b];return a!==undefined?a:null};j.profilerIsRunning=function(){return k.getResults!=null};j.getProfileResults=function(){return(k.getResults||function(){return{}})()};j.postProfileResults=function(a,b){if(k.postResults==null)throw new Error('profiler has not been turned on');return k.postResults(a,b)};j.resetProfileResults=function(){if(k.resetResults==null)throw new Error('profiler has not been turned on');return k.resetResults()};j.DEBUG=false;function t(){};l([t],Error);function a(a,b,c){this.F=a.length;this.K=a;this.L=b;this.I=c;this.H=null;this.P=null};l([a],Object);function n(){};l([n],Object);function g(){var a;var b;var c;this.G={};a=this.E='';b=this._=0;c=this.A=a.length;this.D=0;this.B=b;this.C=c};l([g],n);function v(a,b){a.E=b.E;a._=b._;a.A=b.A;a.D=b.D;a.B=b.B;a.C=b.C};function d(b,d,c,e){var a;if(b._>=b.A){return false}a=b.E.charCodeAt(b._);if(a>e||a>>3]&1<<(a&7))===0){return false}b._++;return true};function e(a,d,c,e){var b;if(a._>=a.A){return false}b=a.E.charCodeAt(a._);if(b>e||b>>3]&1<<(b&7))===0){a._++;return true}return false};function p(a,d,c,e){var b;if(a._<=a.D){return false}b=a.E.charCodeAt(a._-1);if(b>e||b>>3]&1<<(b&7))===0){a._--;return true}return false};function m(a,b,d){var c;if(a.A-a._>>1);h=0;c=g0){break}if(d===b){break}if(l){break}l=true}}while(true){a=m[b];if(g>=a.F){f._=e+a.F|0;if(a.H==null){return a.I}o=a.H(a.P);f._=e+a.F|0;if(o){return a.I}}b=a.L;if(b<0){return 0}}return-1};function f(d,m,p){var b;var g;var e;var n;var f;var k;var l;var i;var h;var c;var a;var j;var o;b=0;g=p;e=d._;n=d.D;f=0;k=0;l=false;while(true){i=b+(g-b>>1);h=0;c=f=0;j--){if(e-c===n){h=-1;break}h=d.E.charCodeAt(e-1-c)-a.K.charCodeAt(j);if(h!==0){break}c++}if(h<0){g=i;k=c}else{b=i;f=c}if(g-b<=1){if(b>0){break}if(g===b){break}if(l){break}l=true}}while(true){a=m[b];if(f>=a.F){d._=e-a.F|0;if(a.H==null){return a.I}o=a.H(d);d._=e-a.F|0;if(o){return a.I}}b=a.L;if(b<0){return 0}}return-1};function s(a,b,d,e){var c;c=e.length-(d-b);a.E=a.E.slice(0,b)+e+a.E.slice(d);a.A+=c|0;if(a._>=d){a._+=c|0}else if(a._>b){a._=b}return c|0};function c(a,f){var b;var c;var d;var e;b=false;if((c=a.B)<0||c>(d=a.C)||d>(e=a.A)||e>a.E.length?false:true){s(a,a.B,a.C,f);b=true}return b};g.prototype.J=function(){return false};g.prototype.b=function(b){var a;var c;var d;var e;a=this.G['.'+b];if(a==null){c=this.E=b;d=this._=0;e=this.A=c.length;this.D=0;this.B=d;this.C=e;this.J();a=this.E;this.G['.'+b]=a}return a};g.prototype.stemWord=g.prototype.b;g.prototype.c=function(e){var d;var b;var c;var a;var f;var g;var h;d=[];for(b=0;b=this.A){break d}this._++}continue b}this._=i;break b}return true};b.prototype.r_prelude=b.prototype.W;function G(a){var j;var e;var k;var f;var g;var h;var i;var l;b:while(true){j=a._;f=true;d:while(f===true){f=false;e:while(true){e=a._;g=true;a:while(g===true){g=false;if(!d(a,b.g_v,97,259)){break a}a.B=a._;h=true;f:while(h===true){h=false;k=a._;i=true;c:while(i===true){i=false;if(!m(a,1,'u')){break c}a.C=a._;if(!d(a,b.g_v,97,259)){break c}if(!c(a,'U')){return false}break f}a._=k;if(!m(a,1,'i')){break a}a.C=a._;if(!d(a,b.g_v,97,259)){break a}if(!c(a,'I')){return false}}a._=e;break e}l=a._=e;if(l>=a.A){break d}a._++}continue b}a._=j;break b}return true};b.prototype.U=function(){var u;var w;var x;var y;var t;var l;var f;var g;var h;var i;var c;var j;var k;var a;var m;var n;var o;var p;var q;var r;var s;var v;this.I_pV=s=this.A;this.I_p1=s;this.I_p2=s;u=this._;l=true;a:while(l===true){l=false;f=true;g:while(f===true){f=false;w=this._;g=true;b:while(g===true){g=false;if(!d(this,b.g_v,97,259)){break b}h=true;f:while(h===true){h=false;x=this._;i=true;c:while(i===true){i=false;if(!e(this,b.g_v,97,259)){break c}d:while(true){c=true;e:while(c===true){c=false;if(!d(this,b.g_v,97,259)){break e}break d}if(this._>=this.A){break c}this._++}break f}this._=x;if(!d(this,b.g_v,97,259)){break b}c:while(true){j=true;d:while(j===true){j=false;if(!e(this,b.g_v,97,259)){break d}break c}if(this._>=this.A){break b}this._++}}break g}this._=w;if(!e(this,b.g_v,97,259)){break a}k=true;c:while(k===true){k=false;y=this._;a=true;b:while(a===true){a=false;if(!e(this,b.g_v,97,259)){break b}e:while(true){m=true;d:while(m===true){m=false;if(!d(this,b.g_v,97,259)){break d}break e}if(this._>=this.A){break b}this._++}break c}this._=y;if(!d(this,b.g_v,97,259)){break a}if(this._>=this.A){break a}this._++}}this.I_pV=this._}v=this._=u;t=v;n=true;a:while(n===true){n=false;b:while(true){o=true;c:while(o===true){o=false;if(!d(this,b.g_v,97,259)){break c}break b}if(this._>=this.A){break a}this._++}b:while(true){p=true;c:while(p===true){p=false;if(!e(this,b.g_v,97,259)){break c}break b}if(this._>=this.A){break a}this._++}this.I_p1=this._;b:while(true){q=true;c:while(q===true){q=false;if(!d(this,b.g_v,97,259)){break c}break b}if(this._>=this.A){break a}this._++}c:while(true){r=true;b:while(r===true){r=false;if(!e(this,b.g_v,97,259)){break b}break c}if(this._>=this.A){break a}this._++}this.I_p2=this._}this._=t;return true};b.prototype.r_mark_regions=b.prototype.U;function H(a){var x;var y;var z;var u;var v;var l;var f;var g;var h;var i;var j;var k;var c;var m;var n;var o;var p;var q;var r;var s;var t;var w;a.I_pV=t=a.A;a.I_p1=t;a.I_p2=t;x=a._;l=true;a:while(l===true){l=false;f=true;g:while(f===true){f=false;y=a._;g=true;b:while(g===true){g=false;if(!d(a,b.g_v,97,259)){break b}h=true;f:while(h===true){h=false;z=a._;i=true;c:while(i===true){i=false;if(!e(a,b.g_v,97,259)){break c}d:while(true){j=true;e:while(j===true){j=false;if(!d(a,b.g_v,97,259)){break e}break d}if(a._>=a.A){break c}a._++}break f}a._=z;if(!d(a,b.g_v,97,259)){break b}c:while(true){k=true;d:while(k===true){k=false;if(!e(a,b.g_v,97,259)){break d}break c}if(a._>=a.A){break b}a._++}}break g}a._=y;if(!e(a,b.g_v,97,259)){break a}c=true;c:while(c===true){c=false;u=a._;m=true;b:while(m===true){m=false;if(!e(a,b.g_v,97,259)){break b}e:while(true){n=true;d:while(n===true){n=false;if(!d(a,b.g_v,97,259)){break d}break e}if(a._>=a.A){break b}a._++}break c}a._=u;if(!d(a,b.g_v,97,259)){break a}if(a._>=a.A){break a}a._++}}a.I_pV=a._}w=a._=x;v=w;o=true;a:while(o===true){o=false;b:while(true){p=true;c:while(p===true){p=false;if(!d(a,b.g_v,97,259)){break c}break b}if(a._>=a.A){break a}a._++}b:while(true){q=true;c:while(q===true){q=false;if(!e(a,b.g_v,97,259)){break c}break b}if(a._>=a.A){break a}a._++}a.I_p1=a._;b:while(true){r=true;c:while(r===true){r=false;if(!d(a,b.g_v,97,259)){break c}break b}if(a._>=a.A){break a}a._++}c:while(true){s=true;b:while(s===true){s=false;if(!e(a,b.g_v,97,259)){break b}break c}if(a._>=a.A){break a}a._++}a.I_p2=a._}a._=v;return true};b.prototype.V=function(){var a;var e;var d;b:while(true){e=this._;d=true;a:while(d===true){d=false;this.B=this._;a=q(this,b.a_0,3);if(a===0){break a}this.C=this._;switch(a){case 0:break a;case 1:if(!c(this,'i')){return false}break;case 2:if(!c(this,'u')){return false}break;case 3:if(this._>=this.A){break a}this._++;break}continue b}this._=e;break b}return true};b.prototype.r_postlude=b.prototype.V;function I(a){var d;var f;var e;b:while(true){f=a._;e=true;a:while(e===true){e=false;a.B=a._;d=q(a,b.a_0,3);if(d===0){break a}a.C=a._;switch(d){case 0:break a;case 1:if(!c(a,'i')){return false}break;case 2:if(!c(a,'u')){return false}break;case 3:if(a._>=a.A){break a}a._++;break}continue b}a._=f;break b}return true};b.prototype.S=function(){return!(this.I_pV<=this._)?false:true};b.prototype.r_RV=b.prototype.S;b.prototype.Q=function(){return!(this.I_p1<=this._)?false:true};b.prototype.r_R1=b.prototype.Q;b.prototype.R=function(){return!(this.I_p2<=this._)?false:true};b.prototype.r_R2=b.prototype.R;b.prototype.Y=function(){var a;var e;var d;var g;this.C=this._;a=f(this,b.a_1,16);if(a===0){return false}this.B=g=this._;if(!(!(this.I_p1<=g)?false:true)){return false}switch(a){case 0:return false;case 1:if(!c(this,'')){return false}break;case 2:if(!c(this,'a')){return false}break;case 3:if(!c(this,'e')){return false}break;case 4:if(!c(this,'i')){return false}break;case 5:e=this.A-this._;d=true;a:while(d===true){d=false;if(!i(this,2,'ab')){break a}return false}this._=this.A-e;if(!c(this,'i')){return false}break;case 6:if(!c(this,'at')){return false}break;case 7:if(!c(this,'aţi')){return false}break}return true};b.prototype.r_step_0=b.prototype.Y;function J(a){var d;var g;var e;var h;a.C=a._;d=f(a,b.a_1,16);if(d===0){return false}a.B=h=a._;if(!(!(a.I_p1<=h)?false:true)){return false}switch(d){case 0:return false;case 1:if(!c(a,'')){return false}break;case 2:if(!c(a,'a')){return false}break;case 3:if(!c(a,'e')){return false}break;case 4:if(!c(a,'i')){return false}break;case 5:g=a.A-a._;e=true;a:while(e===true){e=false;if(!i(a,2,'ab')){break a}return false}a._=a.A-g;if(!c(a,'i')){return false}break;case 6:if(!c(a,'at')){return false}break;case 7:if(!c(a,'aţi')){return false}break}return true};b.prototype.T=function(){var a;var d;var e;var g;d=this.A-(e=this._);this.C=e;a=f(this,b.a_2,46);if(a===0){return false}this.B=g=this._;if(!(!(this.I_p1<=g)?false:true)){return false}switch(a){case 0:return false;case 1:if(!c(this,'abil')){return false}break;case 2:if(!c(this,'ibil')){return false}break;case 3:if(!c(this,'iv')){return false}break;case 4:if(!c(this,'ic')){return false}break;case 5:if(!c(this,'at')){return false}break;case 6:if(!c(this,'it')){return false}break}this.B_standard_suffix_removed=true;this._=this.A-d;return true};b.prototype.r_combo_suffix=b.prototype.T;function o(a){var d;var e;var g;var h;e=a.A-(g=a._);a.C=g;d=f(a,b.a_2,46);if(d===0){return false}a.B=h=a._;if(!(!(a.I_p1<=h)?false:true)){return false}switch(d){case 0:return false;case 1:if(!c(a,'abil')){return false}break;case 2:if(!c(a,'ibil')){return false}break;case 3:if(!c(a,'iv')){return false}break;case 4:if(!c(a,'ic')){return false}break;case 5:if(!c(a,'at')){return false}break;case 6:if(!c(a,'it')){return false}break}a.B_standard_suffix_removed=true;a._=a.A-e;return true};b.prototype.X=function(){var a;var e;var d;var g;this.B_standard_suffix_removed=false;a:while(true){e=this.A-this._;d=true;b:while(d===true){d=false;if(!o(this)){break b}continue a}this._=this.A-e;break a}this.C=this._;a=f(this,b.a_3,62);if(a===0){return false}this.B=g=this._;if(!(!(this.I_p2<=g)?false:true)){return false}switch(a){case 0:return false;case 1:if(!c(this,'')){return false}break;case 2:if(!i(this,1,'ţ')){return false}this.B=this._;if(!c(this,'t')){return false}break;case 3:if(!c(this,'ist')){return false}break}this.B_standard_suffix_removed=true;return true};b.prototype.r_standard_suffix=b.prototype.X;function K(a){var d;var g;var e;var h;a.B_standard_suffix_removed=false;a:while(true){g=a.A-a._;e=true;b:while(e===true){e=false;if(!o(a)){break b}continue a}a._=a.A-g;break a}a.C=a._;d=f(a,b.a_3,62);if(d===0){return false}a.B=h=a._;if(!(!(a.I_p2<=h)?false:true)){return false}switch(d){case 0:return false;case 1:if(!c(a,'')){return false}break;case 2:if(!i(a,1,'ţ')){return false}a.B=a._;if(!c(a,'t')){return false}break;case 3:if(!c(a,'ist')){return false}break}a.B_standard_suffix_removed=true;return true};b.prototype.Z=function(){var d;var h;var a;var j;var e;var g;var k;var l;var m;h=this.A-(k=this._);if(k None: diff --git a/sphinx/search/ru.py b/sphinx/search/ru.py index 20ce14869f9..53b5970b66c 100644 --- a/sphinx/search/ru.py +++ b/sphinx/search/ru.py @@ -243,17 +243,11 @@ | нельзя ''') -js_stemmer = """ -var JSX={};(function(h){function j(b,e){var a=function(){};a.prototype=e.prototype;var c=new a;for(var d in b){b[d].prototype=c}}function J(c,b){for(var a in b.prototype)if(b.prototype.hasOwnProperty(a))c.prototype[a]=b.prototype[a]}function f(a,b,d){function c(a,b,c){delete a[b];a[b]=c;return c}Object.defineProperty(a,b,{get:function(){return c(a,b,d())},set:function(d){c(a,b,d)},enumerable:true,configurable:true})}function K(a,b,c){return a[b]=a[b]/c|0}var p=parseInt;var z=parseFloat;function L(a){return a!==a}var x=isFinite;var w=encodeURIComponent;var u=decodeURIComponent;var t=encodeURI;var s=decodeURI;var B=Object.prototype.toString;var q=Object.prototype.hasOwnProperty;function i(){}h.require=function(b){var a=o[b];return a!==undefined?a:null};h.profilerIsRunning=function(){return i.getResults!=null};h.getProfileResults=function(){return(i.getResults||function(){return{}})()};h.postProfileResults=function(a,b){if(i.postResults==null)throw new Error('profiler has not been turned on');return i.postResults(a,b)};h.resetProfileResults=function(){if(i.resetResults==null)throw new Error('profiler has not been turned on');return i.resetResults()};h.DEBUG=false;function r(){};j([r],Error);function a(a,b,c){this.G=a.length;this.X=a;this.a=b;this.J=c;this.I=null;this.b=null};j([a],Object);function m(){};j([m],Object);function g(){var a;var b;var c;this.F={};a=this.D='';b=this._=0;c=this.A=a.length;this.E=0;this.B=b;this.C=c};j([g],m);function v(a,b){a.D=b.D;a._=b._;a.A=b.A;a.E=b.E;a.B=b.B;a.C=b.C};function k(b,d,c,e){var a;if(b._>=b.A){return false}a=b.D.charCodeAt(b._);if(a>e||a>>3]&1<<(a&7))===0){return false}b._++;return true};function l(a,d,c,e){var b;if(a._>=a.A){return false}b=a.D.charCodeAt(a._);if(b>e||b>>3]&1<<(b&7))===0){a._++;return true}return false};function d(a,b,d){var c;if(a._-a.E>1);h=0;c=f=0;j--){if(e-c===n){h=-1;break}h=d.D.charCodeAt(e-1-c)-a.X.charCodeAt(j);if(h!==0){break}c++}if(h<0){g=i;k=c}else{b=i;f=c}if(g-b<=1){if(b>0){break}if(g===b){break}if(l){break}l=true}}while(true){a=m[b];if(f>=a.G){d._=e-a.G|0;if(a.I==null){return a.J}o=a.I(d);d._=e-a.G|0;if(o){return a.J}}b=a.a;if(b<0){return 0}}return-1};function A(a,b,d,e){var c;c=e.length-(d-b);a.D=a.D.slice(0,b)+e+a.D.slice(d);a.A+=c|0;if(a._>=d){a._+=c|0}else if(a._>b){a._=b}return c|0};function c(a,f){var b;var c;var d;var e;b=false;if((c=a.B)<0||c>(d=a.C)||d>(e=a.A)||e>a.D.length?false:true){A(a,a.B,a.C,f);b=true}return b};g.prototype.H=function(){return false};g.prototype.Y=function(b){var a;var c;var d;var e;a=this.F['.'+b];if(a==null){c=this.D=b;d=this._=0;e=this.A=c.length;this.E=0;this.B=d;this.C=e;this.H();a=this.D;this.F['.'+b]=a}return a};g.prototype.stemWord=g.prototype.Y;g.prototype.Z=function(e){var d;var b;var c;var a;var f;var g;var h;d=[];for(b=0;b=this.A){break a}this._++}this.I_pV=this._;b:while(true){d=true;c:while(d===true){d=false;if(!l(this,b.g_v,1072,1103)){break c}break b}if(this._>=this.A){break a}this._++}b:while(true){e=true;c:while(e===true){e=false;if(!k(this,b.g_v,1072,1103)){break c}break b}if(this._>=this.A){break a}this._++}b:while(true){f=true;c:while(f===true){f=false;if(!l(this,b.g_v,1072,1103)){break c}break b}if(this._>=this.A){break a}this._++}this.I_p2=this._}this._=g;return true};b.prototype.r_mark_regions=b.prototype.R;function D(a){var h;var c;var d;var e;var f;var g;var i;a.I_pV=i=a.A;a.I_p2=i;h=a._;c=true;a:while(c===true){c=false;b:while(true){d=true;c:while(d===true){d=false;if(!k(a,b.g_v,1072,1103)){break c}break b}if(a._>=a.A){break a}a._++}a.I_pV=a._;b:while(true){e=true;c:while(e===true){e=false;if(!l(a,b.g_v,1072,1103)){break c}break b}if(a._>=a.A){break a}a._++}b:while(true){f=true;c:while(f===true){f=false;if(!k(a,b.g_v,1072,1103)){break c}break b}if(a._>=a.A){break a}a._++}b:while(true){g=true;c:while(g===true){g=false;if(!l(a,b.g_v,1072,1103)){break c}break b}if(a._>=a.A){break a}a._++}a.I_p2=a._}a._=h;return true};b.prototype.N=function(){return!(this.I_p2<=this._)?false:true};b.prototype.r_R2=b.prototype.N;b.prototype.T=function(){var a;var h;var f;var g;this.C=this._;a=e(this,b.a_0,9);if(a===0){return false}this.B=this._;switch(a){case 0:return false;case 1:f=true;a:while(f===true){f=false;h=this.A-this._;g=true;b:while(g===true){g=false;if(!d(this,1,'а')){break b}break a}this._=this.A-h;if(!d(this,1,'я')){return false}}if(!c(this,'')){return false}break;case 2:if(!c(this,'')){return false}break}return true};b.prototype.r_perfective_gerund=b.prototype.T;function E(a){var f;var i;var g;var h;a.C=a._;f=e(a,b.a_0,9);if(f===0){return false}a.B=a._;switch(f){case 0:return false;case 1:g=true;a:while(g===true){g=false;i=a.A-a._;h=true;b:while(h===true){h=false;if(!d(a,1,'а')){break b}break a}a._=a.A-i;if(!d(a,1,'я')){return false}}if(!c(a,'')){return false}break;case 2:if(!c(a,'')){return false}break}return true};b.prototype.P=function(){var a;this.C=this._;a=e(this,b.a_1,26);if(a===0){return false}this.B=this._;switch(a){case 0:return false;case 1:if(!c(this,'')){return false}break}return true};b.prototype.r_adjective=b.prototype.P;function n(a){var d;a.C=a._;d=e(a,b.a_1,26);if(d===0){return false}a.B=a._;switch(d){case 0:return false;case 1:if(!c(a,'')){return false}break}return true};b.prototype.O=function(){var f;var a;var j;var g;var h;var i;if(!n(this)){return false}a=this.A-this._;g=true;a:while(g===true){g=false;this.C=this._;f=e(this,b.a_2,8);if(f===0){this._=this.A-a;break a}this.B=this._;switch(f){case 0:this._=this.A-a;break a;case 1:h=true;b:while(h===true){h=false;j=this.A-this._;i=true;c:while(i===true){i=false;if(!d(this,1,'а')){break c}break b}this._=this.A-j;if(!d(this,1,'я')){this._=this.A-a;break a}}if(!c(this,'')){return false}break;case 2:if(!c(this,'')){return false}break}}return true};b.prototype.r_adjectival=b.prototype.O;function G(a){var g;var f;var k;var h;var i;var j;if(!n(a)){return false}f=a.A-a._;h=true;a:while(h===true){h=false;a.C=a._;g=e(a,b.a_2,8);if(g===0){a._=a.A-f;break a}a.B=a._;switch(g){case 0:a._=a.A-f;break a;case 1:i=true;b:while(i===true){i=false;k=a.A-a._;j=true;c:while(j===true){j=false;if(!d(a,1,'а')){break c}break b}a._=a.A-k;if(!d(a,1,'я')){a._=a.A-f;break a}}if(!c(a,'')){return false}break;case 2:if(!c(a,'')){return false}break}}return true};b.prototype.U=function(){var a;this.C=this._;a=e(this,b.a_3,2);if(a===0){return false}this.B=this._;switch(a){case 0:return false;case 1:if(!c(this,'')){return false}break}return true};b.prototype.r_reflexive=b.prototype.U;function H(a){var d;a.C=a._;d=e(a,b.a_3,2);if(d===0){return false}a.B=a._;switch(d){case 0:return false;case 1:if(!c(a,'')){return false}break}return true};b.prototype.W=function(){var a;var h;var f;var g;this.C=this._;a=e(this,b.a_4,46);if(a===0){return false}this.B=this._;switch(a){case 0:return false;case 1:f=true;a:while(f===true){f=false;h=this.A-this._;g=true;b:while(g===true){g=false;if(!d(this,1,'а')){break b}break a}this._=this.A-h;if(!d(this,1,'я')){return false}}if(!c(this,'')){return false}break;case 2:if(!c(this,'')){return false}break}return true};b.prototype.r_verb=b.prototype.W;function I(a){var f;var i;var g;var h;a.C=a._;f=e(a,b.a_4,46);if(f===0){return false}a.B=a._;switch(f){case 0:return false;case 1:g=true;a:while(g===true){g=false;i=a.A-a._;h=true;b:while(h===true){h=false;if(!d(a,1,'а')){break b}break a}a._=a.A-i;if(!d(a,1,'я')){return false}}if(!c(a,'')){return false}break;case 2:if(!c(a,'')){return false}break}return true};b.prototype.S=function(){var a;this.C=this._;a=e(this,b.a_5,36);if(a===0){return false}this.B=this._;switch(a){case 0:return false;case 1:if(!c(this,'')){return false}break}return true};b.prototype.r_noun=b.prototype.S;function F(a){var d;a.C=a._;d=e(a,b.a_5,36);if(d===0){return false}a.B=a._;switch(d){case 0:return false;case 1:if(!c(a,'')){return false}break}return true};b.prototype.Q=function(){var a;var d;this.C=this._;a=e(this,b.a_6,2);if(a===0){return false}this.B=d=this._;if(!(!(this.I_p2<=d)?false:true)){return false}switch(a){case 0:return false;case 1:if(!c(this,'')){return false}break}return true};b.prototype.r_derivational=b.prototype.Q;function C(a){var d;var f;a.C=a._;d=e(a,b.a_6,2);if(d===0){return false}a.B=f=a._;if(!(!(a.I_p2<=f)?false:true)){return false}switch(d){case 0:return false;case 1:if(!c(a,'')){return false}break}return true};b.prototype.V=function(){var a;this.C=this._;a=e(this,b.a_7,4);if(a===0){return false}this.B=this._;switch(a){case 0:return false;case 1:if(!c(this,'')){return false}this.C=this._;if(!d(this,1,'н')){return false}this.B=this._;if(!d(this,1,'н')){return false}if(!c(this,'')){return false}break;case 2:if(!d(this,1,'н')){return false}if(!c(this,'')){return false}break;case 3:if(!c(this,'')){return false}break}return true};b.prototype.r_tidy_up=b.prototype.V;function y(a){var f;a.C=a._;f=e(a,b.a_7,4);if(f===0){return false}a.B=a._;switch(f){case 0:return false;case 1:if(!c(a,'')){return false}a.C=a._;if(!d(a,1,'н')){return false}a.B=a._;if(!d(a,1,'н')){return false}if(!c(a,'')){return false}break;case 2:if(!d(a,1,'н')){return false}if(!c(a,'')){return false}break;case 3:if(!c(a,'')){return false}break}return true};b.prototype.H=function(){var s;var v;var w;var A;var p;var q;var i;var t;var u;var e;var f;var g;var h;var a;var j;var b;var k;var l;var m;var n;var x;var z;var o;var B;var J;var K;var L;var M;var N;var O;var r;s=this._;e=true;a:while(e===true){e=false;if(!D(this)){break a}}x=this._=s;this.E=x;o=this._=z=this.A;v=z-o;if(o None: diff --git a/sphinx/search/sv.py b/sphinx/search/sv.py index 2ce4027ca81..dde90fd6df3 100644 --- a/sphinx/search/sv.py +++ b/sphinx/search/sv.py @@ -132,17 +132,11 @@ vilkas | whose ''') -js_stemmer = """ -var JSX={};(function(e){function i(b,e){var a=function(){};a.prototype=e.prototype;var c=new a;for(var d in b){b[d].prototype=c}}function G(c,b){for(var a in b.prototype)if(b.prototype.hasOwnProperty(a))c.prototype[a]=b.prototype[a]}function h(a,b,d){function c(a,b,c){delete a[b];a[b]=c;return c}Object.defineProperty(a,b,{get:function(){return c(a,b,d())},set:function(d){c(a,b,d)},enumerable:true,configurable:true})}function F(a,b,c){return a[b]=a[b]/c|0}var t=parseInt;var u=parseFloat;function E(a){return a!==a}var x=isFinite;var y=encodeURIComponent;var z=decodeURIComponent;var B=encodeURI;var C=decodeURI;var o=Object.prototype.toString;var p=Object.prototype.hasOwnProperty;function f(){}e.require=function(b){var a=n[b];return a!==undefined?a:null};e.profilerIsRunning=function(){return f.getResults!=null};e.getProfileResults=function(){return(f.getResults||function(){return{}})()};e.postProfileResults=function(a,b){if(f.postResults==null)throw new Error('profiler has not been turned on');return f.postResults(a,b)};e.resetProfileResults=function(){if(f.resetResults==null)throw new Error('profiler has not been turned on');return f.resetResults()};e.DEBUG=false;function r(){};i([r],Error);function a(a,b,c){this.G=a.length;this.R=a;this.U=b;this.J=c;this.I=null;this.V=null};i([a],Object);function j(){};i([j],Object);function d(){var a;var b;var c;this.F={};a=this.C='';b=this._=0;c=this.B=a.length;this.A=0;this.D=b;this.E=c};i([d],j);function v(a,b){a.C=b.C;a._=b._;a.B=b.B;a.A=b.A;a.D=b.D;a.E=b.E};function k(b,d,c,e){var a;if(b._>=b.B){return false}a=b.C.charCodeAt(b._);if(a>e||a>>3]&1<<(a&7))===0){return false}b._++;return true};function l(b,d,c,e){var a;if(b._<=b.A){return false}a=b.C.charCodeAt(b._-1);if(a>e||a>>3]&1<<(a&7))===0){return false}b._--;return true};function m(a,d,c,e){var b;if(a._>=a.B){return false}b=a.C.charCodeAt(a._);if(b>e||b>>3]&1<<(b&7))===0){a._++;return true}return false};function g(d,m,p){var b;var g;var e;var n;var f;var k;var l;var i;var h;var c;var a;var j;var o;b=0;g=p;e=d._;n=d.A;f=0;k=0;l=false;while(true){i=b+(g-b>>1);h=0;c=f=0;j--){if(e-c===n){h=-1;break}h=d.C.charCodeAt(e-1-c)-a.R.charCodeAt(j);if(h!==0){break}c++}if(h<0){g=i;k=c}else{b=i;f=c}if(g-b<=1){if(b>0){break}if(g===b){break}if(l){break}l=true}}while(true){a=m[b];if(f>=a.G){d._=e-a.G|0;if(a.I==null){return a.J}o=a.I(d);d._=e-a.G|0;if(o){return a.J}}b=a.U;if(b<0){return 0}}return-1};function A(a,b,d,e){var c;c=e.length-(d-b);a.C=a.C.slice(0,b)+e+a.C.slice(d);a.B+=c|0;if(a._>=d){a._+=c|0}else if(a._>b){a._=b}return c|0};function c(a,f){var b;var c;var d;var e;b=false;if((c=a.D)<0||c>(d=a.E)||d>(e=a.B)||e>a.C.length?false:true){A(a,a.D,a.E,f);b=true}return b};d.prototype.H=function(){return false};d.prototype.S=function(b){var a;var c;var d;var e;a=this.F['.'+b];if(a==null){c=this.C=b;d=this._=0;e=this.B=c.length;this.A=0;this.D=d;this.E=e;this.H();a=this.C;this.F['.'+b]=a}return a};d.prototype.stemWord=d.prototype.S;d.prototype.T=function(e){var d;var b;var c;var a;var f;var g;var h;d=[];for(b=0;ba||a>j){return false}h=this._=a;this.I_x=h;this._=g;a:while(true){d=this._;e=true;b:while(e===true){e=false;if(!k(this,b.g_v,97,246)){break b}this._=d;break a}l=this._=d;if(l>=this.B){return false}this._++}a:while(true){c=true;b:while(c===true){c=false;if(!m(this,b.g_v,97,246)){break b}break a}if(this._>=this.B){return false}this._++}this.I_p1=this._;f=true;a:while(f===true){f=false;if(!(this.I_p1c||c>l){return false}i=a._=c;a.I_x=i;a._=h;a:while(true){e=a._;f=true;b:while(f===true){f=false;if(!k(a,b.g_v,97,246)){break b}a._=e;break a}n=a._=e;if(n>=a.B){return false}a._++}a:while(true){d=true;b:while(d===true){d=false;if(!m(a,b.g_v,97,246)){break b}break a}if(a._>=a.B){return false}a._++}a.I_p1=a._;g=true;a:while(g===true){g=false;if(!(a.I_p1 None: diff --git a/sphinx/search/tr.py b/sphinx/search/tr.py index 565e341fda4..644e8a53426 100644 --- a/sphinx/search/tr.py +++ b/sphinx/search/tr.py @@ -14,17 +14,11 @@ from sphinx.search import SearchLanguage -js_stemmer = """ -var JSX={};(function(q){function r(b,e){var a=function(){};a.prototype=e.prototype;var c=new a;for(var d in b){b[d].prototype=c}}function Q(c,b){for(var a in b.prototype)if(b.prototype.hasOwnProperty(a))c.prototype[a]=b.prototype[a]}function j(a,b,d){function c(a,b,c){delete a[b];a[b]=c;return c}Object.defineProperty(a,b,{get:function(){return c(a,b,d())},set:function(d){c(a,b,d)},enumerable:true,configurable:true})}function R(a,b,c){return a[b]=a[b]/c|0}var M=parseInt;var K=parseFloat;function P(a){return a!==a}var A=isFinite;var G=encodeURIComponent;var F=decodeURIComponent;var E=encodeURI;var D=decodeURI;var C=Object.prototype.toString;var H=Object.prototype.hasOwnProperty;function p(){}q.require=function(b){var a=y[b];return a!==undefined?a:null};q.profilerIsRunning=function(){return p.getResults!=null};q.getProfileResults=function(){return(p.getResults||function(){return{}})()};q.postProfileResults=function(a,b){if(p.postResults==null)throw new Error('profiler has not been turned on');return p.postResults(a,b)};q.resetProfileResults=function(){if(p.resetResults==null)throw new Error('profiler has not been turned on');return p.resetResults()};q.DEBUG=false;function I(){};r([I],Error);function d(a,b,c){this.G=a.length;this.A_=a;this.D_=b;this.J=c;this.I=null;this.E_=null};r([d],Object);function u(){};r([u],Object);function m(){var a;var b;var c;this.F={};a=this.E='';b=this._=0;c=this.A=a.length;this.D=0;this.B=b;this.C=c};r([m],u);function B(a,b){a.E=b.E;a._=b._;a.A=b.A;a.D=b.D;a.B=b.B;a.C=b.C};function v(b,d,c,e){var a;if(b._>=b.A){return false}a=b.E.charCodeAt(b._);if(a>e||a>>3]&1<<(a&7))===0){return false}b._++;return true};function f(b,d,c,e){var a;if(b._<=b.D){return false}a=b.E.charCodeAt(b._-1);if(a>e||a>>3]&1<<(a&7))===0){return false}b._--;return true};function t(a,d,c,e){var b;if(a._<=a.D){return false}b=a.E.charCodeAt(a._-1);if(b>e||b>>3]&1<<(b&7))===0){a._--;return true}return false};function s(a,b,d){var c;if(a.A-a._>1);h=0;c=f=0;j--){if(e-c===n){h=-1;break}h=d.E.charCodeAt(e-1-c)-a.A_.charCodeAt(j);if(h!==0){break}c++}if(h<0){g=i;k=c}else{b=i;f=c}if(g-b<=1){if(b>0){break}if(g===b){break}if(l){break}l=true}}while(true){a=m[b];if(f>=a.G){d._=e-a.G|0;if(a.I==null){return a.J}o=a.I(d);d._=e-a.G|0;if(o){return a.J}}b=a.D_;if(b<0){return 0}}return-1};function n(a,b,d,e){var c;c=e.length-(d-b);a.E=a.E.slice(0,b)+e+a.E.slice(d);a.A+=c|0;if(a._>=d){a._+=c|0}else if(a._>b){a._=b}return c|0};function e(a,f){var b;var c;var d;var e;b=false;if((c=a.B)<0||c>(d=a.C)||d>(e=a.A)||e>a.E.length?false:true){n(a,a.B,a.C,f);b=true}return b};m.prototype.H=function(){return false};m.prototype.B_=function(b){var a;var c;var d;var e;a=this.F['.'+b];if(a==null){c=this.E=b;d=this._=0;e=this.A=c.length;this.D=0;this.B=d;this.C=e;this.H();a=this.E;this.F['.'+b]=a}return a};m.prototype.stemWord=m.prototype.B_;m.prototype.C_=function(e){var d;var b;var c;var a;var f;var g;var h;d=[];for(b=0;b=this.A){break b}this._++}b--;continue a}this._=f;break a}if(b>0){return false}this._=e;return true};a.prototype.r_more_than_one_syllable_word=a.prototype.v;function N(b){var f;var g;var c;var d;var e;f=b._;c=2;a:while(true){g=b._;d=true;b:while(d===true){d=false;c:while(true){e=true;d:while(e===true){e=false;if(!v(b,a.g_vowel,97,305)){break d}break c}if(b._>=b.A){break b}b._++}c--;continue a}b._=g;break a}if(c>0){return false}b._=f;return true};a.prototype.P=function(){var f;var g;var h;var b;var a;var c;var d;var i;var j;var e;b=true;b:while(b===true){b=false;f=this._;a=true;a:while(a===true){a=false;g=this._;c:while(true){c=true;d:while(c===true){c=false;if(!s(this,2,'ad')){break d}break c}if(this._>=this.A){break a}this._++}i=this.I_strlen=2;if(!(i===this.A)){break a}this._=g;break b}j=this._=f;h=j;a:while(true){d=true;c:while(d===true){d=false;if(!s(this,5,'soyad')){break c}break a}if(this._>=this.A){return false}this._++}e=this.I_strlen=5;if(!(e===this.A)){return false}this._=h}return true};a.prototype.r_is_reserved_word=a.prototype.P;function x(a){var g;var h;var i;var c;var b;var d;var e;var j;var k;var f;c=true;b:while(c===true){c=false;g=a._;b=true;a:while(b===true){b=false;h=a._;c:while(true){d=true;d:while(d===true){d=false;if(!s(a,2,'ad')){break d}break c}if(a._>=a.A){break a}a._++}j=a.I_strlen=2;if(!(j===a.A)){break a}a._=h;break b}k=a._=g;i=k;a:while(true){e=true;c:while(e===true){e=false;if(!s(a,5,'soyad')){break c}break a}if(a._>=a.A){return false}a._++}f=a.I_strlen=5;if(!(f===a.A)){return false}a._=i}return true};a.prototype.x=function(){var d;var e;var a;var b;var c;var f;var g;var h;d=this._;a=true;a:while(a===true){a=false;if(!x(this)){break a}return false}f=this._=d;this.D=f;h=this._=g=this.A;e=g-h;b=true;a:while(b===true){b=false;if(!z(this)){break a}}this._=this.A-e;c=true;a:while(c===true){c=false;if(!w(this)){break a}}this._=this.D;return true};a.prototype.r_postlude=a.prototype.x;function O(a){var e;var f;var b;var c;var d;var g;var h;var i;e=a._;b=true;a:while(b===true){b=false;if(!x(a)){break a}return false}g=a._=e;a.D=g;i=a._=h=a.A;f=h-i;c=true;a:while(c===true){c=false;if(!z(a)){break a}}a._=a.A-f;d=true;a:while(d===true){d=false;if(!w(a)){break a}}a._=a.D;return true};a.prototype.H=function(){var c;var a;var b;var d;var e;if(!N(this)){return false}this.D=this._;e=this._=d=this.A;c=d-e;a=true;a:while(a===true){a=false;if(!J(this)){break a}}this._=this.A-c;if(!this.B_continue_stemming_noun_suffixes){return false}b=true;a:while(b===true){b=false;if(!L(this)){break a}}this._=this.D;return!O(this)?false:true};a.prototype.stem=a.prototype.H;a.prototype.L=function(b){return b instanceof a};a.prototype.equals=a.prototype.L;a.prototype.M=function(){var c;var a;var b;var d;c='TurkishStemmer';a=0;for(b=0;b None: diff --git a/sphinx/themes/basic/static/language_data.js_t b/sphinx/themes/basic/static/language_data.js_t index 1425b022a2b..efa154df6c0 100644 --- a/sphinx/themes/basic/static/language_data.js_t +++ b/sphinx/themes/basic/static/language_data.js_t @@ -13,8 +13,9 @@ var stopwords = {{ search_language_stop_words }}; {% if search_language_stemming_code %} -/* Non-minified version JS is _stemmer.js if file is provided */ {% endif -%} +/* Non-minified version is copied as a separate JS file, is available */ {{ search_language_stemming_code|safe }} +{% endif -%} {% if search_scorer_tool %} {{ search_scorer_tool|safe }}