summaryrefslogtreecommitdiffstats
path: root/web/server/h2o/libh2o/misc/oktavia/src/stemmer
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 02:57:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 02:57:58 +0000
commitbe1c7e50e1e8809ea56f2c9d472eccd8ffd73a97 (patch)
tree9754ff1ca740f6346cf8483ec915d4054bc5da2d /web/server/h2o/libh2o/misc/oktavia/src/stemmer
parentInitial commit. (diff)
downloadnetdata-be1c7e50e1e8809ea56f2c9d472eccd8ffd73a97.tar.xz
netdata-be1c7e50e1e8809ea56f2c9d472eccd8ffd73a97.zip
Adding upstream version 1.44.3.upstream/1.44.3upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--web/server/h2o/libh2o/misc/oktavia/src/stemmer/among.jsx34
-rw-r--r--web/server/h2o/libh2o/misc/oktavia/src/stemmer/base-stemmer.jsx419
-rw-r--r--web/server/h2o/libh2o/misc/oktavia/src/stemmer/danish-stemmer.jsx507
-rw-r--r--web/server/h2o/libh2o/misc/oktavia/src/stemmer/dutch-stemmer.jsx1020
-rw-r--r--web/server/h2o/libh2o/misc/oktavia/src/stemmer/english-stemmer.jsx1638
-rw-r--r--web/server/h2o/libh2o/misc/oktavia/src/stemmer/finnish-stemmer.jsx1208
-rw-r--r--web/server/h2o/libh2o/misc/oktavia/src/stemmer/french-stemmer.jsx1867
-rw-r--r--web/server/h2o/libh2o/misc/oktavia/src/stemmer/german-stemmer.jsx894
-rw-r--r--web/server/h2o/libh2o/misc/oktavia/src/stemmer/hungarian-stemmer.jsx1478
-rw-r--r--web/server/h2o/libh2o/misc/oktavia/src/stemmer/italian-stemmer.jsx1412
-rw-r--r--web/server/h2o/libh2o/misc/oktavia/src/stemmer/norwegian-stemmer.jsx428
-rw-r--r--web/server/h2o/libh2o/misc/oktavia/src/stemmer/porter-stemmer.jsx1121
-rw-r--r--web/server/h2o/libh2o/misc/oktavia/src/stemmer/portuguese-stemmer.jsx1321
-rw-r--r--web/server/h2o/libh2o/misc/oktavia/src/stemmer/romanian-stemmer.jsx1227
-rw-r--r--web/server/h2o/libh2o/misc/oktavia/src/stemmer/russian-stemmer.jsx875
-rw-r--r--web/server/h2o/libh2o/misc/oktavia/src/stemmer/spanish-stemmer.jsx1408
-rw-r--r--web/server/h2o/libh2o/misc/oktavia/src/stemmer/stemmer.jsx5
-rw-r--r--web/server/h2o/libh2o/misc/oktavia/src/stemmer/swedish-stemmer.jsx416
-rw-r--r--web/server/h2o/libh2o/misc/oktavia/src/stemmer/turkish-stemmer.jsx3824
19 files changed, 21102 insertions, 0 deletions
diff --git a/web/server/h2o/libh2o/misc/oktavia/src/stemmer/among.jsx b/web/server/h2o/libh2o/misc/oktavia/src/stemmer/among.jsx
new file mode 100644
index 00000000..f695b94b
--- /dev/null
+++ b/web/server/h2o/libh2o/misc/oktavia/src/stemmer/among.jsx
@@ -0,0 +1,34 @@
+import "base-stemmer.jsx";
+
+class Among
+{
+ var s_size : int; /* search string */
+ var s : string; /* search string */
+ var substring_i : int; /* index to longest matching substring */
+ var result : int; /* result of the lookup */
+ var instance : Nullable.<BaseStemmer> ;
+ /* object to invoke method on. It is a BaseStemmer */
+ var method : Nullable.<(BaseStemmer) -> boolean>;
+ /* method to use if substring matches */
+
+ function constructor (s : string, substring_i : int, result : int)
+ {
+ this.s_size = s.length;
+ this.s = s;
+ this.substring_i = substring_i;
+ this.result = result;
+ this.method = null;
+ this.instance = null;
+ }
+
+ function constructor (s : string, substring_i : int, result : int,
+ method : (BaseStemmer) -> boolean, instance : BaseStemmer)
+ {
+ this.s_size = s.length;
+ this.s = s;
+ this.substring_i = substring_i;
+ this.result = result;
+ this.method = method;
+ this.instance = instance;
+ }
+}
diff --git a/web/server/h2o/libh2o/misc/oktavia/src/stemmer/base-stemmer.jsx b/web/server/h2o/libh2o/misc/oktavia/src/stemmer/base-stemmer.jsx
new file mode 100644
index 00000000..dfc0d6ea
--- /dev/null
+++ b/web/server/h2o/libh2o/misc/oktavia/src/stemmer/base-stemmer.jsx
@@ -0,0 +1,419 @@
+import "stemmer.jsx";
+import "among.jsx";
+
+class BaseStemmer implements Stemmer
+{
+ // this.current string
+ var current : string;
+ var cursor : int;
+ var limit : int;
+ var limit_backward : int;
+ var bra : int;
+ var ket : int;
+ var cache : Map.<string>;
+
+ function constructor ()
+ {
+ this.cache = {} : Map.<string>;
+ this.setCurrent("");
+ }
+
+ /**
+ * Set the this.current string.
+ */
+ function setCurrent (value : string) : void
+ {
+ this.current = value;
+ this.cursor = 0;
+ this.limit = this.current.length;
+ this.limit_backward = 0;
+ this.bra = this.cursor;
+ this.ket = this.limit;
+ }
+
+ /**
+ * Get the this.current string.
+ */
+ function getCurrent () : string
+ {
+ return this.current;
+ }
+
+
+ function copy_from (other : BaseStemmer) : void
+ {
+ 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 in_grouping (s : int[], min : int, max : int) : boolean
+ {
+ 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;
+ }
+
+ function in_grouping_b (s : int[], min : int, max : int) : boolean
+ {
+ 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;
+ }
+
+ function out_grouping (s : int[], min : int, max : int) : boolean
+ {
+ 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;
+ }
+
+ function out_grouping_b (s : int[], min : int, max : int) : boolean
+ {
+ 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;
+ }
+
+ function in_range (min : int, max : int) : boolean
+ {
+ if (this.cursor >= this.limit) return false;
+ var ch = this.current.charCodeAt(this.cursor);
+ if (ch > max || ch < min) return false;
+ this.cursor++;
+ return true;
+ }
+
+ function in_range_b (min : int, max : int) : boolean
+ {
+ if (this.cursor <= this.limit_backward) return false;
+ var ch = this.current.charCodeAt(this.cursor - 1);
+ if (ch > max || ch < min) return false;
+ this.cursor--;
+ return true;
+ }
+
+ function out_range (min : int, max : int) : boolean
+ {
+ if (this.cursor >= this.limit) return false;
+ var ch = this.current.charCodeAt(this.cursor);
+ if (!(ch > max || ch < min)) return false;
+ this.cursor++;
+ return true;
+ }
+
+ function out_range_b (min : int, max : int) : boolean
+ {
+ if (this.cursor <= this.limit_backward) return false;
+ var ch = this.current.charCodeAt(this.cursor - 1);
+ if(!(ch > max || ch < min)) return false;
+ this.cursor--;
+ return true;
+ }
+
+ function eq_s (s_size : int, s : string) : boolean
+ {
+ if (this.limit - this.cursor < s_size) return false;
+ if (this.current.slice(this.cursor, this.cursor + s_size) != s)
+ {
+ return false;
+ }
+ this.cursor += s_size;
+ return true;
+ }
+
+ function eq_s_b (s_size : int, s : string) : boolean
+ {
+ if (this.cursor - this.limit_backward < s_size) return false;
+ if (this.current.slice(this.cursor - s_size, this.cursor) != s)
+ {
+ return false;
+ }
+ this.cursor -= s_size;
+ return true;
+ }
+
+ function eq_v (s : string) : boolean
+ {
+ return this.eq_s(s.length, s);
+ }
+
+ function eq_v_b (s : string) : boolean
+ {
+ return this.eq_s_b(s.length, s);
+ }
+
+ function find_among (v : Among[], v_size : int) : int
+ {
+ var i = 0;
+ var j = v_size;
+
+ 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
+ var w = v[k];
+ var i2;
+ 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; // 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;
+ }
+ }
+ while (true)
+ {
+ var w = v[i];
+ if (common_i >= w.s_size)
+ {
+ this.cursor = c + w.s_size;
+ if (w.method == null)
+ {
+ return w.result;
+ }
+ var res = w.method(w.instance);
+ this.cursor = c + w.s_size;
+ if (res)
+ {
+ return w.result;
+ }
+ }
+ i = w.substring_i;
+ if (i < 0) return 0;
+ }
+ return -1; // not reachable
+ }
+
+ // find_among_b is for backwards processing. Same comments apply
+ function find_among_b (v : Among[], v_size : int) : int
+ {
+ var i = 0;
+ var j = v_size;
+
+ 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.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)
+ {
+ var w = v[i];
+ if (common_i >= w.s_size)
+ {
+ this.cursor = c - w.s_size;
+ if (w.method == null) return w.result;
+ var res = w.method(this);
+ this.cursor = c - w.s_size;
+ if (res) return w.result;
+ }
+ i = w.substring_i;
+ if (i < 0) return 0;
+ }
+ return -1; // not reachable
+ }
+
+ /* to replace chars between c_bra and c_ket in this.current by the
+ * chars in s.
+ */
+ function replace_s (c_bra : int, c_ket : int, s : string) : int
+ {
+ 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;
+ }
+
+ function slice_check () : boolean
+ {
+ if (this.bra < 0 ||
+ this.bra > this.ket ||
+ this.ket > this.limit ||
+ this.limit > this.current.length)
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function slice_from (s : string) : boolean
+ {
+ var result = false;
+ if (this.slice_check())
+ {
+ this.replace_s(this.bra, this.ket, s);
+ result = true;
+ }
+ return result;
+ }
+
+ function slice_del () : boolean
+ {
+ return this.slice_from("");
+ }
+
+ function insert (c_bra : int, c_ket : int, s : string) : void
+ {
+ 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;
+ }
+
+ /* Copy the slice into the supplied StringBuffer */
+ function slice_to (s : string) : string
+ {
+ var result = '';
+ if (this.slice_check())
+ {
+ result = this.current.slice(this.bra, this.ket);
+ }
+ return result;
+ }
+
+ function assign_to (s : string) : string
+ {
+ return this.current.slice(0, this.limit);
+ }
+
+ function stem () : boolean
+ {
+ return false;
+ }
+
+ override function stemWord (word : string) : string
+ {
+ var result = this.cache['.' + word];
+ if (result == null)
+ {
+ this.setCurrent(word);
+ this.stem();
+ result = this.getCurrent();
+ this.cache['.' + word] = result;
+ }
+ return result;
+ }
+
+ override function stemWords (words : string[]) : string[]
+ {
+ var results = [] : string[];
+ for (var i = 0; i < words.length; i++)
+ {
+ var word = words[i];
+ var result = this.cache['.' + word];
+ if (result == null)
+ {
+ this.setCurrent(word);
+ this.stem();
+ result = this.getCurrent();
+ this.cache['.' + word] = result;
+ }
+ results.push(result);
+ }
+ return results;
+ }
+}
diff --git a/web/server/h2o/libh2o/misc/oktavia/src/stemmer/danish-stemmer.jsx b/web/server/h2o/libh2o/misc/oktavia/src/stemmer/danish-stemmer.jsx
new file mode 100644
index 00000000..ffebd881
--- /dev/null
+++ b/web/server/h2o/libh2o/misc/oktavia/src/stemmer/danish-stemmer.jsx
@@ -0,0 +1,507 @@
+// This file was generated automatically by the Snowball to JSX compiler
+
+import "base-stemmer.jsx";
+import "among.jsx";
+
+ /**
+ * This class was automatically generated by a Snowball to JSX compiler
+ * It implements the stemming algorithm defined by a snowball script.
+ */
+
+class DanishStemmer extends BaseStemmer
+{
+ static const serialVersionUID = 1;
+ static const methodObject = new DanishStemmer();
+
+ static const a_0 = [
+ 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)
+ ];
+
+ static const a_1 = [
+ new Among("gd", -1, -1),
+ new Among("dt", -1, -1),
+ new Among("gt", -1, -1),
+ new Among("kt", -1, -1)
+ ];
+
+ static const a_2 = [
+ 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)
+ ];
+
+ static const g_v = [17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 128] : int[];
+
+ static const g_s_ending = [239, 254, 42, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16] : int[];
+
+ var I_x : int = 0;
+ var I_p1 : int = 0;
+ var S_ch : string = "";
+
+ function copy_from (other : DanishStemmer) : void
+ {
+ this.I_x = other.I_x;
+ this.I_p1 = other.I_p1;
+ this.S_ch = other.S_ch;
+ super.copy_from(other);
+ }
+
+ function r_mark_regions () : boolean
+ {
+ var v_1 : int;
+ var v_2 : int;
+ // (, line 29
+ this.I_p1 = this.limit;
+ // test, line 33
+ v_1 = this.cursor;
+ // (, line 33
+ // hop, line 33
+ {
+ var c : int = this.cursor + 3;
+ if (0 > c || c > this.limit)
+ {
+ return false;
+ }
+ this.cursor = c;
+ }
+ // setmark x, line 33
+ this.I_x = this.cursor;
+ this.cursor = v_1;
+ // goto, line 34
+ golab0: while(true)
+ {
+ v_2 = this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ if (!(this.in_grouping(DanishStemmer.g_v, 97, 248)))
+ {
+ break lab1;
+ }
+ this.cursor = v_2;
+ break golab0;
+ }
+ this.cursor = v_2;
+ if (this.cursor >= this.limit)
+ {
+ return false;
+ }
+ this.cursor++;
+ }
+ // gopast, line 34
+ golab2: while(true)
+ {
+ var lab3 = true;
+ lab3: while (lab3 == true)
+ {
+ lab3 = false;
+ if (!(this.out_grouping(DanishStemmer.g_v, 97, 248)))
+ {
+ break lab3;
+ }
+ break golab2;
+ }
+ if (this.cursor >= this.limit)
+ {
+ return false;
+ }
+ this.cursor++;
+ }
+ // setmark p1, line 34
+ this.I_p1 = this.cursor;
+ // try, line 35
+ var lab4 = true;
+ lab4: while (lab4 == true)
+ {
+ lab4 = false;
+ // (, line 35
+ if (!(this.I_p1 < this.I_x))
+ {
+ break lab4;
+ }
+ this.I_p1 = this.I_x;
+ }
+ return true;
+ }
+
+ function r_main_suffix () : boolean
+ {
+ var among_var : int;
+ var v_1 : int;
+ var v_2 : int;
+ // (, line 40
+ // setlimit, line 41
+ v_1 = this.limit - this.cursor;
+ // tomark, line 41
+ if (this.cursor < this.I_p1)
+ {
+ return false;
+ }
+ this.cursor = this.I_p1;
+ v_2 = this.limit_backward;
+ this.limit_backward = this.cursor;
+ this.cursor = this.limit - v_1;
+ // (, line 41
+ // [, line 41
+ this.ket = this.cursor;
+ // substring, line 41
+ among_var = this.find_among_b(DanishStemmer.a_0, 32);
+ if (among_var == 0)
+ {
+ this.limit_backward = v_2;
+ return false;
+ }
+ // ], line 41
+ this.bra = this.cursor;
+ this.limit_backward = v_2;
+ switch (among_var) {
+ case 0:
+ return false;
+ case 1:
+ // (, line 48
+ // delete, line 48
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 2:
+ // (, line 50
+ if (!(this.in_grouping_b(DanishStemmer.g_s_ending, 97, 229)))
+ {
+ return false;
+ }
+ // delete, line 50
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ }
+ return true;
+ }
+
+ function r_consonant_pair () : boolean
+ {
+ var v_1 : int;
+ var v_2 : int;
+ var v_3 : int;
+ // (, line 54
+ // test, line 55
+ v_1 = this.limit - this.cursor;
+ // (, line 55
+ // setlimit, line 56
+ v_2 = this.limit - this.cursor;
+ // tomark, line 56
+ if (this.cursor < this.I_p1)
+ {
+ return false;
+ }
+ this.cursor = this.I_p1;
+ v_3 = this.limit_backward;
+ this.limit_backward = this.cursor;
+ this.cursor = this.limit - v_2;
+ // (, line 56
+ // [, line 56
+ this.ket = this.cursor;
+ // substring, line 56
+ if (this.find_among_b(DanishStemmer.a_1, 4) == 0)
+ {
+ this.limit_backward = v_3;
+ return false;
+ }
+ // ], line 56
+ this.bra = this.cursor;
+ this.limit_backward = v_3;
+ this.cursor = this.limit - v_1;
+ // next, line 62
+ if (this.cursor <= this.limit_backward)
+ {
+ return false;
+ }
+ this.cursor--;
+ // ], line 62
+ this.bra = this.cursor;
+ // delete, line 62
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_other_suffix () : boolean
+ {
+ var among_var : int;
+ var v_1 : int;
+ var v_2 : int;
+ var v_3 : int;
+ var v_4 : int;
+ // (, line 65
+ // do, line 66
+ v_1 = this.limit - this.cursor;
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ // (, line 66
+ // [, line 66
+ this.ket = this.cursor;
+ // literal, line 66
+ if (!(this.eq_s_b(2, "st")))
+ {
+ break lab0;
+ }
+ // ], line 66
+ this.bra = this.cursor;
+ // literal, line 66
+ if (!(this.eq_s_b(2, "ig")))
+ {
+ break lab0;
+ }
+ // delete, line 66
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ }
+ this.cursor = this.limit - v_1;
+ // setlimit, line 67
+ v_2 = this.limit - this.cursor;
+ // tomark, line 67
+ if (this.cursor < this.I_p1)
+ {
+ return false;
+ }
+ this.cursor = this.I_p1;
+ v_3 = this.limit_backward;
+ this.limit_backward = this.cursor;
+ this.cursor = this.limit - v_2;
+ // (, line 67
+ // [, line 67
+ this.ket = this.cursor;
+ // substring, line 67
+ among_var = this.find_among_b(DanishStemmer.a_2, 5);
+ if (among_var == 0)
+ {
+ this.limit_backward = v_3;
+ return false;
+ }
+ // ], line 67
+ this.bra = this.cursor;
+ this.limit_backward = v_3;
+ switch (among_var) {
+ case 0:
+ return false;
+ case 1:
+ // (, line 70
+ // delete, line 70
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // do, line 70
+ v_4 = this.limit - this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ // call consonant_pair, line 70
+ if (!this.r_consonant_pair())
+ {
+ break lab1;
+ }
+ }
+ this.cursor = this.limit - v_4;
+ break;
+ case 2:
+ // (, line 72
+ // <-, line 72
+ if (!this.slice_from("l\u00F8s"))
+ {
+ return false;
+ }
+ break;
+ }
+ return true;
+ }
+
+ function r_undouble () : boolean
+ {
+ var v_1 : int;
+ var v_2 : int;
+ // (, line 75
+ // setlimit, line 76
+ v_1 = this.limit - this.cursor;
+ // tomark, line 76
+ if (this.cursor < this.I_p1)
+ {
+ return false;
+ }
+ this.cursor = this.I_p1;
+ v_2 = this.limit_backward;
+ this.limit_backward = this.cursor;
+ this.cursor = this.limit - v_1;
+ // (, line 76
+ // [, line 76
+ this.ket = this.cursor;
+ if (!(this.out_grouping_b(DanishStemmer.g_v, 97, 248)))
+ {
+ this.limit_backward = v_2;
+ return false;
+ }
+ // ], line 76
+ this.bra = this.cursor;
+ // -> ch, line 76
+ this.S_ch = this.slice_to(this.S_ch);
+ if (this.S_ch == '')
+ {
+ return false;
+ }
+ this.limit_backward = v_2;
+ // name ch, line 77
+ if (!(this.eq_v_b(this.S_ch)))
+ {
+ return false;
+ }
+ // delete, line 78
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ return true;
+ }
+
+ override function stem () : boolean
+ {
+ var v_1 : int;
+ var v_2 : int;
+ var v_3 : int;
+ var v_4 : int;
+ var v_5 : int;
+ // (, line 82
+ // do, line 84
+ v_1 = this.cursor;
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ // call mark_regions, line 84
+ if (!this.r_mark_regions())
+ {
+ break lab0;
+ }
+ }
+ this.cursor = v_1;
+ // backwards, line 85
+ this.limit_backward = this.cursor; this.cursor = this.limit;
+ // (, line 85
+ // do, line 86
+ v_2 = this.limit - this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ // call main_suffix, line 86
+ if (!this.r_main_suffix())
+ {
+ break lab1;
+ }
+ }
+ this.cursor = this.limit - v_2;
+ // do, line 87
+ v_3 = this.limit - this.cursor;
+ var lab2 = true;
+ lab2: while (lab2 == true)
+ {
+ lab2 = false;
+ // call consonant_pair, line 87
+ if (!this.r_consonant_pair())
+ {
+ break lab2;
+ }
+ }
+ this.cursor = this.limit - v_3;
+ // do, line 88
+ v_4 = this.limit - this.cursor;
+ var lab3 = true;
+ lab3: while (lab3 == true)
+ {
+ lab3 = false;
+ // call other_suffix, line 88
+ if (!this.r_other_suffix())
+ {
+ break lab3;
+ }
+ }
+ this.cursor = this.limit - v_4;
+ // do, line 89
+ v_5 = this.limit - this.cursor;
+ var lab4 = true;
+ lab4: while (lab4 == true)
+ {
+ lab4 = false;
+ // call undouble, line 89
+ if (!this.r_undouble())
+ {
+ break lab4;
+ }
+ }
+ this.cursor = this.limit - v_5;
+ this.cursor = this.limit_backward; return true;
+ }
+
+ function equals (o : variant) : boolean {
+ return o instanceof DanishStemmer;
+ }
+
+ function hashCode() : int
+ {
+ //http://stackoverflow.com/questions/194846/is-there-any-kind-of-hashcode-function-in-javascript
+ var classname = "DanishStemmer";
+ var hash = 0;
+ if (classname.length == 0) return hash;
+ for (var i = 0; i < classname.length; i++) {
+ var char = classname.charCodeAt(i);
+ hash = ((hash << 5) - hash) + char;
+ hash = hash & hash; // Convert to 32bit integer
+ }
+ return hash;
+ }
+
+}
+
diff --git a/web/server/h2o/libh2o/misc/oktavia/src/stemmer/dutch-stemmer.jsx b/web/server/h2o/libh2o/misc/oktavia/src/stemmer/dutch-stemmer.jsx
new file mode 100644
index 00000000..a8c45d2f
--- /dev/null
+++ b/web/server/h2o/libh2o/misc/oktavia/src/stemmer/dutch-stemmer.jsx
@@ -0,0 +1,1020 @@
+// This file was generated automatically by the Snowball to JSX compiler
+
+import "base-stemmer.jsx";
+import "among.jsx";
+
+ /**
+ * This class was automatically generated by a Snowball to JSX compiler
+ * It implements the stemming algorithm defined by a snowball script.
+ */
+
+class DutchStemmer extends BaseStemmer
+{
+ static const serialVersionUID = 1;
+ static const methodObject = new DutchStemmer();
+
+ static const a_0 = [
+ 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)
+ ];
+
+ static const a_1 = [
+ new Among("", -1, 3),
+ new Among("I", 0, 2),
+ new Among("Y", 0, 1)
+ ];
+
+ static const a_2 = [
+ new Among("dd", -1, -1),
+ new Among("kk", -1, -1),
+ new Among("tt", -1, -1)
+ ];
+
+ static const a_3 = [
+ 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)
+ ];
+
+ static const a_4 = [
+ 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)
+ ];
+
+ static const a_5 = [
+ new Among("aa", -1, -1),
+ new Among("ee", -1, -1),
+ new Among("oo", -1, -1),
+ new Among("uu", -1, -1)
+ ];
+
+ static const g_v = [17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128] : int[];
+
+ static const g_v_I = [1, 0, 0, 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128] : int[];
+
+ static const g_v_j = [17, 67, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128] : int[];
+
+ var I_p2 : int = 0;
+ var I_p1 : int = 0;
+ var B_e_found : boolean = false;
+
+ function copy_from (other : DutchStemmer) : void
+ {
+ this.I_p2 = other.I_p2;
+ this.I_p1 = other.I_p1;
+ this.B_e_found = other.B_e_found;
+ super.copy_from(other);
+ }
+
+ function r_prelude () : boolean
+ {
+ var among_var : int;
+ var v_1 : int;
+ var v_2 : int;
+ var v_3 : int;
+ var v_4 : int;
+ var v_5 : int;
+ var v_6 : int;
+ // (, line 41
+ // test, line 42
+ v_1 = this.cursor;
+ // repeat, line 42
+ replab0: while(true)
+ {
+ v_2 = this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ // (, line 42
+ // [, line 43
+ this.bra = this.cursor;
+ // substring, line 43
+ among_var = this.find_among(DutchStemmer.a_0, 11);
+ if (among_var == 0)
+ {
+ break lab1;
+ }
+ // ], line 43
+ this.ket = this.cursor;
+ switch (among_var) {
+ case 0:
+ break lab1;
+ case 1:
+ // (, line 45
+ // <-, line 45
+ if (!this.slice_from("a"))
+ {
+ return false;
+ }
+ break;
+ case 2:
+ // (, line 47
+ // <-, line 47
+ if (!this.slice_from("e"))
+ {
+ return false;
+ }
+ break;
+ case 3:
+ // (, line 49
+ // <-, line 49
+ if (!this.slice_from("i"))
+ {
+ return false;
+ }
+ break;
+ case 4:
+ // (, line 51
+ // <-, line 51
+ if (!this.slice_from("o"))
+ {
+ return false;
+ }
+ break;
+ case 5:
+ // (, line 53
+ // <-, line 53
+ if (!this.slice_from("u"))
+ {
+ return false;
+ }
+ break;
+ case 6:
+ // (, line 54
+ // next, line 54
+ if (this.cursor >= this.limit)
+ {
+ break lab1;
+ }
+ this.cursor++;
+ break;
+ }
+ continue replab0;
+ }
+ this.cursor = v_2;
+ break replab0;
+ }
+ this.cursor = v_1;
+ // try, line 57
+ v_3 = this.cursor;
+ var lab2 = true;
+ lab2: while (lab2 == true)
+ {
+ lab2 = false;
+ // (, line 57
+ // [, line 57
+ this.bra = this.cursor;
+ // literal, line 57
+ if (!(this.eq_s(1, "y")))
+ {
+ this.cursor = v_3;
+ break lab2;
+ }
+ // ], line 57
+ this.ket = this.cursor;
+ // <-, line 57
+ if (!this.slice_from("Y"))
+ {
+ return false;
+ }
+ }
+ // repeat, line 58
+ replab3: while(true)
+ {
+ v_4 = this.cursor;
+ var lab4 = true;
+ lab4: while (lab4 == true)
+ {
+ lab4 = false;
+ // goto, line 58
+ golab5: while(true)
+ {
+ v_5 = this.cursor;
+ var lab6 = true;
+ lab6: while (lab6 == true)
+ {
+ lab6 = false;
+ // (, line 58
+ if (!(this.in_grouping(DutchStemmer.g_v, 97, 232)))
+ {
+ break lab6;
+ }
+ // [, line 59
+ this.bra = this.cursor;
+ // or, line 59
+ var lab7 = true;
+ lab7: while (lab7 == true)
+ {
+ lab7 = false;
+ v_6 = this.cursor;
+ var lab8 = true;
+ lab8: while (lab8 == true)
+ {
+ lab8 = false;
+ // (, line 59
+ // literal, line 59
+ if (!(this.eq_s(1, "i")))
+ {
+ break lab8;
+ }
+ // ], line 59
+ this.ket = this.cursor;
+ if (!(this.in_grouping(DutchStemmer.g_v, 97, 232)))
+ {
+ break lab8;
+ }
+ // <-, line 59
+ if (!this.slice_from("I"))
+ {
+ return false;
+ }
+ break lab7;
+ }
+ this.cursor = v_6;
+ // (, line 60
+ // literal, line 60
+ if (!(this.eq_s(1, "y")))
+ {
+ break lab6;
+ }
+ // ], line 60
+ this.ket = this.cursor;
+ // <-, line 60
+ if (!this.slice_from("Y"))
+ {
+ return false;
+ }
+ }
+ this.cursor = v_5;
+ break golab5;
+ }
+ this.cursor = v_5;
+ if (this.cursor >= this.limit)
+ {
+ break lab4;
+ }
+ this.cursor++;
+ }
+ continue replab3;
+ }
+ this.cursor = v_4;
+ break replab3;
+ }
+ return true;
+ }
+
+ function r_mark_regions () : boolean
+ {
+ // (, line 64
+ this.I_p1 = this.limit;
+ this.I_p2 = this.limit;
+ // gopast, line 69
+ golab0: while(true)
+ {
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ if (!(this.in_grouping(DutchStemmer.g_v, 97, 232)))
+ {
+ break lab1;
+ }
+ break golab0;
+ }
+ if (this.cursor >= this.limit)
+ {
+ return false;
+ }
+ this.cursor++;
+ }
+ // gopast, line 69
+ golab2: while(true)
+ {
+ var lab3 = true;
+ lab3: while (lab3 == true)
+ {
+ lab3 = false;
+ if (!(this.out_grouping(DutchStemmer.g_v, 97, 232)))
+ {
+ break lab3;
+ }
+ break golab2;
+ }
+ if (this.cursor >= this.limit)
+ {
+ return false;
+ }
+ this.cursor++;
+ }
+ // setmark p1, line 69
+ this.I_p1 = this.cursor;
+ // try, line 70
+ var lab4 = true;
+ lab4: while (lab4 == true)
+ {
+ lab4 = false;
+ // (, line 70
+ if (!(this.I_p1 < 3))
+ {
+ break lab4;
+ }
+ this.I_p1 = 3;
+ }
+ // gopast, line 71
+ golab5: while(true)
+ {
+ var lab6 = true;
+ lab6: while (lab6 == true)
+ {
+ lab6 = false;
+ if (!(this.in_grouping(DutchStemmer.g_v, 97, 232)))
+ {
+ break lab6;
+ }
+ break golab5;
+ }
+ if (this.cursor >= this.limit)
+ {
+ return false;
+ }
+ this.cursor++;
+ }
+ // gopast, line 71
+ golab7: while(true)
+ {
+ var lab8 = true;
+ lab8: while (lab8 == true)
+ {
+ lab8 = false;
+ if (!(this.out_grouping(DutchStemmer.g_v, 97, 232)))
+ {
+ break lab8;
+ }
+ break golab7;
+ }
+ if (this.cursor >= this.limit)
+ {
+ return false;
+ }
+ this.cursor++;
+ }
+ // setmark p2, line 71
+ this.I_p2 = this.cursor;
+ return true;
+ }
+
+ function r_postlude () : boolean
+ {
+ var among_var : int;
+ var v_1 : int;
+ // repeat, line 75
+ replab0: while(true)
+ {
+ v_1 = this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ // (, line 75
+ // [, line 77
+ this.bra = this.cursor;
+ // substring, line 77
+ among_var = this.find_among(DutchStemmer.a_1, 3);
+ if (among_var == 0)
+ {
+ break lab1;
+ }
+ // ], line 77
+ this.ket = this.cursor;
+ switch (among_var) {
+ case 0:
+ break lab1;
+ case 1:
+ // (, line 78
+ // <-, line 78
+ if (!this.slice_from("y"))
+ {
+ return false;
+ }
+ break;
+ case 2:
+ // (, line 79
+ // <-, line 79
+ if (!this.slice_from("i"))
+ {
+ return false;
+ }
+ break;
+ case 3:
+ // (, line 80
+ // next, line 80
+ if (this.cursor >= this.limit)
+ {
+ break lab1;
+ }
+ this.cursor++;
+ break;
+ }
+ continue replab0;
+ }
+ this.cursor = v_1;
+ break replab0;
+ }
+ return true;
+ }
+
+ function r_R1 () : boolean
+ {
+ if (!(this.I_p1 <= this.cursor))
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_R2 () : boolean
+ {
+ if (!(this.I_p2 <= this.cursor))
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_undouble () : boolean
+ {
+ var v_1 : int;
+ // (, line 90
+ // test, line 91
+ v_1 = this.limit - this.cursor;
+ // among, line 91
+ if (this.find_among_b(DutchStemmer.a_2, 3) == 0)
+ {
+ return false;
+ }
+ this.cursor = this.limit - v_1;
+ // [, line 91
+ this.ket = this.cursor;
+ // next, line 91
+ if (this.cursor <= this.limit_backward)
+ {
+ return false;
+ }
+ this.cursor--;
+ // ], line 91
+ this.bra = this.cursor;
+ // delete, line 91
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_e_ending () : boolean
+ {
+ var v_1 : int;
+ // (, line 94
+ // unset e_found, line 95
+ this.B_e_found = false;
+ // [, line 96
+ this.ket = this.cursor;
+ // literal, line 96
+ if (!(this.eq_s_b(1, "e")))
+ {
+ return false;
+ }
+ // ], line 96
+ this.bra = this.cursor;
+ // call R1, line 96
+ if (!this.r_R1())
+ {
+ return false;
+ }
+ // test, line 96
+ v_1 = this.limit - this.cursor;
+ if (!(this.out_grouping_b(DutchStemmer.g_v, 97, 232)))
+ {
+ return false;
+ }
+ this.cursor = this.limit - v_1;
+ // delete, line 96
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // set e_found, line 97
+ this.B_e_found = true;
+ // call undouble, line 98
+ if (!this.r_undouble())
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_en_ending () : boolean
+ {
+ var v_1 : int;
+ var v_2 : int;
+ // (, line 101
+ // call R1, line 102
+ if (!this.r_R1())
+ {
+ return false;
+ }
+ // and, line 102
+ v_1 = this.limit - this.cursor;
+ if (!(this.out_grouping_b(DutchStemmer.g_v, 97, 232)))
+ {
+ return false;
+ }
+ this.cursor = this.limit - v_1;
+ // not, line 102
+ {
+ v_2 = this.limit - this.cursor;
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ // literal, line 102
+ if (!(this.eq_s_b(3, "gem")))
+ {
+ break lab0;
+ }
+ return false;
+ }
+ this.cursor = this.limit - v_2;
+ }
+ // delete, line 102
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // call undouble, line 103
+ if (!this.r_undouble())
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_standard_suffix () : boolean
+ {
+ var among_var : int;
+ var v_1 : int;
+ var v_2 : int;
+ var v_3 : int;
+ var v_4 : int;
+ var v_5 : int;
+ var v_6 : int;
+ var v_7 : int;
+ var v_8 : int;
+ var v_9 : int;
+ var v_10 : int;
+ // (, line 106
+ // do, line 107
+ v_1 = this.limit - this.cursor;
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ // (, line 107
+ // [, line 108
+ this.ket = this.cursor;
+ // substring, line 108
+ among_var = this.find_among_b(DutchStemmer.a_3, 5);
+ if (among_var == 0)
+ {
+ break lab0;
+ }
+ // ], line 108
+ this.bra = this.cursor;
+ switch (among_var) {
+ case 0:
+ break lab0;
+ case 1:
+ // (, line 110
+ // call R1, line 110
+ if (!this.r_R1())
+ {
+ break lab0;
+ }
+ // <-, line 110
+ if (!this.slice_from("heid"))
+ {
+ return false;
+ }
+ break;
+ case 2:
+ // (, line 113
+ // call en_ending, line 113
+ if (!this.r_en_ending())
+ {
+ break lab0;
+ }
+ break;
+ case 3:
+ // (, line 116
+ // call R1, line 116
+ if (!this.r_R1())
+ {
+ break lab0;
+ }
+ if (!(this.out_grouping_b(DutchStemmer.g_v_j, 97, 232)))
+ {
+ break lab0;
+ }
+ // delete, line 116
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ }
+ }
+ this.cursor = this.limit - v_1;
+ // do, line 120
+ v_2 = this.limit - this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ // call e_ending, line 120
+ if (!this.r_e_ending())
+ {
+ break lab1;
+ }
+ }
+ this.cursor = this.limit - v_2;
+ // do, line 122
+ v_3 = this.limit - this.cursor;
+ var lab2 = true;
+ lab2: while (lab2 == true)
+ {
+ lab2 = false;
+ // (, line 122
+ // [, line 122
+ this.ket = this.cursor;
+ // literal, line 122
+ if (!(this.eq_s_b(4, "heid")))
+ {
+ break lab2;
+ }
+ // ], line 122
+ this.bra = this.cursor;
+ // call R2, line 122
+ if (!this.r_R2())
+ {
+ break lab2;
+ }
+ // not, line 122
+ {
+ v_4 = this.limit - this.cursor;
+ var lab3 = true;
+ lab3: while (lab3 == true)
+ {
+ lab3 = false;
+ // literal, line 122
+ if (!(this.eq_s_b(1, "c")))
+ {
+ break lab3;
+ }
+ break lab2;
+ }
+ this.cursor = this.limit - v_4;
+ }
+ // delete, line 122
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // [, line 123
+ this.ket = this.cursor;
+ // literal, line 123
+ if (!(this.eq_s_b(2, "en")))
+ {
+ break lab2;
+ }
+ // ], line 123
+ this.bra = this.cursor;
+ // call en_ending, line 123
+ if (!this.r_en_ending())
+ {
+ break lab2;
+ }
+ }
+ this.cursor = this.limit - v_3;
+ // do, line 126
+ v_5 = this.limit - this.cursor;
+ var lab4 = true;
+ lab4: while (lab4 == true)
+ {
+ lab4 = false;
+ // (, line 126
+ // [, line 127
+ this.ket = this.cursor;
+ // substring, line 127
+ among_var = this.find_among_b(DutchStemmer.a_4, 6);
+ if (among_var == 0)
+ {
+ break lab4;
+ }
+ // ], line 127
+ this.bra = this.cursor;
+ switch (among_var) {
+ case 0:
+ break lab4;
+ case 1:
+ // (, line 129
+ // call R2, line 129
+ if (!this.r_R2())
+ {
+ break lab4;
+ }
+ // delete, line 129
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // or, line 130
+ var lab5 = true;
+ lab5: while (lab5 == true)
+ {
+ lab5 = false;
+ v_6 = this.limit - this.cursor;
+ var lab6 = true;
+ lab6: while (lab6 == true)
+ {
+ lab6 = false;
+ // (, line 130
+ // [, line 130
+ this.ket = this.cursor;
+ // literal, line 130
+ if (!(this.eq_s_b(2, "ig")))
+ {
+ break lab6;
+ }
+ // ], line 130
+ this.bra = this.cursor;
+ // call R2, line 130
+ if (!this.r_R2())
+ {
+ break lab6;
+ }
+ // not, line 130
+ {
+ v_7 = this.limit - this.cursor;
+ var lab7 = true;
+ lab7: while (lab7 == true)
+ {
+ lab7 = false;
+ // literal, line 130
+ if (!(this.eq_s_b(1, "e")))
+ {
+ break lab7;
+ }
+ break lab6;
+ }
+ this.cursor = this.limit - v_7;
+ }
+ // delete, line 130
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break lab5;
+ }
+ this.cursor = this.limit - v_6;
+ // call undouble, line 130
+ if (!this.r_undouble())
+ {
+ break lab4;
+ }
+ }
+ break;
+ case 2:
+ // (, line 133
+ // call R2, line 133
+ if (!this.r_R2())
+ {
+ break lab4;
+ }
+ // not, line 133
+ {
+ v_8 = this.limit - this.cursor;
+ var lab8 = true;
+ lab8: while (lab8 == true)
+ {
+ lab8 = false;
+ // literal, line 133
+ if (!(this.eq_s_b(1, "e")))
+ {
+ break lab8;
+ }
+ break lab4;
+ }
+ this.cursor = this.limit - v_8;
+ }
+ // delete, line 133
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 3:
+ // (, line 136
+ // call R2, line 136
+ if (!this.r_R2())
+ {
+ break lab4;
+ }
+ // delete, line 136
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // call e_ending, line 136
+ if (!this.r_e_ending())
+ {
+ break lab4;
+ }
+ break;
+ case 4:
+ // (, line 139
+ // call R2, line 139
+ if (!this.r_R2())
+ {
+ break lab4;
+ }
+ // delete, line 139
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 5:
+ // (, line 142
+ // call R2, line 142
+ if (!this.r_R2())
+ {
+ break lab4;
+ }
+ // Boolean test e_found, line 142
+ if (!(this.B_e_found))
+ {
+ break lab4;
+ }
+ // delete, line 142
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ }
+ }
+ this.cursor = this.limit - v_5;
+ // do, line 146
+ v_9 = this.limit - this.cursor;
+ var lab9 = true;
+ lab9: while (lab9 == true)
+ {
+ lab9 = false;
+ // (, line 146
+ if (!(this.out_grouping_b(DutchStemmer.g_v_I, 73, 232)))
+ {
+ break lab9;
+ }
+ // test, line 148
+ v_10 = this.limit - this.cursor;
+ // (, line 148
+ // among, line 149
+ if (this.find_among_b(DutchStemmer.a_5, 4) == 0)
+ {
+ break lab9;
+ }
+ if (!(this.out_grouping_b(DutchStemmer.g_v, 97, 232)))
+ {
+ break lab9;
+ }
+ this.cursor = this.limit - v_10;
+ // [, line 152
+ this.ket = this.cursor;
+ // next, line 152
+ if (this.cursor <= this.limit_backward)
+ {
+ break lab9;
+ }
+ this.cursor--;
+ // ], line 152
+ this.bra = this.cursor;
+ // delete, line 152
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ }
+ this.cursor = this.limit - v_9;
+ return true;
+ }
+
+ override function stem () : boolean
+ {
+ var v_1 : int;
+ var v_2 : int;
+ var v_3 : int;
+ var v_4 : int;
+ // (, line 157
+ // do, line 159
+ v_1 = this.cursor;
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ // call prelude, line 159
+ if (!this.r_prelude())
+ {
+ break lab0;
+ }
+ }
+ this.cursor = v_1;
+ // do, line 160
+ v_2 = this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ // call mark_regions, line 160
+ if (!this.r_mark_regions())
+ {
+ break lab1;
+ }
+ }
+ this.cursor = v_2;
+ // backwards, line 161
+ this.limit_backward = this.cursor; this.cursor = this.limit;
+ // do, line 162
+ v_3 = this.limit - this.cursor;
+ var lab2 = true;
+ lab2: while (lab2 == true)
+ {
+ lab2 = false;
+ // call standard_suffix, line 162
+ if (!this.r_standard_suffix())
+ {
+ break lab2;
+ }
+ }
+ this.cursor = this.limit - v_3;
+ this.cursor = this.limit_backward; // do, line 163
+ v_4 = this.cursor;
+ var lab3 = true;
+ lab3: while (lab3 == true)
+ {
+ lab3 = false;
+ // call postlude, line 163
+ if (!this.r_postlude())
+ {
+ break lab3;
+ }
+ }
+ this.cursor = v_4;
+ return true;
+ }
+
+ function equals (o : variant) : boolean {
+ return o instanceof DutchStemmer;
+ }
+
+ function hashCode() : int
+ {
+ //http://stackoverflow.com/questions/194846/is-there-any-kind-of-hashcode-function-in-javascript
+ var classname = "DutchStemmer";
+ var hash = 0;
+ if (classname.length == 0) return hash;
+ for (var i = 0; i < classname.length; i++) {
+ var char = classname.charCodeAt(i);
+ hash = ((hash << 5) - hash) + char;
+ hash = hash & hash; // Convert to 32bit integer
+ }
+ return hash;
+ }
+
+}
+
diff --git a/web/server/h2o/libh2o/misc/oktavia/src/stemmer/english-stemmer.jsx b/web/server/h2o/libh2o/misc/oktavia/src/stemmer/english-stemmer.jsx
new file mode 100644
index 00000000..901c12c8
--- /dev/null
+++ b/web/server/h2o/libh2o/misc/oktavia/src/stemmer/english-stemmer.jsx
@@ -0,0 +1,1638 @@
+// This file was generated automatically by the Snowball to JSX compiler
+
+import "base-stemmer.jsx";
+import "among.jsx";
+
+ /**
+ * This class was automatically generated by a Snowball to JSX compiler
+ * It implements the stemming algorithm defined by a snowball script.
+ */
+
+class EnglishStemmer extends BaseStemmer
+{
+ static const serialVersionUID = 1;
+ static const methodObject = new EnglishStemmer();
+
+ static const a_0 = [
+ new Among("arsen", -1, -1),
+ new Among("commun", -1, -1),
+ new Among("gener", -1, -1)
+ ];
+
+ static const a_1 = [
+ new Among("'", -1, 1),
+ new Among("'s'", 0, 1),
+ new Among("'s", -1, 1)
+ ];
+
+ static const a_2 = [
+ new Among("ied", -1, 2),
+ new Among("s", -1, 3),
+ new Among("ies", 1, 2),
+ new Among("sses", 1, 1),
+ new Among("ss", 1, -1),
+ new Among("us", 1, -1)
+ ];
+
+ static const a_3 = [
+ 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)
+ ];
+
+ static const a_4 = [
+ new Among("ed", -1, 2),
+ new Among("eed", 0, 1),
+ new Among("ing", -1, 2),
+ new Among("edly", -1, 2),
+ new Among("eedly", 3, 1),
+ new Among("ingly", -1, 2)
+ ];
+
+ static const a_5 = [
+ new Among("anci", -1, 3),
+ new Among("enci", -1, 2),
+ new Among("ogi", -1, 13),
+ new Among("li", -1, 16),
+ new Among("bli", 3, 12),
+ new Among("abli", 4, 4),
+ new Among("alli", 3, 8),
+ new Among("fulli", 3, 14),
+ new Among("lessli", 3, 15),
+ new Among("ousli", 3, 10),
+ new Among("entli", 3, 5),
+ new Among("aliti", -1, 8),
+ new Among("biliti", -1, 12),
+ new Among("iviti", -1, 11),
+ new Among("tional", -1, 1),
+ new Among("ational", 14, 7),
+ new Among("alism", -1, 8),
+ new Among("ation", -1, 7),
+ new Among("ization", 17, 6),
+ new Among("izer", -1, 6),
+ new Among("ator", -1, 7),
+ new Among("iveness", -1, 11),
+ new Among("fulness", -1, 9),
+ new Among("ousness", -1, 10)
+ ];
+
+ static const a_6 = [
+ new Among("icate", -1, 4),
+ new Among("ative", -1, 6),
+ new Among("alize", -1, 3),
+ new Among("iciti", -1, 4),
+ new Among("ical", -1, 4),
+ new Among("tional", -1, 1),
+ new Among("ational", 5, 2),
+ new Among("ful", -1, 5),
+ new Among("ness", -1, 5)
+ ];
+
+ static const a_7 = [
+ 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)
+ ];
+
+ static const a_8 = [
+ new Among("e", -1, 1),
+ new Among("l", -1, 2)
+ ];
+
+ static const a_9 = [
+ new Among("succeed", -1, -1),
+ new Among("proceed", -1, -1),
+ new Among("exceed", -1, -1),
+ new Among("canning", -1, -1),
+ new Among("inning", -1, -1),
+ new Among("earring", -1, -1),
+ new Among("herring", -1, -1),
+ new Among("outing", -1, -1)
+ ];
+
+ static const a_10 = [
+ new Among("andes", -1, -1),
+ new Among("atlas", -1, -1),
+ new Among("bias", -1, -1),
+ new Among("cosmos", -1, -1),
+ new Among("dying", -1, 3),
+ new Among("early", -1, 9),
+ new Among("gently", -1, 7),
+ new Among("howe", -1, -1),
+ new Among("idly", -1, 6),
+ new Among("lying", -1, 4),
+ new Among("news", -1, -1),
+ new Among("only", -1, 10),
+ new Among("singly", -1, 11),
+ new Among("skies", -1, 2),
+ new Among("skis", -1, 1),
+ new Among("sky", -1, -1),
+ new Among("tying", -1, 5),
+ new Among("ugly", -1, 8)
+ ];
+
+ static const g_v = [17, 65, 16, 1] : int[];
+
+ static const g_v_WXY = [1, 17, 65, 208, 1] : int[];
+
+ static const g_valid_LI = [55, 141, 2] : int[];
+
+ var B_Y_found : boolean = false;
+ var I_p2 : int = 0;
+ var I_p1 : int = 0;
+
+ function copy_from (other : EnglishStemmer) : void
+ {
+ this.B_Y_found = other.B_Y_found;
+ this.I_p2 = other.I_p2;
+ this.I_p1 = other.I_p1;
+ super.copy_from(other);
+ }
+
+ function r_prelude () : boolean
+ {
+ var v_1 : int;
+ var v_2 : int;
+ var v_3 : int;
+ var v_4 : int;
+ var v_5 : int;
+ // (, line 25
+ // unset Y_found, line 26
+ this.B_Y_found = false;
+ // do, line 27
+ v_1 = this.cursor;
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ // (, line 27
+ // [, line 27
+ this.bra = this.cursor;
+ // literal, line 27
+ if (!(this.eq_s(1, "'")))
+ {
+ break lab0;
+ }
+ // ], line 27
+ this.ket = this.cursor;
+ // delete, line 27
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ }
+ this.cursor = v_1;
+ // do, line 28
+ v_2 = this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ // (, line 28
+ // [, line 28
+ this.bra = this.cursor;
+ // literal, line 28
+ if (!(this.eq_s(1, "y")))
+ {
+ break lab1;
+ }
+ // ], line 28
+ this.ket = this.cursor;
+ // <-, line 28
+ if (!this.slice_from("Y"))
+ {
+ return false;
+ }
+ // set Y_found, line 28
+ this.B_Y_found = true;
+ }
+ this.cursor = v_2;
+ // do, line 29
+ v_3 = this.cursor;
+ var lab2 = true;
+ lab2: while (lab2 == true)
+ {
+ lab2 = false;
+ // repeat, line 29
+ replab3: while(true)
+ {
+ v_4 = this.cursor;
+ var lab4 = true;
+ lab4: while (lab4 == true)
+ {
+ lab4 = false;
+ // (, line 29
+ // goto, line 29
+ golab5: while(true)
+ {
+ v_5 = this.cursor;
+ var lab6 = true;
+ lab6: while (lab6 == true)
+ {
+ lab6 = false;
+ // (, line 29
+ if (!(this.in_grouping(EnglishStemmer.g_v, 97, 121)))
+ {
+ break lab6;
+ }
+ // [, line 29
+ this.bra = this.cursor;
+ // literal, line 29
+ if (!(this.eq_s(1, "y")))
+ {
+ break lab6;
+ }
+ // ], line 29
+ this.ket = this.cursor;
+ this.cursor = v_5;
+ break golab5;
+ }
+ this.cursor = v_5;
+ if (this.cursor >= this.limit)
+ {
+ break lab4;
+ }
+ this.cursor++;
+ }
+ // <-, line 29
+ if (!this.slice_from("Y"))
+ {
+ return false;
+ }
+ // set Y_found, line 29
+ this.B_Y_found = true;
+ continue replab3;
+ }
+ this.cursor = v_4;
+ break replab3;
+ }
+ }
+ this.cursor = v_3;
+ return true;
+ }
+
+ function r_mark_regions () : boolean
+ {
+ var v_1 : int;
+ var v_2 : int;
+ // (, line 32
+ this.I_p1 = this.limit;
+ this.I_p2 = this.limit;
+ // do, line 35
+ v_1 = this.cursor;
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ // (, line 35
+ // or, line 41
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ v_2 = this.cursor;
+ var lab2 = true;
+ lab2: while (lab2 == true)
+ {
+ lab2 = false;
+ // among, line 36
+ if (this.find_among(EnglishStemmer.a_0, 3) == 0)
+ {
+ break lab2;
+ }
+ break lab1;
+ }
+ this.cursor = v_2;
+ // (, line 41
+ // gopast, line 41
+ golab3: while(true)
+ {
+ var lab4 = true;
+ lab4: while (lab4 == true)
+ {
+ lab4 = false;
+ if (!(this.in_grouping(EnglishStemmer.g_v, 97, 121)))
+ {
+ break lab4;
+ }
+ break golab3;
+ }
+ if (this.cursor >= this.limit)
+ {
+ break lab0;
+ }
+ this.cursor++;
+ }
+ // gopast, line 41
+ golab5: while(true)
+ {
+ var lab6 = true;
+ lab6: while (lab6 == true)
+ {
+ lab6 = false;
+ if (!(this.out_grouping(EnglishStemmer.g_v, 97, 121)))
+ {
+ break lab6;
+ }
+ break golab5;
+ }
+ if (this.cursor >= this.limit)
+ {
+ break lab0;
+ }
+ this.cursor++;
+ }
+ }
+ // setmark p1, line 42
+ this.I_p1 = this.cursor;
+ // gopast, line 43
+ golab7: while(true)
+ {
+ var lab8 = true;
+ lab8: while (lab8 == true)
+ {
+ lab8 = false;
+ if (!(this.in_grouping(EnglishStemmer.g_v, 97, 121)))
+ {
+ break lab8;
+ }
+ break golab7;
+ }
+ if (this.cursor >= this.limit)
+ {
+ break lab0;
+ }
+ this.cursor++;
+ }
+ // gopast, line 43
+ golab9: while(true)
+ {
+ var lab10 = true;
+ lab10: while (lab10 == true)
+ {
+ lab10 = false;
+ if (!(this.out_grouping(EnglishStemmer.g_v, 97, 121)))
+ {
+ break lab10;
+ }
+ break golab9;
+ }
+ if (this.cursor >= this.limit)
+ {
+ break lab0;
+ }
+ this.cursor++;
+ }
+ // setmark p2, line 43
+ this.I_p2 = this.cursor;
+ }
+ this.cursor = v_1;
+ return true;
+ }
+
+ function r_shortv () : boolean
+ {
+ var v_1 : int;
+ // (, line 49
+ // or, line 51
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ v_1 = this.limit - this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ // (, line 50
+ if (!(this.out_grouping_b(EnglishStemmer.g_v_WXY, 89, 121)))
+ {
+ break lab1;
+ }
+ if (!(this.in_grouping_b(EnglishStemmer.g_v, 97, 121)))
+ {
+ break lab1;
+ }
+ if (!(this.out_grouping_b(EnglishStemmer.g_v, 97, 121)))
+ {
+ break lab1;
+ }
+ break lab0;
+ }
+ this.cursor = this.limit - v_1;
+ // (, line 52
+ if (!(this.out_grouping_b(EnglishStemmer.g_v, 97, 121)))
+ {
+ return false;
+ }
+ if (!(this.in_grouping_b(EnglishStemmer.g_v, 97, 121)))
+ {
+ return false;
+ }
+ // atlimit, line 52
+ if (this.cursor > this.limit_backward)
+ {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ function r_R1 () : boolean
+ {
+ if (!(this.I_p1 <= this.cursor))
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_R2 () : boolean
+ {
+ if (!(this.I_p2 <= this.cursor))
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_Step_1a () : boolean
+ {
+ var among_var : int;
+ var v_1 : int;
+ var v_2 : int;
+ // (, line 58
+ // try, line 59
+ v_1 = this.limit - this.cursor;
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ // (, line 59
+ // [, line 60
+ this.ket = this.cursor;
+ // substring, line 60
+ among_var = this.find_among_b(EnglishStemmer.a_1, 3);
+ if (among_var == 0)
+ {
+ this.cursor = this.limit - v_1;
+ break lab0;
+ }
+ // ], line 60
+ this.bra = this.cursor;
+ switch (among_var) {
+ case 0:
+ this.cursor = this.limit - v_1;
+ break lab0;
+ case 1:
+ // (, line 62
+ // delete, line 62
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ }
+ }
+ // [, line 65
+ this.ket = this.cursor;
+ // substring, line 65
+ among_var = this.find_among_b(EnglishStemmer.a_2, 6);
+ if (among_var == 0)
+ {
+ return false;
+ }
+ // ], line 65
+ this.bra = this.cursor;
+ switch (among_var) {
+ case 0:
+ return false;
+ case 1:
+ // (, line 66
+ // <-, line 66
+ if (!this.slice_from("ss"))
+ {
+ return false;
+ }
+ break;
+ case 2:
+ // (, line 68
+ // or, line 68
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ v_2 = this.limit - this.cursor;
+ var lab2 = true;
+ lab2: while (lab2 == true)
+ {
+ lab2 = false;
+ // (, line 68
+ // hop, line 68
+ {
+ var c : int = this.cursor - 2;
+ if (this.limit_backward > c || c > this.limit)
+ {
+ break lab2;
+ }
+ this.cursor = c;
+ }
+ // <-, line 68
+ if (!this.slice_from("i"))
+ {
+ return false;
+ }
+ break lab1;
+ }
+ this.cursor = this.limit - v_2;
+ // <-, line 68
+ if (!this.slice_from("ie"))
+ {
+ return false;
+ }
+ }
+ break;
+ case 3:
+ // (, line 69
+ // next, line 69
+ if (this.cursor <= this.limit_backward)
+ {
+ return false;
+ }
+ this.cursor--;
+ // gopast, line 69
+ golab3: while(true)
+ {
+ var lab4 = true;
+ lab4: while (lab4 == true)
+ {
+ lab4 = false;
+ if (!(this.in_grouping_b(EnglishStemmer.g_v, 97, 121)))
+ {
+ break lab4;
+ }
+ break golab3;
+ }
+ if (this.cursor <= this.limit_backward)
+ {
+ return false;
+ }
+ this.cursor--;
+ }
+ // delete, line 69
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ }
+ return true;
+ }
+
+ function r_Step_1b () : boolean
+ {
+ var among_var : int;
+ var v_1 : int;
+ var v_3 : int;
+ var v_4 : int;
+ // (, line 74
+ // [, line 75
+ this.ket = this.cursor;
+ // substring, line 75
+ among_var = this.find_among_b(EnglishStemmer.a_4, 6);
+ if (among_var == 0)
+ {
+ return false;
+ }
+ // ], line 75
+ this.bra = this.cursor;
+ switch (among_var) {
+ case 0:
+ return false;
+ case 1:
+ // (, line 77
+ // call R1, line 77
+ if (!this.r_R1())
+ {
+ return false;
+ }
+ // <-, line 77
+ if (!this.slice_from("ee"))
+ {
+ return false;
+ }
+ break;
+ case 2:
+ // (, line 79
+ // test, line 80
+ v_1 = this.limit - this.cursor;
+ // gopast, line 80
+ golab0: while(true)
+ {
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ if (!(this.in_grouping_b(EnglishStemmer.g_v, 97, 121)))
+ {
+ break lab1;
+ }
+ break golab0;
+ }
+ if (this.cursor <= this.limit_backward)
+ {
+ return false;
+ }
+ this.cursor--;
+ }
+ this.cursor = this.limit - v_1;
+ // delete, line 80
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // test, line 81
+ v_3 = this.limit - this.cursor;
+ // substring, line 81
+ among_var = this.find_among_b(EnglishStemmer.a_3, 13);
+ if (among_var == 0)
+ {
+ return false;
+ }
+ this.cursor = this.limit - v_3;
+ switch (among_var) {
+ case 0:
+ return false;
+ case 1:
+ // (, line 83
+ // <+, line 83
+ {
+ var c : int = this.cursor;
+ this.insert(this.cursor, this.cursor, "e");
+ this.cursor = c;
+ }
+ break;
+ case 2:
+ // (, line 86
+ // [, line 86
+ this.ket = this.cursor;
+ // next, line 86
+ if (this.cursor <= this.limit_backward)
+ {
+ return false;
+ }
+ this.cursor--;
+ // ], line 86
+ this.bra = this.cursor;
+ // delete, line 86
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 3:
+ // (, line 87
+ // atmark, line 87
+ if (this.cursor != this.I_p1)
+ {
+ return false;
+ }
+ // test, line 87
+ v_4 = this.limit - this.cursor;
+ // call shortv, line 87
+ if (!this.r_shortv())
+ {
+ return false;
+ }
+ this.cursor = this.limit - v_4;
+ // <+, line 87
+ {
+ var c : int = this.cursor;
+ this.insert(this.cursor, this.cursor, "e");
+ this.cursor = c;
+ }
+ break;
+ }
+ break;
+ }
+ return true;
+ }
+
+ function r_Step_1c () : boolean
+ {
+ var v_1 : int;
+ var v_2 : int;
+ // (, line 93
+ // [, line 94
+ this.ket = this.cursor;
+ // or, line 94
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ v_1 = this.limit - this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ // literal, line 94
+ if (!(this.eq_s_b(1, "y")))
+ {
+ break lab1;
+ }
+ break lab0;
+ }
+ this.cursor = this.limit - v_1;
+ // literal, line 94
+ if (!(this.eq_s_b(1, "Y")))
+ {
+ return false;
+ }
+ }
+ // ], line 94
+ this.bra = this.cursor;
+ if (!(this.out_grouping_b(EnglishStemmer.g_v, 97, 121)))
+ {
+ return false;
+ }
+ // not, line 95
+ {
+ v_2 = this.limit - this.cursor;
+ var lab2 = true;
+ lab2: while (lab2 == true)
+ {
+ lab2 = false;
+ // atlimit, line 95
+ if (this.cursor > this.limit_backward)
+ {
+ break lab2;
+ }
+ return false;
+ }
+ this.cursor = this.limit - v_2;
+ }
+ // <-, line 96
+ if (!this.slice_from("i"))
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_Step_2 () : boolean
+ {
+ var among_var : int;
+ // (, line 99
+ // [, line 100
+ this.ket = this.cursor;
+ // substring, line 100
+ among_var = this.find_among_b(EnglishStemmer.a_5, 24);
+ if (among_var == 0)
+ {
+ return false;
+ }
+ // ], line 100
+ this.bra = this.cursor;
+ // call R1, line 100
+ if (!this.r_R1())
+ {
+ return false;
+ }
+ switch (among_var) {
+ case 0:
+ return false;
+ case 1:
+ // (, line 101
+ // <-, line 101
+ if (!this.slice_from("tion"))
+ {
+ return false;
+ }
+ break;
+ case 2:
+ // (, line 102
+ // <-, line 102
+ if (!this.slice_from("ence"))
+ {
+ return false;
+ }
+ break;
+ case 3:
+ // (, line 103
+ // <-, line 103
+ if (!this.slice_from("ance"))
+ {
+ return false;
+ }
+ break;
+ case 4:
+ // (, line 104
+ // <-, line 104
+ if (!this.slice_from("able"))
+ {
+ return false;
+ }
+ break;
+ case 5:
+ // (, line 105
+ // <-, line 105
+ if (!this.slice_from("ent"))
+ {
+ return false;
+ }
+ break;
+ case 6:
+ // (, line 107
+ // <-, line 107
+ if (!this.slice_from("ize"))
+ {
+ return false;
+ }
+ break;
+ case 7:
+ // (, line 109
+ // <-, line 109
+ if (!this.slice_from("ate"))
+ {
+ return false;
+ }
+ break;
+ case 8:
+ // (, line 111
+ // <-, line 111
+ if (!this.slice_from("al"))
+ {
+ return false;
+ }
+ break;
+ case 9:
+ // (, line 112
+ // <-, line 112
+ if (!this.slice_from("ful"))
+ {
+ return false;
+ }
+ break;
+ case 10:
+ // (, line 114
+ // <-, line 114
+ if (!this.slice_from("ous"))
+ {
+ return false;
+ }
+ break;
+ case 11:
+ // (, line 116
+ // <-, line 116
+ if (!this.slice_from("ive"))
+ {
+ return false;
+ }
+ break;
+ case 12:
+ // (, line 118
+ // <-, line 118
+ if (!this.slice_from("ble"))
+ {
+ return false;
+ }
+ break;
+ case 13:
+ // (, line 119
+ // literal, line 119
+ if (!(this.eq_s_b(1, "l")))
+ {
+ return false;
+ }
+ // <-, line 119
+ if (!this.slice_from("og"))
+ {
+ return false;
+ }
+ break;
+ case 14:
+ // (, line 120
+ // <-, line 120
+ if (!this.slice_from("ful"))
+ {
+ return false;
+ }
+ break;
+ case 15:
+ // (, line 121
+ // <-, line 121
+ if (!this.slice_from("less"))
+ {
+ return false;
+ }
+ break;
+ case 16:
+ // (, line 122
+ if (!(this.in_grouping_b(EnglishStemmer.g_valid_LI, 99, 116)))
+ {
+ return false;
+ }
+ // delete, line 122
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ }
+ return true;
+ }
+
+ function r_Step_3 () : boolean
+ {
+ var among_var : int;
+ // (, line 126
+ // [, line 127
+ this.ket = this.cursor;
+ // substring, line 127
+ among_var = this.find_among_b(EnglishStemmer.a_6, 9);
+ if (among_var == 0)
+ {
+ return false;
+ }
+ // ], line 127
+ this.bra = this.cursor;
+ // call R1, line 127
+ if (!this.r_R1())
+ {
+ return false;
+ }
+ switch (among_var) {
+ case 0:
+ return false;
+ case 1:
+ // (, line 128
+ // <-, line 128
+ if (!this.slice_from("tion"))
+ {
+ return false;
+ }
+ break;
+ case 2:
+ // (, line 129
+ // <-, line 129
+ if (!this.slice_from("ate"))
+ {
+ return false;
+ }
+ break;
+ case 3:
+ // (, line 130
+ // <-, line 130
+ if (!this.slice_from("al"))
+ {
+ return false;
+ }
+ break;
+ case 4:
+ // (, line 132
+ // <-, line 132
+ if (!this.slice_from("ic"))
+ {
+ return false;
+ }
+ break;
+ case 5:
+ // (, line 134
+ // delete, line 134
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 6:
+ // (, line 136
+ // call R2, line 136
+ if (!this.r_R2())
+ {
+ return false;
+ }
+ // delete, line 136
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ }
+ return true;
+ }
+
+ function r_Step_4 () : boolean
+ {
+ var among_var : int;
+ var v_1 : int;
+ // (, line 140
+ // [, line 141
+ this.ket = this.cursor;
+ // substring, line 141
+ among_var = this.find_among_b(EnglishStemmer.a_7, 18);
+ if (among_var == 0)
+ {
+ return false;
+ }
+ // ], line 141
+ this.bra = this.cursor;
+ // call R2, line 141
+ if (!this.r_R2())
+ {
+ return false;
+ }
+ switch (among_var) {
+ case 0:
+ return false;
+ case 1:
+ // (, line 144
+ // delete, line 144
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 2:
+ // (, line 145
+ // or, line 145
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ v_1 = this.limit - this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ // literal, line 145
+ if (!(this.eq_s_b(1, "s")))
+ {
+ break lab1;
+ }
+ break lab0;
+ }
+ this.cursor = this.limit - v_1;
+ // literal, line 145
+ if (!(this.eq_s_b(1, "t")))
+ {
+ return false;
+ }
+ }
+ // delete, line 145
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ }
+ return true;
+ }
+
+ function r_Step_5 () : boolean
+ {
+ var among_var : int;
+ var v_1 : int;
+ var v_2 : int;
+ // (, line 149
+ // [, line 150
+ this.ket = this.cursor;
+ // substring, line 150
+ among_var = this.find_among_b(EnglishStemmer.a_8, 2);
+ if (among_var == 0)
+ {
+ return false;
+ }
+ // ], line 150
+ this.bra = this.cursor;
+ switch (among_var) {
+ case 0:
+ return false;
+ case 1:
+ // (, line 151
+ // or, line 151
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ v_1 = this.limit - this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ // call R2, line 151
+ if (!this.r_R2())
+ {
+ break lab1;
+ }
+ break lab0;
+ }
+ this.cursor = this.limit - v_1;
+ // (, line 151
+ // call R1, line 151
+ if (!this.r_R1())
+ {
+ return false;
+ }
+ // not, line 151
+ {
+ v_2 = this.limit - this.cursor;
+ var lab2 = true;
+ lab2: while (lab2 == true)
+ {
+ lab2 = false;
+ // call shortv, line 151
+ if (!this.r_shortv())
+ {
+ break lab2;
+ }
+ return false;
+ }
+ this.cursor = this.limit - v_2;
+ }
+ }
+ // delete, line 151
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 2:
+ // (, line 152
+ // call R2, line 152
+ if (!this.r_R2())
+ {
+ return false;
+ }
+ // literal, line 152
+ if (!(this.eq_s_b(1, "l")))
+ {
+ return false;
+ }
+ // delete, line 152
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ }
+ return true;
+ }
+
+ function r_exception2 () : boolean
+ {
+ // (, line 156
+ // [, line 158
+ this.ket = this.cursor;
+ // substring, line 158
+ if (this.find_among_b(EnglishStemmer.a_9, 8) == 0)
+ {
+ return false;
+ }
+ // ], line 158
+ this.bra = this.cursor;
+ // atlimit, line 158
+ if (this.cursor > this.limit_backward)
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_exception1 () : boolean
+ {
+ var among_var : int;
+ // (, line 168
+ // [, line 170
+ this.bra = this.cursor;
+ // substring, line 170
+ among_var = this.find_among(EnglishStemmer.a_10, 18);
+ if (among_var == 0)
+ {
+ return false;
+ }
+ // ], line 170
+ this.ket = this.cursor;
+ // atlimit, line 170
+ if (this.cursor < this.limit)
+ {
+ return false;
+ }
+ switch (among_var) {
+ case 0:
+ return false;
+ case 1:
+ // (, line 174
+ // <-, line 174
+ if (!this.slice_from("ski"))
+ {
+ return false;
+ }
+ break;
+ case 2:
+ // (, line 175
+ // <-, line 175
+ if (!this.slice_from("sky"))
+ {
+ return false;
+ }
+ break;
+ case 3:
+ // (, line 176
+ // <-, line 176
+ if (!this.slice_from("die"))
+ {
+ return false;
+ }
+ break;
+ case 4:
+ // (, line 177
+ // <-, line 177
+ if (!this.slice_from("lie"))
+ {
+ return false;
+ }
+ break;
+ case 5:
+ // (, line 178
+ // <-, line 178
+ if (!this.slice_from("tie"))
+ {
+ return false;
+ }
+ break;
+ case 6:
+ // (, line 182
+ // <-, line 182
+ if (!this.slice_from("idl"))
+ {
+ return false;
+ }
+ break;
+ case 7:
+ // (, line 183
+ // <-, line 183
+ if (!this.slice_from("gentl"))
+ {
+ return false;
+ }
+ break;
+ case 8:
+ // (, line 184
+ // <-, line 184
+ if (!this.slice_from("ugli"))
+ {
+ return false;
+ }
+ break;
+ case 9:
+ // (, line 185
+ // <-, line 185
+ if (!this.slice_from("earli"))
+ {
+ return false;
+ }
+ break;
+ case 10:
+ // (, line 186
+ // <-, line 186
+ if (!this.slice_from("onli"))
+ {
+ return false;
+ }
+ break;
+ case 11:
+ // (, line 187
+ // <-, line 187
+ if (!this.slice_from("singl"))
+ {
+ return false;
+ }
+ break;
+ }
+ return true;
+ }
+
+ function r_postlude () : boolean
+ {
+ var v_1 : int;
+ var v_2 : int;
+ // (, line 203
+ // Boolean test Y_found, line 203
+ if (!(this.B_Y_found))
+ {
+ return false;
+ }
+ // repeat, line 203
+ replab0: while(true)
+ {
+ v_1 = this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ // (, line 203
+ // goto, line 203
+ golab2: while(true)
+ {
+ v_2 = this.cursor;
+ var lab3 = true;
+ lab3: while (lab3 == true)
+ {
+ lab3 = false;
+ // (, line 203
+ // [, line 203
+ this.bra = this.cursor;
+ // literal, line 203
+ if (!(this.eq_s(1, "Y")))
+ {
+ break lab3;
+ }
+ // ], line 203
+ this.ket = this.cursor;
+ this.cursor = v_2;
+ break golab2;
+ }
+ this.cursor = v_2;
+ if (this.cursor >= this.limit)
+ {
+ break lab1;
+ }
+ this.cursor++;
+ }
+ // <-, line 203
+ if (!this.slice_from("y"))
+ {
+ return false;
+ }
+ continue replab0;
+ }
+ this.cursor = v_1;
+ break replab0;
+ }
+ return true;
+ }
+
+ override function stem () : boolean
+ {
+ var v_1 : int;
+ var v_2 : int;
+ var v_3 : int;
+ var v_4 : int;
+ var v_5 : int;
+ var v_6 : int;
+ var v_7 : int;
+ var v_8 : int;
+ var v_9 : int;
+ var v_10 : int;
+ var v_11 : int;
+ var v_12 : int;
+ var v_13 : int;
+ // (, line 205
+ // or, line 207
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ v_1 = this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ // call exception1, line 207
+ if (!this.r_exception1())
+ {
+ break lab1;
+ }
+ break lab0;
+ }
+ this.cursor = v_1;
+ var lab2 = true;
+ lab2: while (lab2 == true)
+ {
+ lab2 = false;
+ // not, line 208
+ {
+ v_2 = this.cursor;
+ var lab3 = true;
+ lab3: while (lab3 == true)
+ {
+ lab3 = false;
+ // hop, line 208
+ {
+ var c : int = this.cursor + 3;
+ if (0 > c || c > this.limit)
+ {
+ break lab3;
+ }
+ this.cursor = c;
+ }
+ break lab2;
+ }
+ this.cursor = v_2;
+ }
+ break lab0;
+ }
+ this.cursor = v_1;
+ // (, line 208
+ // do, line 209
+ v_3 = this.cursor;
+ var lab4 = true;
+ lab4: while (lab4 == true)
+ {
+ lab4 = false;
+ // call prelude, line 209
+ if (!this.r_prelude())
+ {
+ break lab4;
+ }
+ }
+ this.cursor = v_3;
+ // do, line 210
+ v_4 = this.cursor;
+ var lab5 = true;
+ lab5: while (lab5 == true)
+ {
+ lab5 = false;
+ // call mark_regions, line 210
+ if (!this.r_mark_regions())
+ {
+ break lab5;
+ }
+ }
+ this.cursor = v_4;
+ // backwards, line 211
+ this.limit_backward = this.cursor; this.cursor = this.limit;
+ // (, line 211
+ // do, line 213
+ v_5 = this.limit - this.cursor;
+ var lab6 = true;
+ lab6: while (lab6 == true)
+ {
+ lab6 = false;
+ // call Step_1a, line 213
+ if (!this.r_Step_1a())
+ {
+ break lab6;
+ }
+ }
+ this.cursor = this.limit - v_5;
+ // or, line 215
+ var lab7 = true;
+ lab7: while (lab7 == true)
+ {
+ lab7 = false;
+ v_6 = this.limit - this.cursor;
+ var lab8 = true;
+ lab8: while (lab8 == true)
+ {
+ lab8 = false;
+ // call exception2, line 215
+ if (!this.r_exception2())
+ {
+ break lab8;
+ }
+ break lab7;
+ }
+ this.cursor = this.limit - v_6;
+ // (, line 215
+ // do, line 217
+ v_7 = this.limit - this.cursor;
+ var lab9 = true;
+ lab9: while (lab9 == true)
+ {
+ lab9 = false;
+ // call Step_1b, line 217
+ if (!this.r_Step_1b())
+ {
+ break lab9;
+ }
+ }
+ this.cursor = this.limit - v_7;
+ // do, line 218
+ v_8 = this.limit - this.cursor;
+ var lab10 = true;
+ lab10: while (lab10 == true)
+ {
+ lab10 = false;
+ // call Step_1c, line 218
+ if (!this.r_Step_1c())
+ {
+ break lab10;
+ }
+ }
+ this.cursor = this.limit - v_8;
+ // do, line 220
+ v_9 = this.limit - this.cursor;
+ var lab11 = true;
+ lab11: while (lab11 == true)
+ {
+ lab11 = false;
+ // call Step_2, line 220
+ if (!this.r_Step_2())
+ {
+ break lab11;
+ }
+ }
+ this.cursor = this.limit - v_9;
+ // do, line 221
+ v_10 = this.limit - this.cursor;
+ var lab12 = true;
+ lab12: while (lab12 == true)
+ {
+ lab12 = false;
+ // call Step_3, line 221
+ if (!this.r_Step_3())
+ {
+ break lab12;
+ }
+ }
+ this.cursor = this.limit - v_10;
+ // do, line 222
+ v_11 = this.limit - this.cursor;
+ var lab13 = true;
+ lab13: while (lab13 == true)
+ {
+ lab13 = false;
+ // call Step_4, line 222
+ if (!this.r_Step_4())
+ {
+ break lab13;
+ }
+ }
+ this.cursor = this.limit - v_11;
+ // do, line 224
+ v_12 = this.limit - this.cursor;
+ var lab14 = true;
+ lab14: while (lab14 == true)
+ {
+ lab14 = false;
+ // call Step_5, line 224
+ if (!this.r_Step_5())
+ {
+ break lab14;
+ }
+ }
+ this.cursor = this.limit - v_12;
+ }
+ this.cursor = this.limit_backward; // do, line 227
+ v_13 = this.cursor;
+ var lab15 = true;
+ lab15: while (lab15 == true)
+ {
+ lab15 = false;
+ // call postlude, line 227
+ if (!this.r_postlude())
+ {
+ break lab15;
+ }
+ }
+ this.cursor = v_13;
+ }
+ return true;
+ }
+
+ function equals (o : variant) : boolean {
+ return o instanceof EnglishStemmer;
+ }
+
+ function hashCode() : int
+ {
+ //http://stackoverflow.com/questions/194846/is-there-any-kind-of-hashcode-function-in-javascript
+ var classname = "EnglishStemmer";
+ var hash = 0;
+ if (classname.length == 0) return hash;
+ for (var i = 0; i < classname.length; i++) {
+ var char = classname.charCodeAt(i);
+ hash = ((hash << 5) - hash) + char;
+ hash = hash & hash; // Convert to 32bit integer
+ }
+ return hash;
+ }
+
+}
+
diff --git a/web/server/h2o/libh2o/misc/oktavia/src/stemmer/finnish-stemmer.jsx b/web/server/h2o/libh2o/misc/oktavia/src/stemmer/finnish-stemmer.jsx
new file mode 100644
index 00000000..35a1d56a
--- /dev/null
+++ b/web/server/h2o/libh2o/misc/oktavia/src/stemmer/finnish-stemmer.jsx
@@ -0,0 +1,1208 @@
+// This file was generated automatically by the Snowball to JSX compiler
+
+import "base-stemmer.jsx";
+import "among.jsx";
+
+ /**
+ * This class was automatically generated by a Snowball to JSX compiler
+ * It implements the stemming algorithm defined by a snowball script.
+ */
+
+class FinnishStemmer extends BaseStemmer
+{
+ static const serialVersionUID = 1;
+ static const methodObject = new FinnishStemmer();
+
+ static const a_0 = [
+ 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)
+ ];
+
+ static const a_1 = [
+ 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)
+ ];
+
+ static const a_2 = [
+ 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)
+ ];
+
+ static const a_3 = [
+ new Among("lle", -1, -1),
+ new Among("ine", -1, -1)
+ ];
+
+ static const a_4 = [
+ 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)
+ ];
+
+ static const a_5 = [
+ 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)
+ ];
+
+ static const a_6 = [
+ 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("den", 11, -1, ((instance : BaseStemmer) : boolean -> (instance as FinnishStemmer).r_VI()), FinnishStemmer.methodObject),
+ new Among("seen", 11, -1, ((instance : BaseStemmer) : boolean -> (instance as FinnishStemmer).r_LONG()), FinnishStemmer.methodObject),
+ new Among("hen", 11, 2),
+ new Among("tten", 11, -1, ((instance : BaseStemmer) : boolean -> (instance as FinnishStemmer).r_VI()), FinnishStemmer.methodObject),
+ new Among("hin", 11, 3),
+ new Among("siin", 11, -1, ((instance : BaseStemmer) : boolean -> (instance as FinnishStemmer).r_VI()), 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)
+ ];
+
+ static const a_7 = [
+ 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)
+ ];
+
+ static const a_8 = [
+ new Among("i", -1, -1),
+ new Among("j", -1, -1)
+ ];
+
+ static const a_9 = [
+ new Among("mma", -1, 1),
+ new Among("imma", 0, -1)
+ ];
+
+ static const g_AEI = [17, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8] : int[];
+
+ static const g_V1 = [17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 32] : int[];
+
+ static const g_V2 = [17, 65, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 32] : int[];
+
+ static const g_particle_end = [17, 97, 24, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 32] : int[];
+
+ var B_ending_removed : boolean = false;
+ var S_x : string = "";
+ var I_p2 : int = 0;
+ var I_p1 : int = 0;
+
+ function copy_from (other : FinnishStemmer) : void
+ {
+ 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;
+ super.copy_from(other);
+ }
+
+ function r_mark_regions () : boolean
+ {
+ var v_1 : int;
+ var v_3 : int;
+ // (, line 41
+ this.I_p1 = this.limit;
+ this.I_p2 = this.limit;
+ // goto, line 46
+ golab0: while(true)
+ {
+ v_1 = this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ if (!(this.in_grouping(FinnishStemmer.g_V1, 97, 246)))
+ {
+ break lab1;
+ }
+ this.cursor = v_1;
+ break golab0;
+ }
+ this.cursor = v_1;
+ if (this.cursor >= this.limit)
+ {
+ return false;
+ }
+ this.cursor++;
+ }
+ // gopast, line 46
+ golab2: while(true)
+ {
+ var lab3 = true;
+ lab3: while (lab3 == true)
+ {
+ lab3 = false;
+ if (!(this.out_grouping(FinnishStemmer.g_V1, 97, 246)))
+ {
+ break lab3;
+ }
+ break golab2;
+ }
+ if (this.cursor >= this.limit)
+ {
+ return false;
+ }
+ this.cursor++;
+ }
+ // setmark p1, line 46
+ this.I_p1 = this.cursor;
+ // goto, line 47
+ golab4: while(true)
+ {
+ v_3 = this.cursor;
+ var lab5 = true;
+ lab5: while (lab5 == true)
+ {
+ lab5 = false;
+ if (!(this.in_grouping(FinnishStemmer.g_V1, 97, 246)))
+ {
+ break lab5;
+ }
+ this.cursor = v_3;
+ break golab4;
+ }
+ this.cursor = v_3;
+ if (this.cursor >= this.limit)
+ {
+ return false;
+ }
+ this.cursor++;
+ }
+ // gopast, line 47
+ golab6: while(true)
+ {
+ var lab7 = true;
+ lab7: while (lab7 == true)
+ {
+ lab7 = false;
+ if (!(this.out_grouping(FinnishStemmer.g_V1, 97, 246)))
+ {
+ break lab7;
+ }
+ break golab6;
+ }
+ if (this.cursor >= this.limit)
+ {
+ return false;
+ }
+ this.cursor++;
+ }
+ // setmark p2, line 47
+ this.I_p2 = this.cursor;
+ return true;
+ }
+
+ function r_R2 () : boolean
+ {
+ if (!(this.I_p2 <= this.cursor))
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_particle_etc () : boolean
+ {
+ var among_var : int;
+ var v_1 : int;
+ var v_2 : int;
+ // (, line 54
+ // setlimit, line 55
+ v_1 = this.limit - this.cursor;
+ // tomark, line 55
+ if (this.cursor < this.I_p1)
+ {
+ return false;
+ }
+ this.cursor = this.I_p1;
+ v_2 = this.limit_backward;
+ this.limit_backward = this.cursor;
+ this.cursor = this.limit - v_1;
+ // (, line 55
+ // [, line 55
+ this.ket = this.cursor;
+ // substring, line 55
+ among_var = this.find_among_b(FinnishStemmer.a_0, 10);
+ if (among_var == 0)
+ {
+ this.limit_backward = v_2;
+ return false;
+ }
+ // ], line 55
+ this.bra = this.cursor;
+ this.limit_backward = v_2;
+ switch (among_var) {
+ case 0:
+ return false;
+ case 1:
+ // (, line 62
+ if (!(this.in_grouping_b(FinnishStemmer.g_particle_end, 97, 246)))
+ {
+ return false;
+ }
+ break;
+ case 2:
+ // (, line 64
+ // call R2, line 64
+ if (!this.r_R2())
+ {
+ return false;
+ }
+ break;
+ }
+ // delete, line 66
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_possessive () : boolean
+ {
+ var among_var : int;
+ var v_1 : int;
+ var v_2 : int;
+ var v_3 : int;
+ // (, line 68
+ // setlimit, line 69
+ v_1 = this.limit - this.cursor;
+ // tomark, line 69
+ if (this.cursor < this.I_p1)
+ {
+ return false;
+ }
+ this.cursor = this.I_p1;
+ v_2 = this.limit_backward;
+ this.limit_backward = this.cursor;
+ this.cursor = this.limit - v_1;
+ // (, line 69
+ // [, line 69
+ this.ket = this.cursor;
+ // substring, line 69
+ among_var = this.find_among_b(FinnishStemmer.a_4, 9);
+ if (among_var == 0)
+ {
+ this.limit_backward = v_2;
+ return false;
+ }
+ // ], line 69
+ this.bra = this.cursor;
+ this.limit_backward = v_2;
+ switch (among_var) {
+ case 0:
+ return false;
+ case 1:
+ // (, line 72
+ // not, line 72
+ {
+ v_3 = this.limit - this.cursor;
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ // literal, line 72
+ if (!(this.eq_s_b(1, "k")))
+ {
+ break lab0;
+ }
+ return false;
+ }
+ this.cursor = this.limit - v_3;
+ }
+ // delete, line 72
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 2:
+ // (, line 74
+ // delete, line 74
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // [, line 74
+ this.ket = this.cursor;
+ // literal, line 74
+ if (!(this.eq_s_b(3, "kse")))
+ {
+ return false;
+ }
+ // ], line 74
+ this.bra = this.cursor;
+ // <-, line 74
+ if (!this.slice_from("ksi"))
+ {
+ return false;
+ }
+ break;
+ case 3:
+ // (, line 78
+ // delete, line 78
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 4:
+ // (, line 81
+ // among, line 81
+ if (this.find_among_b(FinnishStemmer.a_1, 6) == 0)
+ {
+ return false;
+ }
+ // delete, line 81
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 5:
+ // (, line 83
+ // among, line 83
+ if (this.find_among_b(FinnishStemmer.a_2, 6) == 0)
+ {
+ return false;
+ }
+ // delete, line 84
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 6:
+ // (, line 86
+ // among, line 86
+ if (this.find_among_b(FinnishStemmer.a_3, 2) == 0)
+ {
+ return false;
+ }
+ // delete, line 86
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ }
+ return true;
+ }
+
+ function r_LONG () : boolean
+ {
+ // among, line 91
+ if (this.find_among_b(FinnishStemmer.a_5, 7) == 0)
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_VI () : boolean
+ {
+ // (, line 93
+ // literal, line 93
+ if (!(this.eq_s_b(1, "i")))
+ {
+ return false;
+ }
+ if (!(this.in_grouping_b(FinnishStemmer.g_V2, 97, 246)))
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_case_ending () : boolean
+ {
+ var among_var : int;
+ var v_1 : int;
+ var v_2 : int;
+ var v_3 : int;
+ var v_4 : int;
+ var v_5 : int;
+ // (, line 95
+ // setlimit, line 96
+ v_1 = this.limit - this.cursor;
+ // tomark, line 96
+ if (this.cursor < this.I_p1)
+ {
+ return false;
+ }
+ this.cursor = this.I_p1;
+ v_2 = this.limit_backward;
+ this.limit_backward = this.cursor;
+ this.cursor = this.limit - v_1;
+ // (, line 96
+ // [, line 96
+ this.ket = this.cursor;
+ // substring, line 96
+ among_var = this.find_among_b(FinnishStemmer.a_6, 30);
+ if (among_var == 0)
+ {
+ this.limit_backward = v_2;
+ return false;
+ }
+ // ], line 96
+ this.bra = this.cursor;
+ this.limit_backward = v_2;
+ switch (among_var) {
+ case 0:
+ return false;
+ case 1:
+ // (, line 98
+ // literal, line 98
+ if (!(this.eq_s_b(1, "a")))
+ {
+ return false;
+ }
+ break;
+ case 2:
+ // (, line 99
+ // literal, line 99
+ if (!(this.eq_s_b(1, "e")))
+ {
+ return false;
+ }
+ break;
+ case 3:
+ // (, line 100
+ // literal, line 100
+ if (!(this.eq_s_b(1, "i")))
+ {
+ return false;
+ }
+ break;
+ case 4:
+ // (, line 101
+ // literal, line 101
+ if (!(this.eq_s_b(1, "o")))
+ {
+ return false;
+ }
+ break;
+ case 5:
+ // (, line 102
+ // literal, line 102
+ if (!(this.eq_s_b(1, "\u00E4")))
+ {
+ return false;
+ }
+ break;
+ case 6:
+ // (, line 103
+ // literal, line 103
+ if (!(this.eq_s_b(1, "\u00F6")))
+ {
+ return false;
+ }
+ break;
+ case 7:
+ // (, line 111
+ // try, line 111
+ v_3 = this.limit - this.cursor;
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ // (, line 111
+ // and, line 113
+ v_4 = this.limit - this.cursor;
+ // or, line 112
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ v_5 = this.limit - this.cursor;
+ var lab2 = true;
+ lab2: while (lab2 == true)
+ {
+ lab2 = false;
+ // call LONG, line 111
+ if (!this.r_LONG())
+ {
+ break lab2;
+ }
+ break lab1;
+ }
+ this.cursor = this.limit - v_5;
+ // literal, line 112
+ if (!(this.eq_s_b(2, "ie")))
+ {
+ this.cursor = this.limit - v_3;
+ break lab0;
+ }
+ }
+ this.cursor = this.limit - v_4;
+ // next, line 113
+ if (this.cursor <= this.limit_backward)
+ {
+ this.cursor = this.limit - v_3;
+ break lab0;
+ }
+ this.cursor--;
+ // ], line 113
+ this.bra = this.cursor;
+ }
+ break;
+ case 8:
+ // (, line 119
+ if (!(this.in_grouping_b(FinnishStemmer.g_V1, 97, 246)))
+ {
+ return false;
+ }
+ if (!(this.out_grouping_b(FinnishStemmer.g_V1, 97, 246)))
+ {
+ return false;
+ }
+ break;
+ case 9:
+ // (, line 121
+ // literal, line 121
+ if (!(this.eq_s_b(1, "e")))
+ {
+ return false;
+ }
+ break;
+ }
+ // delete, line 138
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // set ending_removed, line 139
+ this.B_ending_removed = true;
+ return true;
+ }
+
+ function r_other_endings () : boolean
+ {
+ var among_var : int;
+ var v_1 : int;
+ var v_2 : int;
+ var v_3 : int;
+ // (, line 141
+ // setlimit, line 142
+ v_1 = this.limit - this.cursor;
+ // tomark, line 142
+ if (this.cursor < this.I_p2)
+ {
+ return false;
+ }
+ this.cursor = this.I_p2;
+ v_2 = this.limit_backward;
+ this.limit_backward = this.cursor;
+ this.cursor = this.limit - v_1;
+ // (, line 142
+ // [, line 142
+ this.ket = this.cursor;
+ // substring, line 142
+ among_var = this.find_among_b(FinnishStemmer.a_7, 14);
+ if (among_var == 0)
+ {
+ this.limit_backward = v_2;
+ return false;
+ }
+ // ], line 142
+ this.bra = this.cursor;
+ this.limit_backward = v_2;
+ switch (among_var) {
+ case 0:
+ return false;
+ case 1:
+ // (, line 146
+ // not, line 146
+ {
+ v_3 = this.limit - this.cursor;
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ // literal, line 146
+ if (!(this.eq_s_b(2, "po")))
+ {
+ break lab0;
+ }
+ return false;
+ }
+ this.cursor = this.limit - v_3;
+ }
+ break;
+ }
+ // delete, line 151
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_i_plural () : boolean
+ {
+ var v_1 : int;
+ var v_2 : int;
+ // (, line 153
+ // setlimit, line 154
+ v_1 = this.limit - this.cursor;
+ // tomark, line 154
+ if (this.cursor < this.I_p1)
+ {
+ return false;
+ }
+ this.cursor = this.I_p1;
+ v_2 = this.limit_backward;
+ this.limit_backward = this.cursor;
+ this.cursor = this.limit - v_1;
+ // (, line 154
+ // [, line 154
+ this.ket = this.cursor;
+ // substring, line 154
+ if (this.find_among_b(FinnishStemmer.a_8, 2) == 0)
+ {
+ this.limit_backward = v_2;
+ return false;
+ }
+ // ], line 154
+ this.bra = this.cursor;
+ this.limit_backward = v_2;
+ // delete, line 158
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_t_plural () : boolean
+ {
+ var among_var : int;
+ var v_1 : int;
+ var v_2 : int;
+ var v_3 : int;
+ var v_4 : int;
+ var v_5 : int;
+ var v_6 : int;
+ // (, line 160
+ // setlimit, line 161
+ v_1 = this.limit - this.cursor;
+ // tomark, line 161
+ if (this.cursor < this.I_p1)
+ {
+ return false;
+ }
+ this.cursor = this.I_p1;
+ v_2 = this.limit_backward;
+ this.limit_backward = this.cursor;
+ this.cursor = this.limit - v_1;
+ // (, line 161
+ // [, line 162
+ this.ket = this.cursor;
+ // literal, line 162
+ if (!(this.eq_s_b(1, "t")))
+ {
+ this.limit_backward = v_2;
+ return false;
+ }
+ // ], line 162
+ this.bra = this.cursor;
+ // test, line 162
+ v_3 = this.limit - this.cursor;
+ if (!(this.in_grouping_b(FinnishStemmer.g_V1, 97, 246)))
+ {
+ this.limit_backward = v_2;
+ return false;
+ }
+ this.cursor = this.limit - v_3;
+ // delete, line 163
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ this.limit_backward = v_2;
+ // setlimit, line 165
+ v_4 = this.limit - this.cursor;
+ // tomark, line 165
+ if (this.cursor < this.I_p2)
+ {
+ return false;
+ }
+ this.cursor = this.I_p2;
+ v_5 = this.limit_backward;
+ this.limit_backward = this.cursor;
+ this.cursor = this.limit - v_4;
+ // (, line 165
+ // [, line 165
+ this.ket = this.cursor;
+ // substring, line 165
+ among_var = this.find_among_b(FinnishStemmer.a_9, 2);
+ if (among_var == 0)
+ {
+ this.limit_backward = v_5;
+ return false;
+ }
+ // ], line 165
+ this.bra = this.cursor;
+ this.limit_backward = v_5;
+ switch (among_var) {
+ case 0:
+ return false;
+ case 1:
+ // (, line 167
+ // not, line 167
+ {
+ v_6 = this.limit - this.cursor;
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ // literal, line 167
+ if (!(this.eq_s_b(2, "po")))
+ {
+ break lab0;
+ }
+ return false;
+ }
+ this.cursor = this.limit - v_6;
+ }
+ break;
+ }
+ // delete, line 170
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_tidy () : boolean
+ {
+ var v_1 : int;
+ var v_2 : int;
+ var v_3 : int;
+ var v_4 : int;
+ var v_5 : int;
+ var v_6 : int;
+ var v_7 : int;
+ var v_8 : int;
+ var v_9 : int;
+ // (, line 172
+ // setlimit, line 173
+ v_1 = this.limit - this.cursor;
+ // tomark, line 173
+ if (this.cursor < this.I_p1)
+ {
+ return false;
+ }
+ this.cursor = this.I_p1;
+ v_2 = this.limit_backward;
+ this.limit_backward = this.cursor;
+ this.cursor = this.limit - v_1;
+ // (, line 173
+ // do, line 174
+ v_3 = this.limit - this.cursor;
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ // (, line 174
+ // and, line 174
+ v_4 = this.limit - this.cursor;
+ // call LONG, line 174
+ if (!this.r_LONG())
+ {
+ break lab0;
+ }
+ this.cursor = this.limit - v_4;
+ // (, line 174
+ // [, line 174
+ this.ket = this.cursor;
+ // next, line 174
+ if (this.cursor <= this.limit_backward)
+ {
+ break lab0;
+ }
+ this.cursor--;
+ // ], line 174
+ this.bra = this.cursor;
+ // delete, line 174
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ }
+ this.cursor = this.limit - v_3;
+ // do, line 175
+ v_5 = this.limit - this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ // (, line 175
+ // [, line 175
+ this.ket = this.cursor;
+ if (!(this.in_grouping_b(FinnishStemmer.g_AEI, 97, 228)))
+ {
+ break lab1;
+ }
+ // ], line 175
+ this.bra = this.cursor;
+ if (!(this.out_grouping_b(FinnishStemmer.g_V1, 97, 246)))
+ {
+ break lab1;
+ }
+ // delete, line 175
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ }
+ this.cursor = this.limit - v_5;
+ // do, line 176
+ v_6 = this.limit - this.cursor;
+ var lab2 = true;
+ lab2: while (lab2 == true)
+ {
+ lab2 = false;
+ // (, line 176
+ // [, line 176
+ this.ket = this.cursor;
+ // literal, line 176
+ if (!(this.eq_s_b(1, "j")))
+ {
+ break lab2;
+ }
+ // ], line 176
+ this.bra = this.cursor;
+ // or, line 176
+ var lab3 = true;
+ lab3: while (lab3 == true)
+ {
+ lab3 = false;
+ v_7 = this.limit - this.cursor;
+ var lab4 = true;
+ lab4: while (lab4 == true)
+ {
+ lab4 = false;
+ // literal, line 176
+ if (!(this.eq_s_b(1, "o")))
+ {
+ break lab4;
+ }
+ break lab3;
+ }
+ this.cursor = this.limit - v_7;
+ // literal, line 176
+ if (!(this.eq_s_b(1, "u")))
+ {
+ break lab2;
+ }
+ }
+ // delete, line 176
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ }
+ this.cursor = this.limit - v_6;
+ // do, line 177
+ v_8 = this.limit - this.cursor;
+ var lab5 = true;
+ lab5: while (lab5 == true)
+ {
+ lab5 = false;
+ // (, line 177
+ // [, line 177
+ this.ket = this.cursor;
+ // literal, line 177
+ if (!(this.eq_s_b(1, "o")))
+ {
+ break lab5;
+ }
+ // ], line 177
+ this.bra = this.cursor;
+ // literal, line 177
+ if (!(this.eq_s_b(1, "j")))
+ {
+ break lab5;
+ }
+ // delete, line 177
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ }
+ this.cursor = this.limit - v_8;
+ this.limit_backward = v_2;
+ // goto, line 179
+ golab6: while(true)
+ {
+ v_9 = this.limit - this.cursor;
+ var lab7 = true;
+ lab7: while (lab7 == true)
+ {
+ lab7 = false;
+ if (!(this.out_grouping_b(FinnishStemmer.g_V1, 97, 246)))
+ {
+ break lab7;
+ }
+ this.cursor = this.limit - v_9;
+ break golab6;
+ }
+ this.cursor = this.limit - v_9;
+ if (this.cursor <= this.limit_backward)
+ {
+ return false;
+ }
+ this.cursor--;
+ }
+ // [, line 179
+ this.ket = this.cursor;
+ // next, line 179
+ if (this.cursor <= this.limit_backward)
+ {
+ return false;
+ }
+ this.cursor--;
+ // ], line 179
+ this.bra = this.cursor;
+ // -> x, line 179
+ this.S_x = this.slice_to(this.S_x);
+ if (this.S_x == '')
+ {
+ return false;
+ }
+ // name x, line 179
+ if (!(this.eq_v_b(this.S_x)))
+ {
+ return false;
+ }
+ // delete, line 179
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ return true;
+ }
+
+ override function stem () : boolean
+ {
+ var v_1 : int;
+ var v_2 : int;
+ var v_3 : int;
+ var v_4 : int;
+ var v_5 : int;
+ var v_6 : int;
+ var v_7 : int;
+ var v_8 : int;
+ var v_9 : int;
+ // (, line 183
+ // do, line 185
+ v_1 = this.cursor;
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ // call mark_regions, line 185
+ if (!this.r_mark_regions())
+ {
+ break lab0;
+ }
+ }
+ this.cursor = v_1;
+ // unset ending_removed, line 186
+ this.B_ending_removed = false;
+ // backwards, line 187
+ this.limit_backward = this.cursor; this.cursor = this.limit;
+ // (, line 187
+ // do, line 188
+ v_2 = this.limit - this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ // call particle_etc, line 188
+ if (!this.r_particle_etc())
+ {
+ break lab1;
+ }
+ }
+ this.cursor = this.limit - v_2;
+ // do, line 189
+ v_3 = this.limit - this.cursor;
+ var lab2 = true;
+ lab2: while (lab2 == true)
+ {
+ lab2 = false;
+ // call possessive, line 189
+ if (!this.r_possessive())
+ {
+ break lab2;
+ }
+ }
+ this.cursor = this.limit - v_3;
+ // do, line 190
+ v_4 = this.limit - this.cursor;
+ var lab3 = true;
+ lab3: while (lab3 == true)
+ {
+ lab3 = false;
+ // call case_ending, line 190
+ if (!this.r_case_ending())
+ {
+ break lab3;
+ }
+ }
+ this.cursor = this.limit - v_4;
+ // do, line 191
+ v_5 = this.limit - this.cursor;
+ var lab4 = true;
+ lab4: while (lab4 == true)
+ {
+ lab4 = false;
+ // call other_endings, line 191
+ if (!this.r_other_endings())
+ {
+ break lab4;
+ }
+ }
+ this.cursor = this.limit - v_5;
+ // or, line 192
+ var lab5 = true;
+ lab5: while (lab5 == true)
+ {
+ lab5 = false;
+ v_6 = this.limit - this.cursor;
+ var lab6 = true;
+ lab6: while (lab6 == true)
+ {
+ lab6 = false;
+ // (, line 192
+ // Boolean test ending_removed, line 192
+ if (!(this.B_ending_removed))
+ {
+ break lab6;
+ }
+ // do, line 192
+ v_7 = this.limit - this.cursor;
+ var lab7 = true;
+ lab7: while (lab7 == true)
+ {
+ lab7 = false;
+ // call i_plural, line 192
+ if (!this.r_i_plural())
+ {
+ break lab7;
+ }
+ }
+ this.cursor = this.limit - v_7;
+ break lab5;
+ }
+ this.cursor = this.limit - v_6;
+ // do, line 192
+ v_8 = this.limit - this.cursor;
+ var lab8 = true;
+ lab8: while (lab8 == true)
+ {
+ lab8 = false;
+ // call t_plural, line 192
+ if (!this.r_t_plural())
+ {
+ break lab8;
+ }
+ }
+ this.cursor = this.limit - v_8;
+ }
+ // do, line 193
+ v_9 = this.limit - this.cursor;
+ var lab9 = true;
+ lab9: while (lab9 == true)
+ {
+ lab9 = false;
+ // call tidy, line 193
+ if (!this.r_tidy())
+ {
+ break lab9;
+ }
+ }
+ this.cursor = this.limit - v_9;
+ this.cursor = this.limit_backward; return true;
+ }
+
+ function equals (o : variant) : boolean {
+ return o instanceof FinnishStemmer;
+ }
+
+ function hashCode() : int
+ {
+ //http://stackoverflow.com/questions/194846/is-there-any-kind-of-hashcode-function-in-javascript
+ var classname = "FinnishStemmer";
+ var hash = 0;
+ if (classname.length == 0) return hash;
+ for (var i = 0; i < classname.length; i++) {
+ var char = classname.charCodeAt(i);
+ hash = ((hash << 5) - hash) + char;
+ hash = hash & hash; // Convert to 32bit integer
+ }
+ return hash;
+ }
+
+}
+
diff --git a/web/server/h2o/libh2o/misc/oktavia/src/stemmer/french-stemmer.jsx b/web/server/h2o/libh2o/misc/oktavia/src/stemmer/french-stemmer.jsx
new file mode 100644
index 00000000..3d937818
--- /dev/null
+++ b/web/server/h2o/libh2o/misc/oktavia/src/stemmer/french-stemmer.jsx
@@ -0,0 +1,1867 @@
+// This file was generated automatically by the Snowball to JSX compiler
+
+import "base-stemmer.jsx";
+import "among.jsx";
+
+ /**
+ * This class was automatically generated by a Snowball to JSX compiler
+ * It implements the stemming algorithm defined by a snowball script.
+ */
+
+class FrenchStemmer extends BaseStemmer
+{
+ static const serialVersionUID = 1;
+ static const methodObject = new FrenchStemmer();
+
+ static const a_0 = [
+ new Among("col", -1, -1),
+ new Among("par", -1, -1),
+ new Among("tap", -1, -1)
+ ];
+
+ static const a_1 = [
+ new Among("", -1, 4),
+ new Among("I", 0, 1),
+ new Among("U", 0, 2),
+ new Among("Y", 0, 3)
+ ];
+
+ static const a_2 = [
+ 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)
+ ];
+
+ static const a_3 = [
+ new Among("ic", -1, 2),
+ new Among("abil", -1, 1),
+ new Among("iv", -1, 3)
+ ];
+
+ static const a_4 = [
+ 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)
+ ];
+
+ static const a_5 = [
+ 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)
+ ];
+
+ static const a_6 = [
+ 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)
+ ];
+
+ static const a_7 = [
+ 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)
+ ];
+
+ static const a_8 = [
+ 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)
+ ];
+
+ static const g_v = [17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 130, 103, 8, 5] : int[];
+
+ static const g_keep_with_s = [1, 65, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128] : int[];
+
+ var I_p2 : int = 0;
+ var I_p1 : int = 0;
+ var I_pV : int = 0;
+
+ function copy_from (other : FrenchStemmer) : void
+ {
+ this.I_p2 = other.I_p2;
+ this.I_p1 = other.I_p1;
+ this.I_pV = other.I_pV;
+ super.copy_from(other);
+ }
+
+ function r_prelude () : boolean
+ {
+ var v_1 : int;
+ var v_2 : int;
+ var v_3 : int;
+ var v_4 : int;
+ // repeat, line 38
+ replab0: while(true)
+ {
+ v_1 = this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ // goto, line 38
+ golab2: while(true)
+ {
+ v_2 = this.cursor;
+ var lab3 = true;
+ lab3: while (lab3 == true)
+ {
+ lab3 = false;
+ // (, line 38
+ // or, line 44
+ var lab4 = true;
+ lab4: while (lab4 == true)
+ {
+ lab4 = false;
+ v_3 = this.cursor;
+ var lab5 = true;
+ lab5: while (lab5 == true)
+ {
+ lab5 = false;
+ // (, line 40
+ if (!(this.in_grouping(FrenchStemmer.g_v, 97, 251)))
+ {
+ break lab5;
+ }
+ // [, line 40
+ this.bra = this.cursor;
+ // or, line 40
+ var lab6 = true;
+ lab6: while (lab6 == true)
+ {
+ lab6 = false;
+ v_4 = this.cursor;
+ var lab7 = true;
+ lab7: while (lab7 == true)
+ {
+ lab7 = false;
+ // (, line 40
+ // literal, line 40
+ if (!(this.eq_s(1, "u")))
+ {
+ break lab7;
+ }
+ // ], line 40
+ this.ket = this.cursor;
+ if (!(this.in_grouping(FrenchStemmer.g_v, 97, 251)))
+ {
+ break lab7;
+ }
+ // <-, line 40
+ if (!this.slice_from("U"))
+ {
+ return false;
+ }
+ break lab6;
+ }
+ this.cursor = v_4;
+ var lab8 = true;
+ lab8: while (lab8 == true)
+ {
+ lab8 = false;
+ // (, line 41
+ // literal, line 41
+ if (!(this.eq_s(1, "i")))
+ {
+ break lab8;
+ }
+ // ], line 41
+ this.ket = this.cursor;
+ if (!(this.in_grouping(FrenchStemmer.g_v, 97, 251)))
+ {
+ break lab8;
+ }
+ // <-, line 41
+ if (!this.slice_from("I"))
+ {
+ return false;
+ }
+ break lab6;
+ }
+ this.cursor = v_4;
+ // (, line 42
+ // literal, line 42
+ if (!(this.eq_s(1, "y")))
+ {
+ break lab5;
+ }
+ // ], line 42
+ this.ket = this.cursor;
+ // <-, line 42
+ if (!this.slice_from("Y"))
+ {
+ return false;
+ }
+ }
+ break lab4;
+ }
+ this.cursor = v_3;
+ var lab9 = true;
+ lab9: while (lab9 == true)
+ {
+ lab9 = false;
+ // (, line 45
+ // [, line 45
+ this.bra = this.cursor;
+ // literal, line 45
+ if (!(this.eq_s(1, "y")))
+ {
+ break lab9;
+ }
+ // ], line 45
+ this.ket = this.cursor;
+ if (!(this.in_grouping(FrenchStemmer.g_v, 97, 251)))
+ {
+ break lab9;
+ }
+ // <-, line 45
+ if (!this.slice_from("Y"))
+ {
+ return false;
+ }
+ break lab4;
+ }
+ this.cursor = v_3;
+ // (, line 47
+ // literal, line 47
+ if (!(this.eq_s(1, "q")))
+ {
+ break lab3;
+ }
+ // [, line 47
+ this.bra = this.cursor;
+ // literal, line 47
+ if (!(this.eq_s(1, "u")))
+ {
+ break lab3;
+ }
+ // ], line 47
+ this.ket = this.cursor;
+ // <-, line 47
+ if (!this.slice_from("U"))
+ {
+ return false;
+ }
+ }
+ this.cursor = v_2;
+ break golab2;
+ }
+ this.cursor = v_2;
+ if (this.cursor >= this.limit)
+ {
+ break lab1;
+ }
+ this.cursor++;
+ }
+ continue replab0;
+ }
+ this.cursor = v_1;
+ break replab0;
+ }
+ return true;
+ }
+
+ function r_mark_regions () : boolean
+ {
+ var v_1 : int;
+ var v_2 : int;
+ var v_4 : int;
+ // (, line 50
+ this.I_pV = this.limit;
+ this.I_p1 = this.limit;
+ this.I_p2 = this.limit;
+ // do, line 56
+ v_1 = this.cursor;
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ // (, line 56
+ // or, line 58
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ v_2 = this.cursor;
+ var lab2 = true;
+ lab2: while (lab2 == true)
+ {
+ lab2 = false;
+ // (, line 57
+ if (!(this.in_grouping(FrenchStemmer.g_v, 97, 251)))
+ {
+ break lab2;
+ }
+ if (!(this.in_grouping(FrenchStemmer.g_v, 97, 251)))
+ {
+ break lab2;
+ }
+ // next, line 57
+ if (this.cursor >= this.limit)
+ {
+ break lab2;
+ }
+ this.cursor++;
+ break lab1;
+ }
+ this.cursor = v_2;
+ var lab3 = true;
+ lab3: while (lab3 == true)
+ {
+ lab3 = false;
+ // among, line 59
+ if (this.find_among(FrenchStemmer.a_0, 3) == 0)
+ {
+ break lab3;
+ }
+ break lab1;
+ }
+ this.cursor = v_2;
+ // (, line 66
+ // next, line 66
+ if (this.cursor >= this.limit)
+ {
+ break lab0;
+ }
+ this.cursor++;
+ // gopast, line 66
+ golab4: while(true)
+ {
+ var lab5 = true;
+ lab5: while (lab5 == true)
+ {
+ lab5 = false;
+ if (!(this.in_grouping(FrenchStemmer.g_v, 97, 251)))
+ {
+ break lab5;
+ }
+ break golab4;
+ }
+ if (this.cursor >= this.limit)
+ {
+ break lab0;
+ }
+ this.cursor++;
+ }
+ }
+ // setmark pV, line 67
+ this.I_pV = this.cursor;
+ }
+ this.cursor = v_1;
+ // do, line 69
+ v_4 = this.cursor;
+ var lab6 = true;
+ lab6: while (lab6 == true)
+ {
+ lab6 = false;
+ // (, line 69
+ // gopast, line 70
+ golab7: while(true)
+ {
+ var lab8 = true;
+ lab8: while (lab8 == true)
+ {
+ lab8 = false;
+ if (!(this.in_grouping(FrenchStemmer.g_v, 97, 251)))
+ {
+ break lab8;
+ }
+ break golab7;
+ }
+ if (this.cursor >= this.limit)
+ {
+ break lab6;
+ }
+ this.cursor++;
+ }
+ // gopast, line 70
+ golab9: while(true)
+ {
+ var lab10 = true;
+ lab10: while (lab10 == true)
+ {
+ lab10 = false;
+ if (!(this.out_grouping(FrenchStemmer.g_v, 97, 251)))
+ {
+ break lab10;
+ }
+ break golab9;
+ }
+ if (this.cursor >= this.limit)
+ {
+ break lab6;
+ }
+ this.cursor++;
+ }
+ // setmark p1, line 70
+ this.I_p1 = this.cursor;
+ // gopast, line 71
+ golab11: while(true)
+ {
+ var lab12 = true;
+ lab12: while (lab12 == true)
+ {
+ lab12 = false;
+ if (!(this.in_grouping(FrenchStemmer.g_v, 97, 251)))
+ {
+ break lab12;
+ }
+ break golab11;
+ }
+ if (this.cursor >= this.limit)
+ {
+ break lab6;
+ }
+ this.cursor++;
+ }
+ // gopast, line 71
+ golab13: while(true)
+ {
+ var lab14 = true;
+ lab14: while (lab14 == true)
+ {
+ lab14 = false;
+ if (!(this.out_grouping(FrenchStemmer.g_v, 97, 251)))
+ {
+ break lab14;
+ }
+ break golab13;
+ }
+ if (this.cursor >= this.limit)
+ {
+ break lab6;
+ }
+ this.cursor++;
+ }
+ // setmark p2, line 71
+ this.I_p2 = this.cursor;
+ }
+ this.cursor = v_4;
+ return true;
+ }
+
+ function r_postlude () : boolean
+ {
+ var among_var : int;
+ var v_1 : int;
+ // repeat, line 75
+ replab0: while(true)
+ {
+ v_1 = this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ // (, line 75
+ // [, line 77
+ this.bra = this.cursor;
+ // substring, line 77
+ among_var = this.find_among(FrenchStemmer.a_1, 4);
+ if (among_var == 0)
+ {
+ break lab1;
+ }
+ // ], line 77
+ this.ket = this.cursor;
+ switch (among_var) {
+ case 0:
+ break lab1;
+ case 1:
+ // (, line 78
+ // <-, line 78
+ if (!this.slice_from("i"))
+ {
+ return false;
+ }
+ break;
+ case 2:
+ // (, line 79
+ // <-, line 79
+ if (!this.slice_from("u"))
+ {
+ return false;
+ }
+ break;
+ case 3:
+ // (, line 80
+ // <-, line 80
+ if (!this.slice_from("y"))
+ {
+ return false;
+ }
+ break;
+ case 4:
+ // (, line 81
+ // next, line 81
+ if (this.cursor >= this.limit)
+ {
+ break lab1;
+ }
+ this.cursor++;
+ break;
+ }
+ continue replab0;
+ }
+ this.cursor = v_1;
+ break replab0;
+ }
+ return true;
+ }
+
+ function r_RV () : boolean
+ {
+ if (!(this.I_pV <= this.cursor))
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_R1 () : boolean
+ {
+ if (!(this.I_p1 <= this.cursor))
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_R2 () : boolean
+ {
+ if (!(this.I_p2 <= this.cursor))
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_standard_suffix () : boolean
+ {
+ var among_var : int;
+ var v_1 : int;
+ var v_2 : int;
+ var v_3 : int;
+ var v_4 : int;
+ var v_5 : int;
+ var v_6 : int;
+ var v_7 : int;
+ var v_8 : int;
+ var v_9 : int;
+ var v_10 : int;
+ var v_11 : int;
+ // (, line 91
+ // [, line 92
+ this.ket = this.cursor;
+ // substring, line 92
+ among_var = this.find_among_b(FrenchStemmer.a_4, 43);
+ if (among_var == 0)
+ {
+ return false;
+ }
+ // ], line 92
+ this.bra = this.cursor;
+ switch (among_var) {
+ case 0:
+ return false;
+ case 1:
+ // (, line 96
+ // call R2, line 96
+ if (!this.r_R2())
+ {
+ return false;
+ }
+ // delete, line 96
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 2:
+ // (, line 99
+ // call R2, line 99
+ if (!this.r_R2())
+ {
+ return false;
+ }
+ // delete, line 99
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // try, line 100
+ v_1 = this.limit - this.cursor;
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ // (, line 100
+ // [, line 100
+ this.ket = this.cursor;
+ // literal, line 100
+ if (!(this.eq_s_b(2, "ic")))
+ {
+ this.cursor = this.limit - v_1;
+ break lab0;
+ }
+ // ], line 100
+ this.bra = this.cursor;
+ // or, line 100
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ v_2 = this.limit - this.cursor;
+ var lab2 = true;
+ lab2: while (lab2 == true)
+ {
+ lab2 = false;
+ // (, line 100
+ // call R2, line 100
+ if (!this.r_R2())
+ {
+ break lab2;
+ }
+ // delete, line 100
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break lab1;
+ }
+ this.cursor = this.limit - v_2;
+ // <-, line 100
+ if (!this.slice_from("iqU"))
+ {
+ return false;
+ }
+ }
+ }
+ break;
+ case 3:
+ // (, line 104
+ // call R2, line 104
+ if (!this.r_R2())
+ {
+ return false;
+ }
+ // <-, line 104
+ if (!this.slice_from("log"))
+ {
+ return false;
+ }
+ break;
+ case 4:
+ // (, line 107
+ // call R2, line 107
+ if (!this.r_R2())
+ {
+ return false;
+ }
+ // <-, line 107
+ if (!this.slice_from("u"))
+ {
+ return false;
+ }
+ break;
+ case 5:
+ // (, line 110
+ // call R2, line 110
+ if (!this.r_R2())
+ {
+ return false;
+ }
+ // <-, line 110
+ if (!this.slice_from("ent"))
+ {
+ return false;
+ }
+ break;
+ case 6:
+ // (, line 113
+ // call RV, line 114
+ if (!this.r_RV())
+ {
+ return false;
+ }
+ // delete, line 114
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // try, line 115
+ v_3 = this.limit - this.cursor;
+ var lab3 = true;
+ lab3: while (lab3 == true)
+ {
+ lab3 = false;
+ // (, line 115
+ // [, line 116
+ this.ket = this.cursor;
+ // substring, line 116
+ among_var = this.find_among_b(FrenchStemmer.a_2, 6);
+ if (among_var == 0)
+ {
+ this.cursor = this.limit - v_3;
+ break lab3;
+ }
+ // ], line 116
+ this.bra = this.cursor;
+ switch (among_var) {
+ case 0:
+ this.cursor = this.limit - v_3;
+ break lab3;
+ case 1:
+ // (, line 117
+ // call R2, line 117
+ if (!this.r_R2())
+ {
+ this.cursor = this.limit - v_3;
+ break lab3;
+ }
+ // delete, line 117
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // [, line 117
+ this.ket = this.cursor;
+ // literal, line 117
+ if (!(this.eq_s_b(2, "at")))
+ {
+ this.cursor = this.limit - v_3;
+ break lab3;
+ }
+ // ], line 117
+ this.bra = this.cursor;
+ // call R2, line 117
+ if (!this.r_R2())
+ {
+ this.cursor = this.limit - v_3;
+ break lab3;
+ }
+ // delete, line 117
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 2:
+ // (, line 118
+ // or, line 118
+ var lab4 = true;
+ lab4: while (lab4 == true)
+ {
+ lab4 = false;
+ v_4 = this.limit - this.cursor;
+ var lab5 = true;
+ lab5: while (lab5 == true)
+ {
+ lab5 = false;
+ // (, line 118
+ // call R2, line 118
+ if (!this.r_R2())
+ {
+ break lab5;
+ }
+ // delete, line 118
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break lab4;
+ }
+ this.cursor = this.limit - v_4;
+ // (, line 118
+ // call R1, line 118
+ if (!this.r_R1())
+ {
+ this.cursor = this.limit - v_3;
+ break lab3;
+ }
+ // <-, line 118
+ if (!this.slice_from("eux"))
+ {
+ return false;
+ }
+ }
+ break;
+ case 3:
+ // (, line 120
+ // call R2, line 120
+ if (!this.r_R2())
+ {
+ this.cursor = this.limit - v_3;
+ break lab3;
+ }
+ // delete, line 120
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 4:
+ // (, line 122
+ // call RV, line 122
+ if (!this.r_RV())
+ {
+ this.cursor = this.limit - v_3;
+ break lab3;
+ }
+ // <-, line 122
+ if (!this.slice_from("i"))
+ {
+ return false;
+ }
+ break;
+ }
+ }
+ break;
+ case 7:
+ // (, line 128
+ // call R2, line 129
+ if (!this.r_R2())
+ {
+ return false;
+ }
+ // delete, line 129
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // try, line 130
+ v_5 = this.limit - this.cursor;
+ var lab6 = true;
+ lab6: while (lab6 == true)
+ {
+ lab6 = false;
+ // (, line 130
+ // [, line 131
+ this.ket = this.cursor;
+ // substring, line 131
+ among_var = this.find_among_b(FrenchStemmer.a_3, 3);
+ if (among_var == 0)
+ {
+ this.cursor = this.limit - v_5;
+ break lab6;
+ }
+ // ], line 131
+ this.bra = this.cursor;
+ switch (among_var) {
+ case 0:
+ this.cursor = this.limit - v_5;
+ break lab6;
+ case 1:
+ // (, line 132
+ // or, line 132
+ var lab7 = true;
+ lab7: while (lab7 == true)
+ {
+ lab7 = false;
+ v_6 = this.limit - this.cursor;
+ var lab8 = true;
+ lab8: while (lab8 == true)
+ {
+ lab8 = false;
+ // (, line 132
+ // call R2, line 132
+ if (!this.r_R2())
+ {
+ break lab8;
+ }
+ // delete, line 132
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break lab7;
+ }
+ this.cursor = this.limit - v_6;
+ // <-, line 132
+ if (!this.slice_from("abl"))
+ {
+ return false;
+ }
+ }
+ break;
+ case 2:
+ // (, line 133
+ // or, line 133
+ var lab9 = true;
+ lab9: while (lab9 == true)
+ {
+ lab9 = false;
+ v_7 = this.limit - this.cursor;
+ var lab10 = true;
+ lab10: while (lab10 == true)
+ {
+ lab10 = false;
+ // (, line 133
+ // call R2, line 133
+ if (!this.r_R2())
+ {
+ break lab10;
+ }
+ // delete, line 133
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break lab9;
+ }
+ this.cursor = this.limit - v_7;
+ // <-, line 133
+ if (!this.slice_from("iqU"))
+ {
+ return false;
+ }
+ }
+ break;
+ case 3:
+ // (, line 134
+ // call R2, line 134
+ if (!this.r_R2())
+ {
+ this.cursor = this.limit - v_5;
+ break lab6;
+ }
+ // delete, line 134
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ }
+ }
+ break;
+ case 8:
+ // (, line 140
+ // call R2, line 141
+ if (!this.r_R2())
+ {
+ return false;
+ }
+ // delete, line 141
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // try, line 142
+ v_8 = this.limit - this.cursor;
+ var lab11 = true;
+ lab11: while (lab11 == true)
+ {
+ lab11 = false;
+ // (, line 142
+ // [, line 142
+ this.ket = this.cursor;
+ // literal, line 142
+ if (!(this.eq_s_b(2, "at")))
+ {
+ this.cursor = this.limit - v_8;
+ break lab11;
+ }
+ // ], line 142
+ this.bra = this.cursor;
+ // call R2, line 142
+ if (!this.r_R2())
+ {
+ this.cursor = this.limit - v_8;
+ break lab11;
+ }
+ // delete, line 142
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // [, line 142
+ this.ket = this.cursor;
+ // literal, line 142
+ if (!(this.eq_s_b(2, "ic")))
+ {
+ this.cursor = this.limit - v_8;
+ break lab11;
+ }
+ // ], line 142
+ this.bra = this.cursor;
+ // or, line 142
+ var lab12 = true;
+ lab12: while (lab12 == true)
+ {
+ lab12 = false;
+ v_9 = this.limit - this.cursor;
+ var lab13 = true;
+ lab13: while (lab13 == true)
+ {
+ lab13 = false;
+ // (, line 142
+ // call R2, line 142
+ if (!this.r_R2())
+ {
+ break lab13;
+ }
+ // delete, line 142
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break lab12;
+ }
+ this.cursor = this.limit - v_9;
+ // <-, line 142
+ if (!this.slice_from("iqU"))
+ {
+ return false;
+ }
+ }
+ }
+ break;
+ case 9:
+ // (, line 144
+ // <-, line 144
+ if (!this.slice_from("eau"))
+ {
+ return false;
+ }
+ break;
+ case 10:
+ // (, line 145
+ // call R1, line 145
+ if (!this.r_R1())
+ {
+ return false;
+ }
+ // <-, line 145
+ if (!this.slice_from("al"))
+ {
+ return false;
+ }
+ break;
+ case 11:
+ // (, line 147
+ // or, line 147
+ var lab14 = true;
+ lab14: while (lab14 == true)
+ {
+ lab14 = false;
+ v_10 = this.limit - this.cursor;
+ var lab15 = true;
+ lab15: while (lab15 == true)
+ {
+ lab15 = false;
+ // (, line 147
+ // call R2, line 147
+ if (!this.r_R2())
+ {
+ break lab15;
+ }
+ // delete, line 147
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break lab14;
+ }
+ this.cursor = this.limit - v_10;
+ // (, line 147
+ // call R1, line 147
+ if (!this.r_R1())
+ {
+ return false;
+ }
+ // <-, line 147
+ if (!this.slice_from("eux"))
+ {
+ return false;
+ }
+ }
+ break;
+ case 12:
+ // (, line 150
+ // call R1, line 150
+ if (!this.r_R1())
+ {
+ return false;
+ }
+ if (!(this.out_grouping_b(FrenchStemmer.g_v, 97, 251)))
+ {
+ return false;
+ }
+ // delete, line 150
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 13:
+ // (, line 155
+ // call RV, line 155
+ if (!this.r_RV())
+ {
+ return false;
+ }
+ // fail, line 155
+ // (, line 155
+ // <-, line 155
+ if (!this.slice_from("ant"))
+ {
+ return false;
+ }
+ return false;
+ case 14:
+ // (, line 156
+ // call RV, line 156
+ if (!this.r_RV())
+ {
+ return false;
+ }
+ // fail, line 156
+ // (, line 156
+ // <-, line 156
+ if (!this.slice_from("ent"))
+ {
+ return false;
+ }
+ return false;
+ case 15:
+ // (, line 158
+ // test, line 158
+ v_11 = this.limit - this.cursor;
+ // (, line 158
+ if (!(this.in_grouping_b(FrenchStemmer.g_v, 97, 251)))
+ {
+ return false;
+ }
+ // call RV, line 158
+ if (!this.r_RV())
+ {
+ return false;
+ }
+ this.cursor = this.limit - v_11;
+ // fail, line 158
+ // (, line 158
+ // delete, line 158
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ return false;
+ }
+ return true;
+ }
+
+ function r_i_verb_suffix () : boolean
+ {
+ var among_var : int;
+ var v_1 : int;
+ var v_2 : int;
+ // setlimit, line 163
+ v_1 = this.limit - this.cursor;
+ // tomark, line 163
+ if (this.cursor < this.I_pV)
+ {
+ return false;
+ }
+ this.cursor = this.I_pV;
+ v_2 = this.limit_backward;
+ this.limit_backward = this.cursor;
+ this.cursor = this.limit - v_1;
+ // (, line 163
+ // [, line 164
+ this.ket = this.cursor;
+ // substring, line 164
+ among_var = this.find_among_b(FrenchStemmer.a_5, 35);
+ if (among_var == 0)
+ {
+ this.limit_backward = v_2;
+ return false;
+ }
+ // ], line 164
+ this.bra = this.cursor;
+ switch (among_var) {
+ case 0:
+ this.limit_backward = v_2;
+ return false;
+ case 1:
+ // (, line 170
+ if (!(this.out_grouping_b(FrenchStemmer.g_v, 97, 251)))
+ {
+ this.limit_backward = v_2;
+ return false;
+ }
+ // delete, line 170
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ }
+ this.limit_backward = v_2;
+ return true;
+ }
+
+ function r_verb_suffix () : boolean
+ {
+ var among_var : int;
+ var v_1 : int;
+ var v_2 : int;
+ var v_3 : int;
+ // setlimit, line 174
+ v_1 = this.limit - this.cursor;
+ // tomark, line 174
+ if (this.cursor < this.I_pV)
+ {
+ return false;
+ }
+ this.cursor = this.I_pV;
+ v_2 = this.limit_backward;
+ this.limit_backward = this.cursor;
+ this.cursor = this.limit - v_1;
+ // (, line 174
+ // [, line 175
+ this.ket = this.cursor;
+ // substring, line 175
+ among_var = this.find_among_b(FrenchStemmer.a_6, 38);
+ if (among_var == 0)
+ {
+ this.limit_backward = v_2;
+ return false;
+ }
+ // ], line 175
+ this.bra = this.cursor;
+ switch (among_var) {
+ case 0:
+ this.limit_backward = v_2;
+ return false;
+ case 1:
+ // (, line 177
+ // call R2, line 177
+ if (!this.r_R2())
+ {
+ this.limit_backward = v_2;
+ return false;
+ }
+ // delete, line 177
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 2:
+ // (, line 185
+ // delete, line 185
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 3:
+ // (, line 190
+ // delete, line 190
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // try, line 191
+ v_3 = this.limit - this.cursor;
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ // (, line 191
+ // [, line 191
+ this.ket = this.cursor;
+ // literal, line 191
+ if (!(this.eq_s_b(1, "e")))
+ {
+ this.cursor = this.limit - v_3;
+ break lab0;
+ }
+ // ], line 191
+ this.bra = this.cursor;
+ // delete, line 191
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ }
+ break;
+ }
+ this.limit_backward = v_2;
+ return true;
+ }
+
+ function r_residual_suffix () : boolean
+ {
+ var among_var : int;
+ var v_1 : int;
+ var v_2 : int;
+ var v_3 : int;
+ var v_4 : int;
+ var v_5 : int;
+ // (, line 198
+ // try, line 199
+ v_1 = this.limit - this.cursor;
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ // (, line 199
+ // [, line 199
+ this.ket = this.cursor;
+ // literal, line 199
+ if (!(this.eq_s_b(1, "s")))
+ {
+ this.cursor = this.limit - v_1;
+ break lab0;
+ }
+ // ], line 199
+ this.bra = this.cursor;
+ // test, line 199
+ v_2 = this.limit - this.cursor;
+ if (!(this.out_grouping_b(FrenchStemmer.g_keep_with_s, 97, 232)))
+ {
+ this.cursor = this.limit - v_1;
+ break lab0;
+ }
+ this.cursor = this.limit - v_2;
+ // delete, line 199
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ }
+ // setlimit, line 200
+ v_3 = this.limit - this.cursor;
+ // tomark, line 200
+ if (this.cursor < this.I_pV)
+ {
+ return false;
+ }
+ this.cursor = this.I_pV;
+ v_4 = this.limit_backward;
+ this.limit_backward = this.cursor;
+ this.cursor = this.limit - v_3;
+ // (, line 200
+ // [, line 201
+ this.ket = this.cursor;
+ // substring, line 201
+ among_var = this.find_among_b(FrenchStemmer.a_7, 7);
+ if (among_var == 0)
+ {
+ this.limit_backward = v_4;
+ return false;
+ }
+ // ], line 201
+ this.bra = this.cursor;
+ switch (among_var) {
+ case 0:
+ this.limit_backward = v_4;
+ return false;
+ case 1:
+ // (, line 202
+ // call R2, line 202
+ if (!this.r_R2())
+ {
+ this.limit_backward = v_4;
+ return false;
+ }
+ // or, line 202
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ v_5 = this.limit - this.cursor;
+ var lab2 = true;
+ lab2: while (lab2 == true)
+ {
+ lab2 = false;
+ // literal, line 202
+ if (!(this.eq_s_b(1, "s")))
+ {
+ break lab2;
+ }
+ break lab1;
+ }
+ this.cursor = this.limit - v_5;
+ // literal, line 202
+ if (!(this.eq_s_b(1, "t")))
+ {
+ this.limit_backward = v_4;
+ return false;
+ }
+ }
+ // delete, line 202
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 2:
+ // (, line 204
+ // <-, line 204
+ if (!this.slice_from("i"))
+ {
+ return false;
+ }
+ break;
+ case 3:
+ // (, line 205
+ // delete, line 205
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 4:
+ // (, line 206
+ // literal, line 206
+ if (!(this.eq_s_b(2, "gu")))
+ {
+ this.limit_backward = v_4;
+ return false;
+ }
+ // delete, line 206
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ }
+ this.limit_backward = v_4;
+ return true;
+ }
+
+ function r_un_double () : boolean
+ {
+ var v_1 : int;
+ // (, line 211
+ // test, line 212
+ v_1 = this.limit - this.cursor;
+ // among, line 212
+ if (this.find_among_b(FrenchStemmer.a_8, 5) == 0)
+ {
+ return false;
+ }
+ this.cursor = this.limit - v_1;
+ // [, line 212
+ this.ket = this.cursor;
+ // next, line 212
+ if (this.cursor <= this.limit_backward)
+ {
+ return false;
+ }
+ this.cursor--;
+ // ], line 212
+ this.bra = this.cursor;
+ // delete, line 212
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_un_accent () : boolean
+ {
+ var v_3 : int;
+ // (, line 215
+ // atleast, line 216
+ {
+ var v_1 = 1;
+ // atleast, line 216
+ replab0: while(true)
+ {
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ if (!(this.out_grouping_b(FrenchStemmer.g_v, 97, 251)))
+ {
+ break lab1;
+ }
+ v_1--;
+ continue replab0;
+ }
+ break replab0;
+ }
+ if (v_1 > 0)
+ {
+ return false;
+ }
+ }
+ // [, line 217
+ this.ket = this.cursor;
+ // or, line 217
+ var lab2 = true;
+ lab2: while (lab2 == true)
+ {
+ lab2 = false;
+ v_3 = this.limit - this.cursor;
+ var lab3 = true;
+ lab3: while (lab3 == true)
+ {
+ lab3 = false;
+ // literal, line 217
+ if (!(this.eq_s_b(1, "\u00E9")))
+ {
+ break lab3;
+ }
+ break lab2;
+ }
+ this.cursor = this.limit - v_3;
+ // literal, line 217
+ if (!(this.eq_s_b(1, "\u00E8")))
+ {
+ return false;
+ }
+ }
+ // ], line 217
+ this.bra = this.cursor;
+ // <-, line 217
+ if (!this.slice_from("e"))
+ {
+ return false;
+ }
+ return true;
+ }
+
+ override function stem () : boolean
+ {
+ var v_1 : int;
+ var v_2 : int;
+ var v_3 : int;
+ var v_4 : int;
+ var v_5 : int;
+ var v_6 : int;
+ var v_7 : int;
+ var v_8 : int;
+ var v_9 : int;
+ var v_10 : int;
+ var v_11 : int;
+ // (, line 221
+ // do, line 223
+ v_1 = this.cursor;
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ // call prelude, line 223
+ if (!this.r_prelude())
+ {
+ break lab0;
+ }
+ }
+ this.cursor = v_1;
+ // do, line 224
+ v_2 = this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ // call mark_regions, line 224
+ if (!this.r_mark_regions())
+ {
+ break lab1;
+ }
+ }
+ this.cursor = v_2;
+ // backwards, line 225
+ this.limit_backward = this.cursor; this.cursor = this.limit;
+ // (, line 225
+ // do, line 227
+ v_3 = this.limit - this.cursor;
+ var lab2 = true;
+ lab2: while (lab2 == true)
+ {
+ lab2 = false;
+ // (, line 227
+ // or, line 237
+ var lab3 = true;
+ lab3: while (lab3 == true)
+ {
+ lab3 = false;
+ v_4 = this.limit - this.cursor;
+ var lab4 = true;
+ lab4: while (lab4 == true)
+ {
+ lab4 = false;
+ // (, line 228
+ // and, line 233
+ v_5 = this.limit - this.cursor;
+ // (, line 229
+ // or, line 229
+ var lab5 = true;
+ lab5: while (lab5 == true)
+ {
+ lab5 = false;
+ v_6 = this.limit - this.cursor;
+ var lab6 = true;
+ lab6: while (lab6 == true)
+ {
+ lab6 = false;
+ // call standard_suffix, line 229
+ if (!this.r_standard_suffix())
+ {
+ break lab6;
+ }
+ break lab5;
+ }
+ this.cursor = this.limit - v_6;
+ var lab7 = true;
+ lab7: while (lab7 == true)
+ {
+ lab7 = false;
+ // call i_verb_suffix, line 230
+ if (!this.r_i_verb_suffix())
+ {
+ break lab7;
+ }
+ break lab5;
+ }
+ this.cursor = this.limit - v_6;
+ // call verb_suffix, line 231
+ if (!this.r_verb_suffix())
+ {
+ break lab4;
+ }
+ }
+ this.cursor = this.limit - v_5;
+ // try, line 234
+ v_7 = this.limit - this.cursor;
+ var lab8 = true;
+ lab8: while (lab8 == true)
+ {
+ lab8 = false;
+ // (, line 234
+ // [, line 234
+ this.ket = this.cursor;
+ // or, line 234
+ var lab9 = true;
+ lab9: while (lab9 == true)
+ {
+ lab9 = false;
+ v_8 = this.limit - this.cursor;
+ var lab10 = true;
+ lab10: while (lab10 == true)
+ {
+ lab10 = false;
+ // (, line 234
+ // literal, line 234
+ if (!(this.eq_s_b(1, "Y")))
+ {
+ break lab10;
+ }
+ // ], line 234
+ this.bra = this.cursor;
+ // <-, line 234
+ if (!this.slice_from("i"))
+ {
+ return false;
+ }
+ break lab9;
+ }
+ this.cursor = this.limit - v_8;
+ // (, line 235
+ // literal, line 235
+ if (!(this.eq_s_b(1, "\u00E7")))
+ {
+ this.cursor = this.limit - v_7;
+ break lab8;
+ }
+ // ], line 235
+ this.bra = this.cursor;
+ // <-, line 235
+ if (!this.slice_from("c"))
+ {
+ return false;
+ }
+ }
+ }
+ break lab3;
+ }
+ this.cursor = this.limit - v_4;
+ // call residual_suffix, line 238
+ if (!this.r_residual_suffix())
+ {
+ break lab2;
+ }
+ }
+ }
+ this.cursor = this.limit - v_3;
+ // do, line 243
+ v_9 = this.limit - this.cursor;
+ var lab11 = true;
+ lab11: while (lab11 == true)
+ {
+ lab11 = false;
+ // call un_double, line 243
+ if (!this.r_un_double())
+ {
+ break lab11;
+ }
+ }
+ this.cursor = this.limit - v_9;
+ // do, line 244
+ v_10 = this.limit - this.cursor;
+ var lab12 = true;
+ lab12: while (lab12 == true)
+ {
+ lab12 = false;
+ // call un_accent, line 244
+ if (!this.r_un_accent())
+ {
+ break lab12;
+ }
+ }
+ this.cursor = this.limit - v_10;
+ this.cursor = this.limit_backward; // do, line 246
+ v_11 = this.cursor;
+ var lab13 = true;
+ lab13: while (lab13 == true)
+ {
+ lab13 = false;
+ // call postlude, line 246
+ if (!this.r_postlude())
+ {
+ break lab13;
+ }
+ }
+ this.cursor = v_11;
+ return true;
+ }
+
+ function equals (o : variant) : boolean {
+ return o instanceof FrenchStemmer;
+ }
+
+ function hashCode() : int
+ {
+ //http://stackoverflow.com/questions/194846/is-there-any-kind-of-hashcode-function-in-javascript
+ var classname = "FrenchStemmer";
+ var hash = 0;
+ if (classname.length == 0) return hash;
+ for (var i = 0; i < classname.length; i++) {
+ var char = classname.charCodeAt(i);
+ hash = ((hash << 5) - hash) + char;
+ hash = hash & hash; // Convert to 32bit integer
+ }
+ return hash;
+ }
+
+}
+
diff --git a/web/server/h2o/libh2o/misc/oktavia/src/stemmer/german-stemmer.jsx b/web/server/h2o/libh2o/misc/oktavia/src/stemmer/german-stemmer.jsx
new file mode 100644
index 00000000..7659b3a7
--- /dev/null
+++ b/web/server/h2o/libh2o/misc/oktavia/src/stemmer/german-stemmer.jsx
@@ -0,0 +1,894 @@
+// This file was generated automatically by the Snowball to JSX compiler
+
+import "base-stemmer.jsx";
+import "among.jsx";
+
+ /**
+ * This class was automatically generated by a Snowball to JSX compiler
+ * It implements the stemming algorithm defined by a snowball script.
+ */
+
+class GermanStemmer extends BaseStemmer
+{
+ static const serialVersionUID = 1;
+ static const methodObject = new GermanStemmer();
+
+ static const a_0 = [
+ 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)
+ ];
+
+ static const a_1 = [
+ 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)
+ ];
+
+ static const a_2 = [
+ new Among("en", -1, 1),
+ new Among("er", -1, 1),
+ new Among("st", -1, 2),
+ new Among("est", 2, 1)
+ ];
+
+ static const a_3 = [
+ new Among("ig", -1, 1),
+ new Among("lich", -1, 1)
+ ];
+
+ static const a_4 = [
+ 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)
+ ];
+
+ static const g_v = [17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 32, 8] : int[];
+
+ static const g_s_ending = [117, 30, 5] : int[];
+
+ static const g_st_ending = [117, 30, 4] : int[];
+
+ var I_x : int = 0;
+ var I_p2 : int = 0;
+ var I_p1 : int = 0;
+
+ function copy_from (other : GermanStemmer) : void
+ {
+ this.I_x = other.I_x;
+ this.I_p2 = other.I_p2;
+ this.I_p1 = other.I_p1;
+ super.copy_from(other);
+ }
+
+ function r_prelude () : boolean
+ {
+ var v_1 : int;
+ var v_2 : int;
+ var v_3 : int;
+ var v_4 : int;
+ var v_5 : int;
+ var v_6 : int;
+ // (, line 33
+ // test, line 35
+ v_1 = this.cursor;
+ // repeat, line 35
+ replab0: while(true)
+ {
+ v_2 = this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ // (, line 35
+ // or, line 38
+ var lab2 = true;
+ lab2: while (lab2 == true)
+ {
+ lab2 = false;
+ v_3 = this.cursor;
+ var lab3 = true;
+ lab3: while (lab3 == true)
+ {
+ lab3 = false;
+ // (, line 36
+ // [, line 37
+ this.bra = this.cursor;
+ // literal, line 37
+ if (!(this.eq_s(1, "\u00DF")))
+ {
+ break lab3;
+ }
+ // ], line 37
+ this.ket = this.cursor;
+ // <-, line 37
+ if (!this.slice_from("ss"))
+ {
+ return false;
+ }
+ break lab2;
+ }
+ this.cursor = v_3;
+ // next, line 38
+ if (this.cursor >= this.limit)
+ {
+ break lab1;
+ }
+ this.cursor++;
+ }
+ continue replab0;
+ }
+ this.cursor = v_2;
+ break replab0;
+ }
+ this.cursor = v_1;
+ // repeat, line 41
+ replab4: while(true)
+ {
+ v_4 = this.cursor;
+ var lab5 = true;
+ lab5: while (lab5 == true)
+ {
+ lab5 = false;
+ // goto, line 41
+ golab6: while(true)
+ {
+ v_5 = this.cursor;
+ var lab7 = true;
+ lab7: while (lab7 == true)
+ {
+ lab7 = false;
+ // (, line 41
+ if (!(this.in_grouping(GermanStemmer.g_v, 97, 252)))
+ {
+ break lab7;
+ }
+ // [, line 42
+ this.bra = this.cursor;
+ // or, line 42
+ var lab8 = true;
+ lab8: while (lab8 == true)
+ {
+ lab8 = false;
+ v_6 = this.cursor;
+ var lab9 = true;
+ lab9: while (lab9 == true)
+ {
+ lab9 = false;
+ // (, line 42
+ // literal, line 42
+ if (!(this.eq_s(1, "u")))
+ {
+ break lab9;
+ }
+ // ], line 42
+ this.ket = this.cursor;
+ if (!(this.in_grouping(GermanStemmer.g_v, 97, 252)))
+ {
+ break lab9;
+ }
+ // <-, line 42
+ if (!this.slice_from("U"))
+ {
+ return false;
+ }
+ break lab8;
+ }
+ this.cursor = v_6;
+ // (, line 43
+ // literal, line 43
+ if (!(this.eq_s(1, "y")))
+ {
+ break lab7;
+ }
+ // ], line 43
+ this.ket = this.cursor;
+ if (!(this.in_grouping(GermanStemmer.g_v, 97, 252)))
+ {
+ break lab7;
+ }
+ // <-, line 43
+ if (!this.slice_from("Y"))
+ {
+ return false;
+ }
+ }
+ this.cursor = v_5;
+ break golab6;
+ }
+ this.cursor = v_5;
+ if (this.cursor >= this.limit)
+ {
+ break lab5;
+ }
+ this.cursor++;
+ }
+ continue replab4;
+ }
+ this.cursor = v_4;
+ break replab4;
+ }
+ return true;
+ }
+
+ function r_mark_regions () : boolean
+ {
+ var v_1 : int;
+ // (, line 47
+ this.I_p1 = this.limit;
+ this.I_p2 = this.limit;
+ // test, line 52
+ v_1 = this.cursor;
+ // (, line 52
+ // hop, line 52
+ {
+ var c : int = this.cursor + 3;
+ if (0 > c || c > this.limit)
+ {
+ return false;
+ }
+ this.cursor = c;
+ }
+ // setmark x, line 52
+ this.I_x = this.cursor;
+ this.cursor = v_1;
+ // gopast, line 54
+ golab0: while(true)
+ {
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ if (!(this.in_grouping(GermanStemmer.g_v, 97, 252)))
+ {
+ break lab1;
+ }
+ break golab0;
+ }
+ if (this.cursor >= this.limit)
+ {
+ return false;
+ }
+ this.cursor++;
+ }
+ // gopast, line 54
+ golab2: while(true)
+ {
+ var lab3 = true;
+ lab3: while (lab3 == true)
+ {
+ lab3 = false;
+ if (!(this.out_grouping(GermanStemmer.g_v, 97, 252)))
+ {
+ break lab3;
+ }
+ break golab2;
+ }
+ if (this.cursor >= this.limit)
+ {
+ return false;
+ }
+ this.cursor++;
+ }
+ // setmark p1, line 54
+ this.I_p1 = this.cursor;
+ // try, line 55
+ var lab4 = true;
+ lab4: while (lab4 == true)
+ {
+ lab4 = false;
+ // (, line 55
+ if (!(this.I_p1 < this.I_x))
+ {
+ break lab4;
+ }
+ this.I_p1 = this.I_x;
+ }
+ // gopast, line 56
+ golab5: while(true)
+ {
+ var lab6 = true;
+ lab6: while (lab6 == true)
+ {
+ lab6 = false;
+ if (!(this.in_grouping(GermanStemmer.g_v, 97, 252)))
+ {
+ break lab6;
+ }
+ break golab5;
+ }
+ if (this.cursor >= this.limit)
+ {
+ return false;
+ }
+ this.cursor++;
+ }
+ // gopast, line 56
+ golab7: while(true)
+ {
+ var lab8 = true;
+ lab8: while (lab8 == true)
+ {
+ lab8 = false;
+ if (!(this.out_grouping(GermanStemmer.g_v, 97, 252)))
+ {
+ break lab8;
+ }
+ break golab7;
+ }
+ if (this.cursor >= this.limit)
+ {
+ return false;
+ }
+ this.cursor++;
+ }
+ // setmark p2, line 56
+ this.I_p2 = this.cursor;
+ return true;
+ }
+
+ function r_postlude () : boolean
+ {
+ var among_var : int;
+ var v_1 : int;
+ // repeat, line 60
+ replab0: while(true)
+ {
+ v_1 = this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ // (, line 60
+ // [, line 62
+ this.bra = this.cursor;
+ // substring, line 62
+ among_var = this.find_among(GermanStemmer.a_0, 6);
+ if (among_var == 0)
+ {
+ break lab1;
+ }
+ // ], line 62
+ this.ket = this.cursor;
+ switch (among_var) {
+ case 0:
+ break lab1;
+ case 1:
+ // (, line 63
+ // <-, line 63
+ if (!this.slice_from("y"))
+ {
+ return false;
+ }
+ break;
+ case 2:
+ // (, line 64
+ // <-, line 64
+ if (!this.slice_from("u"))
+ {
+ return false;
+ }
+ break;
+ case 3:
+ // (, line 65
+ // <-, line 65
+ if (!this.slice_from("a"))
+ {
+ return false;
+ }
+ break;
+ case 4:
+ // (, line 66
+ // <-, line 66
+ if (!this.slice_from("o"))
+ {
+ return false;
+ }
+ break;
+ case 5:
+ // (, line 67
+ // <-, line 67
+ if (!this.slice_from("u"))
+ {
+ return false;
+ }
+ break;
+ case 6:
+ // (, line 68
+ // next, line 68
+ if (this.cursor >= this.limit)
+ {
+ break lab1;
+ }
+ this.cursor++;
+ break;
+ }
+ continue replab0;
+ }
+ this.cursor = v_1;
+ break replab0;
+ }
+ return true;
+ }
+
+ function r_R1 () : boolean
+ {
+ if (!(this.I_p1 <= this.cursor))
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_R2 () : boolean
+ {
+ if (!(this.I_p2 <= this.cursor))
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_standard_suffix () : boolean
+ {
+ var among_var : int;
+ var v_1 : int;
+ var v_2 : int;
+ var v_3 : int;
+ var v_4 : int;
+ var v_5 : int;
+ var v_6 : int;
+ var v_7 : int;
+ var v_8 : int;
+ var v_9 : int;
+ var v_10 : int;
+ // (, line 78
+ // do, line 79
+ v_1 = this.limit - this.cursor;
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ // (, line 79
+ // [, line 80
+ this.ket = this.cursor;
+ // substring, line 80
+ among_var = this.find_among_b(GermanStemmer.a_1, 7);
+ if (among_var == 0)
+ {
+ break lab0;
+ }
+ // ], line 80
+ this.bra = this.cursor;
+ // call R1, line 80
+ if (!this.r_R1())
+ {
+ break lab0;
+ }
+ switch (among_var) {
+ case 0:
+ break lab0;
+ case 1:
+ // (, line 82
+ // delete, line 82
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 2:
+ // (, line 85
+ // delete, line 85
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // try, line 86
+ v_2 = this.limit - this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ // (, line 86
+ // [, line 86
+ this.ket = this.cursor;
+ // literal, line 86
+ if (!(this.eq_s_b(1, "s")))
+ {
+ this.cursor = this.limit - v_2;
+ break lab1;
+ }
+ // ], line 86
+ this.bra = this.cursor;
+ // literal, line 86
+ if (!(this.eq_s_b(3, "nis")))
+ {
+ this.cursor = this.limit - v_2;
+ break lab1;
+ }
+ // delete, line 86
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ }
+ break;
+ case 3:
+ // (, line 89
+ if (!(this.in_grouping_b(GermanStemmer.g_s_ending, 98, 116)))
+ {
+ break lab0;
+ }
+ // delete, line 89
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ }
+ }
+ this.cursor = this.limit - v_1;
+ // do, line 93
+ v_3 = this.limit - this.cursor;
+ var lab2 = true;
+ lab2: while (lab2 == true)
+ {
+ lab2 = false;
+ // (, line 93
+ // [, line 94
+ this.ket = this.cursor;
+ // substring, line 94
+ among_var = this.find_among_b(GermanStemmer.a_2, 4);
+ if (among_var == 0)
+ {
+ break lab2;
+ }
+ // ], line 94
+ this.bra = this.cursor;
+ // call R1, line 94
+ if (!this.r_R1())
+ {
+ break lab2;
+ }
+ switch (among_var) {
+ case 0:
+ break lab2;
+ case 1:
+ // (, line 96
+ // delete, line 96
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 2:
+ // (, line 99
+ if (!(this.in_grouping_b(GermanStemmer.g_st_ending, 98, 116)))
+ {
+ break lab2;
+ }
+ // hop, line 99
+ {
+ var c : int = this.cursor - 3;
+ if (this.limit_backward > c || c > this.limit)
+ {
+ break lab2;
+ }
+ this.cursor = c;
+ }
+ // delete, line 99
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ }
+ }
+ this.cursor = this.limit - v_3;
+ // do, line 103
+ v_4 = this.limit - this.cursor;
+ var lab3 = true;
+ lab3: while (lab3 == true)
+ {
+ lab3 = false;
+ // (, line 103
+ // [, line 104
+ this.ket = this.cursor;
+ // substring, line 104
+ among_var = this.find_among_b(GermanStemmer.a_4, 8);
+ if (among_var == 0)
+ {
+ break lab3;
+ }
+ // ], line 104
+ this.bra = this.cursor;
+ // call R2, line 104
+ if (!this.r_R2())
+ {
+ break lab3;
+ }
+ switch (among_var) {
+ case 0:
+ break lab3;
+ case 1:
+ // (, line 106
+ // delete, line 106
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // try, line 107
+ v_5 = this.limit - this.cursor;
+ var lab4 = true;
+ lab4: while (lab4 == true)
+ {
+ lab4 = false;
+ // (, line 107
+ // [, line 107
+ this.ket = this.cursor;
+ // literal, line 107
+ if (!(this.eq_s_b(2, "ig")))
+ {
+ this.cursor = this.limit - v_5;
+ break lab4;
+ }
+ // ], line 107
+ this.bra = this.cursor;
+ // not, line 107
+ {
+ v_6 = this.limit - this.cursor;
+ var lab5 = true;
+ lab5: while (lab5 == true)
+ {
+ lab5 = false;
+ // literal, line 107
+ if (!(this.eq_s_b(1, "e")))
+ {
+ break lab5;
+ }
+ this.cursor = this.limit - v_5;
+ break lab4;
+ }
+ this.cursor = this.limit - v_6;
+ }
+ // call R2, line 107
+ if (!this.r_R2())
+ {
+ this.cursor = this.limit - v_5;
+ break lab4;
+ }
+ // delete, line 107
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ }
+ break;
+ case 2:
+ // (, line 110
+ // not, line 110
+ {
+ v_7 = this.limit - this.cursor;
+ var lab6 = true;
+ lab6: while (lab6 == true)
+ {
+ lab6 = false;
+ // literal, line 110
+ if (!(this.eq_s_b(1, "e")))
+ {
+ break lab6;
+ }
+ break lab3;
+ }
+ this.cursor = this.limit - v_7;
+ }
+ // delete, line 110
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 3:
+ // (, line 113
+ // delete, line 113
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // try, line 114
+ v_8 = this.limit - this.cursor;
+ var lab7 = true;
+ lab7: while (lab7 == true)
+ {
+ lab7 = false;
+ // (, line 114
+ // [, line 115
+ this.ket = this.cursor;
+ // or, line 115
+ var lab8 = true;
+ lab8: while (lab8 == true)
+ {
+ lab8 = false;
+ v_9 = this.limit - this.cursor;
+ var lab9 = true;
+ lab9: while (lab9 == true)
+ {
+ lab9 = false;
+ // literal, line 115
+ if (!(this.eq_s_b(2, "er")))
+ {
+ break lab9;
+ }
+ break lab8;
+ }
+ this.cursor = this.limit - v_9;
+ // literal, line 115
+ if (!(this.eq_s_b(2, "en")))
+ {
+ this.cursor = this.limit - v_8;
+ break lab7;
+ }
+ }
+ // ], line 115
+ this.bra = this.cursor;
+ // call R1, line 115
+ if (!this.r_R1())
+ {
+ this.cursor = this.limit - v_8;
+ break lab7;
+ }
+ // delete, line 115
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ }
+ break;
+ case 4:
+ // (, line 119
+ // delete, line 119
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // try, line 120
+ v_10 = this.limit - this.cursor;
+ var lab10 = true;
+ lab10: while (lab10 == true)
+ {
+ lab10 = false;
+ // (, line 120
+ // [, line 121
+ this.ket = this.cursor;
+ // substring, line 121
+ among_var = this.find_among_b(GermanStemmer.a_3, 2);
+ if (among_var == 0)
+ {
+ this.cursor = this.limit - v_10;
+ break lab10;
+ }
+ // ], line 121
+ this.bra = this.cursor;
+ // call R2, line 121
+ if (!this.r_R2())
+ {
+ this.cursor = this.limit - v_10;
+ break lab10;
+ }
+ switch (among_var) {
+ case 0:
+ this.cursor = this.limit - v_10;
+ break lab10;
+ case 1:
+ // (, line 123
+ // delete, line 123
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ }
+ }
+ break;
+ }
+ }
+ this.cursor = this.limit - v_4;
+ return true;
+ }
+
+ override function stem () : boolean
+ {
+ var v_1 : int;
+ var v_2 : int;
+ var v_3 : int;
+ var v_4 : int;
+ // (, line 133
+ // do, line 134
+ v_1 = this.cursor;
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ // call prelude, line 134
+ if (!this.r_prelude())
+ {
+ break lab0;
+ }
+ }
+ this.cursor = v_1;
+ // do, line 135
+ v_2 = this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ // call mark_regions, line 135
+ if (!this.r_mark_regions())
+ {
+ break lab1;
+ }
+ }
+ this.cursor = v_2;
+ // backwards, line 136
+ this.limit_backward = this.cursor; this.cursor = this.limit;
+ // do, line 137
+ v_3 = this.limit - this.cursor;
+ var lab2 = true;
+ lab2: while (lab2 == true)
+ {
+ lab2 = false;
+ // call standard_suffix, line 137
+ if (!this.r_standard_suffix())
+ {
+ break lab2;
+ }
+ }
+ this.cursor = this.limit - v_3;
+ this.cursor = this.limit_backward; // do, line 138
+ v_4 = this.cursor;
+ var lab3 = true;
+ lab3: while (lab3 == true)
+ {
+ lab3 = false;
+ // call postlude, line 138
+ if (!this.r_postlude())
+ {
+ break lab3;
+ }
+ }
+ this.cursor = v_4;
+ return true;
+ }
+
+ function equals (o : variant) : boolean {
+ return o instanceof GermanStemmer;
+ }
+
+ function hashCode() : int
+ {
+ //http://stackoverflow.com/questions/194846/is-there-any-kind-of-hashcode-function-in-javascript
+ var classname = "GermanStemmer";
+ var hash = 0;
+ if (classname.length == 0) return hash;
+ for (var i = 0; i < classname.length; i++) {
+ var char = classname.charCodeAt(i);
+ hash = ((hash << 5) - hash) + char;
+ hash = hash & hash; // Convert to 32bit integer
+ }
+ return hash;
+ }
+
+}
+
diff --git a/web/server/h2o/libh2o/misc/oktavia/src/stemmer/hungarian-stemmer.jsx b/web/server/h2o/libh2o/misc/oktavia/src/stemmer/hungarian-stemmer.jsx
new file mode 100644
index 00000000..9d67dba4
--- /dev/null
+++ b/web/server/h2o/libh2o/misc/oktavia/src/stemmer/hungarian-stemmer.jsx
@@ -0,0 +1,1478 @@
+// This file was generated automatically by the Snowball to JSX compiler
+
+import "base-stemmer.jsx";
+import "among.jsx";
+
+ /**
+ * This class was automatically generated by a Snowball to JSX compiler
+ * It implements the stemming algorithm defined by a snowball script.
+ */
+
+class HungarianStemmer extends BaseStemmer
+{
+ static const serialVersionUID = 1;
+ static const methodObject = new HungarianStemmer();
+
+ static const a_0 = [
+ 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)
+ ];
+
+ static const a_1 = [
+ new Among("\u00E1", -1, 1),
+ new Among("\u00E9", -1, 2)
+ ];
+
+ static const a_2 = [
+ 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)
+ ];
+
+ static const a_3 = [
+ new Among("al", -1, 1),
+ new Among("el", -1, 2)
+ ];
+
+ static const a_4 = [
+ 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)
+ ];
+
+ static const a_5 = [
+ new Among("\u00E1n", -1, 2),
+ new Among("\u00E9n", -1, 1),
+ new Among("\u00E1nk\u00E9nt", -1, 3)
+ ];
+
+ static const a_6 = [
+ 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)
+ ];
+
+ static const a_7 = [
+ new Among("\u00E1", -1, 1),
+ new Among("\u00E9", -1, 2)
+ ];
+
+ static const a_8 = [
+ 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)
+ ];
+
+ static const a_9 = [
+ 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)
+ ];
+
+ static const a_10 = [
+ 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)
+ ];
+
+ static const a_11 = [
+ 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)
+ ];
+
+ static const g_v = [17, 65, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 17, 52, 14] : int[];
+
+ var I_p1 : int = 0;
+
+ function copy_from (other : HungarianStemmer) : void
+ {
+ this.I_p1 = other.I_p1;
+ super.copy_from(other);
+ }
+
+ function r_mark_regions () : boolean
+ {
+ var v_1 : int;
+ var v_2 : int;
+ var v_3 : int;
+ // (, line 44
+ this.I_p1 = this.limit;
+ // or, line 51
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ v_1 = this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ // (, line 48
+ if (!(this.in_grouping(HungarianStemmer.g_v, 97, 252)))
+ {
+ break lab1;
+ }
+ // goto, line 48
+ golab2: while(true)
+ {
+ v_2 = this.cursor;
+ var lab3 = true;
+ lab3: while (lab3 == true)
+ {
+ lab3 = false;
+ if (!(this.out_grouping(HungarianStemmer.g_v, 97, 252)))
+ {
+ break lab3;
+ }
+ this.cursor = v_2;
+ break golab2;
+ }
+ this.cursor = v_2;
+ if (this.cursor >= this.limit)
+ {
+ break lab1;
+ }
+ this.cursor++;
+ }
+ // or, line 49
+ var lab4 = true;
+ lab4: while (lab4 == true)
+ {
+ lab4 = false;
+ v_3 = this.cursor;
+ var lab5 = true;
+ lab5: while (lab5 == true)
+ {
+ lab5 = false;
+ // among, line 49
+ if (this.find_among(HungarianStemmer.a_0, 8) == 0)
+ {
+ break lab5;
+ }
+ break lab4;
+ }
+ this.cursor = v_3;
+ // next, line 49
+ if (this.cursor >= this.limit)
+ {
+ break lab1;
+ }
+ this.cursor++;
+ }
+ // setmark p1, line 50
+ this.I_p1 = this.cursor;
+ break lab0;
+ }
+ this.cursor = v_1;
+ // (, line 53
+ if (!(this.out_grouping(HungarianStemmer.g_v, 97, 252)))
+ {
+ return false;
+ }
+ // gopast, line 53
+ golab6: while(true)
+ {
+ var lab7 = true;
+ lab7: while (lab7 == true)
+ {
+ lab7 = false;
+ if (!(this.in_grouping(HungarianStemmer.g_v, 97, 252)))
+ {
+ break lab7;
+ }
+ break golab6;
+ }
+ if (this.cursor >= this.limit)
+ {
+ return false;
+ }
+ this.cursor++;
+ }
+ // setmark p1, line 53
+ this.I_p1 = this.cursor;
+ }
+ return true;
+ }
+
+ function r_R1 () : boolean
+ {
+ if (!(this.I_p1 <= this.cursor))
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_v_ending () : boolean
+ {
+ var among_var : int;
+ // (, line 60
+ // [, line 61
+ this.ket = this.cursor;
+ // substring, line 61
+ among_var = this.find_among_b(HungarianStemmer.a_1, 2);
+ if (among_var == 0)
+ {
+ return false;
+ }
+ // ], line 61
+ this.bra = this.cursor;
+ // call R1, line 61
+ if (!this.r_R1())
+ {
+ return false;
+ }
+ switch (among_var) {
+ case 0:
+ return false;
+ case 1:
+ // (, line 62
+ // <-, line 62
+ if (!this.slice_from("a"))
+ {
+ return false;
+ }
+ break;
+ case 2:
+ // (, line 63
+ // <-, line 63
+ if (!this.slice_from("e"))
+ {
+ return false;
+ }
+ break;
+ }
+ return true;
+ }
+
+ function r_double () : boolean
+ {
+ var v_1 : int;
+ // (, line 67
+ // test, line 68
+ v_1 = this.limit - this.cursor;
+ // among, line 68
+ if (this.find_among_b(HungarianStemmer.a_2, 23) == 0)
+ {
+ return false;
+ }
+ this.cursor = this.limit - v_1;
+ return true;
+ }
+
+ function r_undouble () : boolean
+ {
+ // (, line 72
+ // next, line 73
+ if (this.cursor <= this.limit_backward)
+ {
+ return false;
+ }
+ this.cursor--;
+ // [, line 73
+ this.ket = this.cursor;
+ // hop, line 73
+ {
+ var c : int = this.cursor - 1;
+ if (this.limit_backward > c || c > this.limit)
+ {
+ return false;
+ }
+ this.cursor = c;
+ }
+ // ], line 73
+ this.bra = this.cursor;
+ // delete, line 73
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_instrum () : boolean
+ {
+ var among_var : int;
+ // (, line 76
+ // [, line 77
+ this.ket = this.cursor;
+ // substring, line 77
+ among_var = this.find_among_b(HungarianStemmer.a_3, 2);
+ if (among_var == 0)
+ {
+ return false;
+ }
+ // ], line 77
+ this.bra = this.cursor;
+ // call R1, line 77
+ if (!this.r_R1())
+ {
+ return false;
+ }
+ switch (among_var) {
+ case 0:
+ return false;
+ case 1:
+ // (, line 78
+ // call double, line 78
+ if (!this.r_double())
+ {
+ return false;
+ }
+ break;
+ case 2:
+ // (, line 79
+ // call double, line 79
+ if (!this.r_double())
+ {
+ return false;
+ }
+ break;
+ }
+ // delete, line 81
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // call undouble, line 82
+ if (!this.r_undouble())
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_case () : boolean
+ {
+ // (, line 86
+ // [, line 87
+ this.ket = this.cursor;
+ // substring, line 87
+ if (this.find_among_b(HungarianStemmer.a_4, 44) == 0)
+ {
+ return false;
+ }
+ // ], line 87
+ this.bra = this.cursor;
+ // call R1, line 87
+ if (!this.r_R1())
+ {
+ return false;
+ }
+ // delete, line 111
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // call v_ending, line 112
+ if (!this.r_v_ending())
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_case_special () : boolean
+ {
+ var among_var : int;
+ // (, line 115
+ // [, line 116
+ this.ket = this.cursor;
+ // substring, line 116
+ among_var = this.find_among_b(HungarianStemmer.a_5, 3);
+ if (among_var == 0)
+ {
+ return false;
+ }
+ // ], line 116
+ this.bra = this.cursor;
+ // call R1, line 116
+ if (!this.r_R1())
+ {
+ return false;
+ }
+ switch (among_var) {
+ case 0:
+ return false;
+ case 1:
+ // (, line 117
+ // <-, line 117
+ if (!this.slice_from("e"))
+ {
+ return false;
+ }
+ break;
+ case 2:
+ // (, line 118
+ // <-, line 118
+ if (!this.slice_from("a"))
+ {
+ return false;
+ }
+ break;
+ case 3:
+ // (, line 119
+ // <-, line 119
+ if (!this.slice_from("a"))
+ {
+ return false;
+ }
+ break;
+ }
+ return true;
+ }
+
+ function r_case_other () : boolean
+ {
+ var among_var : int;
+ // (, line 123
+ // [, line 124
+ this.ket = this.cursor;
+ // substring, line 124
+ among_var = this.find_among_b(HungarianStemmer.a_6, 6);
+ if (among_var == 0)
+ {
+ return false;
+ }
+ // ], line 124
+ this.bra = this.cursor;
+ // call R1, line 124
+ if (!this.r_R1())
+ {
+ return false;
+ }
+ switch (among_var) {
+ case 0:
+ return false;
+ case 1:
+ // (, line 125
+ // delete, line 125
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 2:
+ // (, line 126
+ // delete, line 126
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 3:
+ // (, line 127
+ // <-, line 127
+ if (!this.slice_from("a"))
+ {
+ return false;
+ }
+ break;
+ case 4:
+ // (, line 128
+ // <-, line 128
+ if (!this.slice_from("e"))
+ {
+ return false;
+ }
+ break;
+ }
+ return true;
+ }
+
+ function r_factive () : boolean
+ {
+ var among_var : int;
+ // (, line 132
+ // [, line 133
+ this.ket = this.cursor;
+ // substring, line 133
+ among_var = this.find_among_b(HungarianStemmer.a_7, 2);
+ if (among_var == 0)
+ {
+ return false;
+ }
+ // ], line 133
+ this.bra = this.cursor;
+ // call R1, line 133
+ if (!this.r_R1())
+ {
+ return false;
+ }
+ switch (among_var) {
+ case 0:
+ return false;
+ case 1:
+ // (, line 134
+ // call double, line 134
+ if (!this.r_double())
+ {
+ return false;
+ }
+ break;
+ case 2:
+ // (, line 135
+ // call double, line 135
+ if (!this.r_double())
+ {
+ return false;
+ }
+ break;
+ }
+ // delete, line 137
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // call undouble, line 138
+ if (!this.r_undouble())
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_plural () : boolean
+ {
+ var among_var : int;
+ // (, line 141
+ // [, line 142
+ this.ket = this.cursor;
+ // substring, line 142
+ among_var = this.find_among_b(HungarianStemmer.a_8, 7);
+ if (among_var == 0)
+ {
+ return false;
+ }
+ // ], line 142
+ this.bra = this.cursor;
+ // call R1, line 142
+ if (!this.r_R1())
+ {
+ return false;
+ }
+ switch (among_var) {
+ case 0:
+ return false;
+ case 1:
+ // (, line 143
+ // <-, line 143
+ if (!this.slice_from("a"))
+ {
+ return false;
+ }
+ break;
+ case 2:
+ // (, line 144
+ // <-, line 144
+ if (!this.slice_from("e"))
+ {
+ return false;
+ }
+ break;
+ case 3:
+ // (, line 145
+ // delete, line 145
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 4:
+ // (, line 146
+ // delete, line 146
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 5:
+ // (, line 147
+ // delete, line 147
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 6:
+ // (, line 148
+ // delete, line 148
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 7:
+ // (, line 149
+ // delete, line 149
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ }
+ return true;
+ }
+
+ function r_owned () : boolean
+ {
+ var among_var : int;
+ // (, line 153
+ // [, line 154
+ this.ket = this.cursor;
+ // substring, line 154
+ among_var = this.find_among_b(HungarianStemmer.a_9, 12);
+ if (among_var == 0)
+ {
+ return false;
+ }
+ // ], line 154
+ this.bra = this.cursor;
+ // call R1, line 154
+ if (!this.r_R1())
+ {
+ return false;
+ }
+ switch (among_var) {
+ case 0:
+ return false;
+ case 1:
+ // (, line 155
+ // delete, line 155
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 2:
+ // (, line 156
+ // <-, line 156
+ if (!this.slice_from("e"))
+ {
+ return false;
+ }
+ break;
+ case 3:
+ // (, line 157
+ // <-, line 157
+ if (!this.slice_from("a"))
+ {
+ return false;
+ }
+ break;
+ case 4:
+ // (, line 158
+ // delete, line 158
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 5:
+ // (, line 159
+ // <-, line 159
+ if (!this.slice_from("e"))
+ {
+ return false;
+ }
+ break;
+ case 6:
+ // (, line 160
+ // <-, line 160
+ if (!this.slice_from("a"))
+ {
+ return false;
+ }
+ break;
+ case 7:
+ // (, line 161
+ // delete, line 161
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 8:
+ // (, line 162
+ // <-, line 162
+ if (!this.slice_from("e"))
+ {
+ return false;
+ }
+ break;
+ case 9:
+ // (, line 163
+ // delete, line 163
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ }
+ return true;
+ }
+
+ function r_sing_owner () : boolean
+ {
+ var among_var : int;
+ // (, line 167
+ // [, line 168
+ this.ket = this.cursor;
+ // substring, line 168
+ among_var = this.find_among_b(HungarianStemmer.a_10, 31);
+ if (among_var == 0)
+ {
+ return false;
+ }
+ // ], line 168
+ this.bra = this.cursor;
+ // call R1, line 168
+ if (!this.r_R1())
+ {
+ return false;
+ }
+ switch (among_var) {
+ case 0:
+ return false;
+ case 1:
+ // (, line 169
+ // delete, line 169
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 2:
+ // (, line 170
+ // <-, line 170
+ if (!this.slice_from("a"))
+ {
+ return false;
+ }
+ break;
+ case 3:
+ // (, line 171
+ // <-, line 171
+ if (!this.slice_from("e"))
+ {
+ return false;
+ }
+ break;
+ case 4:
+ // (, line 172
+ // delete, line 172
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 5:
+ // (, line 173
+ // <-, line 173
+ if (!this.slice_from("a"))
+ {
+ return false;
+ }
+ break;
+ case 6:
+ // (, line 174
+ // <-, line 174
+ if (!this.slice_from("e"))
+ {
+ return false;
+ }
+ break;
+ case 7:
+ // (, line 175
+ // delete, line 175
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 8:
+ // (, line 176
+ // delete, line 176
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 9:
+ // (, line 177
+ // delete, line 177
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 10:
+ // (, line 178
+ // <-, line 178
+ if (!this.slice_from("a"))
+ {
+ return false;
+ }
+ break;
+ case 11:
+ // (, line 179
+ // <-, line 179
+ if (!this.slice_from("e"))
+ {
+ return false;
+ }
+ break;
+ case 12:
+ // (, line 180
+ // delete, line 180
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 13:
+ // (, line 181
+ // delete, line 181
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 14:
+ // (, line 182
+ // <-, line 182
+ if (!this.slice_from("a"))
+ {
+ return false;
+ }
+ break;
+ case 15:
+ // (, line 183
+ // <-, line 183
+ if (!this.slice_from("e"))
+ {
+ return false;
+ }
+ break;
+ case 16:
+ // (, line 184
+ // delete, line 184
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 17:
+ // (, line 185
+ // delete, line 185
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 18:
+ // (, line 186
+ // delete, line 186
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 19:
+ // (, line 187
+ // <-, line 187
+ if (!this.slice_from("a"))
+ {
+ return false;
+ }
+ break;
+ case 20:
+ // (, line 188
+ // <-, line 188
+ if (!this.slice_from("e"))
+ {
+ return false;
+ }
+ break;
+ }
+ return true;
+ }
+
+ function r_plur_owner () : boolean
+ {
+ var among_var : int;
+ // (, line 192
+ // [, line 193
+ this.ket = this.cursor;
+ // substring, line 193
+ among_var = this.find_among_b(HungarianStemmer.a_11, 42);
+ if (among_var == 0)
+ {
+ return false;
+ }
+ // ], line 193
+ this.bra = this.cursor;
+ // call R1, line 193
+ if (!this.r_R1())
+ {
+ return false;
+ }
+ switch (among_var) {
+ case 0:
+ return false;
+ case 1:
+ // (, line 194
+ // delete, line 194
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 2:
+ // (, line 195
+ // <-, line 195
+ if (!this.slice_from("a"))
+ {
+ return false;
+ }
+ break;
+ case 3:
+ // (, line 196
+ // <-, line 196
+ if (!this.slice_from("e"))
+ {
+ return false;
+ }
+ break;
+ case 4:
+ // (, line 197
+ // delete, line 197
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 5:
+ // (, line 198
+ // delete, line 198
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 6:
+ // (, line 199
+ // delete, line 199
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 7:
+ // (, line 200
+ // <-, line 200
+ if (!this.slice_from("a"))
+ {
+ return false;
+ }
+ break;
+ case 8:
+ // (, line 201
+ // <-, line 201
+ if (!this.slice_from("e"))
+ {
+ return false;
+ }
+ break;
+ case 9:
+ // (, line 202
+ // delete, line 202
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 10:
+ // (, line 203
+ // delete, line 203
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 11:
+ // (, line 204
+ // delete, line 204
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 12:
+ // (, line 205
+ // <-, line 205
+ if (!this.slice_from("a"))
+ {
+ return false;
+ }
+ break;
+ case 13:
+ // (, line 206
+ // <-, line 206
+ if (!this.slice_from("e"))
+ {
+ return false;
+ }
+ break;
+ case 14:
+ // (, line 207
+ // delete, line 207
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 15:
+ // (, line 208
+ // delete, line 208
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 16:
+ // (, line 209
+ // delete, line 209
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 17:
+ // (, line 210
+ // delete, line 210
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 18:
+ // (, line 211
+ // <-, line 211
+ if (!this.slice_from("a"))
+ {
+ return false;
+ }
+ break;
+ case 19:
+ // (, line 212
+ // <-, line 212
+ if (!this.slice_from("e"))
+ {
+ return false;
+ }
+ break;
+ case 20:
+ // (, line 214
+ // delete, line 214
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 21:
+ // (, line 215
+ // delete, line 215
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 22:
+ // (, line 216
+ // <-, line 216
+ if (!this.slice_from("a"))
+ {
+ return false;
+ }
+ break;
+ case 23:
+ // (, line 217
+ // <-, line 217
+ if (!this.slice_from("e"))
+ {
+ return false;
+ }
+ break;
+ case 24:
+ // (, line 218
+ // delete, line 218
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 25:
+ // (, line 219
+ // delete, line 219
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 26:
+ // (, line 220
+ // delete, line 220
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 27:
+ // (, line 221
+ // <-, line 221
+ if (!this.slice_from("a"))
+ {
+ return false;
+ }
+ break;
+ case 28:
+ // (, line 222
+ // <-, line 222
+ if (!this.slice_from("e"))
+ {
+ return false;
+ }
+ break;
+ case 29:
+ // (, line 223
+ // delete, line 223
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ }
+ return true;
+ }
+
+ override function stem () : boolean
+ {
+ var v_1 : int;
+ var v_2 : int;
+ var v_3 : int;
+ var v_4 : int;
+ var v_5 : int;
+ var v_6 : int;
+ var v_7 : int;
+ var v_8 : int;
+ var v_9 : int;
+ var v_10 : int;
+ // (, line 228
+ // do, line 229
+ v_1 = this.cursor;
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ // call mark_regions, line 229
+ if (!this.r_mark_regions())
+ {
+ break lab0;
+ }
+ }
+ this.cursor = v_1;
+ // backwards, line 230
+ this.limit_backward = this.cursor; this.cursor = this.limit;
+ // (, line 230
+ // do, line 231
+ v_2 = this.limit - this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ // call instrum, line 231
+ if (!this.r_instrum())
+ {
+ break lab1;
+ }
+ }
+ this.cursor = this.limit - v_2;
+ // do, line 232
+ v_3 = this.limit - this.cursor;
+ var lab2 = true;
+ lab2: while (lab2 == true)
+ {
+ lab2 = false;
+ // call case, line 232
+ if (!this.r_case())
+ {
+ break lab2;
+ }
+ }
+ this.cursor = this.limit - v_3;
+ // do, line 233
+ v_4 = this.limit - this.cursor;
+ var lab3 = true;
+ lab3: while (lab3 == true)
+ {
+ lab3 = false;
+ // call case_special, line 233
+ if (!this.r_case_special())
+ {
+ break lab3;
+ }
+ }
+ this.cursor = this.limit - v_4;
+ // do, line 234
+ v_5 = this.limit - this.cursor;
+ var lab4 = true;
+ lab4: while (lab4 == true)
+ {
+ lab4 = false;
+ // call case_other, line 234
+ if (!this.r_case_other())
+ {
+ break lab4;
+ }
+ }
+ this.cursor = this.limit - v_5;
+ // do, line 235
+ v_6 = this.limit - this.cursor;
+ var lab5 = true;
+ lab5: while (lab5 == true)
+ {
+ lab5 = false;
+ // call factive, line 235
+ if (!this.r_factive())
+ {
+ break lab5;
+ }
+ }
+ this.cursor = this.limit - v_6;
+ // do, line 236
+ v_7 = this.limit - this.cursor;
+ var lab6 = true;
+ lab6: while (lab6 == true)
+ {
+ lab6 = false;
+ // call owned, line 236
+ if (!this.r_owned())
+ {
+ break lab6;
+ }
+ }
+ this.cursor = this.limit - v_7;
+ // do, line 237
+ v_8 = this.limit - this.cursor;
+ var lab7 = true;
+ lab7: while (lab7 == true)
+ {
+ lab7 = false;
+ // call sing_owner, line 237
+ if (!this.r_sing_owner())
+ {
+ break lab7;
+ }
+ }
+ this.cursor = this.limit - v_8;
+ // do, line 238
+ v_9 = this.limit - this.cursor;
+ var lab8 = true;
+ lab8: while (lab8 == true)
+ {
+ lab8 = false;
+ // call plur_owner, line 238
+ if (!this.r_plur_owner())
+ {
+ break lab8;
+ }
+ }
+ this.cursor = this.limit - v_9;
+ // do, line 239
+ v_10 = this.limit - this.cursor;
+ var lab9 = true;
+ lab9: while (lab9 == true)
+ {
+ lab9 = false;
+ // call plural, line 239
+ if (!this.r_plural())
+ {
+ break lab9;
+ }
+ }
+ this.cursor = this.limit - v_10;
+ this.cursor = this.limit_backward; return true;
+ }
+
+ function equals (o : variant) : boolean {
+ return o instanceof HungarianStemmer;
+ }
+
+ function hashCode() : int
+ {
+ //http://stackoverflow.com/questions/194846/is-there-any-kind-of-hashcode-function-in-javascript
+ var classname = "HungarianStemmer";
+ var hash = 0;
+ if (classname.length == 0) return hash;
+ for (var i = 0; i < classname.length; i++) {
+ var char = classname.charCodeAt(i);
+ hash = ((hash << 5) - hash) + char;
+ hash = hash & hash; // Convert to 32bit integer
+ }
+ return hash;
+ }
+
+}
+
diff --git a/web/server/h2o/libh2o/misc/oktavia/src/stemmer/italian-stemmer.jsx b/web/server/h2o/libh2o/misc/oktavia/src/stemmer/italian-stemmer.jsx
new file mode 100644
index 00000000..2072deb9
--- /dev/null
+++ b/web/server/h2o/libh2o/misc/oktavia/src/stemmer/italian-stemmer.jsx
@@ -0,0 +1,1412 @@
+// This file was generated automatically by the Snowball to JSX compiler
+
+import "base-stemmer.jsx";
+import "among.jsx";
+
+ /**
+ * This class was automatically generated by a Snowball to JSX compiler
+ * It implements the stemming algorithm defined by a snowball script.
+ */
+
+class ItalianStemmer extends BaseStemmer
+{
+ static const serialVersionUID = 1;
+ static const methodObject = new ItalianStemmer();
+
+ static const a_0 = [
+ 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)
+ ];
+
+ static const a_1 = [
+ new Among("", -1, 3),
+ new Among("I", 0, 1),
+ new Among("U", 0, 2)
+ ];
+
+ static const a_2 = [
+ 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)
+ ];
+
+ static const a_3 = [
+ 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)
+ ];
+
+ static const a_4 = [
+ new Among("ic", -1, -1),
+ new Among("abil", -1, -1),
+ new Among("os", -1, -1),
+ new Among("iv", -1, 1)
+ ];
+
+ static const a_5 = [
+ new Among("ic", -1, 1),
+ new Among("abil", -1, 1),
+ new Among("iv", -1, 1)
+ ];
+
+ static const a_6 = [
+ 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)
+ ];
+
+ static const a_7 = [
+ 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)
+ ];
+
+ static const g_v = [17, 65, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 8, 2, 1] : int[];
+
+ static const g_AEIO = [17, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 8, 2] : int[];
+
+ static const g_CG = [17] : int[];
+
+ var I_p2 : int = 0;
+ var I_p1 : int = 0;
+ var I_pV : int = 0;
+
+ function copy_from (other : ItalianStemmer) : void
+ {
+ this.I_p2 = other.I_p2;
+ this.I_p1 = other.I_p1;
+ this.I_pV = other.I_pV;
+ super.copy_from(other);
+ }
+
+ function r_prelude () : boolean
+ {
+ var among_var : int;
+ var v_1 : int;
+ var v_2 : int;
+ var v_3 : int;
+ var v_4 : int;
+ var v_5 : int;
+ // (, line 34
+ // test, line 35
+ v_1 = this.cursor;
+ // repeat, line 35
+ replab0: while(true)
+ {
+ v_2 = this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ // (, line 35
+ // [, line 36
+ this.bra = this.cursor;
+ // substring, line 36
+ among_var = this.find_among(ItalianStemmer.a_0, 7);
+ if (among_var == 0)
+ {
+ break lab1;
+ }
+ // ], line 36
+ this.ket = this.cursor;
+ switch (among_var) {
+ case 0:
+ break lab1;
+ case 1:
+ // (, line 37
+ // <-, line 37
+ if (!this.slice_from("\u00E0"))
+ {
+ return false;
+ }
+ break;
+ case 2:
+ // (, line 38
+ // <-, line 38
+ if (!this.slice_from("\u00E8"))
+ {
+ return false;
+ }
+ break;
+ case 3:
+ // (, line 39
+ // <-, line 39
+ if (!this.slice_from("\u00EC"))
+ {
+ return false;
+ }
+ break;
+ case 4:
+ // (, line 40
+ // <-, line 40
+ if (!this.slice_from("\u00F2"))
+ {
+ return false;
+ }
+ break;
+ case 5:
+ // (, line 41
+ // <-, line 41
+ if (!this.slice_from("\u00F9"))
+ {
+ return false;
+ }
+ break;
+ case 6:
+ // (, line 42
+ // <-, line 42
+ if (!this.slice_from("qU"))
+ {
+ return false;
+ }
+ break;
+ case 7:
+ // (, line 43
+ // next, line 43
+ if (this.cursor >= this.limit)
+ {
+ break lab1;
+ }
+ this.cursor++;
+ break;
+ }
+ continue replab0;
+ }
+ this.cursor = v_2;
+ break replab0;
+ }
+ this.cursor = v_1;
+ // repeat, line 46
+ replab2: while(true)
+ {
+ v_3 = this.cursor;
+ var lab3 = true;
+ lab3: while (lab3 == true)
+ {
+ lab3 = false;
+ // goto, line 46
+ golab4: while(true)
+ {
+ v_4 = this.cursor;
+ var lab5 = true;
+ lab5: while (lab5 == true)
+ {
+ lab5 = false;
+ // (, line 46
+ if (!(this.in_grouping(ItalianStemmer.g_v, 97, 249)))
+ {
+ break lab5;
+ }
+ // [, line 47
+ this.bra = this.cursor;
+ // or, line 47
+ var lab6 = true;
+ lab6: while (lab6 == true)
+ {
+ lab6 = false;
+ v_5 = this.cursor;
+ var lab7 = true;
+ lab7: while (lab7 == true)
+ {
+ lab7 = false;
+ // (, line 47
+ // literal, line 47
+ if (!(this.eq_s(1, "u")))
+ {
+ break lab7;
+ }
+ // ], line 47
+ this.ket = this.cursor;
+ if (!(this.in_grouping(ItalianStemmer.g_v, 97, 249)))
+ {
+ break lab7;
+ }
+ // <-, line 47
+ if (!this.slice_from("U"))
+ {
+ return false;
+ }
+ break lab6;
+ }
+ this.cursor = v_5;
+ // (, line 48
+ // literal, line 48
+ if (!(this.eq_s(1, "i")))
+ {
+ break lab5;
+ }
+ // ], line 48
+ this.ket = this.cursor;
+ if (!(this.in_grouping(ItalianStemmer.g_v, 97, 249)))
+ {
+ break lab5;
+ }
+ // <-, line 48
+ if (!this.slice_from("I"))
+ {
+ return false;
+ }
+ }
+ this.cursor = v_4;
+ break golab4;
+ }
+ this.cursor = v_4;
+ if (this.cursor >= this.limit)
+ {
+ break lab3;
+ }
+ this.cursor++;
+ }
+ continue replab2;
+ }
+ this.cursor = v_3;
+ break replab2;
+ }
+ return true;
+ }
+
+ function r_mark_regions () : boolean
+ {
+ var v_1 : int;
+ var v_2 : int;
+ var v_3 : int;
+ var v_6 : int;
+ var v_8 : int;
+ // (, line 52
+ this.I_pV = this.limit;
+ this.I_p1 = this.limit;
+ this.I_p2 = this.limit;
+ // do, line 58
+ v_1 = this.cursor;
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ // (, line 58
+ // or, line 60
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ v_2 = this.cursor;
+ var lab2 = true;
+ lab2: while (lab2 == true)
+ {
+ lab2 = false;
+ // (, line 59
+ if (!(this.in_grouping(ItalianStemmer.g_v, 97, 249)))
+ {
+ break lab2;
+ }
+ // or, line 59
+ var lab3 = true;
+ lab3: while (lab3 == true)
+ {
+ lab3 = false;
+ v_3 = this.cursor;
+ var lab4 = true;
+ lab4: while (lab4 == true)
+ {
+ lab4 = false;
+ // (, line 59
+ if (!(this.out_grouping(ItalianStemmer.g_v, 97, 249)))
+ {
+ break lab4;
+ }
+ // gopast, line 59
+ golab5: while(true)
+ {
+ var lab6 = true;
+ lab6: while (lab6 == true)
+ {
+ lab6 = false;
+ if (!(this.in_grouping(ItalianStemmer.g_v, 97, 249)))
+ {
+ break lab6;
+ }
+ break golab5;
+ }
+ if (this.cursor >= this.limit)
+ {
+ break lab4;
+ }
+ this.cursor++;
+ }
+ break lab3;
+ }
+ this.cursor = v_3;
+ // (, line 59
+ if (!(this.in_grouping(ItalianStemmer.g_v, 97, 249)))
+ {
+ break lab2;
+ }
+ // gopast, line 59
+ golab7: while(true)
+ {
+ var lab8 = true;
+ lab8: while (lab8 == true)
+ {
+ lab8 = false;
+ if (!(this.out_grouping(ItalianStemmer.g_v, 97, 249)))
+ {
+ break lab8;
+ }
+ break golab7;
+ }
+ if (this.cursor >= this.limit)
+ {
+ break lab2;
+ }
+ this.cursor++;
+ }
+ }
+ break lab1;
+ }
+ this.cursor = v_2;
+ // (, line 61
+ if (!(this.out_grouping(ItalianStemmer.g_v, 97, 249)))
+ {
+ break lab0;
+ }
+ // or, line 61
+ var lab9 = true;
+ lab9: while (lab9 == true)
+ {
+ lab9 = false;
+ v_6 = this.cursor;
+ var lab10 = true;
+ lab10: while (lab10 == true)
+ {
+ lab10 = false;
+ // (, line 61
+ if (!(this.out_grouping(ItalianStemmer.g_v, 97, 249)))
+ {
+ break lab10;
+ }
+ // gopast, line 61
+ golab11: while(true)
+ {
+ var lab12 = true;
+ lab12: while (lab12 == true)
+ {
+ lab12 = false;
+ if (!(this.in_grouping(ItalianStemmer.g_v, 97, 249)))
+ {
+ break lab12;
+ }
+ break golab11;
+ }
+ if (this.cursor >= this.limit)
+ {
+ break lab10;
+ }
+ this.cursor++;
+ }
+ break lab9;
+ }
+ this.cursor = v_6;
+ // (, line 61
+ if (!(this.in_grouping(ItalianStemmer.g_v, 97, 249)))
+ {
+ break lab0;
+ }
+ // next, line 61
+ if (this.cursor >= this.limit)
+ {
+ break lab0;
+ }
+ this.cursor++;
+ }
+ }
+ // setmark pV, line 62
+ this.I_pV = this.cursor;
+ }
+ this.cursor = v_1;
+ // do, line 64
+ v_8 = this.cursor;
+ var lab13 = true;
+ lab13: while (lab13 == true)
+ {
+ lab13 = false;
+ // (, line 64
+ // gopast, line 65
+ golab14: while(true)
+ {
+ var lab15 = true;
+ lab15: while (lab15 == true)
+ {
+ lab15 = false;
+ if (!(this.in_grouping(ItalianStemmer.g_v, 97, 249)))
+ {
+ break lab15;
+ }
+ break golab14;
+ }
+ if (this.cursor >= this.limit)
+ {
+ break lab13;
+ }
+ this.cursor++;
+ }
+ // gopast, line 65
+ golab16: while(true)
+ {
+ var lab17 = true;
+ lab17: while (lab17 == true)
+ {
+ lab17 = false;
+ if (!(this.out_grouping(ItalianStemmer.g_v, 97, 249)))
+ {
+ break lab17;
+ }
+ break golab16;
+ }
+ if (this.cursor >= this.limit)
+ {
+ break lab13;
+ }
+ this.cursor++;
+ }
+ // setmark p1, line 65
+ this.I_p1 = this.cursor;
+ // gopast, line 66
+ golab18: while(true)
+ {
+ var lab19 = true;
+ lab19: while (lab19 == true)
+ {
+ lab19 = false;
+ if (!(this.in_grouping(ItalianStemmer.g_v, 97, 249)))
+ {
+ break lab19;
+ }
+ break golab18;
+ }
+ if (this.cursor >= this.limit)
+ {
+ break lab13;
+ }
+ this.cursor++;
+ }
+ // gopast, line 66
+ golab20: while(true)
+ {
+ var lab21 = true;
+ lab21: while (lab21 == true)
+ {
+ lab21 = false;
+ if (!(this.out_grouping(ItalianStemmer.g_v, 97, 249)))
+ {
+ break lab21;
+ }
+ break golab20;
+ }
+ if (this.cursor >= this.limit)
+ {
+ break lab13;
+ }
+ this.cursor++;
+ }
+ // setmark p2, line 66
+ this.I_p2 = this.cursor;
+ }
+ this.cursor = v_8;
+ return true;
+ }
+
+ function r_postlude () : boolean
+ {
+ var among_var : int;
+ var v_1 : int;
+ // repeat, line 70
+ replab0: while(true)
+ {
+ v_1 = this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ // (, line 70
+ // [, line 72
+ this.bra = this.cursor;
+ // substring, line 72
+ among_var = this.find_among(ItalianStemmer.a_1, 3);
+ if (among_var == 0)
+ {
+ break lab1;
+ }
+ // ], line 72
+ this.ket = this.cursor;
+ switch (among_var) {
+ case 0:
+ break lab1;
+ case 1:
+ // (, line 73
+ // <-, line 73
+ if (!this.slice_from("i"))
+ {
+ return false;
+ }
+ break;
+ case 2:
+ // (, line 74
+ // <-, line 74
+ if (!this.slice_from("u"))
+ {
+ return false;
+ }
+ break;
+ case 3:
+ // (, line 75
+ // next, line 75
+ if (this.cursor >= this.limit)
+ {
+ break lab1;
+ }
+ this.cursor++;
+ break;
+ }
+ continue replab0;
+ }
+ this.cursor = v_1;
+ break replab0;
+ }
+ return true;
+ }
+
+ function r_RV () : boolean
+ {
+ if (!(this.I_pV <= this.cursor))
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_R1 () : boolean
+ {
+ if (!(this.I_p1 <= this.cursor))
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_R2 () : boolean
+ {
+ if (!(this.I_p2 <= this.cursor))
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_attached_pronoun () : boolean
+ {
+ var among_var : int;
+ // (, line 86
+ // [, line 87
+ this.ket = this.cursor;
+ // substring, line 87
+ if (this.find_among_b(ItalianStemmer.a_2, 37) == 0)
+ {
+ return false;
+ }
+ // ], line 87
+ this.bra = this.cursor;
+ // among, line 97
+ among_var = this.find_among_b(ItalianStemmer.a_3, 5);
+ if (among_var == 0)
+ {
+ return false;
+ }
+ // (, line 97
+ // call RV, line 97
+ if (!this.r_RV())
+ {
+ return false;
+ }
+ switch (among_var) {
+ case 0:
+ return false;
+ case 1:
+ // (, line 98
+ // delete, line 98
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 2:
+ // (, line 99
+ // <-, line 99
+ if (!this.slice_from("e"))
+ {
+ return false;
+ }
+ break;
+ }
+ return true;
+ }
+
+ function r_standard_suffix () : boolean
+ {
+ var among_var : int;
+ var v_1 : int;
+ var v_2 : int;
+ var v_3 : int;
+ var v_4 : int;
+ // (, line 103
+ // [, line 104
+ this.ket = this.cursor;
+ // substring, line 104
+ among_var = this.find_among_b(ItalianStemmer.a_6, 51);
+ if (among_var == 0)
+ {
+ return false;
+ }
+ // ], line 104
+ this.bra = this.cursor;
+ switch (among_var) {
+ case 0:
+ return false;
+ case 1:
+ // (, line 111
+ // call R2, line 111
+ if (!this.r_R2())
+ {
+ return false;
+ }
+ // delete, line 111
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 2:
+ // (, line 113
+ // call R2, line 113
+ if (!this.r_R2())
+ {
+ return false;
+ }
+ // delete, line 113
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // try, line 114
+ v_1 = this.limit - this.cursor;
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ // (, line 114
+ // [, line 114
+ this.ket = this.cursor;
+ // literal, line 114
+ if (!(this.eq_s_b(2, "ic")))
+ {
+ this.cursor = this.limit - v_1;
+ break lab0;
+ }
+ // ], line 114
+ this.bra = this.cursor;
+ // call R2, line 114
+ if (!this.r_R2())
+ {
+ this.cursor = this.limit - v_1;
+ break lab0;
+ }
+ // delete, line 114
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ }
+ break;
+ case 3:
+ // (, line 117
+ // call R2, line 117
+ if (!this.r_R2())
+ {
+ return false;
+ }
+ // <-, line 117
+ if (!this.slice_from("log"))
+ {
+ return false;
+ }
+ break;
+ case 4:
+ // (, line 119
+ // call R2, line 119
+ if (!this.r_R2())
+ {
+ return false;
+ }
+ // <-, line 119
+ if (!this.slice_from("u"))
+ {
+ return false;
+ }
+ break;
+ case 5:
+ // (, line 121
+ // call R2, line 121
+ if (!this.r_R2())
+ {
+ return false;
+ }
+ // <-, line 121
+ if (!this.slice_from("ente"))
+ {
+ return false;
+ }
+ break;
+ case 6:
+ // (, line 123
+ // call RV, line 123
+ if (!this.r_RV())
+ {
+ return false;
+ }
+ // delete, line 123
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 7:
+ // (, line 124
+ // call R1, line 125
+ if (!this.r_R1())
+ {
+ return false;
+ }
+ // delete, line 125
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // try, line 126
+ v_2 = this.limit - this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ // (, line 126
+ // [, line 127
+ this.ket = this.cursor;
+ // substring, line 127
+ among_var = this.find_among_b(ItalianStemmer.a_4, 4);
+ if (among_var == 0)
+ {
+ this.cursor = this.limit - v_2;
+ break lab1;
+ }
+ // ], line 127
+ this.bra = this.cursor;
+ // call R2, line 127
+ if (!this.r_R2())
+ {
+ this.cursor = this.limit - v_2;
+ break lab1;
+ }
+ // delete, line 127
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ switch (among_var) {
+ case 0:
+ this.cursor = this.limit - v_2;
+ break lab1;
+ case 1:
+ // (, line 128
+ // [, line 128
+ this.ket = this.cursor;
+ // literal, line 128
+ if (!(this.eq_s_b(2, "at")))
+ {
+ this.cursor = this.limit - v_2;
+ break lab1;
+ }
+ // ], line 128
+ this.bra = this.cursor;
+ // call R2, line 128
+ if (!this.r_R2())
+ {
+ this.cursor = this.limit - v_2;
+ break lab1;
+ }
+ // delete, line 128
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ }
+ }
+ break;
+ case 8:
+ // (, line 133
+ // call R2, line 134
+ if (!this.r_R2())
+ {
+ return false;
+ }
+ // delete, line 134
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // try, line 135
+ v_3 = this.limit - this.cursor;
+ var lab2 = true;
+ lab2: while (lab2 == true)
+ {
+ lab2 = false;
+ // (, line 135
+ // [, line 136
+ this.ket = this.cursor;
+ // substring, line 136
+ among_var = this.find_among_b(ItalianStemmer.a_5, 3);
+ if (among_var == 0)
+ {
+ this.cursor = this.limit - v_3;
+ break lab2;
+ }
+ // ], line 136
+ this.bra = this.cursor;
+ switch (among_var) {
+ case 0:
+ this.cursor = this.limit - v_3;
+ break lab2;
+ case 1:
+ // (, line 137
+ // call R2, line 137
+ if (!this.r_R2())
+ {
+ this.cursor = this.limit - v_3;
+ break lab2;
+ }
+ // delete, line 137
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ }
+ }
+ break;
+ case 9:
+ // (, line 141
+ // call R2, line 142
+ if (!this.r_R2())
+ {
+ return false;
+ }
+ // delete, line 142
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // try, line 143
+ v_4 = this.limit - this.cursor;
+ var lab3 = true;
+ lab3: while (lab3 == true)
+ {
+ lab3 = false;
+ // (, line 143
+ // [, line 143
+ this.ket = this.cursor;
+ // literal, line 143
+ if (!(this.eq_s_b(2, "at")))
+ {
+ this.cursor = this.limit - v_4;
+ break lab3;
+ }
+ // ], line 143
+ this.bra = this.cursor;
+ // call R2, line 143
+ if (!this.r_R2())
+ {
+ this.cursor = this.limit - v_4;
+ break lab3;
+ }
+ // delete, line 143
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // [, line 143
+ this.ket = this.cursor;
+ // literal, line 143
+ if (!(this.eq_s_b(2, "ic")))
+ {
+ this.cursor = this.limit - v_4;
+ break lab3;
+ }
+ // ], line 143
+ this.bra = this.cursor;
+ // call R2, line 143
+ if (!this.r_R2())
+ {
+ this.cursor = this.limit - v_4;
+ break lab3;
+ }
+ // delete, line 143
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ }
+ break;
+ }
+ return true;
+ }
+
+ function r_verb_suffix () : boolean
+ {
+ var among_var : int;
+ var v_1 : int;
+ var v_2 : int;
+ // setlimit, line 148
+ v_1 = this.limit - this.cursor;
+ // tomark, line 148
+ if (this.cursor < this.I_pV)
+ {
+ return false;
+ }
+ this.cursor = this.I_pV;
+ v_2 = this.limit_backward;
+ this.limit_backward = this.cursor;
+ this.cursor = this.limit - v_1;
+ // (, line 148
+ // [, line 149
+ this.ket = this.cursor;
+ // substring, line 149
+ among_var = this.find_among_b(ItalianStemmer.a_7, 87);
+ if (among_var == 0)
+ {
+ this.limit_backward = v_2;
+ return false;
+ }
+ // ], line 149
+ this.bra = this.cursor;
+ switch (among_var) {
+ case 0:
+ this.limit_backward = v_2;
+ return false;
+ case 1:
+ // (, line 163
+ // delete, line 163
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ }
+ this.limit_backward = v_2;
+ return true;
+ }
+
+ function r_vowel_suffix () : boolean
+ {
+ var v_1 : int;
+ var v_2 : int;
+ // (, line 170
+ // try, line 171
+ v_1 = this.limit - this.cursor;
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ // (, line 171
+ // [, line 172
+ this.ket = this.cursor;
+ if (!(this.in_grouping_b(ItalianStemmer.g_AEIO, 97, 242)))
+ {
+ this.cursor = this.limit - v_1;
+ break lab0;
+ }
+ // ], line 172
+ this.bra = this.cursor;
+ // call RV, line 172
+ if (!this.r_RV())
+ {
+ this.cursor = this.limit - v_1;
+ break lab0;
+ }
+ // delete, line 172
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // [, line 173
+ this.ket = this.cursor;
+ // literal, line 173
+ if (!(this.eq_s_b(1, "i")))
+ {
+ this.cursor = this.limit - v_1;
+ break lab0;
+ }
+ // ], line 173
+ this.bra = this.cursor;
+ // call RV, line 173
+ if (!this.r_RV())
+ {
+ this.cursor = this.limit - v_1;
+ break lab0;
+ }
+ // delete, line 173
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ }
+ // try, line 175
+ v_2 = this.limit - this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ // (, line 175
+ // [, line 176
+ this.ket = this.cursor;
+ // literal, line 176
+ if (!(this.eq_s_b(1, "h")))
+ {
+ this.cursor = this.limit - v_2;
+ break lab1;
+ }
+ // ], line 176
+ this.bra = this.cursor;
+ if (!(this.in_grouping_b(ItalianStemmer.g_CG, 99, 103)))
+ {
+ this.cursor = this.limit - v_2;
+ break lab1;
+ }
+ // call RV, line 176
+ if (!this.r_RV())
+ {
+ this.cursor = this.limit - v_2;
+ break lab1;
+ }
+ // delete, line 176
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ override function stem () : boolean
+ {
+ var v_1 : int;
+ var v_2 : int;
+ var v_3 : int;
+ var v_4 : int;
+ var v_5 : int;
+ var v_6 : int;
+ var v_7 : int;
+ // (, line 181
+ // do, line 182
+ v_1 = this.cursor;
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ // call prelude, line 182
+ if (!this.r_prelude())
+ {
+ break lab0;
+ }
+ }
+ this.cursor = v_1;
+ // do, line 183
+ v_2 = this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ // call mark_regions, line 183
+ if (!this.r_mark_regions())
+ {
+ break lab1;
+ }
+ }
+ this.cursor = v_2;
+ // backwards, line 184
+ this.limit_backward = this.cursor; this.cursor = this.limit;
+ // (, line 184
+ // do, line 185
+ v_3 = this.limit - this.cursor;
+ var lab2 = true;
+ lab2: while (lab2 == true)
+ {
+ lab2 = false;
+ // call attached_pronoun, line 185
+ if (!this.r_attached_pronoun())
+ {
+ break lab2;
+ }
+ }
+ this.cursor = this.limit - v_3;
+ // do, line 186
+ v_4 = this.limit - this.cursor;
+ var lab3 = true;
+ lab3: while (lab3 == true)
+ {
+ lab3 = false;
+ // (, line 186
+ // or, line 186
+ var lab4 = true;
+ lab4: while (lab4 == true)
+ {
+ lab4 = false;
+ v_5 = this.limit - this.cursor;
+ var lab5 = true;
+ lab5: while (lab5 == true)
+ {
+ lab5 = false;
+ // call standard_suffix, line 186
+ if (!this.r_standard_suffix())
+ {
+ break lab5;
+ }
+ break lab4;
+ }
+ this.cursor = this.limit - v_5;
+ // call verb_suffix, line 186
+ if (!this.r_verb_suffix())
+ {
+ break lab3;
+ }
+ }
+ }
+ this.cursor = this.limit - v_4;
+ // do, line 187
+ v_6 = this.limit - this.cursor;
+ var lab6 = true;
+ lab6: while (lab6 == true)
+ {
+ lab6 = false;
+ // call vowel_suffix, line 187
+ if (!this.r_vowel_suffix())
+ {
+ break lab6;
+ }
+ }
+ this.cursor = this.limit - v_6;
+ this.cursor = this.limit_backward; // do, line 189
+ v_7 = this.cursor;
+ var lab7 = true;
+ lab7: while (lab7 == true)
+ {
+ lab7 = false;
+ // call postlude, line 189
+ if (!this.r_postlude())
+ {
+ break lab7;
+ }
+ }
+ this.cursor = v_7;
+ return true;
+ }
+
+ function equals (o : variant) : boolean {
+ return o instanceof ItalianStemmer;
+ }
+
+ function hashCode() : int
+ {
+ //http://stackoverflow.com/questions/194846/is-there-any-kind-of-hashcode-function-in-javascript
+ var classname = "ItalianStemmer";
+ var hash = 0;
+ if (classname.length == 0) return hash;
+ for (var i = 0; i < classname.length; i++) {
+ var char = classname.charCodeAt(i);
+ hash = ((hash << 5) - hash) + char;
+ hash = hash & hash; // Convert to 32bit integer
+ }
+ return hash;
+ }
+
+}
+
diff --git a/web/server/h2o/libh2o/misc/oktavia/src/stemmer/norwegian-stemmer.jsx b/web/server/h2o/libh2o/misc/oktavia/src/stemmer/norwegian-stemmer.jsx
new file mode 100644
index 00000000..29640bf1
--- /dev/null
+++ b/web/server/h2o/libh2o/misc/oktavia/src/stemmer/norwegian-stemmer.jsx
@@ -0,0 +1,428 @@
+// This file was generated automatically by the Snowball to JSX compiler
+
+import "base-stemmer.jsx";
+import "among.jsx";
+
+ /**
+ * This class was automatically generated by a Snowball to JSX compiler
+ * It implements the stemming algorithm defined by a snowball script.
+ */
+
+class NorwegianStemmer extends BaseStemmer
+{
+ static const serialVersionUID = 1;
+ static const methodObject = new NorwegianStemmer();
+
+ static const a_0 = [
+ 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)
+ ];
+
+ static const a_1 = [
+ new Among("dt", -1, -1),
+ new Among("vt", -1, -1)
+ ];
+
+ static const a_2 = [
+ 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)
+ ];
+
+ static const g_v = [17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 128] : int[];
+
+ static const g_s_ending = [119, 125, 149, 1] : int[];
+
+ var I_x : int = 0;
+ var I_p1 : int = 0;
+
+ function copy_from (other : NorwegianStemmer) : void
+ {
+ this.I_x = other.I_x;
+ this.I_p1 = other.I_p1;
+ super.copy_from(other);
+ }
+
+ function r_mark_regions () : boolean
+ {
+ var v_1 : int;
+ var v_2 : int;
+ // (, line 26
+ this.I_p1 = this.limit;
+ // test, line 30
+ v_1 = this.cursor;
+ // (, line 30
+ // hop, line 30
+ {
+ var c : int = this.cursor + 3;
+ if (0 > c || c > this.limit)
+ {
+ return false;
+ }
+ this.cursor = c;
+ }
+ // setmark x, line 30
+ this.I_x = this.cursor;
+ this.cursor = v_1;
+ // goto, line 31
+ golab0: while(true)
+ {
+ v_2 = this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ if (!(this.in_grouping(NorwegianStemmer.g_v, 97, 248)))
+ {
+ break lab1;
+ }
+ this.cursor = v_2;
+ break golab0;
+ }
+ this.cursor = v_2;
+ if (this.cursor >= this.limit)
+ {
+ return false;
+ }
+ this.cursor++;
+ }
+ // gopast, line 31
+ golab2: while(true)
+ {
+ var lab3 = true;
+ lab3: while (lab3 == true)
+ {
+ lab3 = false;
+ if (!(this.out_grouping(NorwegianStemmer.g_v, 97, 248)))
+ {
+ break lab3;
+ }
+ break golab2;
+ }
+ if (this.cursor >= this.limit)
+ {
+ return false;
+ }
+ this.cursor++;
+ }
+ // setmark p1, line 31
+ this.I_p1 = this.cursor;
+ // try, line 32
+ var lab4 = true;
+ lab4: while (lab4 == true)
+ {
+ lab4 = false;
+ // (, line 32
+ if (!(this.I_p1 < this.I_x))
+ {
+ break lab4;
+ }
+ this.I_p1 = this.I_x;
+ }
+ return true;
+ }
+
+ function r_main_suffix () : boolean
+ {
+ var among_var : int;
+ var v_1 : int;
+ var v_2 : int;
+ var v_3 : int;
+ // (, line 37
+ // setlimit, line 38
+ v_1 = this.limit - this.cursor;
+ // tomark, line 38
+ if (this.cursor < this.I_p1)
+ {
+ return false;
+ }
+ this.cursor = this.I_p1;
+ v_2 = this.limit_backward;
+ this.limit_backward = this.cursor;
+ this.cursor = this.limit - v_1;
+ // (, line 38
+ // [, line 38
+ this.ket = this.cursor;
+ // substring, line 38
+ among_var = this.find_among_b(NorwegianStemmer.a_0, 29);
+ if (among_var == 0)
+ {
+ this.limit_backward = v_2;
+ return false;
+ }
+ // ], line 38
+ this.bra = this.cursor;
+ this.limit_backward = v_2;
+ switch (among_var) {
+ case 0:
+ return false;
+ case 1:
+ // (, line 44
+ // delete, line 44
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 2:
+ // (, line 46
+ // or, line 46
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ v_3 = this.limit - this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ if (!(this.in_grouping_b(NorwegianStemmer.g_s_ending, 98, 122)))
+ {
+ break lab1;
+ }
+ break lab0;
+ }
+ this.cursor = this.limit - v_3;
+ // (, line 46
+ // literal, line 46
+ if (!(this.eq_s_b(1, "k")))
+ {
+ return false;
+ }
+ if (!(this.out_grouping_b(NorwegianStemmer.g_v, 97, 248)))
+ {
+ return false;
+ }
+ }
+ // delete, line 46
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 3:
+ // (, line 48
+ // <-, line 48
+ if (!this.slice_from("er"))
+ {
+ return false;
+ }
+ break;
+ }
+ return true;
+ }
+
+ function r_consonant_pair () : boolean
+ {
+ var v_1 : int;
+ var v_2 : int;
+ var v_3 : int;
+ // (, line 52
+ // test, line 53
+ v_1 = this.limit - this.cursor;
+ // (, line 53
+ // setlimit, line 54
+ v_2 = this.limit - this.cursor;
+ // tomark, line 54
+ if (this.cursor < this.I_p1)
+ {
+ return false;
+ }
+ this.cursor = this.I_p1;
+ v_3 = this.limit_backward;
+ this.limit_backward = this.cursor;
+ this.cursor = this.limit - v_2;
+ // (, line 54
+ // [, line 54
+ this.ket = this.cursor;
+ // substring, line 54
+ if (this.find_among_b(NorwegianStemmer.a_1, 2) == 0)
+ {
+ this.limit_backward = v_3;
+ return false;
+ }
+ // ], line 54
+ this.bra = this.cursor;
+ this.limit_backward = v_3;
+ this.cursor = this.limit - v_1;
+ // next, line 59
+ if (this.cursor <= this.limit_backward)
+ {
+ return false;
+ }
+ this.cursor--;
+ // ], line 59
+ this.bra = this.cursor;
+ // delete, line 59
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_other_suffix () : boolean
+ {
+ var among_var : int;
+ var v_1 : int;
+ var v_2 : int;
+ // (, line 62
+ // setlimit, line 63
+ v_1 = this.limit - this.cursor;
+ // tomark, line 63
+ if (this.cursor < this.I_p1)
+ {
+ return false;
+ }
+ this.cursor = this.I_p1;
+ v_2 = this.limit_backward;
+ this.limit_backward = this.cursor;
+ this.cursor = this.limit - v_1;
+ // (, line 63
+ // [, line 63
+ this.ket = this.cursor;
+ // substring, line 63
+ among_var = this.find_among_b(NorwegianStemmer.a_2, 11);
+ if (among_var == 0)
+ {
+ this.limit_backward = v_2;
+ return false;
+ }
+ // ], line 63
+ this.bra = this.cursor;
+ this.limit_backward = v_2;
+ switch (among_var) {
+ case 0:
+ return false;
+ case 1:
+ // (, line 67
+ // delete, line 67
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ }
+ return true;
+ }
+
+ override function stem () : boolean
+ {
+ var v_1 : int;
+ var v_2 : int;
+ var v_3 : int;
+ var v_4 : int;
+ // (, line 72
+ // do, line 74
+ v_1 = this.cursor;
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ // call mark_regions, line 74
+ if (!this.r_mark_regions())
+ {
+ break lab0;
+ }
+ }
+ this.cursor = v_1;
+ // backwards, line 75
+ this.limit_backward = this.cursor; this.cursor = this.limit;
+ // (, line 75
+ // do, line 76
+ v_2 = this.limit - this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ // call main_suffix, line 76
+ if (!this.r_main_suffix())
+ {
+ break lab1;
+ }
+ }
+ this.cursor = this.limit - v_2;
+ // do, line 77
+ v_3 = this.limit - this.cursor;
+ var lab2 = true;
+ lab2: while (lab2 == true)
+ {
+ lab2 = false;
+ // call consonant_pair, line 77
+ if (!this.r_consonant_pair())
+ {
+ break lab2;
+ }
+ }
+ this.cursor = this.limit - v_3;
+ // do, line 78
+ v_4 = this.limit - this.cursor;
+ var lab3 = true;
+ lab3: while (lab3 == true)
+ {
+ lab3 = false;
+ // call other_suffix, line 78
+ if (!this.r_other_suffix())
+ {
+ break lab3;
+ }
+ }
+ this.cursor = this.limit - v_4;
+ this.cursor = this.limit_backward; return true;
+ }
+
+ function equals (o : variant) : boolean {
+ return o instanceof NorwegianStemmer;
+ }
+
+ function hashCode() : int
+ {
+ //http://stackoverflow.com/questions/194846/is-there-any-kind-of-hashcode-function-in-javascript
+ var classname = "NorwegianStemmer";
+ var hash = 0;
+ if (classname.length == 0) return hash;
+ for (var i = 0; i < classname.length; i++) {
+ var char = classname.charCodeAt(i);
+ hash = ((hash << 5) - hash) + char;
+ hash = hash & hash; // Convert to 32bit integer
+ }
+ return hash;
+ }
+
+}
+
diff --git a/web/server/h2o/libh2o/misc/oktavia/src/stemmer/porter-stemmer.jsx b/web/server/h2o/libh2o/misc/oktavia/src/stemmer/porter-stemmer.jsx
new file mode 100644
index 00000000..f8570501
--- /dev/null
+++ b/web/server/h2o/libh2o/misc/oktavia/src/stemmer/porter-stemmer.jsx
@@ -0,0 +1,1121 @@
+// This file was generated automatically by the Snowball to JSX compiler
+
+import "base-stemmer.jsx";
+import "among.jsx";
+
+ /**
+ * This class was automatically generated by a Snowball to JSX compiler
+ * It implements the stemming algorithm defined by a snowball script.
+ */
+
+class PorterStemmer extends BaseStemmer
+{
+ static const serialVersionUID = 1;
+ static const methodObject = new PorterStemmer();
+
+ static const a_0 = [
+ new Among("s", -1, 3),
+ new Among("ies", 0, 2),
+ new Among("sses", 0, 1),
+ new Among("ss", 0, -1)
+ ];
+
+ static const a_1 = [
+ 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)
+ ];
+
+ static const a_2 = [
+ new Among("ed", -1, 2),
+ new Among("eed", 0, 1),
+ new Among("ing", -1, 2)
+ ];
+
+ static const a_3 = [
+ 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)
+ ];
+
+ static const a_4 = [
+ 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)
+ ];
+
+ static const a_5 = [
+ 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)
+ ];
+
+ static const g_v = [17, 65, 16, 1] : int[];
+
+ static const g_v_WXY = [1, 17, 65, 208, 1] : int[];
+
+ var B_Y_found : boolean = false;
+ var I_p2 : int = 0;
+ var I_p1 : int = 0;
+
+ function copy_from (other : PorterStemmer) : void
+ {
+ this.B_Y_found = other.B_Y_found;
+ this.I_p2 = other.I_p2;
+ this.I_p1 = other.I_p1;
+ super.copy_from(other);
+ }
+
+ function r_shortv () : boolean
+ {
+ // (, line 19
+ if (!(this.out_grouping_b(PorterStemmer.g_v_WXY, 89, 121)))
+ {
+ return false;
+ }
+ if (!(this.in_grouping_b(PorterStemmer.g_v, 97, 121)))
+ {
+ return false;
+ }
+ if (!(this.out_grouping_b(PorterStemmer.g_v, 97, 121)))
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_R1 () : boolean
+ {
+ if (!(this.I_p1 <= this.cursor))
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_R2 () : boolean
+ {
+ if (!(this.I_p2 <= this.cursor))
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_Step_1a () : boolean
+ {
+ var among_var : int;
+ // (, line 24
+ // [, line 25
+ this.ket = this.cursor;
+ // substring, line 25
+ among_var = this.find_among_b(PorterStemmer.a_0, 4);
+ if (among_var == 0)
+ {
+ return false;
+ }
+ // ], line 25
+ this.bra = this.cursor;
+ switch (among_var) {
+ case 0:
+ return false;
+ case 1:
+ // (, line 26
+ // <-, line 26
+ if (!this.slice_from("ss"))
+ {
+ return false;
+ }
+ break;
+ case 2:
+ // (, line 27
+ // <-, line 27
+ if (!this.slice_from("i"))
+ {
+ return false;
+ }
+ break;
+ case 3:
+ // (, line 29
+ // delete, line 29
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ }
+ return true;
+ }
+
+ function r_Step_1b () : boolean
+ {
+ var among_var : int;
+ var v_1 : int;
+ var v_3 : int;
+ var v_4 : int;
+ // (, line 33
+ // [, line 34
+ this.ket = this.cursor;
+ // substring, line 34
+ among_var = this.find_among_b(PorterStemmer.a_2, 3);
+ if (among_var == 0)
+ {
+ return false;
+ }
+ // ], line 34
+ this.bra = this.cursor;
+ switch (among_var) {
+ case 0:
+ return false;
+ case 1:
+ // (, line 35
+ // call R1, line 35
+ if (!this.r_R1())
+ {
+ return false;
+ }
+ // <-, line 35
+ if (!this.slice_from("ee"))
+ {
+ return false;
+ }
+ break;
+ case 2:
+ // (, line 37
+ // test, line 38
+ v_1 = this.limit - this.cursor;
+ // gopast, line 38
+ golab0: while(true)
+ {
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ if (!(this.in_grouping_b(PorterStemmer.g_v, 97, 121)))
+ {
+ break lab1;
+ }
+ break golab0;
+ }
+ if (this.cursor <= this.limit_backward)
+ {
+ return false;
+ }
+ this.cursor--;
+ }
+ this.cursor = this.limit - v_1;
+ // delete, line 38
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // test, line 39
+ v_3 = this.limit - this.cursor;
+ // substring, line 39
+ among_var = this.find_among_b(PorterStemmer.a_1, 13);
+ if (among_var == 0)
+ {
+ return false;
+ }
+ this.cursor = this.limit - v_3;
+ switch (among_var) {
+ case 0:
+ return false;
+ case 1:
+ // (, line 41
+ // <+, line 41
+ {
+ var c : int = this.cursor;
+ this.insert(this.cursor, this.cursor, "e");
+ this.cursor = c;
+ }
+ break;
+ case 2:
+ // (, line 44
+ // [, line 44
+ this.ket = this.cursor;
+ // next, line 44
+ if (this.cursor <= this.limit_backward)
+ {
+ return false;
+ }
+ this.cursor--;
+ // ], line 44
+ this.bra = this.cursor;
+ // delete, line 44
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 3:
+ // (, line 45
+ // atmark, line 45
+ if (this.cursor != this.I_p1)
+ {
+ return false;
+ }
+ // test, line 45
+ v_4 = this.limit - this.cursor;
+ // call shortv, line 45
+ if (!this.r_shortv())
+ {
+ return false;
+ }
+ this.cursor = this.limit - v_4;
+ // <+, line 45
+ {
+ var c : int = this.cursor;
+ this.insert(this.cursor, this.cursor, "e");
+ this.cursor = c;
+ }
+ break;
+ }
+ break;
+ }
+ return true;
+ }
+
+ function r_Step_1c () : boolean
+ {
+ var v_1 : int;
+ // (, line 51
+ // [, line 52
+ this.ket = this.cursor;
+ // or, line 52
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ v_1 = this.limit - this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ // literal, line 52
+ if (!(this.eq_s_b(1, "y")))
+ {
+ break lab1;
+ }
+ break lab0;
+ }
+ this.cursor = this.limit - v_1;
+ // literal, line 52
+ if (!(this.eq_s_b(1, "Y")))
+ {
+ return false;
+ }
+ }
+ // ], line 52
+ this.bra = this.cursor;
+ // gopast, line 53
+ golab2: while(true)
+ {
+ var lab3 = true;
+ lab3: while (lab3 == true)
+ {
+ lab3 = false;
+ if (!(this.in_grouping_b(PorterStemmer.g_v, 97, 121)))
+ {
+ break lab3;
+ }
+ break golab2;
+ }
+ if (this.cursor <= this.limit_backward)
+ {
+ return false;
+ }
+ this.cursor--;
+ }
+ // <-, line 54
+ if (!this.slice_from("i"))
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_Step_2 () : boolean
+ {
+ var among_var : int;
+ // (, line 57
+ // [, line 58
+ this.ket = this.cursor;
+ // substring, line 58
+ among_var = this.find_among_b(PorterStemmer.a_3, 20);
+ if (among_var == 0)
+ {
+ return false;
+ }
+ // ], line 58
+ this.bra = this.cursor;
+ // call R1, line 58
+ if (!this.r_R1())
+ {
+ return false;
+ }
+ switch (among_var) {
+ case 0:
+ return false;
+ case 1:
+ // (, line 59
+ // <-, line 59
+ if (!this.slice_from("tion"))
+ {
+ return false;
+ }
+ break;
+ case 2:
+ // (, line 60
+ // <-, line 60
+ if (!this.slice_from("ence"))
+ {
+ return false;
+ }
+ break;
+ case 3:
+ // (, line 61
+ // <-, line 61
+ if (!this.slice_from("ance"))
+ {
+ return false;
+ }
+ break;
+ case 4:
+ // (, line 62
+ // <-, line 62
+ if (!this.slice_from("able"))
+ {
+ return false;
+ }
+ break;
+ case 5:
+ // (, line 63
+ // <-, line 63
+ if (!this.slice_from("ent"))
+ {
+ return false;
+ }
+ break;
+ case 6:
+ // (, line 64
+ // <-, line 64
+ if (!this.slice_from("e"))
+ {
+ return false;
+ }
+ break;
+ case 7:
+ // (, line 66
+ // <-, line 66
+ if (!this.slice_from("ize"))
+ {
+ return false;
+ }
+ break;
+ case 8:
+ // (, line 68
+ // <-, line 68
+ if (!this.slice_from("ate"))
+ {
+ return false;
+ }
+ break;
+ case 9:
+ // (, line 69
+ // <-, line 69
+ if (!this.slice_from("al"))
+ {
+ return false;
+ }
+ break;
+ case 10:
+ // (, line 71
+ // <-, line 71
+ if (!this.slice_from("al"))
+ {
+ return false;
+ }
+ break;
+ case 11:
+ // (, line 72
+ // <-, line 72
+ if (!this.slice_from("ful"))
+ {
+ return false;
+ }
+ break;
+ case 12:
+ // (, line 74
+ // <-, line 74
+ if (!this.slice_from("ous"))
+ {
+ return false;
+ }
+ break;
+ case 13:
+ // (, line 76
+ // <-, line 76
+ if (!this.slice_from("ive"))
+ {
+ return false;
+ }
+ break;
+ case 14:
+ // (, line 77
+ // <-, line 77
+ if (!this.slice_from("ble"))
+ {
+ return false;
+ }
+ break;
+ }
+ return true;
+ }
+
+ function r_Step_3 () : boolean
+ {
+ var among_var : int;
+ // (, line 81
+ // [, line 82
+ this.ket = this.cursor;
+ // substring, line 82
+ among_var = this.find_among_b(PorterStemmer.a_4, 7);
+ if (among_var == 0)
+ {
+ return false;
+ }
+ // ], line 82
+ this.bra = this.cursor;
+ // call R1, line 82
+ if (!this.r_R1())
+ {
+ return false;
+ }
+ switch (among_var) {
+ case 0:
+ return false;
+ case 1:
+ // (, line 83
+ // <-, line 83
+ if (!this.slice_from("al"))
+ {
+ return false;
+ }
+ break;
+ case 2:
+ // (, line 85
+ // <-, line 85
+ if (!this.slice_from("ic"))
+ {
+ return false;
+ }
+ break;
+ case 3:
+ // (, line 87
+ // delete, line 87
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ }
+ return true;
+ }
+
+ function r_Step_4 () : boolean
+ {
+ var among_var : int;
+ var v_1 : int;
+ // (, line 91
+ // [, line 92
+ this.ket = this.cursor;
+ // substring, line 92
+ among_var = this.find_among_b(PorterStemmer.a_5, 19);
+ if (among_var == 0)
+ {
+ return false;
+ }
+ // ], line 92
+ this.bra = this.cursor;
+ // call R2, line 92
+ if (!this.r_R2())
+ {
+ return false;
+ }
+ switch (among_var) {
+ case 0:
+ return false;
+ case 1:
+ // (, line 95
+ // delete, line 95
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 2:
+ // (, line 96
+ // or, line 96
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ v_1 = this.limit - this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ // literal, line 96
+ if (!(this.eq_s_b(1, "s")))
+ {
+ break lab1;
+ }
+ break lab0;
+ }
+ this.cursor = this.limit - v_1;
+ // literal, line 96
+ if (!(this.eq_s_b(1, "t")))
+ {
+ return false;
+ }
+ }
+ // delete, line 96
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ }
+ return true;
+ }
+
+ function r_Step_5a () : boolean
+ {
+ var v_1 : int;
+ var v_2 : int;
+ // (, line 100
+ // [, line 101
+ this.ket = this.cursor;
+ // literal, line 101
+ if (!(this.eq_s_b(1, "e")))
+ {
+ return false;
+ }
+ // ], line 101
+ this.bra = this.cursor;
+ // or, line 102
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ v_1 = this.limit - this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ // call R2, line 102
+ if (!this.r_R2())
+ {
+ break lab1;
+ }
+ break lab0;
+ }
+ this.cursor = this.limit - v_1;
+ // (, line 102
+ // call R1, line 102
+ if (!this.r_R1())
+ {
+ return false;
+ }
+ // not, line 102
+ {
+ v_2 = this.limit - this.cursor;
+ var lab2 = true;
+ lab2: while (lab2 == true)
+ {
+ lab2 = false;
+ // call shortv, line 102
+ if (!this.r_shortv())
+ {
+ break lab2;
+ }
+ return false;
+ }
+ this.cursor = this.limit - v_2;
+ }
+ }
+ // delete, line 103
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_Step_5b () : boolean
+ {
+ // (, line 106
+ // [, line 107
+ this.ket = this.cursor;
+ // literal, line 107
+ if (!(this.eq_s_b(1, "l")))
+ {
+ return false;
+ }
+ // ], line 107
+ this.bra = this.cursor;
+ // call R2, line 108
+ if (!this.r_R2())
+ {
+ return false;
+ }
+ // literal, line 108
+ if (!(this.eq_s_b(1, "l")))
+ {
+ return false;
+ }
+ // delete, line 109
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ return true;
+ }
+
+ override function stem () : boolean
+ {
+ var v_1 : int;
+ var v_2 : int;
+ var v_3 : int;
+ var v_4 : int;
+ var v_5 : int;
+ var v_10 : int;
+ var v_11 : int;
+ var v_12 : int;
+ var v_13 : int;
+ var v_14 : int;
+ var v_15 : int;
+ var v_16 : int;
+ var v_17 : int;
+ var v_18 : int;
+ var v_19 : int;
+ var v_20 : int;
+ // (, line 113
+ // unset Y_found, line 115
+ this.B_Y_found = false;
+ // do, line 116
+ v_1 = this.cursor;
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ // (, line 116
+ // [, line 116
+ this.bra = this.cursor;
+ // literal, line 116
+ if (!(this.eq_s(1, "y")))
+ {
+ break lab0;
+ }
+ // ], line 116
+ this.ket = this.cursor;
+ // <-, line 116
+ if (!this.slice_from("Y"))
+ {
+ return false;
+ }
+ // set Y_found, line 116
+ this.B_Y_found = true;
+ }
+ this.cursor = v_1;
+ // do, line 117
+ v_2 = this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ // repeat, line 117
+ replab2: while(true)
+ {
+ v_3 = this.cursor;
+ var lab3 = true;
+ lab3: while (lab3 == true)
+ {
+ lab3 = false;
+ // (, line 117
+ // goto, line 117
+ golab4: while(true)
+ {
+ v_4 = this.cursor;
+ var lab5 = true;
+ lab5: while (lab5 == true)
+ {
+ lab5 = false;
+ // (, line 117
+ if (!(this.in_grouping(PorterStemmer.g_v, 97, 121)))
+ {
+ break lab5;
+ }
+ // [, line 117
+ this.bra = this.cursor;
+ // literal, line 117
+ if (!(this.eq_s(1, "y")))
+ {
+ break lab5;
+ }
+ // ], line 117
+ this.ket = this.cursor;
+ this.cursor = v_4;
+ break golab4;
+ }
+ this.cursor = v_4;
+ if (this.cursor >= this.limit)
+ {
+ break lab3;
+ }
+ this.cursor++;
+ }
+ // <-, line 117
+ if (!this.slice_from("Y"))
+ {
+ return false;
+ }
+ // set Y_found, line 117
+ this.B_Y_found = true;
+ continue replab2;
+ }
+ this.cursor = v_3;
+ break replab2;
+ }
+ }
+ this.cursor = v_2;
+ this.I_p1 = this.limit;
+ this.I_p2 = this.limit;
+ // do, line 121
+ v_5 = this.cursor;
+ var lab6 = true;
+ lab6: while (lab6 == true)
+ {
+ lab6 = false;
+ // (, line 121
+ // gopast, line 122
+ golab7: while(true)
+ {
+ var lab8 = true;
+ lab8: while (lab8 == true)
+ {
+ lab8 = false;
+ if (!(this.in_grouping(PorterStemmer.g_v, 97, 121)))
+ {
+ break lab8;
+ }
+ break golab7;
+ }
+ if (this.cursor >= this.limit)
+ {
+ break lab6;
+ }
+ this.cursor++;
+ }
+ // gopast, line 122
+ golab9: while(true)
+ {
+ var lab10 = true;
+ lab10: while (lab10 == true)
+ {
+ lab10 = false;
+ if (!(this.out_grouping(PorterStemmer.g_v, 97, 121)))
+ {
+ break lab10;
+ }
+ break golab9;
+ }
+ if (this.cursor >= this.limit)
+ {
+ break lab6;
+ }
+ this.cursor++;
+ }
+ // setmark p1, line 122
+ this.I_p1 = this.cursor;
+ // gopast, line 123
+ golab11: while(true)
+ {
+ var lab12 = true;
+ lab12: while (lab12 == true)
+ {
+ lab12 = false;
+ if (!(this.in_grouping(PorterStemmer.g_v, 97, 121)))
+ {
+ break lab12;
+ }
+ break golab11;
+ }
+ if (this.cursor >= this.limit)
+ {
+ break lab6;
+ }
+ this.cursor++;
+ }
+ // gopast, line 123
+ golab13: while(true)
+ {
+ var lab14 = true;
+ lab14: while (lab14 == true)
+ {
+ lab14 = false;
+ if (!(this.out_grouping(PorterStemmer.g_v, 97, 121)))
+ {
+ break lab14;
+ }
+ break golab13;
+ }
+ if (this.cursor >= this.limit)
+ {
+ break lab6;
+ }
+ this.cursor++;
+ }
+ // setmark p2, line 123
+ this.I_p2 = this.cursor;
+ }
+ this.cursor = v_5;
+ // backwards, line 126
+ this.limit_backward = this.cursor; this.cursor = this.limit;
+ // (, line 126
+ // do, line 127
+ v_10 = this.limit - this.cursor;
+ var lab15 = true;
+ lab15: while (lab15 == true)
+ {
+ lab15 = false;
+ // call Step_1a, line 127
+ if (!this.r_Step_1a())
+ {
+ break lab15;
+ }
+ }
+ this.cursor = this.limit - v_10;
+ // do, line 128
+ v_11 = this.limit - this.cursor;
+ var lab16 = true;
+ lab16: while (lab16 == true)
+ {
+ lab16 = false;
+ // call Step_1b, line 128
+ if (!this.r_Step_1b())
+ {
+ break lab16;
+ }
+ }
+ this.cursor = this.limit - v_11;
+ // do, line 129
+ v_12 = this.limit - this.cursor;
+ var lab17 = true;
+ lab17: while (lab17 == true)
+ {
+ lab17 = false;
+ // call Step_1c, line 129
+ if (!this.r_Step_1c())
+ {
+ break lab17;
+ }
+ }
+ this.cursor = this.limit - v_12;
+ // do, line 130
+ v_13 = this.limit - this.cursor;
+ var lab18 = true;
+ lab18: while (lab18 == true)
+ {
+ lab18 = false;
+ // call Step_2, line 130
+ if (!this.r_Step_2())
+ {
+ break lab18;
+ }
+ }
+ this.cursor = this.limit - v_13;
+ // do, line 131
+ v_14 = this.limit - this.cursor;
+ var lab19 = true;
+ lab19: while (lab19 == true)
+ {
+ lab19 = false;
+ // call Step_3, line 131
+ if (!this.r_Step_3())
+ {
+ break lab19;
+ }
+ }
+ this.cursor = this.limit - v_14;
+ // do, line 132
+ v_15 = this.limit - this.cursor;
+ var lab20 = true;
+ lab20: while (lab20 == true)
+ {
+ lab20 = false;
+ // call Step_4, line 132
+ if (!this.r_Step_4())
+ {
+ break lab20;
+ }
+ }
+ this.cursor = this.limit - v_15;
+ // do, line 133
+ v_16 = this.limit - this.cursor;
+ var lab21 = true;
+ lab21: while (lab21 == true)
+ {
+ lab21 = false;
+ // call Step_5a, line 133
+ if (!this.r_Step_5a())
+ {
+ break lab21;
+ }
+ }
+ this.cursor = this.limit - v_16;
+ // do, line 134
+ v_17 = this.limit - this.cursor;
+ var lab22 = true;
+ lab22: while (lab22 == true)
+ {
+ lab22 = false;
+ // call Step_5b, line 134
+ if (!this.r_Step_5b())
+ {
+ break lab22;
+ }
+ }
+ this.cursor = this.limit - v_17;
+ this.cursor = this.limit_backward; // do, line 137
+ v_18 = this.cursor;
+ var lab23 = true;
+ lab23: while (lab23 == true)
+ {
+ lab23 = false;
+ // (, line 137
+ // Boolean test Y_found, line 137
+ if (!(this.B_Y_found))
+ {
+ break lab23;
+ }
+ // repeat, line 137
+ replab24: while(true)
+ {
+ v_19 = this.cursor;
+ var lab25 = true;
+ lab25: while (lab25 == true)
+ {
+ lab25 = false;
+ // (, line 137
+ // goto, line 137
+ golab26: while(true)
+ {
+ v_20 = this.cursor;
+ var lab27 = true;
+ lab27: while (lab27 == true)
+ {
+ lab27 = false;
+ // (, line 137
+ // [, line 137
+ this.bra = this.cursor;
+ // literal, line 137
+ if (!(this.eq_s(1, "Y")))
+ {
+ break lab27;
+ }
+ // ], line 137
+ this.ket = this.cursor;
+ this.cursor = v_20;
+ break golab26;
+ }
+ this.cursor = v_20;
+ if (this.cursor >= this.limit)
+ {
+ break lab25;
+ }
+ this.cursor++;
+ }
+ // <-, line 137
+ if (!this.slice_from("y"))
+ {
+ return false;
+ }
+ continue replab24;
+ }
+ this.cursor = v_19;
+ break replab24;
+ }
+ }
+ this.cursor = v_18;
+ return true;
+ }
+
+ function equals (o : variant) : boolean {
+ return o instanceof PorterStemmer;
+ }
+
+ function hashCode() : int
+ {
+ //http://stackoverflow.com/questions/194846/is-there-any-kind-of-hashcode-function-in-javascript
+ var classname = "PorterStemmer";
+ var hash = 0;
+ if (classname.length == 0) return hash;
+ for (var i = 0; i < classname.length; i++) {
+ var char = classname.charCodeAt(i);
+ hash = ((hash << 5) - hash) + char;
+ hash = hash & hash; // Convert to 32bit integer
+ }
+ return hash;
+ }
+
+}
+
diff --git a/web/server/h2o/libh2o/misc/oktavia/src/stemmer/portuguese-stemmer.jsx b/web/server/h2o/libh2o/misc/oktavia/src/stemmer/portuguese-stemmer.jsx
new file mode 100644
index 00000000..317837d9
--- /dev/null
+++ b/web/server/h2o/libh2o/misc/oktavia/src/stemmer/portuguese-stemmer.jsx
@@ -0,0 +1,1321 @@
+// This file was generated automatically by the Snowball to JSX compiler
+
+import "base-stemmer.jsx";
+import "among.jsx";
+
+ /**
+ * This class was automatically generated by a Snowball to JSX compiler
+ * It implements the stemming algorithm defined by a snowball script.
+ */
+
+class PortugueseStemmer extends BaseStemmer
+{
+ static const serialVersionUID = 1;
+ static const methodObject = new PortugueseStemmer();
+
+ static const a_0 = [
+ new Among("", -1, 3),
+ new Among("\u00E3", 0, 1),
+ new Among("\u00F5", 0, 2)
+ ];
+
+ static const a_1 = [
+ new Among("", -1, 3),
+ new Among("a~", 0, 1),
+ new Among("o~", 0, 2)
+ ];
+
+ static const a_2 = [
+ new Among("ic", -1, -1),
+ new Among("ad", -1, -1),
+ new Among("os", -1, -1),
+ new Among("iv", -1, 1)
+ ];
+
+ static const a_3 = [
+ new Among("ante", -1, 1),
+ new Among("avel", -1, 1),
+ new Among("\u00EDvel", -1, 1)
+ ];
+
+ static const a_4 = [
+ new Among("ic", -1, 1),
+ new Among("abil", -1, 1),
+ new Among("iv", -1, 1)
+ ];
+
+ static const a_5 = [
+ 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)
+ ];
+
+ static const a_6 = [
+ 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)
+ ];
+
+ static const a_7 = [
+ 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)
+ ];
+
+ static const a_8 = [
+ new Among("e", -1, 1),
+ new Among("\u00E7", -1, 2),
+ new Among("\u00E9", -1, 1),
+ new Among("\u00EA", -1, 1)
+ ];
+
+ static const g_v = [17, 65, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 19, 12, 2] : int[];
+
+ var I_p2 : int = 0;
+ var I_p1 : int = 0;
+ var I_pV : int = 0;
+
+ function copy_from (other : PortugueseStemmer) : void
+ {
+ this.I_p2 = other.I_p2;
+ this.I_p1 = other.I_p1;
+ this.I_pV = other.I_pV;
+ super.copy_from(other);
+ }
+
+ function r_prelude () : boolean
+ {
+ var among_var : int;
+ var v_1 : int;
+ // repeat, line 36
+ replab0: while(true)
+ {
+ v_1 = this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ // (, line 36
+ // [, line 37
+ this.bra = this.cursor;
+ // substring, line 37
+ among_var = this.find_among(PortugueseStemmer.a_0, 3);
+ if (among_var == 0)
+ {
+ break lab1;
+ }
+ // ], line 37
+ this.ket = this.cursor;
+ switch (among_var) {
+ case 0:
+ break lab1;
+ case 1:
+ // (, line 38
+ // <-, line 38
+ if (!this.slice_from("a~"))
+ {
+ return false;
+ }
+ break;
+ case 2:
+ // (, line 39
+ // <-, line 39
+ if (!this.slice_from("o~"))
+ {
+ return false;
+ }
+ break;
+ case 3:
+ // (, line 40
+ // next, line 40
+ if (this.cursor >= this.limit)
+ {
+ break lab1;
+ }
+ this.cursor++;
+ break;
+ }
+ continue replab0;
+ }
+ this.cursor = v_1;
+ break replab0;
+ }
+ return true;
+ }
+
+ function r_mark_regions () : boolean
+ {
+ var v_1 : int;
+ var v_2 : int;
+ var v_3 : int;
+ var v_6 : int;
+ var v_8 : int;
+ // (, line 44
+ this.I_pV = this.limit;
+ this.I_p1 = this.limit;
+ this.I_p2 = this.limit;
+ // do, line 50
+ v_1 = this.cursor;
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ // (, line 50
+ // or, line 52
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ v_2 = this.cursor;
+ var lab2 = true;
+ lab2: while (lab2 == true)
+ {
+ lab2 = false;
+ // (, line 51
+ if (!(this.in_grouping(PortugueseStemmer.g_v, 97, 250)))
+ {
+ break lab2;
+ }
+ // or, line 51
+ var lab3 = true;
+ lab3: while (lab3 == true)
+ {
+ lab3 = false;
+ v_3 = this.cursor;
+ var lab4 = true;
+ lab4: while (lab4 == true)
+ {
+ lab4 = false;
+ // (, line 51
+ if (!(this.out_grouping(PortugueseStemmer.g_v, 97, 250)))
+ {
+ break lab4;
+ }
+ // gopast, line 51
+ golab5: while(true)
+ {
+ var lab6 = true;
+ lab6: while (lab6 == true)
+ {
+ lab6 = false;
+ if (!(this.in_grouping(PortugueseStemmer.g_v, 97, 250)))
+ {
+ break lab6;
+ }
+ break golab5;
+ }
+ if (this.cursor >= this.limit)
+ {
+ break lab4;
+ }
+ this.cursor++;
+ }
+ break lab3;
+ }
+ this.cursor = v_3;
+ // (, line 51
+ if (!(this.in_grouping(PortugueseStemmer.g_v, 97, 250)))
+ {
+ break lab2;
+ }
+ // gopast, line 51
+ golab7: while(true)
+ {
+ var lab8 = true;
+ lab8: while (lab8 == true)
+ {
+ lab8 = false;
+ if (!(this.out_grouping(PortugueseStemmer.g_v, 97, 250)))
+ {
+ break lab8;
+ }
+ break golab7;
+ }
+ if (this.cursor >= this.limit)
+ {
+ break lab2;
+ }
+ this.cursor++;
+ }
+ }
+ break lab1;
+ }
+ this.cursor = v_2;
+ // (, line 53
+ if (!(this.out_grouping(PortugueseStemmer.g_v, 97, 250)))
+ {
+ break lab0;
+ }
+ // or, line 53
+ var lab9 = true;
+ lab9: while (lab9 == true)
+ {
+ lab9 = false;
+ v_6 = this.cursor;
+ var lab10 = true;
+ lab10: while (lab10 == true)
+ {
+ lab10 = false;
+ // (, line 53
+ if (!(this.out_grouping(PortugueseStemmer.g_v, 97, 250)))
+ {
+ break lab10;
+ }
+ // gopast, line 53
+ golab11: while(true)
+ {
+ var lab12 = true;
+ lab12: while (lab12 == true)
+ {
+ lab12 = false;
+ if (!(this.in_grouping(PortugueseStemmer.g_v, 97, 250)))
+ {
+ break lab12;
+ }
+ break golab11;
+ }
+ if (this.cursor >= this.limit)
+ {
+ break lab10;
+ }
+ this.cursor++;
+ }
+ break lab9;
+ }
+ this.cursor = v_6;
+ // (, line 53
+ if (!(this.in_grouping(PortugueseStemmer.g_v, 97, 250)))
+ {
+ break lab0;
+ }
+ // next, line 53
+ if (this.cursor >= this.limit)
+ {
+ break lab0;
+ }
+ this.cursor++;
+ }
+ }
+ // setmark pV, line 54
+ this.I_pV = this.cursor;
+ }
+ this.cursor = v_1;
+ // do, line 56
+ v_8 = this.cursor;
+ var lab13 = true;
+ lab13: while (lab13 == true)
+ {
+ lab13 = false;
+ // (, line 56
+ // gopast, line 57
+ golab14: while(true)
+ {
+ var lab15 = true;
+ lab15: while (lab15 == true)
+ {
+ lab15 = false;
+ if (!(this.in_grouping(PortugueseStemmer.g_v, 97, 250)))
+ {
+ break lab15;
+ }
+ break golab14;
+ }
+ if (this.cursor >= this.limit)
+ {
+ break lab13;
+ }
+ this.cursor++;
+ }
+ // gopast, line 57
+ golab16: while(true)
+ {
+ var lab17 = true;
+ lab17: while (lab17 == true)
+ {
+ lab17 = false;
+ if (!(this.out_grouping(PortugueseStemmer.g_v, 97, 250)))
+ {
+ break lab17;
+ }
+ break golab16;
+ }
+ if (this.cursor >= this.limit)
+ {
+ break lab13;
+ }
+ this.cursor++;
+ }
+ // setmark p1, line 57
+ this.I_p1 = this.cursor;
+ // gopast, line 58
+ golab18: while(true)
+ {
+ var lab19 = true;
+ lab19: while (lab19 == true)
+ {
+ lab19 = false;
+ if (!(this.in_grouping(PortugueseStemmer.g_v, 97, 250)))
+ {
+ break lab19;
+ }
+ break golab18;
+ }
+ if (this.cursor >= this.limit)
+ {
+ break lab13;
+ }
+ this.cursor++;
+ }
+ // gopast, line 58
+ golab20: while(true)
+ {
+ var lab21 = true;
+ lab21: while (lab21 == true)
+ {
+ lab21 = false;
+ if (!(this.out_grouping(PortugueseStemmer.g_v, 97, 250)))
+ {
+ break lab21;
+ }
+ break golab20;
+ }
+ if (this.cursor >= this.limit)
+ {
+ break lab13;
+ }
+ this.cursor++;
+ }
+ // setmark p2, line 58
+ this.I_p2 = this.cursor;
+ }
+ this.cursor = v_8;
+ return true;
+ }
+
+ function r_postlude () : boolean
+ {
+ var among_var : int;
+ var v_1 : int;
+ // repeat, line 62
+ replab0: while(true)
+ {
+ v_1 = this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ // (, line 62
+ // [, line 63
+ this.bra = this.cursor;
+ // substring, line 63
+ among_var = this.find_among(PortugueseStemmer.a_1, 3);
+ if (among_var == 0)
+ {
+ break lab1;
+ }
+ // ], line 63
+ this.ket = this.cursor;
+ switch (among_var) {
+ case 0:
+ break lab1;
+ case 1:
+ // (, line 64
+ // <-, line 64
+ if (!this.slice_from("\u00E3"))
+ {
+ return false;
+ }
+ break;
+ case 2:
+ // (, line 65
+ // <-, line 65
+ if (!this.slice_from("\u00F5"))
+ {
+ return false;
+ }
+ break;
+ case 3:
+ // (, line 66
+ // next, line 66
+ if (this.cursor >= this.limit)
+ {
+ break lab1;
+ }
+ this.cursor++;
+ break;
+ }
+ continue replab0;
+ }
+ this.cursor = v_1;
+ break replab0;
+ }
+ return true;
+ }
+
+ function r_RV () : boolean
+ {
+ if (!(this.I_pV <= this.cursor))
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_R1 () : boolean
+ {
+ if (!(this.I_p1 <= this.cursor))
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_R2 () : boolean
+ {
+ if (!(this.I_p2 <= this.cursor))
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_standard_suffix () : boolean
+ {
+ var among_var : int;
+ var v_1 : int;
+ var v_2 : int;
+ var v_3 : int;
+ var v_4 : int;
+ // (, line 76
+ // [, line 77
+ this.ket = this.cursor;
+ // substring, line 77
+ among_var = this.find_among_b(PortugueseStemmer.a_5, 45);
+ if (among_var == 0)
+ {
+ return false;
+ }
+ // ], line 77
+ this.bra = this.cursor;
+ switch (among_var) {
+ case 0:
+ return false;
+ case 1:
+ // (, line 92
+ // call R2, line 93
+ if (!this.r_R2())
+ {
+ return false;
+ }
+ // delete, line 93
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 2:
+ // (, line 97
+ // call R2, line 98
+ if (!this.r_R2())
+ {
+ return false;
+ }
+ // <-, line 98
+ if (!this.slice_from("log"))
+ {
+ return false;
+ }
+ break;
+ case 3:
+ // (, line 101
+ // call R2, line 102
+ if (!this.r_R2())
+ {
+ return false;
+ }
+ // <-, line 102
+ if (!this.slice_from("u"))
+ {
+ return false;
+ }
+ break;
+ case 4:
+ // (, line 105
+ // call R2, line 106
+ if (!this.r_R2())
+ {
+ return false;
+ }
+ // <-, line 106
+ if (!this.slice_from("ente"))
+ {
+ return false;
+ }
+ break;
+ case 5:
+ // (, line 109
+ // call R1, line 110
+ if (!this.r_R1())
+ {
+ return false;
+ }
+ // delete, line 110
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // try, line 111
+ v_1 = this.limit - this.cursor;
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ // (, line 111
+ // [, line 112
+ this.ket = this.cursor;
+ // substring, line 112
+ among_var = this.find_among_b(PortugueseStemmer.a_2, 4);
+ if (among_var == 0)
+ {
+ this.cursor = this.limit - v_1;
+ break lab0;
+ }
+ // ], line 112
+ this.bra = this.cursor;
+ // call R2, line 112
+ if (!this.r_R2())
+ {
+ this.cursor = this.limit - v_1;
+ break lab0;
+ }
+ // delete, line 112
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ switch (among_var) {
+ case 0:
+ this.cursor = this.limit - v_1;
+ break lab0;
+ case 1:
+ // (, line 113
+ // [, line 113
+ this.ket = this.cursor;
+ // literal, line 113
+ if (!(this.eq_s_b(2, "at")))
+ {
+ this.cursor = this.limit - v_1;
+ break lab0;
+ }
+ // ], line 113
+ this.bra = this.cursor;
+ // call R2, line 113
+ if (!this.r_R2())
+ {
+ this.cursor = this.limit - v_1;
+ break lab0;
+ }
+ // delete, line 113
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ }
+ }
+ break;
+ case 6:
+ // (, line 121
+ // call R2, line 122
+ if (!this.r_R2())
+ {
+ return false;
+ }
+ // delete, line 122
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // try, line 123
+ v_2 = this.limit - this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ // (, line 123
+ // [, line 124
+ this.ket = this.cursor;
+ // substring, line 124
+ among_var = this.find_among_b(PortugueseStemmer.a_3, 3);
+ if (among_var == 0)
+ {
+ this.cursor = this.limit - v_2;
+ break lab1;
+ }
+ // ], line 124
+ this.bra = this.cursor;
+ switch (among_var) {
+ case 0:
+ this.cursor = this.limit - v_2;
+ break lab1;
+ case 1:
+ // (, line 127
+ // call R2, line 127
+ if (!this.r_R2())
+ {
+ this.cursor = this.limit - v_2;
+ break lab1;
+ }
+ // delete, line 127
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ }
+ }
+ break;
+ case 7:
+ // (, line 133
+ // call R2, line 134
+ if (!this.r_R2())
+ {
+ return false;
+ }
+ // delete, line 134
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // try, line 135
+ v_3 = this.limit - this.cursor;
+ var lab2 = true;
+ lab2: while (lab2 == true)
+ {
+ lab2 = false;
+ // (, line 135
+ // [, line 136
+ this.ket = this.cursor;
+ // substring, line 136
+ among_var = this.find_among_b(PortugueseStemmer.a_4, 3);
+ if (among_var == 0)
+ {
+ this.cursor = this.limit - v_3;
+ break lab2;
+ }
+ // ], line 136
+ this.bra = this.cursor;
+ switch (among_var) {
+ case 0:
+ this.cursor = this.limit - v_3;
+ break lab2;
+ case 1:
+ // (, line 139
+ // call R2, line 139
+ if (!this.r_R2())
+ {
+ this.cursor = this.limit - v_3;
+ break lab2;
+ }
+ // delete, line 139
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ }
+ }
+ break;
+ case 8:
+ // (, line 145
+ // call R2, line 146
+ if (!this.r_R2())
+ {
+ return false;
+ }
+ // delete, line 146
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // try, line 147
+ v_4 = this.limit - this.cursor;
+ var lab3 = true;
+ lab3: while (lab3 == true)
+ {
+ lab3 = false;
+ // (, line 147
+ // [, line 148
+ this.ket = this.cursor;
+ // literal, line 148
+ if (!(this.eq_s_b(2, "at")))
+ {
+ this.cursor = this.limit - v_4;
+ break lab3;
+ }
+ // ], line 148
+ this.bra = this.cursor;
+ // call R2, line 148
+ if (!this.r_R2())
+ {
+ this.cursor = this.limit - v_4;
+ break lab3;
+ }
+ // delete, line 148
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ }
+ break;
+ case 9:
+ // (, line 152
+ // call RV, line 153
+ if (!this.r_RV())
+ {
+ return false;
+ }
+ // literal, line 153
+ if (!(this.eq_s_b(1, "e")))
+ {
+ return false;
+ }
+ // <-, line 154
+ if (!this.slice_from("ir"))
+ {
+ return false;
+ }
+ break;
+ }
+ return true;
+ }
+
+ function r_verb_suffix () : boolean
+ {
+ var among_var : int;
+ var v_1 : int;
+ var v_2 : int;
+ // setlimit, line 159
+ v_1 = this.limit - this.cursor;
+ // tomark, line 159
+ if (this.cursor < this.I_pV)
+ {
+ return false;
+ }
+ this.cursor = this.I_pV;
+ v_2 = this.limit_backward;
+ this.limit_backward = this.cursor;
+ this.cursor = this.limit - v_1;
+ // (, line 159
+ // [, line 160
+ this.ket = this.cursor;
+ // substring, line 160
+ among_var = this.find_among_b(PortugueseStemmer.a_6, 120);
+ if (among_var == 0)
+ {
+ this.limit_backward = v_2;
+ return false;
+ }
+ // ], line 160
+ this.bra = this.cursor;
+ switch (among_var) {
+ case 0:
+ this.limit_backward = v_2;
+ return false;
+ case 1:
+ // (, line 179
+ // delete, line 179
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ }
+ this.limit_backward = v_2;
+ return true;
+ }
+
+ function r_residual_suffix () : boolean
+ {
+ var among_var : int;
+ // (, line 183
+ // [, line 184
+ this.ket = this.cursor;
+ // substring, line 184
+ among_var = this.find_among_b(PortugueseStemmer.a_7, 7);
+ if (among_var == 0)
+ {
+ return false;
+ }
+ // ], line 184
+ this.bra = this.cursor;
+ switch (among_var) {
+ case 0:
+ return false;
+ case 1:
+ // (, line 187
+ // call RV, line 187
+ if (!this.r_RV())
+ {
+ return false;
+ }
+ // delete, line 187
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ }
+ return true;
+ }
+
+ function r_residual_form () : boolean
+ {
+ var among_var : int;
+ var v_1 : int;
+ var v_2 : int;
+ var v_3 : int;
+ // (, line 191
+ // [, line 192
+ this.ket = this.cursor;
+ // substring, line 192
+ among_var = this.find_among_b(PortugueseStemmer.a_8, 4);
+ if (among_var == 0)
+ {
+ return false;
+ }
+ // ], line 192
+ this.bra = this.cursor;
+ switch (among_var) {
+ case 0:
+ return false;
+ case 1:
+ // (, line 194
+ // call RV, line 194
+ if (!this.r_RV())
+ {
+ return false;
+ }
+ // delete, line 194
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // [, line 194
+ this.ket = this.cursor;
+ // or, line 194
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ v_1 = this.limit - this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ // (, line 194
+ // literal, line 194
+ if (!(this.eq_s_b(1, "u")))
+ {
+ break lab1;
+ }
+ // ], line 194
+ this.bra = this.cursor;
+ // test, line 194
+ v_2 = this.limit - this.cursor;
+ // literal, line 194
+ if (!(this.eq_s_b(1, "g")))
+ {
+ break lab1;
+ }
+ this.cursor = this.limit - v_2;
+ break lab0;
+ }
+ this.cursor = this.limit - v_1;
+ // (, line 195
+ // literal, line 195
+ if (!(this.eq_s_b(1, "i")))
+ {
+ return false;
+ }
+ // ], line 195
+ this.bra = this.cursor;
+ // test, line 195
+ v_3 = this.limit - this.cursor;
+ // literal, line 195
+ if (!(this.eq_s_b(1, "c")))
+ {
+ return false;
+ }
+ this.cursor = this.limit - v_3;
+ }
+ // call RV, line 195
+ if (!this.r_RV())
+ {
+ return false;
+ }
+ // delete, line 195
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 2:
+ // (, line 196
+ // <-, line 196
+ if (!this.slice_from("c"))
+ {
+ return false;
+ }
+ break;
+ }
+ return true;
+ }
+
+ override function stem () : boolean
+ {
+ var v_1 : int;
+ var v_2 : int;
+ var v_3 : int;
+ var v_4 : int;
+ var v_5 : int;
+ var v_6 : int;
+ var v_7 : int;
+ var v_8 : int;
+ var v_9 : int;
+ var v_10 : int;
+ // (, line 201
+ // do, line 202
+ v_1 = this.cursor;
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ // call prelude, line 202
+ if (!this.r_prelude())
+ {
+ break lab0;
+ }
+ }
+ this.cursor = v_1;
+ // do, line 203
+ v_2 = this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ // call mark_regions, line 203
+ if (!this.r_mark_regions())
+ {
+ break lab1;
+ }
+ }
+ this.cursor = v_2;
+ // backwards, line 204
+ this.limit_backward = this.cursor; this.cursor = this.limit;
+ // (, line 204
+ // do, line 205
+ v_3 = this.limit - this.cursor;
+ var lab2 = true;
+ lab2: while (lab2 == true)
+ {
+ lab2 = false;
+ // (, line 205
+ // or, line 209
+ var lab3 = true;
+ lab3: while (lab3 == true)
+ {
+ lab3 = false;
+ v_4 = this.limit - this.cursor;
+ var lab4 = true;
+ lab4: while (lab4 == true)
+ {
+ lab4 = false;
+ // (, line 206
+ // and, line 207
+ v_5 = this.limit - this.cursor;
+ // (, line 206
+ // or, line 206
+ var lab5 = true;
+ lab5: while (lab5 == true)
+ {
+ lab5 = false;
+ v_6 = this.limit - this.cursor;
+ var lab6 = true;
+ lab6: while (lab6 == true)
+ {
+ lab6 = false;
+ // call standard_suffix, line 206
+ if (!this.r_standard_suffix())
+ {
+ break lab6;
+ }
+ break lab5;
+ }
+ this.cursor = this.limit - v_6;
+ // call verb_suffix, line 206
+ if (!this.r_verb_suffix())
+ {
+ break lab4;
+ }
+ }
+ this.cursor = this.limit - v_5;
+ // do, line 207
+ v_7 = this.limit - this.cursor;
+ var lab7 = true;
+ lab7: while (lab7 == true)
+ {
+ lab7 = false;
+ // (, line 207
+ // [, line 207
+ this.ket = this.cursor;
+ // literal, line 207
+ if (!(this.eq_s_b(1, "i")))
+ {
+ break lab7;
+ }
+ // ], line 207
+ this.bra = this.cursor;
+ // test, line 207
+ v_8 = this.limit - this.cursor;
+ // literal, line 207
+ if (!(this.eq_s_b(1, "c")))
+ {
+ break lab7;
+ }
+ this.cursor = this.limit - v_8;
+ // call RV, line 207
+ if (!this.r_RV())
+ {
+ break lab7;
+ }
+ // delete, line 207
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ }
+ this.cursor = this.limit - v_7;
+ break lab3;
+ }
+ this.cursor = this.limit - v_4;
+ // call residual_suffix, line 209
+ if (!this.r_residual_suffix())
+ {
+ break lab2;
+ }
+ }
+ }
+ this.cursor = this.limit - v_3;
+ // do, line 211
+ v_9 = this.limit - this.cursor;
+ var lab8 = true;
+ lab8: while (lab8 == true)
+ {
+ lab8 = false;
+ // call residual_form, line 211
+ if (!this.r_residual_form())
+ {
+ break lab8;
+ }
+ }
+ this.cursor = this.limit - v_9;
+ this.cursor = this.limit_backward; // do, line 213
+ v_10 = this.cursor;
+ var lab9 = true;
+ lab9: while (lab9 == true)
+ {
+ lab9 = false;
+ // call postlude, line 213
+ if (!this.r_postlude())
+ {
+ break lab9;
+ }
+ }
+ this.cursor = v_10;
+ return true;
+ }
+
+ function equals (o : variant) : boolean {
+ return o instanceof PortugueseStemmer;
+ }
+
+ function hashCode() : int
+ {
+ //http://stackoverflow.com/questions/194846/is-there-any-kind-of-hashcode-function-in-javascript
+ var classname = "PortugueseStemmer";
+ var hash = 0;
+ if (classname.length == 0) return hash;
+ for (var i = 0; i < classname.length; i++) {
+ var char = classname.charCodeAt(i);
+ hash = ((hash << 5) - hash) + char;
+ hash = hash & hash; // Convert to 32bit integer
+ }
+ return hash;
+ }
+
+}
+
diff --git a/web/server/h2o/libh2o/misc/oktavia/src/stemmer/romanian-stemmer.jsx b/web/server/h2o/libh2o/misc/oktavia/src/stemmer/romanian-stemmer.jsx
new file mode 100644
index 00000000..1eb9f3d8
--- /dev/null
+++ b/web/server/h2o/libh2o/misc/oktavia/src/stemmer/romanian-stemmer.jsx
@@ -0,0 +1,1227 @@
+// This file was generated automatically by the Snowball to JSX compiler
+
+import "base-stemmer.jsx";
+import "among.jsx";
+
+ /**
+ * This class was automatically generated by a Snowball to JSX compiler
+ * It implements the stemming algorithm defined by a snowball script.
+ */
+
+class RomanianStemmer extends BaseStemmer
+{
+ static const serialVersionUID = 1;
+ static const methodObject = new RomanianStemmer();
+
+ static const a_0 = [
+ new Among("", -1, 3),
+ new Among("I", 0, 1),
+ new Among("U", 0, 2)
+ ];
+
+ static const a_1 = [
+ 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)
+ ];
+
+ static const a_2 = [
+ 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)
+ ];
+
+ static const a_3 = [
+ 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)
+ ];
+
+ static const a_4 = [
+ 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)
+ ];
+
+ static const a_5 = [
+ 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)
+ ];
+
+ static const g_v = [17, 65, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 32, 0, 0, 4] : int[];
+
+ var B_standard_suffix_removed : boolean = false;
+ var I_p2 : int = 0;
+ var I_p1 : int = 0;
+ var I_pV : int = 0;
+
+ function copy_from (other : RomanianStemmer) : void
+ {
+ 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;
+ super.copy_from(other);
+ }
+
+ function r_prelude () : boolean
+ {
+ var v_1 : int;
+ var v_2 : int;
+ var v_3 : int;
+ // (, line 31
+ // repeat, line 32
+ replab0: while(true)
+ {
+ v_1 = this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ // goto, line 32
+ golab2: while(true)
+ {
+ v_2 = this.cursor;
+ var lab3 = true;
+ lab3: while (lab3 == true)
+ {
+ lab3 = false;
+ // (, line 32
+ if (!(this.in_grouping(RomanianStemmer.g_v, 97, 259)))
+ {
+ break lab3;
+ }
+ // [, line 33
+ this.bra = this.cursor;
+ // or, line 33
+ var lab4 = true;
+ lab4: while (lab4 == true)
+ {
+ lab4 = false;
+ v_3 = this.cursor;
+ var lab5 = true;
+ lab5: while (lab5 == true)
+ {
+ lab5 = false;
+ // (, line 33
+ // literal, line 33
+ if (!(this.eq_s(1, "u")))
+ {
+ break lab5;
+ }
+ // ], line 33
+ this.ket = this.cursor;
+ if (!(this.in_grouping(RomanianStemmer.g_v, 97, 259)))
+ {
+ break lab5;
+ }
+ // <-, line 33
+ if (!this.slice_from("U"))
+ {
+ return false;
+ }
+ break lab4;
+ }
+ this.cursor = v_3;
+ // (, line 34
+ // literal, line 34
+ if (!(this.eq_s(1, "i")))
+ {
+ break lab3;
+ }
+ // ], line 34
+ this.ket = this.cursor;
+ if (!(this.in_grouping(RomanianStemmer.g_v, 97, 259)))
+ {
+ break lab3;
+ }
+ // <-, line 34
+ if (!this.slice_from("I"))
+ {
+ return false;
+ }
+ }
+ this.cursor = v_2;
+ break golab2;
+ }
+ this.cursor = v_2;
+ if (this.cursor >= this.limit)
+ {
+ break lab1;
+ }
+ this.cursor++;
+ }
+ continue replab0;
+ }
+ this.cursor = v_1;
+ break replab0;
+ }
+ return true;
+ }
+
+ function r_mark_regions () : boolean
+ {
+ var v_1 : int;
+ var v_2 : int;
+ var v_3 : int;
+ var v_6 : int;
+ var v_8 : int;
+ // (, line 38
+ this.I_pV = this.limit;
+ this.I_p1 = this.limit;
+ this.I_p2 = this.limit;
+ // do, line 44
+ v_1 = this.cursor;
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ // (, line 44
+ // or, line 46
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ v_2 = this.cursor;
+ var lab2 = true;
+ lab2: while (lab2 == true)
+ {
+ lab2 = false;
+ // (, line 45
+ if (!(this.in_grouping(RomanianStemmer.g_v, 97, 259)))
+ {
+ break lab2;
+ }
+ // or, line 45
+ var lab3 = true;
+ lab3: while (lab3 == true)
+ {
+ lab3 = false;
+ v_3 = this.cursor;
+ var lab4 = true;
+ lab4: while (lab4 == true)
+ {
+ lab4 = false;
+ // (, line 45
+ if (!(this.out_grouping(RomanianStemmer.g_v, 97, 259)))
+ {
+ break lab4;
+ }
+ // gopast, line 45
+ golab5: while(true)
+ {
+ var lab6 = true;
+ lab6: while (lab6 == true)
+ {
+ lab6 = false;
+ if (!(this.in_grouping(RomanianStemmer.g_v, 97, 259)))
+ {
+ break lab6;
+ }
+ break golab5;
+ }
+ if (this.cursor >= this.limit)
+ {
+ break lab4;
+ }
+ this.cursor++;
+ }
+ break lab3;
+ }
+ this.cursor = v_3;
+ // (, line 45
+ if (!(this.in_grouping(RomanianStemmer.g_v, 97, 259)))
+ {
+ break lab2;
+ }
+ // gopast, line 45
+ golab7: while(true)
+ {
+ var lab8 = true;
+ lab8: while (lab8 == true)
+ {
+ lab8 = false;
+ if (!(this.out_grouping(RomanianStemmer.g_v, 97, 259)))
+ {
+ break lab8;
+ }
+ break golab7;
+ }
+ if (this.cursor >= this.limit)
+ {
+ break lab2;
+ }
+ this.cursor++;
+ }
+ }
+ break lab1;
+ }
+ this.cursor = v_2;
+ // (, line 47
+ if (!(this.out_grouping(RomanianStemmer.g_v, 97, 259)))
+ {
+ break lab0;
+ }
+ // or, line 47
+ var lab9 = true;
+ lab9: while (lab9 == true)
+ {
+ lab9 = false;
+ v_6 = this.cursor;
+ var lab10 = true;
+ lab10: while (lab10 == true)
+ {
+ lab10 = false;
+ // (, line 47
+ if (!(this.out_grouping(RomanianStemmer.g_v, 97, 259)))
+ {
+ break lab10;
+ }
+ // gopast, line 47
+ golab11: while(true)
+ {
+ var lab12 = true;
+ lab12: while (lab12 == true)
+ {
+ lab12 = false;
+ if (!(this.in_grouping(RomanianStemmer.g_v, 97, 259)))
+ {
+ break lab12;
+ }
+ break golab11;
+ }
+ if (this.cursor >= this.limit)
+ {
+ break lab10;
+ }
+ this.cursor++;
+ }
+ break lab9;
+ }
+ this.cursor = v_6;
+ // (, line 47
+ if (!(this.in_grouping(RomanianStemmer.g_v, 97, 259)))
+ {
+ break lab0;
+ }
+ // next, line 47
+ if (this.cursor >= this.limit)
+ {
+ break lab0;
+ }
+ this.cursor++;
+ }
+ }
+ // setmark pV, line 48
+ this.I_pV = this.cursor;
+ }
+ this.cursor = v_1;
+ // do, line 50
+ v_8 = this.cursor;
+ var lab13 = true;
+ lab13: while (lab13 == true)
+ {
+ lab13 = false;
+ // (, line 50
+ // gopast, line 51
+ golab14: while(true)
+ {
+ var lab15 = true;
+ lab15: while (lab15 == true)
+ {
+ lab15 = false;
+ if (!(this.in_grouping(RomanianStemmer.g_v, 97, 259)))
+ {
+ break lab15;
+ }
+ break golab14;
+ }
+ if (this.cursor >= this.limit)
+ {
+ break lab13;
+ }
+ this.cursor++;
+ }
+ // gopast, line 51
+ golab16: while(true)
+ {
+ var lab17 = true;
+ lab17: while (lab17 == true)
+ {
+ lab17 = false;
+ if (!(this.out_grouping(RomanianStemmer.g_v, 97, 259)))
+ {
+ break lab17;
+ }
+ break golab16;
+ }
+ if (this.cursor >= this.limit)
+ {
+ break lab13;
+ }
+ this.cursor++;
+ }
+ // setmark p1, line 51
+ this.I_p1 = this.cursor;
+ // gopast, line 52
+ golab18: while(true)
+ {
+ var lab19 = true;
+ lab19: while (lab19 == true)
+ {
+ lab19 = false;
+ if (!(this.in_grouping(RomanianStemmer.g_v, 97, 259)))
+ {
+ break lab19;
+ }
+ break golab18;
+ }
+ if (this.cursor >= this.limit)
+ {
+ break lab13;
+ }
+ this.cursor++;
+ }
+ // gopast, line 52
+ golab20: while(true)
+ {
+ var lab21 = true;
+ lab21: while (lab21 == true)
+ {
+ lab21 = false;
+ if (!(this.out_grouping(RomanianStemmer.g_v, 97, 259)))
+ {
+ break lab21;
+ }
+ break golab20;
+ }
+ if (this.cursor >= this.limit)
+ {
+ break lab13;
+ }
+ this.cursor++;
+ }
+ // setmark p2, line 52
+ this.I_p2 = this.cursor;
+ }
+ this.cursor = v_8;
+ return true;
+ }
+
+ function r_postlude () : boolean
+ {
+ var among_var : int;
+ var v_1 : int;
+ // repeat, line 56
+ replab0: while(true)
+ {
+ v_1 = this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ // (, line 56
+ // [, line 58
+ this.bra = this.cursor;
+ // substring, line 58
+ among_var = this.find_among(RomanianStemmer.a_0, 3);
+ if (among_var == 0)
+ {
+ break lab1;
+ }
+ // ], line 58
+ this.ket = this.cursor;
+ switch (among_var) {
+ case 0:
+ break lab1;
+ case 1:
+ // (, line 59
+ // <-, line 59
+ if (!this.slice_from("i"))
+ {
+ return false;
+ }
+ break;
+ case 2:
+ // (, line 60
+ // <-, line 60
+ if (!this.slice_from("u"))
+ {
+ return false;
+ }
+ break;
+ case 3:
+ // (, line 61
+ // next, line 61
+ if (this.cursor >= this.limit)
+ {
+ break lab1;
+ }
+ this.cursor++;
+ break;
+ }
+ continue replab0;
+ }
+ this.cursor = v_1;
+ break replab0;
+ }
+ return true;
+ }
+
+ function r_RV () : boolean
+ {
+ if (!(this.I_pV <= this.cursor))
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_R1 () : boolean
+ {
+ if (!(this.I_p1 <= this.cursor))
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_R2 () : boolean
+ {
+ if (!(this.I_p2 <= this.cursor))
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_step_0 () : boolean
+ {
+ var among_var : int;
+ var v_1 : int;
+ // (, line 72
+ // [, line 73
+ this.ket = this.cursor;
+ // substring, line 73
+ among_var = this.find_among_b(RomanianStemmer.a_1, 16);
+ if (among_var == 0)
+ {
+ return false;
+ }
+ // ], line 73
+ this.bra = this.cursor;
+ // call R1, line 73
+ if (!this.r_R1())
+ {
+ return false;
+ }
+ switch (among_var) {
+ case 0:
+ return false;
+ case 1:
+ // (, line 75
+ // delete, line 75
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 2:
+ // (, line 77
+ // <-, line 77
+ if (!this.slice_from("a"))
+ {
+ return false;
+ }
+ break;
+ case 3:
+ // (, line 79
+ // <-, line 79
+ if (!this.slice_from("e"))
+ {
+ return false;
+ }
+ break;
+ case 4:
+ // (, line 81
+ // <-, line 81
+ if (!this.slice_from("i"))
+ {
+ return false;
+ }
+ break;
+ case 5:
+ // (, line 83
+ // not, line 83
+ {
+ v_1 = this.limit - this.cursor;
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ // literal, line 83
+ if (!(this.eq_s_b(2, "ab")))
+ {
+ break lab0;
+ }
+ return false;
+ }
+ this.cursor = this.limit - v_1;
+ }
+ // <-, line 83
+ if (!this.slice_from("i"))
+ {
+ return false;
+ }
+ break;
+ case 6:
+ // (, line 85
+ // <-, line 85
+ if (!this.slice_from("at"))
+ {
+ return false;
+ }
+ break;
+ case 7:
+ // (, line 87
+ // <-, line 87
+ if (!this.slice_from("a\u0163i"))
+ {
+ return false;
+ }
+ break;
+ }
+ return true;
+ }
+
+ function r_combo_suffix () : boolean
+ {
+ var among_var : int;
+ var v_1 : int;
+ // test, line 91
+ v_1 = this.limit - this.cursor;
+ // (, line 91
+ // [, line 92
+ this.ket = this.cursor;
+ // substring, line 92
+ among_var = this.find_among_b(RomanianStemmer.a_2, 46);
+ if (among_var == 0)
+ {
+ return false;
+ }
+ // ], line 92
+ this.bra = this.cursor;
+ // call R1, line 92
+ if (!this.r_R1())
+ {
+ return false;
+ }
+ // (, line 92
+ switch (among_var) {
+ case 0:
+ return false;
+ case 1:
+ // (, line 100
+ // <-, line 101
+ if (!this.slice_from("abil"))
+ {
+ return false;
+ }
+ break;
+ case 2:
+ // (, line 103
+ // <-, line 104
+ if (!this.slice_from("ibil"))
+ {
+ return false;
+ }
+ break;
+ case 3:
+ // (, line 106
+ // <-, line 107
+ if (!this.slice_from("iv"))
+ {
+ return false;
+ }
+ break;
+ case 4:
+ // (, line 112
+ // <-, line 113
+ if (!this.slice_from("ic"))
+ {
+ return false;
+ }
+ break;
+ case 5:
+ // (, line 117
+ // <-, line 118
+ if (!this.slice_from("at"))
+ {
+ return false;
+ }
+ break;
+ case 6:
+ // (, line 121
+ // <-, line 122
+ if (!this.slice_from("it"))
+ {
+ return false;
+ }
+ break;
+ }
+ // set standard_suffix_removed, line 125
+ this.B_standard_suffix_removed = true;
+ this.cursor = this.limit - v_1;
+ return true;
+ }
+
+ function r_standard_suffix () : boolean
+ {
+ var among_var : int;
+ var v_1 : int;
+ // (, line 129
+ // unset standard_suffix_removed, line 130
+ this.B_standard_suffix_removed = false;
+ // repeat, line 131
+ replab0: while(true)
+ {
+ v_1 = this.limit - this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ // call combo_suffix, line 131
+ if (!this.r_combo_suffix())
+ {
+ break lab1;
+ }
+ continue replab0;
+ }
+ this.cursor = this.limit - v_1;
+ break replab0;
+ }
+ // [, line 132
+ this.ket = this.cursor;
+ // substring, line 132
+ among_var = this.find_among_b(RomanianStemmer.a_3, 62);
+ if (among_var == 0)
+ {
+ return false;
+ }
+ // ], line 132
+ this.bra = this.cursor;
+ // call R2, line 132
+ if (!this.r_R2())
+ {
+ return false;
+ }
+ // (, line 132
+ switch (among_var) {
+ case 0:
+ return false;
+ case 1:
+ // (, line 148
+ // delete, line 149
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 2:
+ // (, line 151
+ // literal, line 152
+ if (!(this.eq_s_b(1, "\u0163")))
+ {
+ return false;
+ }
+ // ], line 152
+ this.bra = this.cursor;
+ // <-, line 152
+ if (!this.slice_from("t"))
+ {
+ return false;
+ }
+ break;
+ case 3:
+ // (, line 155
+ // <-, line 156
+ if (!this.slice_from("ist"))
+ {
+ return false;
+ }
+ break;
+ }
+ // set standard_suffix_removed, line 160
+ this.B_standard_suffix_removed = true;
+ return true;
+ }
+
+ function r_verb_suffix () : boolean
+ {
+ var among_var : int;
+ var v_1 : int;
+ var v_2 : int;
+ var v_3 : int;
+ // setlimit, line 164
+ v_1 = this.limit - this.cursor;
+ // tomark, line 164
+ if (this.cursor < this.I_pV)
+ {
+ return false;
+ }
+ this.cursor = this.I_pV;
+ v_2 = this.limit_backward;
+ this.limit_backward = this.cursor;
+ this.cursor = this.limit - v_1;
+ // (, line 164
+ // [, line 165
+ this.ket = this.cursor;
+ // substring, line 165
+ among_var = this.find_among_b(RomanianStemmer.a_4, 94);
+ if (among_var == 0)
+ {
+ this.limit_backward = v_2;
+ return false;
+ }
+ // ], line 165
+ this.bra = this.cursor;
+ switch (among_var) {
+ case 0:
+ this.limit_backward = v_2;
+ return false;
+ case 1:
+ // (, line 200
+ // or, line 200
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ v_3 = this.limit - this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ if (!(this.out_grouping_b(RomanianStemmer.g_v, 97, 259)))
+ {
+ break lab1;
+ }
+ break lab0;
+ }
+ this.cursor = this.limit - v_3;
+ // literal, line 200
+ if (!(this.eq_s_b(1, "u")))
+ {
+ this.limit_backward = v_2;
+ return false;
+ }
+ }
+ // delete, line 200
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 2:
+ // (, line 214
+ // delete, line 214
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ }
+ this.limit_backward = v_2;
+ return true;
+ }
+
+ function r_vowel_suffix () : boolean
+ {
+ var among_var : int;
+ // (, line 218
+ // [, line 219
+ this.ket = this.cursor;
+ // substring, line 219
+ among_var = this.find_among_b(RomanianStemmer.a_5, 5);
+ if (among_var == 0)
+ {
+ return false;
+ }
+ // ], line 219
+ this.bra = this.cursor;
+ // call RV, line 219
+ if (!this.r_RV())
+ {
+ return false;
+ }
+ switch (among_var) {
+ case 0:
+ return false;
+ case 1:
+ // (, line 220
+ // delete, line 220
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ }
+ return true;
+ }
+
+ override function stem () : boolean
+ {
+ var v_1 : int;
+ var v_2 : int;
+ var v_3 : int;
+ var v_4 : int;
+ var v_5 : int;
+ var v_6 : int;
+ var v_7 : int;
+ var v_8 : int;
+ // (, line 225
+ // do, line 226
+ v_1 = this.cursor;
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ // call prelude, line 226
+ if (!this.r_prelude())
+ {
+ break lab0;
+ }
+ }
+ this.cursor = v_1;
+ // do, line 227
+ v_2 = this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ // call mark_regions, line 227
+ if (!this.r_mark_regions())
+ {
+ break lab1;
+ }
+ }
+ this.cursor = v_2;
+ // backwards, line 228
+ this.limit_backward = this.cursor; this.cursor = this.limit;
+ // (, line 228
+ // do, line 229
+ v_3 = this.limit - this.cursor;
+ var lab2 = true;
+ lab2: while (lab2 == true)
+ {
+ lab2 = false;
+ // call step_0, line 229
+ if (!this.r_step_0())
+ {
+ break lab2;
+ }
+ }
+ this.cursor = this.limit - v_3;
+ // do, line 230
+ v_4 = this.limit - this.cursor;
+ var lab3 = true;
+ lab3: while (lab3 == true)
+ {
+ lab3 = false;
+ // call standard_suffix, line 230
+ if (!this.r_standard_suffix())
+ {
+ break lab3;
+ }
+ }
+ this.cursor = this.limit - v_4;
+ // do, line 231
+ v_5 = this.limit - this.cursor;
+ var lab4 = true;
+ lab4: while (lab4 == true)
+ {
+ lab4 = false;
+ // (, line 231
+ // or, line 231
+ var lab5 = true;
+ lab5: while (lab5 == true)
+ {
+ lab5 = false;
+ v_6 = this.limit - this.cursor;
+ var lab6 = true;
+ lab6: while (lab6 == true)
+ {
+ lab6 = false;
+ // Boolean test standard_suffix_removed, line 231
+ if (!(this.B_standard_suffix_removed))
+ {
+ break lab6;
+ }
+ break lab5;
+ }
+ this.cursor = this.limit - v_6;
+ // call verb_suffix, line 231
+ if (!this.r_verb_suffix())
+ {
+ break lab4;
+ }
+ }
+ }
+ this.cursor = this.limit - v_5;
+ // do, line 232
+ v_7 = this.limit - this.cursor;
+ var lab7 = true;
+ lab7: while (lab7 == true)
+ {
+ lab7 = false;
+ // call vowel_suffix, line 232
+ if (!this.r_vowel_suffix())
+ {
+ break lab7;
+ }
+ }
+ this.cursor = this.limit - v_7;
+ this.cursor = this.limit_backward; // do, line 234
+ v_8 = this.cursor;
+ var lab8 = true;
+ lab8: while (lab8 == true)
+ {
+ lab8 = false;
+ // call postlude, line 234
+ if (!this.r_postlude())
+ {
+ break lab8;
+ }
+ }
+ this.cursor = v_8;
+ return true;
+ }
+
+ function equals (o : variant) : boolean {
+ return o instanceof RomanianStemmer;
+ }
+
+ function hashCode() : int
+ {
+ //http://stackoverflow.com/questions/194846/is-there-any-kind-of-hashcode-function-in-javascript
+ var classname = "RomanianStemmer";
+ var hash = 0;
+ if (classname.length == 0) return hash;
+ for (var i = 0; i < classname.length; i++) {
+ var char = classname.charCodeAt(i);
+ hash = ((hash << 5) - hash) + char;
+ hash = hash & hash; // Convert to 32bit integer
+ }
+ return hash;
+ }
+
+}
+
diff --git a/web/server/h2o/libh2o/misc/oktavia/src/stemmer/russian-stemmer.jsx b/web/server/h2o/libh2o/misc/oktavia/src/stemmer/russian-stemmer.jsx
new file mode 100644
index 00000000..2b7d30a9
--- /dev/null
+++ b/web/server/h2o/libh2o/misc/oktavia/src/stemmer/russian-stemmer.jsx
@@ -0,0 +1,875 @@
+// This file was generated automatically by the Snowball to JSX compiler
+
+import "base-stemmer.jsx";
+import "among.jsx";
+
+ /**
+ * This class was automatically generated by a Snowball to JSX compiler
+ * It implements the stemming algorithm defined by a snowball script.
+ */
+
+class RussianStemmer extends BaseStemmer
+{
+ static const serialVersionUID = 1;
+ static const methodObject = new RussianStemmer();
+
+ static const a_0 = [
+ 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)
+ ];
+
+ static const a_1 = [
+ 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)
+ ];
+
+ static const a_2 = [
+ 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)
+ ];
+
+ static const a_3 = [
+ new Among("\u0441\u044C", -1, 1),
+ new Among("\u0441\u044F", -1, 1)
+ ];
+
+ static const a_4 = [
+ 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)
+ ];
+
+ static const a_5 = [
+ 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)
+ ];
+
+ static const a_6 = [
+ new Among("\u043E\u0441\u0442", -1, 1),
+ new Among("\u043E\u0441\u0442\u044C", -1, 1)
+ ];
+
+ static const a_7 = [
+ 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)
+ ];
+
+ static const g_v = [33, 65, 8, 232] : int[];
+
+ var I_p2 : int = 0;
+ var I_pV : int = 0;
+
+ function copy_from (other : RussianStemmer) : void
+ {
+ this.I_p2 = other.I_p2;
+ this.I_pV = other.I_pV;
+ super.copy_from(other);
+ }
+
+ function r_mark_regions () : boolean
+ {
+ var v_1 : int;
+ // (, line 57
+ this.I_pV = this.limit;
+ this.I_p2 = this.limit;
+ // do, line 61
+ v_1 = this.cursor;
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ // (, line 61
+ // gopast, line 62
+ golab1: while(true)
+ {
+ var lab2 = true;
+ lab2: while (lab2 == true)
+ {
+ lab2 = false;
+ if (!(this.in_grouping(RussianStemmer.g_v, 1072, 1103)))
+ {
+ break lab2;
+ }
+ break golab1;
+ }
+ if (this.cursor >= this.limit)
+ {
+ break lab0;
+ }
+ this.cursor++;
+ }
+ // setmark pV, line 62
+ this.I_pV = this.cursor;
+ // gopast, line 62
+ golab3: while(true)
+ {
+ var lab4 = true;
+ lab4: while (lab4 == true)
+ {
+ lab4 = false;
+ if (!(this.out_grouping(RussianStemmer.g_v, 1072, 1103)))
+ {
+ break lab4;
+ }
+ break golab3;
+ }
+ if (this.cursor >= this.limit)
+ {
+ break lab0;
+ }
+ this.cursor++;
+ }
+ // gopast, line 63
+ golab5: while(true)
+ {
+ var lab6 = true;
+ lab6: while (lab6 == true)
+ {
+ lab6 = false;
+ if (!(this.in_grouping(RussianStemmer.g_v, 1072, 1103)))
+ {
+ break lab6;
+ }
+ break golab5;
+ }
+ if (this.cursor >= this.limit)
+ {
+ break lab0;
+ }
+ this.cursor++;
+ }
+ // gopast, line 63
+ golab7: while(true)
+ {
+ var lab8 = true;
+ lab8: while (lab8 == true)
+ {
+ lab8 = false;
+ if (!(this.out_grouping(RussianStemmer.g_v, 1072, 1103)))
+ {
+ break lab8;
+ }
+ break golab7;
+ }
+ if (this.cursor >= this.limit)
+ {
+ break lab0;
+ }
+ this.cursor++;
+ }
+ // setmark p2, line 63
+ this.I_p2 = this.cursor;
+ }
+ this.cursor = v_1;
+ return true;
+ }
+
+ function r_R2 () : boolean
+ {
+ if (!(this.I_p2 <= this.cursor))
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_perfective_gerund () : boolean
+ {
+ var among_var : int;
+ var v_1 : int;
+ // (, line 71
+ // [, line 72
+ this.ket = this.cursor;
+ // substring, line 72
+ among_var = this.find_among_b(RussianStemmer.a_0, 9);
+ if (among_var == 0)
+ {
+ return false;
+ }
+ // ], line 72
+ this.bra = this.cursor;
+ switch (among_var) {
+ case 0:
+ return false;
+ case 1:
+ // (, line 76
+ // or, line 76
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ v_1 = this.limit - this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ // literal, line 76
+ if (!(this.eq_s_b(1, "\u0430")))
+ {
+ break lab1;
+ }
+ break lab0;
+ }
+ this.cursor = this.limit - v_1;
+ // literal, line 76
+ if (!(this.eq_s_b(1, "\u044F")))
+ {
+ return false;
+ }
+ }
+ // delete, line 76
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 2:
+ // (, line 83
+ // delete, line 83
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ }
+ return true;
+ }
+
+ function r_adjective () : boolean
+ {
+ var among_var : int;
+ // (, line 87
+ // [, line 88
+ this.ket = this.cursor;
+ // substring, line 88
+ among_var = this.find_among_b(RussianStemmer.a_1, 26);
+ if (among_var == 0)
+ {
+ return false;
+ }
+ // ], line 88
+ this.bra = this.cursor;
+ switch (among_var) {
+ case 0:
+ return false;
+ case 1:
+ // (, line 97
+ // delete, line 97
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ }
+ return true;
+ }
+
+ function r_adjectival () : boolean
+ {
+ var among_var : int;
+ var v_1 : int;
+ var v_2 : int;
+ // (, line 101
+ // call adjective, line 102
+ if (!this.r_adjective())
+ {
+ return false;
+ }
+ // try, line 109
+ v_1 = this.limit - this.cursor;
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ // (, line 109
+ // [, line 110
+ this.ket = this.cursor;
+ // substring, line 110
+ among_var = this.find_among_b(RussianStemmer.a_2, 8);
+ if (among_var == 0)
+ {
+ this.cursor = this.limit - v_1;
+ break lab0;
+ }
+ // ], line 110
+ this.bra = this.cursor;
+ switch (among_var) {
+ case 0:
+ this.cursor = this.limit - v_1;
+ break lab0;
+ case 1:
+ // (, line 115
+ // or, line 115
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ v_2 = this.limit - this.cursor;
+ var lab2 = true;
+ lab2: while (lab2 == true)
+ {
+ lab2 = false;
+ // literal, line 115
+ if (!(this.eq_s_b(1, "\u0430")))
+ {
+ break lab2;
+ }
+ break lab1;
+ }
+ this.cursor = this.limit - v_2;
+ // literal, line 115
+ if (!(this.eq_s_b(1, "\u044F")))
+ {
+ this.cursor = this.limit - v_1;
+ break lab0;
+ }
+ }
+ // delete, line 115
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 2:
+ // (, line 122
+ // delete, line 122
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ }
+ }
+ return true;
+ }
+
+ function r_reflexive () : boolean
+ {
+ var among_var : int;
+ // (, line 128
+ // [, line 129
+ this.ket = this.cursor;
+ // substring, line 129
+ among_var = this.find_among_b(RussianStemmer.a_3, 2);
+ if (among_var == 0)
+ {
+ return false;
+ }
+ // ], line 129
+ this.bra = this.cursor;
+ switch (among_var) {
+ case 0:
+ return false;
+ case 1:
+ // (, line 132
+ // delete, line 132
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ }
+ return true;
+ }
+
+ function r_verb () : boolean
+ {
+ var among_var : int;
+ var v_1 : int;
+ // (, line 136
+ // [, line 137
+ this.ket = this.cursor;
+ // substring, line 137
+ among_var = this.find_among_b(RussianStemmer.a_4, 46);
+ if (among_var == 0)
+ {
+ return false;
+ }
+ // ], line 137
+ this.bra = this.cursor;
+ switch (among_var) {
+ case 0:
+ return false;
+ case 1:
+ // (, line 143
+ // or, line 143
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ v_1 = this.limit - this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ // literal, line 143
+ if (!(this.eq_s_b(1, "\u0430")))
+ {
+ break lab1;
+ }
+ break lab0;
+ }
+ this.cursor = this.limit - v_1;
+ // literal, line 143
+ if (!(this.eq_s_b(1, "\u044F")))
+ {
+ return false;
+ }
+ }
+ // delete, line 143
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 2:
+ // (, line 151
+ // delete, line 151
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ }
+ return true;
+ }
+
+ function r_noun () : boolean
+ {
+ var among_var : int;
+ // (, line 159
+ // [, line 160
+ this.ket = this.cursor;
+ // substring, line 160
+ among_var = this.find_among_b(RussianStemmer.a_5, 36);
+ if (among_var == 0)
+ {
+ return false;
+ }
+ // ], line 160
+ this.bra = this.cursor;
+ switch (among_var) {
+ case 0:
+ return false;
+ case 1:
+ // (, line 167
+ // delete, line 167
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ }
+ return true;
+ }
+
+ function r_derivational () : boolean
+ {
+ var among_var : int;
+ // (, line 175
+ // [, line 176
+ this.ket = this.cursor;
+ // substring, line 176
+ among_var = this.find_among_b(RussianStemmer.a_6, 2);
+ if (among_var == 0)
+ {
+ return false;
+ }
+ // ], line 176
+ this.bra = this.cursor;
+ // call R2, line 176
+ if (!this.r_R2())
+ {
+ return false;
+ }
+ switch (among_var) {
+ case 0:
+ return false;
+ case 1:
+ // (, line 179
+ // delete, line 179
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ }
+ return true;
+ }
+
+ function r_tidy_up () : boolean
+ {
+ var among_var : int;
+ // (, line 183
+ // [, line 184
+ this.ket = this.cursor;
+ // substring, line 184
+ among_var = this.find_among_b(RussianStemmer.a_7, 4);
+ if (among_var == 0)
+ {
+ return false;
+ }
+ // ], line 184
+ this.bra = this.cursor;
+ switch (among_var) {
+ case 0:
+ return false;
+ case 1:
+ // (, line 188
+ // delete, line 188
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // [, line 189
+ this.ket = this.cursor;
+ // literal, line 189
+ if (!(this.eq_s_b(1, "\u043D")))
+ {
+ return false;
+ }
+ // ], line 189
+ this.bra = this.cursor;
+ // literal, line 189
+ if (!(this.eq_s_b(1, "\u043D")))
+ {
+ return false;
+ }
+ // delete, line 189
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 2:
+ // (, line 192
+ // literal, line 192
+ if (!(this.eq_s_b(1, "\u043D")))
+ {
+ return false;
+ }
+ // delete, line 192
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 3:
+ // (, line 194
+ // delete, line 194
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ }
+ return true;
+ }
+
+ override function stem () : boolean
+ {
+ var v_1 : int;
+ var v_2 : int;
+ var v_3 : int;
+ var v_4 : int;
+ var v_5 : int;
+ var v_6 : int;
+ var v_7 : int;
+ var v_8 : int;
+ var v_9 : int;
+ var v_10 : int;
+ // (, line 199
+ // do, line 201
+ v_1 = this.cursor;
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ // call mark_regions, line 201
+ if (!this.r_mark_regions())
+ {
+ break lab0;
+ }
+ }
+ this.cursor = v_1;
+ // backwards, line 202
+ this.limit_backward = this.cursor; this.cursor = this.limit;
+ // setlimit, line 202
+ v_2 = this.limit - this.cursor;
+ // tomark, line 202
+ if (this.cursor < this.I_pV)
+ {
+ return false;
+ }
+ this.cursor = this.I_pV;
+ v_3 = this.limit_backward;
+ this.limit_backward = this.cursor;
+ this.cursor = this.limit - v_2;
+ // (, line 202
+ // do, line 203
+ v_4 = this.limit - this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ // (, line 203
+ // or, line 204
+ var lab2 = true;
+ lab2: while (lab2 == true)
+ {
+ lab2 = false;
+ v_5 = this.limit - this.cursor;
+ var lab3 = true;
+ lab3: while (lab3 == true)
+ {
+ lab3 = false;
+ // call perfective_gerund, line 204
+ if (!this.r_perfective_gerund())
+ {
+ break lab3;
+ }
+ break lab2;
+ }
+ this.cursor = this.limit - v_5;
+ // (, line 205
+ // try, line 205
+ v_6 = this.limit - this.cursor;
+ var lab4 = true;
+ lab4: while (lab4 == true)
+ {
+ lab4 = false;
+ // call reflexive, line 205
+ if (!this.r_reflexive())
+ {
+ this.cursor = this.limit - v_6;
+ break lab4;
+ }
+ }
+ // or, line 206
+ var lab5 = true;
+ lab5: while (lab5 == true)
+ {
+ lab5 = false;
+ v_7 = this.limit - this.cursor;
+ var lab6 = true;
+ lab6: while (lab6 == true)
+ {
+ lab6 = false;
+ // call adjectival, line 206
+ if (!this.r_adjectival())
+ {
+ break lab6;
+ }
+ break lab5;
+ }
+ this.cursor = this.limit - v_7;
+ var lab7 = true;
+ lab7: while (lab7 == true)
+ {
+ lab7 = false;
+ // call verb, line 206
+ if (!this.r_verb())
+ {
+ break lab7;
+ }
+ break lab5;
+ }
+ this.cursor = this.limit - v_7;
+ // call noun, line 206
+ if (!this.r_noun())
+ {
+ break lab1;
+ }
+ }
+ }
+ }
+ this.cursor = this.limit - v_4;
+ // try, line 209
+ v_8 = this.limit - this.cursor;
+ var lab8 = true;
+ lab8: while (lab8 == true)
+ {
+ lab8 = false;
+ // (, line 209
+ // [, line 209
+ this.ket = this.cursor;
+ // literal, line 209
+ if (!(this.eq_s_b(1, "\u0438")))
+ {
+ this.cursor = this.limit - v_8;
+ break lab8;
+ }
+ // ], line 209
+ this.bra = this.cursor;
+ // delete, line 209
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ }
+ // do, line 212
+ v_9 = this.limit - this.cursor;
+ var lab9 = true;
+ lab9: while (lab9 == true)
+ {
+ lab9 = false;
+ // call derivational, line 212
+ if (!this.r_derivational())
+ {
+ break lab9;
+ }
+ }
+ this.cursor = this.limit - v_9;
+ // do, line 213
+ v_10 = this.limit - this.cursor;
+ var lab10 = true;
+ lab10: while (lab10 == true)
+ {
+ lab10 = false;
+ // call tidy_up, line 213
+ if (!this.r_tidy_up())
+ {
+ break lab10;
+ }
+ }
+ this.cursor = this.limit - v_10;
+ this.limit_backward = v_3;
+ this.cursor = this.limit_backward; return true;
+ }
+
+ function equals (o : variant) : boolean {
+ return o instanceof RussianStemmer;
+ }
+
+ function hashCode() : int
+ {
+ //http://stackoverflow.com/questions/194846/is-there-any-kind-of-hashcode-function-in-javascript
+ var classname = "RussianStemmer";
+ var hash = 0;
+ if (classname.length == 0) return hash;
+ for (var i = 0; i < classname.length; i++) {
+ var char = classname.charCodeAt(i);
+ hash = ((hash << 5) - hash) + char;
+ hash = hash & hash; // Convert to 32bit integer
+ }
+ return hash;
+ }
+
+}
+
diff --git a/web/server/h2o/libh2o/misc/oktavia/src/stemmer/spanish-stemmer.jsx b/web/server/h2o/libh2o/misc/oktavia/src/stemmer/spanish-stemmer.jsx
new file mode 100644
index 00000000..e9bee696
--- /dev/null
+++ b/web/server/h2o/libh2o/misc/oktavia/src/stemmer/spanish-stemmer.jsx
@@ -0,0 +1,1408 @@
+// This file was generated automatically by the Snowball to JSX compiler
+
+import "base-stemmer.jsx";
+import "among.jsx";
+
+ /**
+ * This class was automatically generated by a Snowball to JSX compiler
+ * It implements the stemming algorithm defined by a snowball script.
+ */
+
+class SpanishStemmer extends BaseStemmer
+{
+ static const serialVersionUID = 1;
+ static const methodObject = new SpanishStemmer();
+
+ static const a_0 = [
+ 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)
+ ];
+
+ static const a_1 = [
+ 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)
+ ];
+
+ static const a_2 = [
+ 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)
+ ];
+
+ static const a_3 = [
+ new Among("ic", -1, -1),
+ new Among("ad", -1, -1),
+ new Among("os", -1, -1),
+ new Among("iv", -1, 1)
+ ];
+
+ static const a_4 = [
+ new Among("able", -1, 1),
+ new Among("ible", -1, 1),
+ new Among("ante", -1, 1)
+ ];
+
+ static const a_5 = [
+ new Among("ic", -1, 1),
+ new Among("abil", -1, 1),
+ new Among("iv", -1, 1)
+ ];
+
+ static const a_6 = [
+ 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)
+ ];
+
+ static const a_7 = [
+ 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)
+ ];
+
+ static const a_8 = [
+ 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)
+ ];
+
+ static const a_9 = [
+ 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)
+ ];
+
+ static const g_v = [17, 65, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 17, 4, 10] : int[];
+
+ var I_p2 : int = 0;
+ var I_p1 : int = 0;
+ var I_pV : int = 0;
+
+ function copy_from (other : SpanishStemmer) : void
+ {
+ this.I_p2 = other.I_p2;
+ this.I_p1 = other.I_p1;
+ this.I_pV = other.I_pV;
+ super.copy_from(other);
+ }
+
+ function r_mark_regions () : boolean
+ {
+ var v_1 : int;
+ var v_2 : int;
+ var v_3 : int;
+ var v_6 : int;
+ var v_8 : int;
+ // (, line 31
+ this.I_pV = this.limit;
+ this.I_p1 = this.limit;
+ this.I_p2 = this.limit;
+ // do, line 37
+ v_1 = this.cursor;
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ // (, line 37
+ // or, line 39
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ v_2 = this.cursor;
+ var lab2 = true;
+ lab2: while (lab2 == true)
+ {
+ lab2 = false;
+ // (, line 38
+ if (!(this.in_grouping(SpanishStemmer.g_v, 97, 252)))
+ {
+ break lab2;
+ }
+ // or, line 38
+ var lab3 = true;
+ lab3: while (lab3 == true)
+ {
+ lab3 = false;
+ v_3 = this.cursor;
+ var lab4 = true;
+ lab4: while (lab4 == true)
+ {
+ lab4 = false;
+ // (, line 38
+ if (!(this.out_grouping(SpanishStemmer.g_v, 97, 252)))
+ {
+ break lab4;
+ }
+ // gopast, line 38
+ golab5: while(true)
+ {
+ var lab6 = true;
+ lab6: while (lab6 == true)
+ {
+ lab6 = false;
+ if (!(this.in_grouping(SpanishStemmer.g_v, 97, 252)))
+ {
+ break lab6;
+ }
+ break golab5;
+ }
+ if (this.cursor >= this.limit)
+ {
+ break lab4;
+ }
+ this.cursor++;
+ }
+ break lab3;
+ }
+ this.cursor = v_3;
+ // (, line 38
+ if (!(this.in_grouping(SpanishStemmer.g_v, 97, 252)))
+ {
+ break lab2;
+ }
+ // gopast, line 38
+ golab7: while(true)
+ {
+ var lab8 = true;
+ lab8: while (lab8 == true)
+ {
+ lab8 = false;
+ if (!(this.out_grouping(SpanishStemmer.g_v, 97, 252)))
+ {
+ break lab8;
+ }
+ break golab7;
+ }
+ if (this.cursor >= this.limit)
+ {
+ break lab2;
+ }
+ this.cursor++;
+ }
+ }
+ break lab1;
+ }
+ this.cursor = v_2;
+ // (, line 40
+ if (!(this.out_grouping(SpanishStemmer.g_v, 97, 252)))
+ {
+ break lab0;
+ }
+ // or, line 40
+ var lab9 = true;
+ lab9: while (lab9 == true)
+ {
+ lab9 = false;
+ v_6 = this.cursor;
+ var lab10 = true;
+ lab10: while (lab10 == true)
+ {
+ lab10 = false;
+ // (, line 40
+ if (!(this.out_grouping(SpanishStemmer.g_v, 97, 252)))
+ {
+ break lab10;
+ }
+ // gopast, line 40
+ golab11: while(true)
+ {
+ var lab12 = true;
+ lab12: while (lab12 == true)
+ {
+ lab12 = false;
+ if (!(this.in_grouping(SpanishStemmer.g_v, 97, 252)))
+ {
+ break lab12;
+ }
+ break golab11;
+ }
+ if (this.cursor >= this.limit)
+ {
+ break lab10;
+ }
+ this.cursor++;
+ }
+ break lab9;
+ }
+ this.cursor = v_6;
+ // (, line 40
+ if (!(this.in_grouping(SpanishStemmer.g_v, 97, 252)))
+ {
+ break lab0;
+ }
+ // next, line 40
+ if (this.cursor >= this.limit)
+ {
+ break lab0;
+ }
+ this.cursor++;
+ }
+ }
+ // setmark pV, line 41
+ this.I_pV = this.cursor;
+ }
+ this.cursor = v_1;
+ // do, line 43
+ v_8 = this.cursor;
+ var lab13 = true;
+ lab13: while (lab13 == true)
+ {
+ lab13 = false;
+ // (, line 43
+ // gopast, line 44
+ golab14: while(true)
+ {
+ var lab15 = true;
+ lab15: while (lab15 == true)
+ {
+ lab15 = false;
+ if (!(this.in_grouping(SpanishStemmer.g_v, 97, 252)))
+ {
+ break lab15;
+ }
+ break golab14;
+ }
+ if (this.cursor >= this.limit)
+ {
+ break lab13;
+ }
+ this.cursor++;
+ }
+ // gopast, line 44
+ golab16: while(true)
+ {
+ var lab17 = true;
+ lab17: while (lab17 == true)
+ {
+ lab17 = false;
+ if (!(this.out_grouping(SpanishStemmer.g_v, 97, 252)))
+ {
+ break lab17;
+ }
+ break golab16;
+ }
+ if (this.cursor >= this.limit)
+ {
+ break lab13;
+ }
+ this.cursor++;
+ }
+ // setmark p1, line 44
+ this.I_p1 = this.cursor;
+ // gopast, line 45
+ golab18: while(true)
+ {
+ var lab19 = true;
+ lab19: while (lab19 == true)
+ {
+ lab19 = false;
+ if (!(this.in_grouping(SpanishStemmer.g_v, 97, 252)))
+ {
+ break lab19;
+ }
+ break golab18;
+ }
+ if (this.cursor >= this.limit)
+ {
+ break lab13;
+ }
+ this.cursor++;
+ }
+ // gopast, line 45
+ golab20: while(true)
+ {
+ var lab21 = true;
+ lab21: while (lab21 == true)
+ {
+ lab21 = false;
+ if (!(this.out_grouping(SpanishStemmer.g_v, 97, 252)))
+ {
+ break lab21;
+ }
+ break golab20;
+ }
+ if (this.cursor >= this.limit)
+ {
+ break lab13;
+ }
+ this.cursor++;
+ }
+ // setmark p2, line 45
+ this.I_p2 = this.cursor;
+ }
+ this.cursor = v_8;
+ return true;
+ }
+
+ function r_postlude () : boolean
+ {
+ var among_var : int;
+ var v_1 : int;
+ // repeat, line 49
+ replab0: while(true)
+ {
+ v_1 = this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ // (, line 49
+ // [, line 50
+ this.bra = this.cursor;
+ // substring, line 50
+ among_var = this.find_among(SpanishStemmer.a_0, 6);
+ if (among_var == 0)
+ {
+ break lab1;
+ }
+ // ], line 50
+ this.ket = this.cursor;
+ switch (among_var) {
+ case 0:
+ break lab1;
+ case 1:
+ // (, line 51
+ // <-, line 51
+ if (!this.slice_from("a"))
+ {
+ return false;
+ }
+ break;
+ case 2:
+ // (, line 52
+ // <-, line 52
+ if (!this.slice_from("e"))
+ {
+ return false;
+ }
+ break;
+ case 3:
+ // (, line 53
+ // <-, line 53
+ if (!this.slice_from("i"))
+ {
+ return false;
+ }
+ break;
+ case 4:
+ // (, line 54
+ // <-, line 54
+ if (!this.slice_from("o"))
+ {
+ return false;
+ }
+ break;
+ case 5:
+ // (, line 55
+ // <-, line 55
+ if (!this.slice_from("u"))
+ {
+ return false;
+ }
+ break;
+ case 6:
+ // (, line 57
+ // next, line 57
+ if (this.cursor >= this.limit)
+ {
+ break lab1;
+ }
+ this.cursor++;
+ break;
+ }
+ continue replab0;
+ }
+ this.cursor = v_1;
+ break replab0;
+ }
+ return true;
+ }
+
+ function r_RV () : boolean
+ {
+ if (!(this.I_pV <= this.cursor))
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_R1 () : boolean
+ {
+ if (!(this.I_p1 <= this.cursor))
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_R2 () : boolean
+ {
+ if (!(this.I_p2 <= this.cursor))
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_attached_pronoun () : boolean
+ {
+ var among_var : int;
+ // (, line 67
+ // [, line 68
+ this.ket = this.cursor;
+ // substring, line 68
+ if (this.find_among_b(SpanishStemmer.a_1, 13) == 0)
+ {
+ return false;
+ }
+ // ], line 68
+ this.bra = this.cursor;
+ // substring, line 72
+ among_var = this.find_among_b(SpanishStemmer.a_2, 11);
+ if (among_var == 0)
+ {
+ return false;
+ }
+ // call RV, line 72
+ if (!this.r_RV())
+ {
+ return false;
+ }
+ switch (among_var) {
+ case 0:
+ return false;
+ case 1:
+ // (, line 73
+ // ], line 73
+ this.bra = this.cursor;
+ // <-, line 73
+ if (!this.slice_from("iendo"))
+ {
+ return false;
+ }
+ break;
+ case 2:
+ // (, line 74
+ // ], line 74
+ this.bra = this.cursor;
+ // <-, line 74
+ if (!this.slice_from("ando"))
+ {
+ return false;
+ }
+ break;
+ case 3:
+ // (, line 75
+ // ], line 75
+ this.bra = this.cursor;
+ // <-, line 75
+ if (!this.slice_from("ar"))
+ {
+ return false;
+ }
+ break;
+ case 4:
+ // (, line 76
+ // ], line 76
+ this.bra = this.cursor;
+ // <-, line 76
+ if (!this.slice_from("er"))
+ {
+ return false;
+ }
+ break;
+ case 5:
+ // (, line 77
+ // ], line 77
+ this.bra = this.cursor;
+ // <-, line 77
+ if (!this.slice_from("ir"))
+ {
+ return false;
+ }
+ break;
+ case 6:
+ // (, line 81
+ // delete, line 81
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 7:
+ // (, line 82
+ // literal, line 82
+ if (!(this.eq_s_b(1, "u")))
+ {
+ return false;
+ }
+ // delete, line 82
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ }
+ return true;
+ }
+
+ function r_standard_suffix () : boolean
+ {
+ var among_var : int;
+ var v_1 : int;
+ var v_2 : int;
+ var v_3 : int;
+ var v_4 : int;
+ var v_5 : int;
+ // (, line 86
+ // [, line 87
+ this.ket = this.cursor;
+ // substring, line 87
+ among_var = this.find_among_b(SpanishStemmer.a_6, 46);
+ if (among_var == 0)
+ {
+ return false;
+ }
+ // ], line 87
+ this.bra = this.cursor;
+ switch (among_var) {
+ case 0:
+ return false;
+ case 1:
+ // (, line 98
+ // call R2, line 99
+ if (!this.r_R2())
+ {
+ return false;
+ }
+ // delete, line 99
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 2:
+ // (, line 104
+ // call R2, line 105
+ if (!this.r_R2())
+ {
+ return false;
+ }
+ // delete, line 105
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // try, line 106
+ v_1 = this.limit - this.cursor;
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ // (, line 106
+ // [, line 106
+ this.ket = this.cursor;
+ // literal, line 106
+ if (!(this.eq_s_b(2, "ic")))
+ {
+ this.cursor = this.limit - v_1;
+ break lab0;
+ }
+ // ], line 106
+ this.bra = this.cursor;
+ // call R2, line 106
+ if (!this.r_R2())
+ {
+ this.cursor = this.limit - v_1;
+ break lab0;
+ }
+ // delete, line 106
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ }
+ break;
+ case 3:
+ // (, line 110
+ // call R2, line 111
+ if (!this.r_R2())
+ {
+ return false;
+ }
+ // <-, line 111
+ if (!this.slice_from("log"))
+ {
+ return false;
+ }
+ break;
+ case 4:
+ // (, line 114
+ // call R2, line 115
+ if (!this.r_R2())
+ {
+ return false;
+ }
+ // <-, line 115
+ if (!this.slice_from("u"))
+ {
+ return false;
+ }
+ break;
+ case 5:
+ // (, line 118
+ // call R2, line 119
+ if (!this.r_R2())
+ {
+ return false;
+ }
+ // <-, line 119
+ if (!this.slice_from("ente"))
+ {
+ return false;
+ }
+ break;
+ case 6:
+ // (, line 122
+ // call R1, line 123
+ if (!this.r_R1())
+ {
+ return false;
+ }
+ // delete, line 123
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // try, line 124
+ v_2 = this.limit - this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ // (, line 124
+ // [, line 125
+ this.ket = this.cursor;
+ // substring, line 125
+ among_var = this.find_among_b(SpanishStemmer.a_3, 4);
+ if (among_var == 0)
+ {
+ this.cursor = this.limit - v_2;
+ break lab1;
+ }
+ // ], line 125
+ this.bra = this.cursor;
+ // call R2, line 125
+ if (!this.r_R2())
+ {
+ this.cursor = this.limit - v_2;
+ break lab1;
+ }
+ // delete, line 125
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ switch (among_var) {
+ case 0:
+ this.cursor = this.limit - v_2;
+ break lab1;
+ case 1:
+ // (, line 126
+ // [, line 126
+ this.ket = this.cursor;
+ // literal, line 126
+ if (!(this.eq_s_b(2, "at")))
+ {
+ this.cursor = this.limit - v_2;
+ break lab1;
+ }
+ // ], line 126
+ this.bra = this.cursor;
+ // call R2, line 126
+ if (!this.r_R2())
+ {
+ this.cursor = this.limit - v_2;
+ break lab1;
+ }
+ // delete, line 126
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ }
+ }
+ break;
+ case 7:
+ // (, line 134
+ // call R2, line 135
+ if (!this.r_R2())
+ {
+ return false;
+ }
+ // delete, line 135
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // try, line 136
+ v_3 = this.limit - this.cursor;
+ var lab2 = true;
+ lab2: while (lab2 == true)
+ {
+ lab2 = false;
+ // (, line 136
+ // [, line 137
+ this.ket = this.cursor;
+ // substring, line 137
+ among_var = this.find_among_b(SpanishStemmer.a_4, 3);
+ if (among_var == 0)
+ {
+ this.cursor = this.limit - v_3;
+ break lab2;
+ }
+ // ], line 137
+ this.bra = this.cursor;
+ switch (among_var) {
+ case 0:
+ this.cursor = this.limit - v_3;
+ break lab2;
+ case 1:
+ // (, line 140
+ // call R2, line 140
+ if (!this.r_R2())
+ {
+ this.cursor = this.limit - v_3;
+ break lab2;
+ }
+ // delete, line 140
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ }
+ }
+ break;
+ case 8:
+ // (, line 146
+ // call R2, line 147
+ if (!this.r_R2())
+ {
+ return false;
+ }
+ // delete, line 147
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // try, line 148
+ v_4 = this.limit - this.cursor;
+ var lab3 = true;
+ lab3: while (lab3 == true)
+ {
+ lab3 = false;
+ // (, line 148
+ // [, line 149
+ this.ket = this.cursor;
+ // substring, line 149
+ among_var = this.find_among_b(SpanishStemmer.a_5, 3);
+ if (among_var == 0)
+ {
+ this.cursor = this.limit - v_4;
+ break lab3;
+ }
+ // ], line 149
+ this.bra = this.cursor;
+ switch (among_var) {
+ case 0:
+ this.cursor = this.limit - v_4;
+ break lab3;
+ case 1:
+ // (, line 152
+ // call R2, line 152
+ if (!this.r_R2())
+ {
+ this.cursor = this.limit - v_4;
+ break lab3;
+ }
+ // delete, line 152
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ }
+ }
+ break;
+ case 9:
+ // (, line 158
+ // call R2, line 159
+ if (!this.r_R2())
+ {
+ return false;
+ }
+ // delete, line 159
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // try, line 160
+ v_5 = this.limit - this.cursor;
+ var lab4 = true;
+ lab4: while (lab4 == true)
+ {
+ lab4 = false;
+ // (, line 160
+ // [, line 161
+ this.ket = this.cursor;
+ // literal, line 161
+ if (!(this.eq_s_b(2, "at")))
+ {
+ this.cursor = this.limit - v_5;
+ break lab4;
+ }
+ // ], line 161
+ this.bra = this.cursor;
+ // call R2, line 161
+ if (!this.r_R2())
+ {
+ this.cursor = this.limit - v_5;
+ break lab4;
+ }
+ // delete, line 161
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ }
+ break;
+ }
+ return true;
+ }
+
+ function r_y_verb_suffix () : boolean
+ {
+ var among_var : int;
+ var v_1 : int;
+ var v_2 : int;
+ // (, line 167
+ // setlimit, line 168
+ v_1 = this.limit - this.cursor;
+ // tomark, line 168
+ if (this.cursor < this.I_pV)
+ {
+ return false;
+ }
+ this.cursor = this.I_pV;
+ v_2 = this.limit_backward;
+ this.limit_backward = this.cursor;
+ this.cursor = this.limit - v_1;
+ // (, line 168
+ // [, line 168
+ this.ket = this.cursor;
+ // substring, line 168
+ among_var = this.find_among_b(SpanishStemmer.a_7, 12);
+ if (among_var == 0)
+ {
+ this.limit_backward = v_2;
+ return false;
+ }
+ // ], line 168
+ this.bra = this.cursor;
+ this.limit_backward = v_2;
+ switch (among_var) {
+ case 0:
+ return false;
+ case 1:
+ // (, line 171
+ // literal, line 171
+ if (!(this.eq_s_b(1, "u")))
+ {
+ return false;
+ }
+ // delete, line 171
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ }
+ return true;
+ }
+
+ function r_verb_suffix () : boolean
+ {
+ var among_var : int;
+ var v_1 : int;
+ var v_2 : int;
+ var v_3 : int;
+ var v_4 : int;
+ // (, line 175
+ // setlimit, line 176
+ v_1 = this.limit - this.cursor;
+ // tomark, line 176
+ if (this.cursor < this.I_pV)
+ {
+ return false;
+ }
+ this.cursor = this.I_pV;
+ v_2 = this.limit_backward;
+ this.limit_backward = this.cursor;
+ this.cursor = this.limit - v_1;
+ // (, line 176
+ // [, line 176
+ this.ket = this.cursor;
+ // substring, line 176
+ among_var = this.find_among_b(SpanishStemmer.a_8, 96);
+ if (among_var == 0)
+ {
+ this.limit_backward = v_2;
+ return false;
+ }
+ // ], line 176
+ this.bra = this.cursor;
+ this.limit_backward = v_2;
+ switch (among_var) {
+ case 0:
+ return false;
+ case 1:
+ // (, line 179
+ // try, line 179
+ v_3 = this.limit - this.cursor;
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ // (, line 179
+ // literal, line 179
+ if (!(this.eq_s_b(1, "u")))
+ {
+ this.cursor = this.limit - v_3;
+ break lab0;
+ }
+ // test, line 179
+ v_4 = this.limit - this.cursor;
+ // literal, line 179
+ if (!(this.eq_s_b(1, "g")))
+ {
+ this.cursor = this.limit - v_3;
+ break lab0;
+ }
+ this.cursor = this.limit - v_4;
+ }
+ // ], line 179
+ this.bra = this.cursor;
+ // delete, line 179
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 2:
+ // (, line 200
+ // delete, line 200
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ }
+ return true;
+ }
+
+ function r_residual_suffix () : boolean
+ {
+ var among_var : int;
+ var v_1 : int;
+ var v_2 : int;
+ // (, line 204
+ // [, line 205
+ this.ket = this.cursor;
+ // substring, line 205
+ among_var = this.find_among_b(SpanishStemmer.a_9, 8);
+ if (among_var == 0)
+ {
+ return false;
+ }
+ // ], line 205
+ this.bra = this.cursor;
+ switch (among_var) {
+ case 0:
+ return false;
+ case 1:
+ // (, line 208
+ // call RV, line 208
+ if (!this.r_RV())
+ {
+ return false;
+ }
+ // delete, line 208
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 2:
+ // (, line 210
+ // call RV, line 210
+ if (!this.r_RV())
+ {
+ return false;
+ }
+ // delete, line 210
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // try, line 210
+ v_1 = this.limit - this.cursor;
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ // (, line 210
+ // [, line 210
+ this.ket = this.cursor;
+ // literal, line 210
+ if (!(this.eq_s_b(1, "u")))
+ {
+ this.cursor = this.limit - v_1;
+ break lab0;
+ }
+ // ], line 210
+ this.bra = this.cursor;
+ // test, line 210
+ v_2 = this.limit - this.cursor;
+ // literal, line 210
+ if (!(this.eq_s_b(1, "g")))
+ {
+ this.cursor = this.limit - v_1;
+ break lab0;
+ }
+ this.cursor = this.limit - v_2;
+ // call RV, line 210
+ if (!this.r_RV())
+ {
+ this.cursor = this.limit - v_1;
+ break lab0;
+ }
+ // delete, line 210
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ }
+ break;
+ }
+ return true;
+ }
+
+ override function stem () : boolean
+ {
+ var v_1 : int;
+ var v_2 : int;
+ var v_3 : int;
+ var v_4 : int;
+ var v_5 : int;
+ var v_6 : int;
+ // (, line 215
+ // do, line 216
+ v_1 = this.cursor;
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ // call mark_regions, line 216
+ if (!this.r_mark_regions())
+ {
+ break lab0;
+ }
+ }
+ this.cursor = v_1;
+ // backwards, line 217
+ this.limit_backward = this.cursor; this.cursor = this.limit;
+ // (, line 217
+ // do, line 218
+ v_2 = this.limit - this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ // call attached_pronoun, line 218
+ if (!this.r_attached_pronoun())
+ {
+ break lab1;
+ }
+ }
+ this.cursor = this.limit - v_2;
+ // do, line 219
+ v_3 = this.limit - this.cursor;
+ var lab2 = true;
+ lab2: while (lab2 == true)
+ {
+ lab2 = false;
+ // (, line 219
+ // or, line 219
+ var lab3 = true;
+ lab3: while (lab3 == true)
+ {
+ lab3 = false;
+ v_4 = this.limit - this.cursor;
+ var lab4 = true;
+ lab4: while (lab4 == true)
+ {
+ lab4 = false;
+ // call standard_suffix, line 219
+ if (!this.r_standard_suffix())
+ {
+ break lab4;
+ }
+ break lab3;
+ }
+ this.cursor = this.limit - v_4;
+ var lab5 = true;
+ lab5: while (lab5 == true)
+ {
+ lab5 = false;
+ // call y_verb_suffix, line 220
+ if (!this.r_y_verb_suffix())
+ {
+ break lab5;
+ }
+ break lab3;
+ }
+ this.cursor = this.limit - v_4;
+ // call verb_suffix, line 221
+ if (!this.r_verb_suffix())
+ {
+ break lab2;
+ }
+ }
+ }
+ this.cursor = this.limit - v_3;
+ // do, line 223
+ v_5 = this.limit - this.cursor;
+ var lab6 = true;
+ lab6: while (lab6 == true)
+ {
+ lab6 = false;
+ // call residual_suffix, line 223
+ if (!this.r_residual_suffix())
+ {
+ break lab6;
+ }
+ }
+ this.cursor = this.limit - v_5;
+ this.cursor = this.limit_backward; // do, line 225
+ v_6 = this.cursor;
+ var lab7 = true;
+ lab7: while (lab7 == true)
+ {
+ lab7 = false;
+ // call postlude, line 225
+ if (!this.r_postlude())
+ {
+ break lab7;
+ }
+ }
+ this.cursor = v_6;
+ return true;
+ }
+
+ function equals (o : variant) : boolean {
+ return o instanceof SpanishStemmer;
+ }
+
+ function hashCode() : int
+ {
+ //http://stackoverflow.com/questions/194846/is-there-any-kind-of-hashcode-function-in-javascript
+ var classname = "SpanishStemmer";
+ var hash = 0;
+ if (classname.length == 0) return hash;
+ for (var i = 0; i < classname.length; i++) {
+ var char = classname.charCodeAt(i);
+ hash = ((hash << 5) - hash) + char;
+ hash = hash & hash; // Convert to 32bit integer
+ }
+ return hash;
+ }
+
+}
+
diff --git a/web/server/h2o/libh2o/misc/oktavia/src/stemmer/stemmer.jsx b/web/server/h2o/libh2o/misc/oktavia/src/stemmer/stemmer.jsx
new file mode 100644
index 00000000..43bd75fa
--- /dev/null
+++ b/web/server/h2o/libh2o/misc/oktavia/src/stemmer/stemmer.jsx
@@ -0,0 +1,5 @@
+interface Stemmer
+{
+ function stemWord (word : string) : string;
+ function stemWords (words : string[]) : string[];
+}
diff --git a/web/server/h2o/libh2o/misc/oktavia/src/stemmer/swedish-stemmer.jsx b/web/server/h2o/libh2o/misc/oktavia/src/stemmer/swedish-stemmer.jsx
new file mode 100644
index 00000000..536094ae
--- /dev/null
+++ b/web/server/h2o/libh2o/misc/oktavia/src/stemmer/swedish-stemmer.jsx
@@ -0,0 +1,416 @@
+// This file was generated automatically by the Snowball to JSX compiler
+
+import "base-stemmer.jsx";
+import "among.jsx";
+
+ /**
+ * This class was automatically generated by a Snowball to JSX compiler
+ * It implements the stemming algorithm defined by a snowball script.
+ */
+
+class SwedishStemmer extends BaseStemmer
+{
+ static const serialVersionUID = 1;
+ static const methodObject = new SwedishStemmer();
+
+ static const a_0 = [
+ 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)
+ ];
+
+ static const a_1 = [
+ 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)
+ ];
+
+ static const a_2 = [
+ 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)
+ ];
+
+ static const g_v = [17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 32] : int[];
+
+ static const g_s_ending = [119, 127, 149] : int[];
+
+ var I_x : int = 0;
+ var I_p1 : int = 0;
+
+ function copy_from (other : SwedishStemmer) : void
+ {
+ this.I_x = other.I_x;
+ this.I_p1 = other.I_p1;
+ super.copy_from(other);
+ }
+
+ function r_mark_regions () : boolean
+ {
+ var v_1 : int;
+ var v_2 : int;
+ // (, line 26
+ this.I_p1 = this.limit;
+ // test, line 29
+ v_1 = this.cursor;
+ // (, line 29
+ // hop, line 29
+ {
+ var c : int = this.cursor + 3;
+ if (0 > c || c > this.limit)
+ {
+ return false;
+ }
+ this.cursor = c;
+ }
+ // setmark x, line 29
+ this.I_x = this.cursor;
+ this.cursor = v_1;
+ // goto, line 30
+ golab0: while(true)
+ {
+ v_2 = this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ if (!(this.in_grouping(SwedishStemmer.g_v, 97, 246)))
+ {
+ break lab1;
+ }
+ this.cursor = v_2;
+ break golab0;
+ }
+ this.cursor = v_2;
+ if (this.cursor >= this.limit)
+ {
+ return false;
+ }
+ this.cursor++;
+ }
+ // gopast, line 30
+ golab2: while(true)
+ {
+ var lab3 = true;
+ lab3: while (lab3 == true)
+ {
+ lab3 = false;
+ if (!(this.out_grouping(SwedishStemmer.g_v, 97, 246)))
+ {
+ break lab3;
+ }
+ break golab2;
+ }
+ if (this.cursor >= this.limit)
+ {
+ return false;
+ }
+ this.cursor++;
+ }
+ // setmark p1, line 30
+ this.I_p1 = this.cursor;
+ // try, line 31
+ var lab4 = true;
+ lab4: while (lab4 == true)
+ {
+ lab4 = false;
+ // (, line 31
+ if (!(this.I_p1 < this.I_x))
+ {
+ break lab4;
+ }
+ this.I_p1 = this.I_x;
+ }
+ return true;
+ }
+
+ function r_main_suffix () : boolean
+ {
+ var among_var : int;
+ var v_1 : int;
+ var v_2 : int;
+ // (, line 36
+ // setlimit, line 37
+ v_1 = this.limit - this.cursor;
+ // tomark, line 37
+ if (this.cursor < this.I_p1)
+ {
+ return false;
+ }
+ this.cursor = this.I_p1;
+ v_2 = this.limit_backward;
+ this.limit_backward = this.cursor;
+ this.cursor = this.limit - v_1;
+ // (, line 37
+ // [, line 37
+ this.ket = this.cursor;
+ // substring, line 37
+ among_var = this.find_among_b(SwedishStemmer.a_0, 37);
+ if (among_var == 0)
+ {
+ this.limit_backward = v_2;
+ return false;
+ }
+ // ], line 37
+ this.bra = this.cursor;
+ this.limit_backward = v_2;
+ switch (among_var) {
+ case 0:
+ return false;
+ case 1:
+ // (, line 44
+ // delete, line 44
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 2:
+ // (, line 46
+ if (!(this.in_grouping_b(SwedishStemmer.g_s_ending, 98, 121)))
+ {
+ return false;
+ }
+ // delete, line 46
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ }
+ return true;
+ }
+
+ function r_consonant_pair () : boolean
+ {
+ var v_1 : int;
+ var v_2 : int;
+ var v_3 : int;
+ // setlimit, line 50
+ v_1 = this.limit - this.cursor;
+ // tomark, line 50
+ if (this.cursor < this.I_p1)
+ {
+ return false;
+ }
+ this.cursor = this.I_p1;
+ v_2 = this.limit_backward;
+ this.limit_backward = this.cursor;
+ this.cursor = this.limit - v_1;
+ // (, line 50
+ // and, line 52
+ v_3 = this.limit - this.cursor;
+ // among, line 51
+ if (this.find_among_b(SwedishStemmer.a_1, 7) == 0)
+ {
+ this.limit_backward = v_2;
+ return false;
+ }
+ this.cursor = this.limit - v_3;
+ // (, line 52
+ // [, line 52
+ this.ket = this.cursor;
+ // next, line 52
+ if (this.cursor <= this.limit_backward)
+ {
+ this.limit_backward = v_2;
+ return false;
+ }
+ this.cursor--;
+ // ], line 52
+ this.bra = this.cursor;
+ // delete, line 52
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ this.limit_backward = v_2;
+ return true;
+ }
+
+ function r_other_suffix () : boolean
+ {
+ var among_var : int;
+ var v_1 : int;
+ var v_2 : int;
+ // setlimit, line 55
+ v_1 = this.limit - this.cursor;
+ // tomark, line 55
+ if (this.cursor < this.I_p1)
+ {
+ return false;
+ }
+ this.cursor = this.I_p1;
+ v_2 = this.limit_backward;
+ this.limit_backward = this.cursor;
+ this.cursor = this.limit - v_1;
+ // (, line 55
+ // [, line 56
+ this.ket = this.cursor;
+ // substring, line 56
+ among_var = this.find_among_b(SwedishStemmer.a_2, 5);
+ if (among_var == 0)
+ {
+ this.limit_backward = v_2;
+ return false;
+ }
+ // ], line 56
+ this.bra = this.cursor;
+ switch (among_var) {
+ case 0:
+ this.limit_backward = v_2;
+ return false;
+ case 1:
+ // (, line 57
+ // delete, line 57
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break;
+ case 2:
+ // (, line 58
+ // <-, line 58
+ if (!this.slice_from("l\u00F6s"))
+ {
+ return false;
+ }
+ break;
+ case 3:
+ // (, line 59
+ // <-, line 59
+ if (!this.slice_from("full"))
+ {
+ return false;
+ }
+ break;
+ }
+ this.limit_backward = v_2;
+ return true;
+ }
+
+ override function stem () : boolean
+ {
+ var v_1 : int;
+ var v_2 : int;
+ var v_3 : int;
+ var v_4 : int;
+ // (, line 64
+ // do, line 66
+ v_1 = this.cursor;
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ // call mark_regions, line 66
+ if (!this.r_mark_regions())
+ {
+ break lab0;
+ }
+ }
+ this.cursor = v_1;
+ // backwards, line 67
+ this.limit_backward = this.cursor; this.cursor = this.limit;
+ // (, line 67
+ // do, line 68
+ v_2 = this.limit - this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ // call main_suffix, line 68
+ if (!this.r_main_suffix())
+ {
+ break lab1;
+ }
+ }
+ this.cursor = this.limit - v_2;
+ // do, line 69
+ v_3 = this.limit - this.cursor;
+ var lab2 = true;
+ lab2: while (lab2 == true)
+ {
+ lab2 = false;
+ // call consonant_pair, line 69
+ if (!this.r_consonant_pair())
+ {
+ break lab2;
+ }
+ }
+ this.cursor = this.limit - v_3;
+ // do, line 70
+ v_4 = this.limit - this.cursor;
+ var lab3 = true;
+ lab3: while (lab3 == true)
+ {
+ lab3 = false;
+ // call other_suffix, line 70
+ if (!this.r_other_suffix())
+ {
+ break lab3;
+ }
+ }
+ this.cursor = this.limit - v_4;
+ this.cursor = this.limit_backward; return true;
+ }
+
+ function equals (o : variant) : boolean {
+ return o instanceof SwedishStemmer;
+ }
+
+ function hashCode() : int
+ {
+ //http://stackoverflow.com/questions/194846/is-there-any-kind-of-hashcode-function-in-javascript
+ var classname = "SwedishStemmer";
+ var hash = 0;
+ if (classname.length == 0) return hash;
+ for (var i = 0; i < classname.length; i++) {
+ var char = classname.charCodeAt(i);
+ hash = ((hash << 5) - hash) + char;
+ hash = hash & hash; // Convert to 32bit integer
+ }
+ return hash;
+ }
+
+}
+
diff --git a/web/server/h2o/libh2o/misc/oktavia/src/stemmer/turkish-stemmer.jsx b/web/server/h2o/libh2o/misc/oktavia/src/stemmer/turkish-stemmer.jsx
new file mode 100644
index 00000000..d26ed8ba
--- /dev/null
+++ b/web/server/h2o/libh2o/misc/oktavia/src/stemmer/turkish-stemmer.jsx
@@ -0,0 +1,3824 @@
+// This file was generated automatically by the Snowball to JSX compiler
+
+import "base-stemmer.jsx";
+import "among.jsx";
+
+ /**
+ * This class was automatically generated by a Snowball to JSX compiler
+ * It implements the stemming algorithm defined by a snowball script.
+ */
+
+class TurkishStemmer extends BaseStemmer
+{
+ static const serialVersionUID = 1;
+ static const methodObject = new TurkishStemmer();
+
+ static const a_0 = [
+ 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)
+ ];
+
+ static const a_1 = [
+ new Among("leri", -1, -1),
+ new Among("lar\u0131", -1, -1)
+ ];
+
+ static const a_2 = [
+ new Among("ni", -1, -1),
+ new Among("nu", -1, -1),
+ new Among("n\u00FC", -1, -1),
+ new Among("n\u0131", -1, -1)
+ ];
+
+ static const a_3 = [
+ new Among("in", -1, -1),
+ new Among("un", -1, -1),
+ new Among("\u00FCn", -1, -1),
+ new Among("\u0131n", -1, -1)
+ ];
+
+ static const a_4 = [
+ new Among("a", -1, -1),
+ new Among("e", -1, -1)
+ ];
+
+ static const a_5 = [
+ new Among("na", -1, -1),
+ new Among("ne", -1, -1)
+ ];
+
+ static const a_6 = [
+ new Among("da", -1, -1),
+ new Among("ta", -1, -1),
+ new Among("de", -1, -1),
+ new Among("te", -1, -1)
+ ];
+
+ static const a_7 = [
+ new Among("nda", -1, -1),
+ new Among("nde", -1, -1)
+ ];
+
+ static const a_8 = [
+ new Among("dan", -1, -1),
+ new Among("tan", -1, -1),
+ new Among("den", -1, -1),
+ new Among("ten", -1, -1)
+ ];
+
+ static const a_9 = [
+ new Among("ndan", -1, -1),
+ new Among("nden", -1, -1)
+ ];
+
+ static const a_10 = [
+ new Among("la", -1, -1),
+ new Among("le", -1, -1)
+ ];
+
+ static const a_11 = [
+ new Among("ca", -1, -1),
+ new Among("ce", -1, -1)
+ ];
+
+ static const a_12 = [
+ new Among("im", -1, -1),
+ new Among("um", -1, -1),
+ new Among("\u00FCm", -1, -1),
+ new Among("\u0131m", -1, -1)
+ ];
+
+ static const a_13 = [
+ new Among("sin", -1, -1),
+ new Among("sun", -1, -1),
+ new Among("s\u00FCn", -1, -1),
+ new Among("s\u0131n", -1, -1)
+ ];
+
+ static const a_14 = [
+ new Among("iz", -1, -1),
+ new Among("uz", -1, -1),
+ new Among("\u00FCz", -1, -1),
+ new Among("\u0131z", -1, -1)
+ ];
+
+ static const a_15 = [
+ new Among("siniz", -1, -1),
+ new Among("sunuz", -1, -1),
+ new Among("s\u00FCn\u00FCz", -1, -1),
+ new Among("s\u0131n\u0131z", -1, -1)
+ ];
+
+ static const a_16 = [
+ new Among("lar", -1, -1),
+ new Among("ler", -1, -1)
+ ];
+
+ static const a_17 = [
+ new Among("niz", -1, -1),
+ new Among("nuz", -1, -1),
+ new Among("n\u00FCz", -1, -1),
+ new Among("n\u0131z", -1, -1)
+ ];
+
+ static const a_18 = [
+ 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)
+ ];
+
+ static const a_19 = [
+ new Among("cas\u0131na", -1, -1),
+ new Among("cesine", -1, -1)
+ ];
+
+ static const a_20 = [
+ 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)
+ ];
+
+ static const a_21 = [
+ 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)
+ ];
+
+ static const a_22 = [
+ 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)
+ ];
+
+ static const a_23 = [
+ new Among("b", -1, 1),
+ new Among("c", -1, 2),
+ new Among("d", -1, 3),
+ new Among("\u011F", -1, 4)
+ ];
+
+ static const 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] : int[];
+
+ static const 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] : int[];
+
+ static const 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] : int[];
+
+ static const g_vowel2 = [17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 130] : int[];
+
+ static const 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] : int[];
+
+ static const g_vowel4 = [17] : int[];
+
+ static const g_vowel5 = [65] : int[];
+
+ static const g_vowel6 = [65] : int[];
+
+ var B_continue_stemming_noun_suffixes : boolean = false;
+ var I_strlen : int = 0;
+
+ function copy_from (other : TurkishStemmer) : void
+ {
+ this.B_continue_stemming_noun_suffixes = other.B_continue_stemming_noun_suffixes;
+ this.I_strlen = other.I_strlen;
+ super.copy_from(other);
+ }
+
+ function r_check_vowel_harmony () : boolean
+ {
+ var v_1 : int;
+ var v_2 : int;
+ var v_3 : int;
+ var v_4 : int;
+ var v_5 : int;
+ var v_6 : int;
+ var v_7 : int;
+ var v_8 : int;
+ var v_9 : int;
+ var v_10 : int;
+ var v_11 : int;
+ // (, line 111
+ // test, line 112
+ v_1 = this.limit - this.cursor;
+ // (, line 113
+ // (, line 114
+ // goto, line 114
+ golab0: while(true)
+ {
+ v_2 = this.limit - this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ if (!(this.in_grouping_b(TurkishStemmer.g_vowel, 97, 305)))
+ {
+ break lab1;
+ }
+ this.cursor = this.limit - v_2;
+ break golab0;
+ }
+ this.cursor = this.limit - v_2;
+ if (this.cursor <= this.limit_backward)
+ {
+ return false;
+ }
+ this.cursor--;
+ }
+ // (, line 115
+ // or, line 116
+ var lab2 = true;
+ lab2: while (lab2 == true)
+ {
+ lab2 = false;
+ v_3 = this.limit - this.cursor;
+ var lab3 = true;
+ lab3: while (lab3 == true)
+ {
+ lab3 = false;
+ // (, line 116
+ // literal, line 116
+ if (!(this.eq_s_b(1, "a")))
+ {
+ break lab3;
+ }
+ // goto, line 116
+ golab4: while(true)
+ {
+ v_4 = this.limit - this.cursor;
+ var lab5 = true;
+ lab5: while (lab5 == true)
+ {
+ lab5 = false;
+ if (!(this.in_grouping_b(TurkishStemmer.g_vowel1, 97, 305)))
+ {
+ break lab5;
+ }
+ this.cursor = this.limit - v_4;
+ break golab4;
+ }
+ this.cursor = this.limit - v_4;
+ if (this.cursor <= this.limit_backward)
+ {
+ break lab3;
+ }
+ this.cursor--;
+ }
+ break lab2;
+ }
+ this.cursor = this.limit - v_3;
+ var lab6 = true;
+ lab6: while (lab6 == true)
+ {
+ lab6 = false;
+ // (, line 117
+ // literal, line 117
+ if (!(this.eq_s_b(1, "e")))
+ {
+ break lab6;
+ }
+ // goto, line 117
+ golab7: while(true)
+ {
+ v_5 = this.limit - this.cursor;
+ var lab8 = true;
+ lab8: while (lab8 == true)
+ {
+ lab8 = false;
+ if (!(this.in_grouping_b(TurkishStemmer.g_vowel2, 101, 252)))
+ {
+ break lab8;
+ }
+ this.cursor = this.limit - v_5;
+ break golab7;
+ }
+ this.cursor = this.limit - v_5;
+ if (this.cursor <= this.limit_backward)
+ {
+ break lab6;
+ }
+ this.cursor--;
+ }
+ break lab2;
+ }
+ this.cursor = this.limit - v_3;
+ var lab9 = true;
+ lab9: while (lab9 == true)
+ {
+ lab9 = false;
+ // (, line 118
+ // literal, line 118
+ if (!(this.eq_s_b(1, "\u0131")))
+ {
+ break lab9;
+ }
+ // goto, line 118
+ golab10: while(true)
+ {
+ v_6 = this.limit - this.cursor;
+ var lab11 = true;
+ lab11: while (lab11 == true)
+ {
+ lab11 = false;
+ if (!(this.in_grouping_b(TurkishStemmer.g_vowel3, 97, 305)))
+ {
+ break lab11;
+ }
+ this.cursor = this.limit - v_6;
+ break golab10;
+ }
+ this.cursor = this.limit - v_6;
+ if (this.cursor <= this.limit_backward)
+ {
+ break lab9;
+ }
+ this.cursor--;
+ }
+ break lab2;
+ }
+ this.cursor = this.limit - v_3;
+ var lab12 = true;
+ lab12: while (lab12 == true)
+ {
+ lab12 = false;
+ // (, line 119
+ // literal, line 119
+ if (!(this.eq_s_b(1, "i")))
+ {
+ break lab12;
+ }
+ // goto, line 119
+ golab13: while(true)
+ {
+ v_7 = this.limit - this.cursor;
+ var lab14 = true;
+ lab14: while (lab14 == true)
+ {
+ lab14 = false;
+ if (!(this.in_grouping_b(TurkishStemmer.g_vowel4, 101, 105)))
+ {
+ break lab14;
+ }
+ this.cursor = this.limit - v_7;
+ break golab13;
+ }
+ this.cursor = this.limit - v_7;
+ if (this.cursor <= this.limit_backward)
+ {
+ break lab12;
+ }
+ this.cursor--;
+ }
+ break lab2;
+ }
+ this.cursor = this.limit - v_3;
+ var lab15 = true;
+ lab15: while (lab15 == true)
+ {
+ lab15 = false;
+ // (, line 120
+ // literal, line 120
+ if (!(this.eq_s_b(1, "o")))
+ {
+ break lab15;
+ }
+ // goto, line 120
+ golab16: while(true)
+ {
+ v_8 = this.limit - this.cursor;
+ var lab17 = true;
+ lab17: while (lab17 == true)
+ {
+ lab17 = false;
+ if (!(this.in_grouping_b(TurkishStemmer.g_vowel5, 111, 117)))
+ {
+ break lab17;
+ }
+ this.cursor = this.limit - v_8;
+ break golab16;
+ }
+ this.cursor = this.limit - v_8;
+ if (this.cursor <= this.limit_backward)
+ {
+ break lab15;
+ }
+ this.cursor--;
+ }
+ break lab2;
+ }
+ this.cursor = this.limit - v_3;
+ var lab18 = true;
+ lab18: while (lab18 == true)
+ {
+ lab18 = false;
+ // (, line 121
+ // literal, line 121
+ if (!(this.eq_s_b(1, "\u00F6")))
+ {
+ break lab18;
+ }
+ // goto, line 121
+ golab19: while(true)
+ {
+ v_9 = this.limit - this.cursor;
+ var lab20 = true;
+ lab20: while (lab20 == true)
+ {
+ lab20 = false;
+ if (!(this.in_grouping_b(TurkishStemmer.g_vowel6, 246, 252)))
+ {
+ break lab20;
+ }
+ this.cursor = this.limit - v_9;
+ break golab19;
+ }
+ this.cursor = this.limit - v_9;
+ if (this.cursor <= this.limit_backward)
+ {
+ break lab18;
+ }
+ this.cursor--;
+ }
+ break lab2;
+ }
+ this.cursor = this.limit - v_3;
+ var lab21 = true;
+ lab21: while (lab21 == true)
+ {
+ lab21 = false;
+ // (, line 122
+ // literal, line 122
+ if (!(this.eq_s_b(1, "u")))
+ {
+ break lab21;
+ }
+ // goto, line 122
+ golab22: while(true)
+ {
+ v_10 = this.limit - this.cursor;
+ var lab23 = true;
+ lab23: while (lab23 == true)
+ {
+ lab23 = false;
+ if (!(this.in_grouping_b(TurkishStemmer.g_vowel5, 111, 117)))
+ {
+ break lab23;
+ }
+ this.cursor = this.limit - v_10;
+ break golab22;
+ }
+ this.cursor = this.limit - v_10;
+ if (this.cursor <= this.limit_backward)
+ {
+ break lab21;
+ }
+ this.cursor--;
+ }
+ break lab2;
+ }
+ this.cursor = this.limit - v_3;
+ // (, line 123
+ // literal, line 123
+ if (!(this.eq_s_b(1, "\u00FC")))
+ {
+ return false;
+ }
+ // goto, line 123
+ golab24: while(true)
+ {
+ v_11 = this.limit - this.cursor;
+ var lab25 = true;
+ lab25: while (lab25 == true)
+ {
+ lab25 = false;
+ if (!(this.in_grouping_b(TurkishStemmer.g_vowel6, 246, 252)))
+ {
+ break lab25;
+ }
+ this.cursor = this.limit - v_11;
+ break golab24;
+ }
+ this.cursor = this.limit - v_11;
+ if (this.cursor <= this.limit_backward)
+ {
+ return false;
+ }
+ this.cursor--;
+ }
+ }
+ this.cursor = this.limit - v_1;
+ return true;
+ }
+
+ function r_mark_suffix_with_optional_n_consonant () : boolean
+ {
+ var v_1 : int;
+ var v_2 : int;
+ var v_3 : int;
+ var v_4 : int;
+ var v_5 : int;
+ var v_6 : int;
+ var v_7 : int;
+ // (, line 132
+ // or, line 134
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ v_1 = this.limit - this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ // (, line 133
+ // (, line 133
+ // test, line 133
+ v_2 = this.limit - this.cursor;
+ // literal, line 133
+ if (!(this.eq_s_b(1, "n")))
+ {
+ break lab1;
+ }
+ this.cursor = this.limit - v_2;
+ // next, line 133
+ if (this.cursor <= this.limit_backward)
+ {
+ break lab1;
+ }
+ this.cursor--;
+ // (, line 133
+ // test, line 133
+ v_3 = this.limit - this.cursor;
+ if (!(this.in_grouping_b(TurkishStemmer.g_vowel, 97, 305)))
+ {
+ break lab1;
+ }
+ this.cursor = this.limit - v_3;
+ break lab0;
+ }
+ this.cursor = this.limit - v_1;
+ // (, line 135
+ // (, line 135
+ // not, line 135
+ {
+ v_4 = this.limit - this.cursor;
+ var lab2 = true;
+ lab2: while (lab2 == true)
+ {
+ lab2 = false;
+ // (, line 135
+ // test, line 135
+ v_5 = this.limit - this.cursor;
+ // literal, line 135
+ if (!(this.eq_s_b(1, "n")))
+ {
+ break lab2;
+ }
+ this.cursor = this.limit - v_5;
+ return false;
+ }
+ this.cursor = this.limit - v_4;
+ }
+ // test, line 135
+ v_6 = this.limit - this.cursor;
+ // (, line 135
+ // next, line 135
+ if (this.cursor <= this.limit_backward)
+ {
+ return false;
+ }
+ this.cursor--;
+ // (, line 135
+ // test, line 135
+ v_7 = this.limit - this.cursor;
+ if (!(this.in_grouping_b(TurkishStemmer.g_vowel, 97, 305)))
+ {
+ return false;
+ }
+ this.cursor = this.limit - v_7;
+ this.cursor = this.limit - v_6;
+ }
+ return true;
+ }
+
+ function r_mark_suffix_with_optional_s_consonant () : boolean
+ {
+ var v_1 : int;
+ var v_2 : int;
+ var v_3 : int;
+ var v_4 : int;
+ var v_5 : int;
+ var v_6 : int;
+ var v_7 : int;
+ // (, line 143
+ // or, line 145
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ v_1 = this.limit - this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ // (, line 144
+ // (, line 144
+ // test, line 144
+ v_2 = this.limit - this.cursor;
+ // literal, line 144
+ if (!(this.eq_s_b(1, "s")))
+ {
+ break lab1;
+ }
+ this.cursor = this.limit - v_2;
+ // next, line 144
+ if (this.cursor <= this.limit_backward)
+ {
+ break lab1;
+ }
+ this.cursor--;
+ // (, line 144
+ // test, line 144
+ v_3 = this.limit - this.cursor;
+ if (!(this.in_grouping_b(TurkishStemmer.g_vowel, 97, 305)))
+ {
+ break lab1;
+ }
+ this.cursor = this.limit - v_3;
+ break lab0;
+ }
+ this.cursor = this.limit - v_1;
+ // (, line 146
+ // (, line 146
+ // not, line 146
+ {
+ v_4 = this.limit - this.cursor;
+ var lab2 = true;
+ lab2: while (lab2 == true)
+ {
+ lab2 = false;
+ // (, line 146
+ // test, line 146
+ v_5 = this.limit - this.cursor;
+ // literal, line 146
+ if (!(this.eq_s_b(1, "s")))
+ {
+ break lab2;
+ }
+ this.cursor = this.limit - v_5;
+ return false;
+ }
+ this.cursor = this.limit - v_4;
+ }
+ // test, line 146
+ v_6 = this.limit - this.cursor;
+ // (, line 146
+ // next, line 146
+ if (this.cursor <= this.limit_backward)
+ {
+ return false;
+ }
+ this.cursor--;
+ // (, line 146
+ // test, line 146
+ v_7 = this.limit - this.cursor;
+ if (!(this.in_grouping_b(TurkishStemmer.g_vowel, 97, 305)))
+ {
+ return false;
+ }
+ this.cursor = this.limit - v_7;
+ this.cursor = this.limit - v_6;
+ }
+ return true;
+ }
+
+ function r_mark_suffix_with_optional_y_consonant () : boolean
+ {
+ var v_1 : int;
+ var v_2 : int;
+ var v_3 : int;
+ var v_4 : int;
+ var v_5 : int;
+ var v_6 : int;
+ var v_7 : int;
+ // (, line 153
+ // or, line 155
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ v_1 = this.limit - this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ // (, line 154
+ // (, line 154
+ // test, line 154
+ v_2 = this.limit - this.cursor;
+ // literal, line 154
+ if (!(this.eq_s_b(1, "y")))
+ {
+ break lab1;
+ }
+ this.cursor = this.limit - v_2;
+ // next, line 154
+ if (this.cursor <= this.limit_backward)
+ {
+ break lab1;
+ }
+ this.cursor--;
+ // (, line 154
+ // test, line 154
+ v_3 = this.limit - this.cursor;
+ if (!(this.in_grouping_b(TurkishStemmer.g_vowel, 97, 305)))
+ {
+ break lab1;
+ }
+ this.cursor = this.limit - v_3;
+ break lab0;
+ }
+ this.cursor = this.limit - v_1;
+ // (, line 156
+ // (, line 156
+ // not, line 156
+ {
+ v_4 = this.limit - this.cursor;
+ var lab2 = true;
+ lab2: while (lab2 == true)
+ {
+ lab2 = false;
+ // (, line 156
+ // test, line 156
+ v_5 = this.limit - this.cursor;
+ // literal, line 156
+ if (!(this.eq_s_b(1, "y")))
+ {
+ break lab2;
+ }
+ this.cursor = this.limit - v_5;
+ return false;
+ }
+ this.cursor = this.limit - v_4;
+ }
+ // test, line 156
+ v_6 = this.limit - this.cursor;
+ // (, line 156
+ // next, line 156
+ if (this.cursor <= this.limit_backward)
+ {
+ return false;
+ }
+ this.cursor--;
+ // (, line 156
+ // test, line 156
+ v_7 = this.limit - this.cursor;
+ if (!(this.in_grouping_b(TurkishStemmer.g_vowel, 97, 305)))
+ {
+ return false;
+ }
+ this.cursor = this.limit - v_7;
+ this.cursor = this.limit - v_6;
+ }
+ return true;
+ }
+
+ function r_mark_suffix_with_optional_U_vowel () : boolean
+ {
+ var v_1 : int;
+ var v_2 : int;
+ var v_3 : int;
+ var v_4 : int;
+ var v_5 : int;
+ var v_6 : int;
+ var v_7 : int;
+ // (, line 159
+ // or, line 161
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ v_1 = this.limit - this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ // (, line 160
+ // (, line 160
+ // test, line 160
+ v_2 = this.limit - this.cursor;
+ if (!(this.in_grouping_b(TurkishStemmer.g_U, 105, 305)))
+ {
+ break lab1;
+ }
+ this.cursor = this.limit - v_2;
+ // next, line 160
+ if (this.cursor <= this.limit_backward)
+ {
+ break lab1;
+ }
+ this.cursor--;
+ // (, line 160
+ // test, line 160
+ v_3 = this.limit - this.cursor;
+ if (!(this.out_grouping_b(TurkishStemmer.g_vowel, 97, 305)))
+ {
+ break lab1;
+ }
+ this.cursor = this.limit - v_3;
+ break lab0;
+ }
+ this.cursor = this.limit - v_1;
+ // (, line 162
+ // (, line 162
+ // not, line 162
+ {
+ v_4 = this.limit - this.cursor;
+ var lab2 = true;
+ lab2: while (lab2 == true)
+ {
+ lab2 = false;
+ // (, line 162
+ // test, line 162
+ v_5 = this.limit - this.cursor;
+ if (!(this.in_grouping_b(TurkishStemmer.g_U, 105, 305)))
+ {
+ break lab2;
+ }
+ this.cursor = this.limit - v_5;
+ return false;
+ }
+ this.cursor = this.limit - v_4;
+ }
+ // test, line 162
+ v_6 = this.limit - this.cursor;
+ // (, line 162
+ // next, line 162
+ if (this.cursor <= this.limit_backward)
+ {
+ return false;
+ }
+ this.cursor--;
+ // (, line 162
+ // test, line 162
+ v_7 = this.limit - this.cursor;
+ if (!(this.out_grouping_b(TurkishStemmer.g_vowel, 97, 305)))
+ {
+ return false;
+ }
+ this.cursor = this.limit - v_7;
+ this.cursor = this.limit - v_6;
+ }
+ return true;
+ }
+
+ function r_mark_possessives () : boolean
+ {
+ // (, line 166
+ // among, line 167
+ if (this.find_among_b(TurkishStemmer.a_0, 10) == 0)
+ {
+ return false;
+ }
+ // (, line 169
+ // call mark_suffix_with_optional_U_vowel, line 169
+ if (!this.r_mark_suffix_with_optional_U_vowel())
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_mark_sU () : boolean
+ {
+ // (, line 172
+ // call check_vowel_harmony, line 173
+ if (!this.r_check_vowel_harmony())
+ {
+ return false;
+ }
+ if (!(this.in_grouping_b(TurkishStemmer.g_U, 105, 305)))
+ {
+ return false;
+ }
+ // (, line 175
+ // call mark_suffix_with_optional_s_consonant, line 175
+ if (!this.r_mark_suffix_with_optional_s_consonant())
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_mark_lArI () : boolean
+ {
+ // (, line 178
+ // among, line 179
+ if (this.find_among_b(TurkishStemmer.a_1, 2) == 0)
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_mark_yU () : boolean
+ {
+ // (, line 182
+ // call check_vowel_harmony, line 183
+ if (!this.r_check_vowel_harmony())
+ {
+ return false;
+ }
+ if (!(this.in_grouping_b(TurkishStemmer.g_U, 105, 305)))
+ {
+ return false;
+ }
+ // (, line 185
+ // call mark_suffix_with_optional_y_consonant, line 185
+ if (!this.r_mark_suffix_with_optional_y_consonant())
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_mark_nU () : boolean
+ {
+ // (, line 188
+ // call check_vowel_harmony, line 189
+ if (!this.r_check_vowel_harmony())
+ {
+ return false;
+ }
+ // among, line 190
+ if (this.find_among_b(TurkishStemmer.a_2, 4) == 0)
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_mark_nUn () : boolean
+ {
+ // (, line 193
+ // call check_vowel_harmony, line 194
+ if (!this.r_check_vowel_harmony())
+ {
+ return false;
+ }
+ // among, line 195
+ if (this.find_among_b(TurkishStemmer.a_3, 4) == 0)
+ {
+ return false;
+ }
+ // (, line 196
+ // call mark_suffix_with_optional_n_consonant, line 196
+ if (!this.r_mark_suffix_with_optional_n_consonant())
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_mark_yA () : boolean
+ {
+ // (, line 199
+ // call check_vowel_harmony, line 200
+ if (!this.r_check_vowel_harmony())
+ {
+ return false;
+ }
+ // among, line 201
+ if (this.find_among_b(TurkishStemmer.a_4, 2) == 0)
+ {
+ return false;
+ }
+ // (, line 202
+ // call mark_suffix_with_optional_y_consonant, line 202
+ if (!this.r_mark_suffix_with_optional_y_consonant())
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_mark_nA () : boolean
+ {
+ // (, line 205
+ // call check_vowel_harmony, line 206
+ if (!this.r_check_vowel_harmony())
+ {
+ return false;
+ }
+ // among, line 207
+ if (this.find_among_b(TurkishStemmer.a_5, 2) == 0)
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_mark_DA () : boolean
+ {
+ // (, line 210
+ // call check_vowel_harmony, line 211
+ if (!this.r_check_vowel_harmony())
+ {
+ return false;
+ }
+ // among, line 212
+ if (this.find_among_b(TurkishStemmer.a_6, 4) == 0)
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_mark_ndA () : boolean
+ {
+ // (, line 215
+ // call check_vowel_harmony, line 216
+ if (!this.r_check_vowel_harmony())
+ {
+ return false;
+ }
+ // among, line 217
+ if (this.find_among_b(TurkishStemmer.a_7, 2) == 0)
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_mark_DAn () : boolean
+ {
+ // (, line 220
+ // call check_vowel_harmony, line 221
+ if (!this.r_check_vowel_harmony())
+ {
+ return false;
+ }
+ // among, line 222
+ if (this.find_among_b(TurkishStemmer.a_8, 4) == 0)
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_mark_ndAn () : boolean
+ {
+ // (, line 225
+ // call check_vowel_harmony, line 226
+ if (!this.r_check_vowel_harmony())
+ {
+ return false;
+ }
+ // among, line 227
+ if (this.find_among_b(TurkishStemmer.a_9, 2) == 0)
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_mark_ylA () : boolean
+ {
+ // (, line 230
+ // call check_vowel_harmony, line 231
+ if (!this.r_check_vowel_harmony())
+ {
+ return false;
+ }
+ // among, line 232
+ if (this.find_among_b(TurkishStemmer.a_10, 2) == 0)
+ {
+ return false;
+ }
+ // (, line 233
+ // call mark_suffix_with_optional_y_consonant, line 233
+ if (!this.r_mark_suffix_with_optional_y_consonant())
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_mark_ki () : boolean
+ {
+ // (, line 236
+ // literal, line 237
+ if (!(this.eq_s_b(2, "ki")))
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_mark_ncA () : boolean
+ {
+ // (, line 240
+ // call check_vowel_harmony, line 241
+ if (!this.r_check_vowel_harmony())
+ {
+ return false;
+ }
+ // among, line 242
+ if (this.find_among_b(TurkishStemmer.a_11, 2) == 0)
+ {
+ return false;
+ }
+ // (, line 243
+ // call mark_suffix_with_optional_n_consonant, line 243
+ if (!this.r_mark_suffix_with_optional_n_consonant())
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_mark_yUm () : boolean
+ {
+ // (, line 246
+ // call check_vowel_harmony, line 247
+ if (!this.r_check_vowel_harmony())
+ {
+ return false;
+ }
+ // among, line 248
+ if (this.find_among_b(TurkishStemmer.a_12, 4) == 0)
+ {
+ return false;
+ }
+ // (, line 249
+ // call mark_suffix_with_optional_y_consonant, line 249
+ if (!this.r_mark_suffix_with_optional_y_consonant())
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_mark_sUn () : boolean
+ {
+ // (, line 252
+ // call check_vowel_harmony, line 253
+ if (!this.r_check_vowel_harmony())
+ {
+ return false;
+ }
+ // among, line 254
+ if (this.find_among_b(TurkishStemmer.a_13, 4) == 0)
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_mark_yUz () : boolean
+ {
+ // (, line 257
+ // call check_vowel_harmony, line 258
+ if (!this.r_check_vowel_harmony())
+ {
+ return false;
+ }
+ // among, line 259
+ if (this.find_among_b(TurkishStemmer.a_14, 4) == 0)
+ {
+ return false;
+ }
+ // (, line 260
+ // call mark_suffix_with_optional_y_consonant, line 260
+ if (!this.r_mark_suffix_with_optional_y_consonant())
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_mark_sUnUz () : boolean
+ {
+ // (, line 263
+ // among, line 264
+ if (this.find_among_b(TurkishStemmer.a_15, 4) == 0)
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_mark_lAr () : boolean
+ {
+ // (, line 267
+ // call check_vowel_harmony, line 268
+ if (!this.r_check_vowel_harmony())
+ {
+ return false;
+ }
+ // among, line 269
+ if (this.find_among_b(TurkishStemmer.a_16, 2) == 0)
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_mark_nUz () : boolean
+ {
+ // (, line 272
+ // call check_vowel_harmony, line 273
+ if (!this.r_check_vowel_harmony())
+ {
+ return false;
+ }
+ // among, line 274
+ if (this.find_among_b(TurkishStemmer.a_17, 4) == 0)
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_mark_DUr () : boolean
+ {
+ // (, line 277
+ // call check_vowel_harmony, line 278
+ if (!this.r_check_vowel_harmony())
+ {
+ return false;
+ }
+ // among, line 279
+ if (this.find_among_b(TurkishStemmer.a_18, 8) == 0)
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_mark_cAsInA () : boolean
+ {
+ // (, line 282
+ // among, line 283
+ if (this.find_among_b(TurkishStemmer.a_19, 2) == 0)
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_mark_yDU () : boolean
+ {
+ // (, line 286
+ // call check_vowel_harmony, line 287
+ if (!this.r_check_vowel_harmony())
+ {
+ return false;
+ }
+ // among, line 288
+ if (this.find_among_b(TurkishStemmer.a_20, 32) == 0)
+ {
+ return false;
+ }
+ // (, line 292
+ // call mark_suffix_with_optional_y_consonant, line 292
+ if (!this.r_mark_suffix_with_optional_y_consonant())
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_mark_ysA () : boolean
+ {
+ // (, line 296
+ // among, line 297
+ if (this.find_among_b(TurkishStemmer.a_21, 8) == 0)
+ {
+ return false;
+ }
+ // (, line 298
+ // call mark_suffix_with_optional_y_consonant, line 298
+ if (!this.r_mark_suffix_with_optional_y_consonant())
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_mark_ymUs_ () : boolean
+ {
+ // (, line 301
+ // call check_vowel_harmony, line 302
+ if (!this.r_check_vowel_harmony())
+ {
+ return false;
+ }
+ // among, line 303
+ if (this.find_among_b(TurkishStemmer.a_22, 4) == 0)
+ {
+ return false;
+ }
+ // (, line 304
+ // call mark_suffix_with_optional_y_consonant, line 304
+ if (!this.r_mark_suffix_with_optional_y_consonant())
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_mark_yken () : boolean
+ {
+ // (, line 307
+ // literal, line 308
+ if (!(this.eq_s_b(3, "ken")))
+ {
+ return false;
+ }
+ // (, line 308
+ // call mark_suffix_with_optional_y_consonant, line 308
+ if (!this.r_mark_suffix_with_optional_y_consonant())
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_stem_nominal_verb_suffixes () : boolean
+ {
+ var v_1 : int;
+ var v_2 : int;
+ var v_3 : int;
+ var v_4 : int;
+ var v_5 : int;
+ var v_6 : int;
+ var v_7 : int;
+ var v_8 : int;
+ var v_9 : int;
+ var v_10 : int;
+ // (, line 311
+ // [, line 312
+ this.ket = this.cursor;
+ // set continue_stemming_noun_suffixes, line 313
+ this.B_continue_stemming_noun_suffixes = true;
+ // or, line 315
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ v_1 = this.limit - this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ // (, line 314
+ // or, line 314
+ var lab2 = true;
+ lab2: while (lab2 == true)
+ {
+ lab2 = false;
+ v_2 = this.limit - this.cursor;
+ var lab3 = true;
+ lab3: while (lab3 == true)
+ {
+ lab3 = false;
+ // call mark_ymUs_, line 314
+ if (!this.r_mark_ymUs_())
+ {
+ break lab3;
+ }
+ break lab2;
+ }
+ this.cursor = this.limit - v_2;
+ var lab4 = true;
+ lab4: while (lab4 == true)
+ {
+ lab4 = false;
+ // call mark_yDU, line 314
+ if (!this.r_mark_yDU())
+ {
+ break lab4;
+ }
+ break lab2;
+ }
+ this.cursor = this.limit - v_2;
+ var lab5 = true;
+ lab5: while (lab5 == true)
+ {
+ lab5 = false;
+ // call mark_ysA, line 314
+ if (!this.r_mark_ysA())
+ {
+ break lab5;
+ }
+ break lab2;
+ }
+ this.cursor = this.limit - v_2;
+ // call mark_yken, line 314
+ if (!this.r_mark_yken())
+ {
+ break lab1;
+ }
+ }
+ break lab0;
+ }
+ this.cursor = this.limit - v_1;
+ var lab6 = true;
+ lab6: while (lab6 == true)
+ {
+ lab6 = false;
+ // (, line 316
+ // call mark_cAsInA, line 316
+ if (!this.r_mark_cAsInA())
+ {
+ break lab6;
+ }
+ // (, line 316
+ // or, line 316
+ var lab7 = true;
+ lab7: while (lab7 == true)
+ {
+ lab7 = false;
+ v_3 = this.limit - this.cursor;
+ var lab8 = true;
+ lab8: while (lab8 == true)
+ {
+ lab8 = false;
+ // call mark_sUnUz, line 316
+ if (!this.r_mark_sUnUz())
+ {
+ break lab8;
+ }
+ break lab7;
+ }
+ this.cursor = this.limit - v_3;
+ var lab9 = true;
+ lab9: while (lab9 == true)
+ {
+ lab9 = false;
+ // call mark_lAr, line 316
+ if (!this.r_mark_lAr())
+ {
+ break lab9;
+ }
+ break lab7;
+ }
+ this.cursor = this.limit - v_3;
+ var lab10 = true;
+ lab10: while (lab10 == true)
+ {
+ lab10 = false;
+ // call mark_yUm, line 316
+ if (!this.r_mark_yUm())
+ {
+ break lab10;
+ }
+ break lab7;
+ }
+ this.cursor = this.limit - v_3;
+ var lab11 = true;
+ lab11: while (lab11 == true)
+ {
+ lab11 = false;
+ // call mark_sUn, line 316
+ if (!this.r_mark_sUn())
+ {
+ break lab11;
+ }
+ break lab7;
+ }
+ this.cursor = this.limit - v_3;
+ var lab12 = true;
+ lab12: while (lab12 == true)
+ {
+ lab12 = false;
+ // call mark_yUz, line 316
+ if (!this.r_mark_yUz())
+ {
+ break lab12;
+ }
+ break lab7;
+ }
+ this.cursor = this.limit - v_3;
+ }
+ // call mark_ymUs_, line 316
+ if (!this.r_mark_ymUs_())
+ {
+ break lab6;
+ }
+ break lab0;
+ }
+ this.cursor = this.limit - v_1;
+ var lab13 = true;
+ lab13: while (lab13 == true)
+ {
+ lab13 = false;
+ // (, line 318
+ // call mark_lAr, line 319
+ if (!this.r_mark_lAr())
+ {
+ break lab13;
+ }
+ // ], line 319
+ this.bra = this.cursor;
+ // delete, line 319
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // try, line 319
+ v_4 = this.limit - this.cursor;
+ var lab14 = true;
+ lab14: while (lab14 == true)
+ {
+ lab14 = false;
+ // (, line 319
+ // [, line 319
+ this.ket = this.cursor;
+ // (, line 319
+ // or, line 319
+ var lab15 = true;
+ lab15: while (lab15 == true)
+ {
+ lab15 = false;
+ v_5 = this.limit - this.cursor;
+ var lab16 = true;
+ lab16: while (lab16 == true)
+ {
+ lab16 = false;
+ // call mark_DUr, line 319
+ if (!this.r_mark_DUr())
+ {
+ break lab16;
+ }
+ break lab15;
+ }
+ this.cursor = this.limit - v_5;
+ var lab17 = true;
+ lab17: while (lab17 == true)
+ {
+ lab17 = false;
+ // call mark_yDU, line 319
+ if (!this.r_mark_yDU())
+ {
+ break lab17;
+ }
+ break lab15;
+ }
+ this.cursor = this.limit - v_5;
+ var lab18 = true;
+ lab18: while (lab18 == true)
+ {
+ lab18 = false;
+ // call mark_ysA, line 319
+ if (!this.r_mark_ysA())
+ {
+ break lab18;
+ }
+ break lab15;
+ }
+ this.cursor = this.limit - v_5;
+ // call mark_ymUs_, line 319
+ if (!this.r_mark_ymUs_())
+ {
+ this.cursor = this.limit - v_4;
+ break lab14;
+ }
+ }
+ }
+ // unset continue_stemming_noun_suffixes, line 320
+ this.B_continue_stemming_noun_suffixes = false;
+ break lab0;
+ }
+ this.cursor = this.limit - v_1;
+ var lab19 = true;
+ lab19: while (lab19 == true)
+ {
+ lab19 = false;
+ // (, line 323
+ // call mark_nUz, line 323
+ if (!this.r_mark_nUz())
+ {
+ break lab19;
+ }
+ // (, line 323
+ // or, line 323
+ var lab20 = true;
+ lab20: while (lab20 == true)
+ {
+ lab20 = false;
+ v_6 = this.limit - this.cursor;
+ var lab21 = true;
+ lab21: while (lab21 == true)
+ {
+ lab21 = false;
+ // call mark_yDU, line 323
+ if (!this.r_mark_yDU())
+ {
+ break lab21;
+ }
+ break lab20;
+ }
+ this.cursor = this.limit - v_6;
+ // call mark_ysA, line 323
+ if (!this.r_mark_ysA())
+ {
+ break lab19;
+ }
+ }
+ break lab0;
+ }
+ this.cursor = this.limit - v_1;
+ var lab22 = true;
+ lab22: while (lab22 == true)
+ {
+ lab22 = false;
+ // (, line 325
+ // (, line 325
+ // or, line 325
+ var lab23 = true;
+ lab23: while (lab23 == true)
+ {
+ lab23 = false;
+ v_7 = this.limit - this.cursor;
+ var lab24 = true;
+ lab24: while (lab24 == true)
+ {
+ lab24 = false;
+ // call mark_sUnUz, line 325
+ if (!this.r_mark_sUnUz())
+ {
+ break lab24;
+ }
+ break lab23;
+ }
+ this.cursor = this.limit - v_7;
+ var lab25 = true;
+ lab25: while (lab25 == true)
+ {
+ lab25 = false;
+ // call mark_yUz, line 325
+ if (!this.r_mark_yUz())
+ {
+ break lab25;
+ }
+ break lab23;
+ }
+ this.cursor = this.limit - v_7;
+ var lab26 = true;
+ lab26: while (lab26 == true)
+ {
+ lab26 = false;
+ // call mark_sUn, line 325
+ if (!this.r_mark_sUn())
+ {
+ break lab26;
+ }
+ break lab23;
+ }
+ this.cursor = this.limit - v_7;
+ // call mark_yUm, line 325
+ if (!this.r_mark_yUm())
+ {
+ break lab22;
+ }
+ }
+ // ], line 325
+ this.bra = this.cursor;
+ // delete, line 325
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // try, line 325
+ v_8 = this.limit - this.cursor;
+ var lab27 = true;
+ lab27: while (lab27 == true)
+ {
+ lab27 = false;
+ // (, line 325
+ // [, line 325
+ this.ket = this.cursor;
+ // call mark_ymUs_, line 325
+ if (!this.r_mark_ymUs_())
+ {
+ this.cursor = this.limit - v_8;
+ break lab27;
+ }
+ }
+ break lab0;
+ }
+ this.cursor = this.limit - v_1;
+ // (, line 327
+ // call mark_DUr, line 327
+ if (!this.r_mark_DUr())
+ {
+ return false;
+ }
+ // ], line 327
+ this.bra = this.cursor;
+ // delete, line 327
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // try, line 327
+ v_9 = this.limit - this.cursor;
+ var lab28 = true;
+ lab28: while (lab28 == true)
+ {
+ lab28 = false;
+ // (, line 327
+ // [, line 327
+ this.ket = this.cursor;
+ // (, line 327
+ // or, line 327
+ var lab29 = true;
+ lab29: while (lab29 == true)
+ {
+ lab29 = false;
+ v_10 = this.limit - this.cursor;
+ var lab30 = true;
+ lab30: while (lab30 == true)
+ {
+ lab30 = false;
+ // call mark_sUnUz, line 327
+ if (!this.r_mark_sUnUz())
+ {
+ break lab30;
+ }
+ break lab29;
+ }
+ this.cursor = this.limit - v_10;
+ var lab31 = true;
+ lab31: while (lab31 == true)
+ {
+ lab31 = false;
+ // call mark_lAr, line 327
+ if (!this.r_mark_lAr())
+ {
+ break lab31;
+ }
+ break lab29;
+ }
+ this.cursor = this.limit - v_10;
+ var lab32 = true;
+ lab32: while (lab32 == true)
+ {
+ lab32 = false;
+ // call mark_yUm, line 327
+ if (!this.r_mark_yUm())
+ {
+ break lab32;
+ }
+ break lab29;
+ }
+ this.cursor = this.limit - v_10;
+ var lab33 = true;
+ lab33: while (lab33 == true)
+ {
+ lab33 = false;
+ // call mark_sUn, line 327
+ if (!this.r_mark_sUn())
+ {
+ break lab33;
+ }
+ break lab29;
+ }
+ this.cursor = this.limit - v_10;
+ var lab34 = true;
+ lab34: while (lab34 == true)
+ {
+ lab34 = false;
+ // call mark_yUz, line 327
+ if (!this.r_mark_yUz())
+ {
+ break lab34;
+ }
+ break lab29;
+ }
+ this.cursor = this.limit - v_10;
+ }
+ // call mark_ymUs_, line 327
+ if (!this.r_mark_ymUs_())
+ {
+ this.cursor = this.limit - v_9;
+ break lab28;
+ }
+ }
+ }
+ // ], line 328
+ this.bra = this.cursor;
+ // delete, line 328
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function r_stem_suffix_chain_before_ki () : boolean
+ {
+ var v_1 : int;
+ var v_2 : int;
+ var v_3 : int;
+ var v_4 : int;
+ var v_5 : int;
+ var v_6 : int;
+ var v_7 : int;
+ var v_8 : int;
+ var v_9 : int;
+ var v_10 : int;
+ var v_11 : int;
+ // (, line 332
+ // [, line 333
+ this.ket = this.cursor;
+ // call mark_ki, line 334
+ if (!this.r_mark_ki())
+ {
+ return false;
+ }
+ // (, line 335
+ // or, line 342
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ v_1 = this.limit - this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ // (, line 336
+ // call mark_DA, line 336
+ if (!this.r_mark_DA())
+ {
+ break lab1;
+ }
+ // ], line 336
+ this.bra = this.cursor;
+ // delete, line 336
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // try, line 336
+ v_2 = this.limit - this.cursor;
+ var lab2 = true;
+ lab2: while (lab2 == true)
+ {
+ lab2 = false;
+ // (, line 336
+ // [, line 336
+ this.ket = this.cursor;
+ // or, line 338
+ var lab3 = true;
+ lab3: while (lab3 == true)
+ {
+ lab3 = false;
+ v_3 = this.limit - this.cursor;
+ var lab4 = true;
+ lab4: while (lab4 == true)
+ {
+ lab4 = false;
+ // (, line 337
+ // call mark_lAr, line 337
+ if (!this.r_mark_lAr())
+ {
+ break lab4;
+ }
+ // ], line 337
+ this.bra = this.cursor;
+ // delete, line 337
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // try, line 337
+ v_4 = this.limit - this.cursor;
+ var lab5 = true;
+ lab5: while (lab5 == true)
+ {
+ lab5 = false;
+ // (, line 337
+ // call stem_suffix_chain_before_ki, line 337
+ if (!this.r_stem_suffix_chain_before_ki())
+ {
+ this.cursor = this.limit - v_4;
+ break lab5;
+ }
+ }
+ break lab3;
+ }
+ this.cursor = this.limit - v_3;
+ // (, line 339
+ // call mark_possessives, line 339
+ if (!this.r_mark_possessives())
+ {
+ this.cursor = this.limit - v_2;
+ break lab2;
+ }
+ // ], line 339
+ this.bra = this.cursor;
+ // delete, line 339
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // try, line 339
+ v_5 = this.limit - this.cursor;
+ var lab6 = true;
+ lab6: while (lab6 == true)
+ {
+ lab6 = false;
+ // (, line 339
+ // [, line 339
+ this.ket = this.cursor;
+ // call mark_lAr, line 339
+ if (!this.r_mark_lAr())
+ {
+ this.cursor = this.limit - v_5;
+ break lab6;
+ }
+ // ], line 339
+ this.bra = this.cursor;
+ // delete, line 339
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // call stem_suffix_chain_before_ki, line 339
+ if (!this.r_stem_suffix_chain_before_ki())
+ {
+ this.cursor = this.limit - v_5;
+ break lab6;
+ }
+ }
+ }
+ }
+ break lab0;
+ }
+ this.cursor = this.limit - v_1;
+ var lab7 = true;
+ lab7: while (lab7 == true)
+ {
+ lab7 = false;
+ // (, line 343
+ // call mark_nUn, line 343
+ if (!this.r_mark_nUn())
+ {
+ break lab7;
+ }
+ // ], line 343
+ this.bra = this.cursor;
+ // delete, line 343
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // try, line 343
+ v_6 = this.limit - this.cursor;
+ var lab8 = true;
+ lab8: while (lab8 == true)
+ {
+ lab8 = false;
+ // (, line 343
+ // [, line 343
+ this.ket = this.cursor;
+ // or, line 345
+ var lab9 = true;
+ lab9: while (lab9 == true)
+ {
+ lab9 = false;
+ v_7 = this.limit - this.cursor;
+ var lab10 = true;
+ lab10: while (lab10 == true)
+ {
+ lab10 = false;
+ // (, line 344
+ // call mark_lArI, line 344
+ if (!this.r_mark_lArI())
+ {
+ break lab10;
+ }
+ // ], line 344
+ this.bra = this.cursor;
+ // delete, line 344
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break lab9;
+ }
+ this.cursor = this.limit - v_7;
+ var lab11 = true;
+ lab11: while (lab11 == true)
+ {
+ lab11 = false;
+ // (, line 346
+ // [, line 346
+ this.ket = this.cursor;
+ // or, line 346
+ var lab12 = true;
+ lab12: while (lab12 == true)
+ {
+ lab12 = false;
+ v_8 = this.limit - this.cursor;
+ var lab13 = true;
+ lab13: while (lab13 == true)
+ {
+ lab13 = false;
+ // call mark_possessives, line 346
+ if (!this.r_mark_possessives())
+ {
+ break lab13;
+ }
+ break lab12;
+ }
+ this.cursor = this.limit - v_8;
+ // call mark_sU, line 346
+ if (!this.r_mark_sU())
+ {
+ break lab11;
+ }
+ }
+ // ], line 346
+ this.bra = this.cursor;
+ // delete, line 346
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // try, line 346
+ v_9 = this.limit - this.cursor;
+ var lab14 = true;
+ lab14: while (lab14 == true)
+ {
+ lab14 = false;
+ // (, line 346
+ // [, line 346
+ this.ket = this.cursor;
+ // call mark_lAr, line 346
+ if (!this.r_mark_lAr())
+ {
+ this.cursor = this.limit - v_9;
+ break lab14;
+ }
+ // ], line 346
+ this.bra = this.cursor;
+ // delete, line 346
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // call stem_suffix_chain_before_ki, line 346
+ if (!this.r_stem_suffix_chain_before_ki())
+ {
+ this.cursor = this.limit - v_9;
+ break lab14;
+ }
+ }
+ break lab9;
+ }
+ this.cursor = this.limit - v_7;
+ // (, line 348
+ // call stem_suffix_chain_before_ki, line 348
+ if (!this.r_stem_suffix_chain_before_ki())
+ {
+ this.cursor = this.limit - v_6;
+ break lab8;
+ }
+ }
+ }
+ break lab0;
+ }
+ this.cursor = this.limit - v_1;
+ // (, line 351
+ // call mark_ndA, line 351
+ if (!this.r_mark_ndA())
+ {
+ return false;
+ }
+ // (, line 351
+ // or, line 353
+ var lab15 = true;
+ lab15: while (lab15 == true)
+ {
+ lab15 = false;
+ v_10 = this.limit - this.cursor;
+ var lab16 = true;
+ lab16: while (lab16 == true)
+ {
+ lab16 = false;
+ // (, line 352
+ // call mark_lArI, line 352
+ if (!this.r_mark_lArI())
+ {
+ break lab16;
+ }
+ // ], line 352
+ this.bra = this.cursor;
+ // delete, line 352
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break lab15;
+ }
+ this.cursor = this.limit - v_10;
+ var lab17 = true;
+ lab17: while (lab17 == true)
+ {
+ lab17 = false;
+ // (, line 354
+ // (, line 354
+ // call mark_sU, line 354
+ if (!this.r_mark_sU())
+ {
+ break lab17;
+ }
+ // ], line 354
+ this.bra = this.cursor;
+ // delete, line 354
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // try, line 354
+ v_11 = this.limit - this.cursor;
+ var lab18 = true;
+ lab18: while (lab18 == true)
+ {
+ lab18 = false;
+ // (, line 354
+ // [, line 354
+ this.ket = this.cursor;
+ // call mark_lAr, line 354
+ if (!this.r_mark_lAr())
+ {
+ this.cursor = this.limit - v_11;
+ break lab18;
+ }
+ // ], line 354
+ this.bra = this.cursor;
+ // delete, line 354
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // call stem_suffix_chain_before_ki, line 354
+ if (!this.r_stem_suffix_chain_before_ki())
+ {
+ this.cursor = this.limit - v_11;
+ break lab18;
+ }
+ }
+ break lab15;
+ }
+ this.cursor = this.limit - v_10;
+ // (, line 356
+ // call stem_suffix_chain_before_ki, line 356
+ if (!this.r_stem_suffix_chain_before_ki())
+ {
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+
+ function r_stem_noun_suffixes () : boolean
+ {
+ var v_1 : int;
+ var v_2 : int;
+ var v_3 : int;
+ var v_4 : int;
+ var v_5 : int;
+ var v_6 : int;
+ var v_7 : int;
+ var v_8 : int;
+ var v_9 : int;
+ var v_10 : int;
+ var v_11 : int;
+ var v_12 : int;
+ var v_13 : int;
+ var v_14 : int;
+ var v_15 : int;
+ var v_16 : int;
+ var v_17 : int;
+ var v_18 : int;
+ var v_19 : int;
+ var v_20 : int;
+ var v_21 : int;
+ var v_22 : int;
+ var v_23 : int;
+ var v_24 : int;
+ var v_25 : int;
+ var v_26 : int;
+ var v_27 : int;
+ // (, line 361
+ // or, line 363
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ v_1 = this.limit - this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ // (, line 362
+ // [, line 362
+ this.ket = this.cursor;
+ // call mark_lAr, line 362
+ if (!this.r_mark_lAr())
+ {
+ break lab1;
+ }
+ // ], line 362
+ this.bra = this.cursor;
+ // delete, line 362
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // try, line 362
+ v_2 = this.limit - this.cursor;
+ var lab2 = true;
+ lab2: while (lab2 == true)
+ {
+ lab2 = false;
+ // (, line 362
+ // call stem_suffix_chain_before_ki, line 362
+ if (!this.r_stem_suffix_chain_before_ki())
+ {
+ this.cursor = this.limit - v_2;
+ break lab2;
+ }
+ }
+ break lab0;
+ }
+ this.cursor = this.limit - v_1;
+ var lab3 = true;
+ lab3: while (lab3 == true)
+ {
+ lab3 = false;
+ // (, line 364
+ // [, line 364
+ this.ket = this.cursor;
+ // call mark_ncA, line 364
+ if (!this.r_mark_ncA())
+ {
+ break lab3;
+ }
+ // ], line 364
+ this.bra = this.cursor;
+ // delete, line 364
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // try, line 365
+ v_3 = this.limit - this.cursor;
+ var lab4 = true;
+ lab4: while (lab4 == true)
+ {
+ lab4 = false;
+ // (, line 365
+ // or, line 367
+ var lab5 = true;
+ lab5: while (lab5 == true)
+ {
+ lab5 = false;
+ v_4 = this.limit - this.cursor;
+ var lab6 = true;
+ lab6: while (lab6 == true)
+ {
+ lab6 = false;
+ // (, line 366
+ // [, line 366
+ this.ket = this.cursor;
+ // call mark_lArI, line 366
+ if (!this.r_mark_lArI())
+ {
+ break lab6;
+ }
+ // ], line 366
+ this.bra = this.cursor;
+ // delete, line 366
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break lab5;
+ }
+ this.cursor = this.limit - v_4;
+ var lab7 = true;
+ lab7: while (lab7 == true)
+ {
+ lab7 = false;
+ // (, line 368
+ // [, line 368
+ this.ket = this.cursor;
+ // or, line 368
+ var lab8 = true;
+ lab8: while (lab8 == true)
+ {
+ lab8 = false;
+ v_5 = this.limit - this.cursor;
+ var lab9 = true;
+ lab9: while (lab9 == true)
+ {
+ lab9 = false;
+ // call mark_possessives, line 368
+ if (!this.r_mark_possessives())
+ {
+ break lab9;
+ }
+ break lab8;
+ }
+ this.cursor = this.limit - v_5;
+ // call mark_sU, line 368
+ if (!this.r_mark_sU())
+ {
+ break lab7;
+ }
+ }
+ // ], line 368
+ this.bra = this.cursor;
+ // delete, line 368
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // try, line 368
+ v_6 = this.limit - this.cursor;
+ var lab10 = true;
+ lab10: while (lab10 == true)
+ {
+ lab10 = false;
+ // (, line 368
+ // [, line 368
+ this.ket = this.cursor;
+ // call mark_lAr, line 368
+ if (!this.r_mark_lAr())
+ {
+ this.cursor = this.limit - v_6;
+ break lab10;
+ }
+ // ], line 368
+ this.bra = this.cursor;
+ // delete, line 368
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // call stem_suffix_chain_before_ki, line 368
+ if (!this.r_stem_suffix_chain_before_ki())
+ {
+ this.cursor = this.limit - v_6;
+ break lab10;
+ }
+ }
+ break lab5;
+ }
+ this.cursor = this.limit - v_4;
+ // (, line 370
+ // [, line 370
+ this.ket = this.cursor;
+ // call mark_lAr, line 370
+ if (!this.r_mark_lAr())
+ {
+ this.cursor = this.limit - v_3;
+ break lab4;
+ }
+ // ], line 370
+ this.bra = this.cursor;
+ // delete, line 370
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // call stem_suffix_chain_before_ki, line 370
+ if (!this.r_stem_suffix_chain_before_ki())
+ {
+ this.cursor = this.limit - v_3;
+ break lab4;
+ }
+ }
+ }
+ break lab0;
+ }
+ this.cursor = this.limit - v_1;
+ var lab11 = true;
+ lab11: while (lab11 == true)
+ {
+ lab11 = false;
+ // (, line 374
+ // [, line 374
+ this.ket = this.cursor;
+ // (, line 374
+ // or, line 374
+ var lab12 = true;
+ lab12: while (lab12 == true)
+ {
+ lab12 = false;
+ v_7 = this.limit - this.cursor;
+ var lab13 = true;
+ lab13: while (lab13 == true)
+ {
+ lab13 = false;
+ // call mark_ndA, line 374
+ if (!this.r_mark_ndA())
+ {
+ break lab13;
+ }
+ break lab12;
+ }
+ this.cursor = this.limit - v_7;
+ // call mark_nA, line 374
+ if (!this.r_mark_nA())
+ {
+ break lab11;
+ }
+ }
+ // (, line 375
+ // or, line 377
+ var lab14 = true;
+ lab14: while (lab14 == true)
+ {
+ lab14 = false;
+ v_8 = this.limit - this.cursor;
+ var lab15 = true;
+ lab15: while (lab15 == true)
+ {
+ lab15 = false;
+ // (, line 376
+ // call mark_lArI, line 376
+ if (!this.r_mark_lArI())
+ {
+ break lab15;
+ }
+ // ], line 376
+ this.bra = this.cursor;
+ // delete, line 376
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break lab14;
+ }
+ this.cursor = this.limit - v_8;
+ var lab16 = true;
+ lab16: while (lab16 == true)
+ {
+ lab16 = false;
+ // (, line 378
+ // call mark_sU, line 378
+ if (!this.r_mark_sU())
+ {
+ break lab16;
+ }
+ // ], line 378
+ this.bra = this.cursor;
+ // delete, line 378
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // try, line 378
+ v_9 = this.limit - this.cursor;
+ var lab17 = true;
+ lab17: while (lab17 == true)
+ {
+ lab17 = false;
+ // (, line 378
+ // [, line 378
+ this.ket = this.cursor;
+ // call mark_lAr, line 378
+ if (!this.r_mark_lAr())
+ {
+ this.cursor = this.limit - v_9;
+ break lab17;
+ }
+ // ], line 378
+ this.bra = this.cursor;
+ // delete, line 378
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // call stem_suffix_chain_before_ki, line 378
+ if (!this.r_stem_suffix_chain_before_ki())
+ {
+ this.cursor = this.limit - v_9;
+ break lab17;
+ }
+ }
+ break lab14;
+ }
+ this.cursor = this.limit - v_8;
+ // (, line 380
+ // call stem_suffix_chain_before_ki, line 380
+ if (!this.r_stem_suffix_chain_before_ki())
+ {
+ break lab11;
+ }
+ }
+ break lab0;
+ }
+ this.cursor = this.limit - v_1;
+ var lab18 = true;
+ lab18: while (lab18 == true)
+ {
+ lab18 = false;
+ // (, line 384
+ // [, line 384
+ this.ket = this.cursor;
+ // (, line 384
+ // or, line 384
+ var lab19 = true;
+ lab19: while (lab19 == true)
+ {
+ lab19 = false;
+ v_10 = this.limit - this.cursor;
+ var lab20 = true;
+ lab20: while (lab20 == true)
+ {
+ lab20 = false;
+ // call mark_ndAn, line 384
+ if (!this.r_mark_ndAn())
+ {
+ break lab20;
+ }
+ break lab19;
+ }
+ this.cursor = this.limit - v_10;
+ // call mark_nU, line 384
+ if (!this.r_mark_nU())
+ {
+ break lab18;
+ }
+ }
+ // (, line 384
+ // or, line 384
+ var lab21 = true;
+ lab21: while (lab21 == true)
+ {
+ lab21 = false;
+ v_11 = this.limit - this.cursor;
+ var lab22 = true;
+ lab22: while (lab22 == true)
+ {
+ lab22 = false;
+ // (, line 384
+ // call mark_sU, line 384
+ if (!this.r_mark_sU())
+ {
+ break lab22;
+ }
+ // ], line 384
+ this.bra = this.cursor;
+ // delete, line 384
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // try, line 384
+ v_12 = this.limit - this.cursor;
+ var lab23 = true;
+ lab23: while (lab23 == true)
+ {
+ lab23 = false;
+ // (, line 384
+ // [, line 384
+ this.ket = this.cursor;
+ // call mark_lAr, line 384
+ if (!this.r_mark_lAr())
+ {
+ this.cursor = this.limit - v_12;
+ break lab23;
+ }
+ // ], line 384
+ this.bra = this.cursor;
+ // delete, line 384
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // call stem_suffix_chain_before_ki, line 384
+ if (!this.r_stem_suffix_chain_before_ki())
+ {
+ this.cursor = this.limit - v_12;
+ break lab23;
+ }
+ }
+ break lab21;
+ }
+ this.cursor = this.limit - v_11;
+ // (, line 384
+ // call mark_lArI, line 384
+ if (!this.r_mark_lArI())
+ {
+ break lab18;
+ }
+ }
+ break lab0;
+ }
+ this.cursor = this.limit - v_1;
+ var lab24 = true;
+ lab24: while (lab24 == true)
+ {
+ lab24 = false;
+ // (, line 386
+ // [, line 386
+ this.ket = this.cursor;
+ // call mark_DAn, line 386
+ if (!this.r_mark_DAn())
+ {
+ break lab24;
+ }
+ // ], line 386
+ this.bra = this.cursor;
+ // delete, line 386
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // try, line 386
+ v_13 = this.limit - this.cursor;
+ var lab25 = true;
+ lab25: while (lab25 == true)
+ {
+ lab25 = false;
+ // (, line 386
+ // [, line 386
+ this.ket = this.cursor;
+ // (, line 387
+ // or, line 389
+ var lab26 = true;
+ lab26: while (lab26 == true)
+ {
+ lab26 = false;
+ v_14 = this.limit - this.cursor;
+ var lab27 = true;
+ lab27: while (lab27 == true)
+ {
+ lab27 = false;
+ // (, line 388
+ // call mark_possessives, line 388
+ if (!this.r_mark_possessives())
+ {
+ break lab27;
+ }
+ // ], line 388
+ this.bra = this.cursor;
+ // delete, line 388
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // try, line 388
+ v_15 = this.limit - this.cursor;
+ var lab28 = true;
+ lab28: while (lab28 == true)
+ {
+ lab28 = false;
+ // (, line 388
+ // [, line 388
+ this.ket = this.cursor;
+ // call mark_lAr, line 388
+ if (!this.r_mark_lAr())
+ {
+ this.cursor = this.limit - v_15;
+ break lab28;
+ }
+ // ], line 388
+ this.bra = this.cursor;
+ // delete, line 388
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // call stem_suffix_chain_before_ki, line 388
+ if (!this.r_stem_suffix_chain_before_ki())
+ {
+ this.cursor = this.limit - v_15;
+ break lab28;
+ }
+ }
+ break lab26;
+ }
+ this.cursor = this.limit - v_14;
+ var lab29 = true;
+ lab29: while (lab29 == true)
+ {
+ lab29 = false;
+ // (, line 390
+ // call mark_lAr, line 390
+ if (!this.r_mark_lAr())
+ {
+ break lab29;
+ }
+ // ], line 390
+ this.bra = this.cursor;
+ // delete, line 390
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // try, line 390
+ v_16 = this.limit - this.cursor;
+ var lab30 = true;
+ lab30: while (lab30 == true)
+ {
+ lab30 = false;
+ // (, line 390
+ // call stem_suffix_chain_before_ki, line 390
+ if (!this.r_stem_suffix_chain_before_ki())
+ {
+ this.cursor = this.limit - v_16;
+ break lab30;
+ }
+ }
+ break lab26;
+ }
+ this.cursor = this.limit - v_14;
+ // (, line 392
+ // call stem_suffix_chain_before_ki, line 392
+ if (!this.r_stem_suffix_chain_before_ki())
+ {
+ this.cursor = this.limit - v_13;
+ break lab25;
+ }
+ }
+ }
+ break lab0;
+ }
+ this.cursor = this.limit - v_1;
+ var lab31 = true;
+ lab31: while (lab31 == true)
+ {
+ lab31 = false;
+ // (, line 396
+ // [, line 396
+ this.ket = this.cursor;
+ // or, line 396
+ var lab32 = true;
+ lab32: while (lab32 == true)
+ {
+ lab32 = false;
+ v_17 = this.limit - this.cursor;
+ var lab33 = true;
+ lab33: while (lab33 == true)
+ {
+ lab33 = false;
+ // call mark_nUn, line 396
+ if (!this.r_mark_nUn())
+ {
+ break lab33;
+ }
+ break lab32;
+ }
+ this.cursor = this.limit - v_17;
+ // call mark_ylA, line 396
+ if (!this.r_mark_ylA())
+ {
+ break lab31;
+ }
+ }
+ // ], line 396
+ this.bra = this.cursor;
+ // delete, line 396
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // try, line 397
+ v_18 = this.limit - this.cursor;
+ var lab34 = true;
+ lab34: while (lab34 == true)
+ {
+ lab34 = false;
+ // (, line 397
+ // or, line 399
+ var lab35 = true;
+ lab35: while (lab35 == true)
+ {
+ lab35 = false;
+ v_19 = this.limit - this.cursor;
+ var lab36 = true;
+ lab36: while (lab36 == true)
+ {
+ lab36 = false;
+ // (, line 398
+ // [, line 398
+ this.ket = this.cursor;
+ // call mark_lAr, line 398
+ if (!this.r_mark_lAr())
+ {
+ break lab36;
+ }
+ // ], line 398
+ this.bra = this.cursor;
+ // delete, line 398
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // call stem_suffix_chain_before_ki, line 398
+ if (!this.r_stem_suffix_chain_before_ki())
+ {
+ break lab36;
+ }
+ break lab35;
+ }
+ this.cursor = this.limit - v_19;
+ var lab37 = true;
+ lab37: while (lab37 == true)
+ {
+ lab37 = false;
+ // (, line 400
+ // [, line 400
+ this.ket = this.cursor;
+ // or, line 400
+ var lab38 = true;
+ lab38: while (lab38 == true)
+ {
+ lab38 = false;
+ v_20 = this.limit - this.cursor;
+ var lab39 = true;
+ lab39: while (lab39 == true)
+ {
+ lab39 = false;
+ // call mark_possessives, line 400
+ if (!this.r_mark_possessives())
+ {
+ break lab39;
+ }
+ break lab38;
+ }
+ this.cursor = this.limit - v_20;
+ // call mark_sU, line 400
+ if (!this.r_mark_sU())
+ {
+ break lab37;
+ }
+ }
+ // ], line 400
+ this.bra = this.cursor;
+ // delete, line 400
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // try, line 400
+ v_21 = this.limit - this.cursor;
+ var lab40 = true;
+ lab40: while (lab40 == true)
+ {
+ lab40 = false;
+ // (, line 400
+ // [, line 400
+ this.ket = this.cursor;
+ // call mark_lAr, line 400
+ if (!this.r_mark_lAr())
+ {
+ this.cursor = this.limit - v_21;
+ break lab40;
+ }
+ // ], line 400
+ this.bra = this.cursor;
+ // delete, line 400
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // call stem_suffix_chain_before_ki, line 400
+ if (!this.r_stem_suffix_chain_before_ki())
+ {
+ this.cursor = this.limit - v_21;
+ break lab40;
+ }
+ }
+ break lab35;
+ }
+ this.cursor = this.limit - v_19;
+ // call stem_suffix_chain_before_ki, line 402
+ if (!this.r_stem_suffix_chain_before_ki())
+ {
+ this.cursor = this.limit - v_18;
+ break lab34;
+ }
+ }
+ }
+ break lab0;
+ }
+ this.cursor = this.limit - v_1;
+ var lab41 = true;
+ lab41: while (lab41 == true)
+ {
+ lab41 = false;
+ // (, line 406
+ // [, line 406
+ this.ket = this.cursor;
+ // call mark_lArI, line 406
+ if (!this.r_mark_lArI())
+ {
+ break lab41;
+ }
+ // ], line 406
+ this.bra = this.cursor;
+ // delete, line 406
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ break lab0;
+ }
+ this.cursor = this.limit - v_1;
+ var lab42 = true;
+ lab42: while (lab42 == true)
+ {
+ lab42 = false;
+ // (, line 408
+ // call stem_suffix_chain_before_ki, line 408
+ if (!this.r_stem_suffix_chain_before_ki())
+ {
+ break lab42;
+ }
+ break lab0;
+ }
+ this.cursor = this.limit - v_1;
+ var lab43 = true;
+ lab43: while (lab43 == true)
+ {
+ lab43 = false;
+ // (, line 410
+ // [, line 410
+ this.ket = this.cursor;
+ // or, line 410
+ var lab44 = true;
+ lab44: while (lab44 == true)
+ {
+ lab44 = false;
+ v_22 = this.limit - this.cursor;
+ var lab45 = true;
+ lab45: while (lab45 == true)
+ {
+ lab45 = false;
+ // call mark_DA, line 410
+ if (!this.r_mark_DA())
+ {
+ break lab45;
+ }
+ break lab44;
+ }
+ this.cursor = this.limit - v_22;
+ var lab46 = true;
+ lab46: while (lab46 == true)
+ {
+ lab46 = false;
+ // call mark_yU, line 410
+ if (!this.r_mark_yU())
+ {
+ break lab46;
+ }
+ break lab44;
+ }
+ this.cursor = this.limit - v_22;
+ // call mark_yA, line 410
+ if (!this.r_mark_yA())
+ {
+ break lab43;
+ }
+ }
+ // ], line 410
+ this.bra = this.cursor;
+ // delete, line 410
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // try, line 410
+ v_23 = this.limit - this.cursor;
+ var lab47 = true;
+ lab47: while (lab47 == true)
+ {
+ lab47 = false;
+ // (, line 410
+ // [, line 410
+ this.ket = this.cursor;
+ // (, line 410
+ // or, line 410
+ var lab48 = true;
+ lab48: while (lab48 == true)
+ {
+ lab48 = false;
+ v_24 = this.limit - this.cursor;
+ var lab49 = true;
+ lab49: while (lab49 == true)
+ {
+ lab49 = false;
+ // (, line 410
+ // call mark_possessives, line 410
+ if (!this.r_mark_possessives())
+ {
+ break lab49;
+ }
+ // ], line 410
+ this.bra = this.cursor;
+ // delete, line 410
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // try, line 410
+ v_25 = this.limit - this.cursor;
+ var lab50 = true;
+ lab50: while (lab50 == true)
+ {
+ lab50 = false;
+ // (, line 410
+ // [, line 410
+ this.ket = this.cursor;
+ // call mark_lAr, line 410
+ if (!this.r_mark_lAr())
+ {
+ this.cursor = this.limit - v_25;
+ break lab50;
+ }
+ }
+ break lab48;
+ }
+ this.cursor = this.limit - v_24;
+ // call mark_lAr, line 410
+ if (!this.r_mark_lAr())
+ {
+ this.cursor = this.limit - v_23;
+ break lab47;
+ }
+ }
+ // ], line 410
+ this.bra = this.cursor;
+ // delete, line 410
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // [, line 410
+ this.ket = this.cursor;
+ // call stem_suffix_chain_before_ki, line 410
+ if (!this.r_stem_suffix_chain_before_ki())
+ {
+ this.cursor = this.limit - v_23;
+ break lab47;
+ }
+ }
+ break lab0;
+ }
+ this.cursor = this.limit - v_1;
+ // (, line 412
+ // [, line 412
+ this.ket = this.cursor;
+ // or, line 412
+ var lab51 = true;
+ lab51: while (lab51 == true)
+ {
+ lab51 = false;
+ v_26 = this.limit - this.cursor;
+ var lab52 = true;
+ lab52: while (lab52 == true)
+ {
+ lab52 = false;
+ // call mark_possessives, line 412
+ if (!this.r_mark_possessives())
+ {
+ break lab52;
+ }
+ break lab51;
+ }
+ this.cursor = this.limit - v_26;
+ // call mark_sU, line 412
+ if (!this.r_mark_sU())
+ {
+ return false;
+ }
+ }
+ // ], line 412
+ this.bra = this.cursor;
+ // delete, line 412
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // try, line 412
+ v_27 = this.limit - this.cursor;
+ var lab53 = true;
+ lab53: while (lab53 == true)
+ {
+ lab53 = false;
+ // (, line 412
+ // [, line 412
+ this.ket = this.cursor;
+ // call mark_lAr, line 412
+ if (!this.r_mark_lAr())
+ {
+ this.cursor = this.limit - v_27;
+ break lab53;
+ }
+ // ], line 412
+ this.bra = this.cursor;
+ // delete, line 412
+ if (!this.slice_del())
+ {
+ return false;
+ }
+ // call stem_suffix_chain_before_ki, line 412
+ if (!this.r_stem_suffix_chain_before_ki())
+ {
+ this.cursor = this.limit - v_27;
+ break lab53;
+ }
+ }
+ }
+ return true;
+ }
+
+ function r_post_process_last_consonants () : boolean
+ {
+ var among_var : int;
+ // (, line 415
+ // [, line 416
+ this.ket = this.cursor;
+ // substring, line 416
+ among_var = this.find_among_b(TurkishStemmer.a_23, 4);
+ if (among_var == 0)
+ {
+ return false;
+ }
+ // ], line 416
+ this.bra = this.cursor;
+ switch (among_var) {
+ case 0:
+ return false;
+ case 1:
+ // (, line 417
+ // <-, line 417
+ if (!this.slice_from("p"))
+ {
+ return false;
+ }
+ break;
+ case 2:
+ // (, line 418
+ // <-, line 418
+ if (!this.slice_from("\u00E7"))
+ {
+ return false;
+ }
+ break;
+ case 3:
+ // (, line 419
+ // <-, line 419
+ if (!this.slice_from("t"))
+ {
+ return false;
+ }
+ break;
+ case 4:
+ // (, line 420
+ // <-, line 420
+ if (!this.slice_from("k"))
+ {
+ return false;
+ }
+ break;
+ }
+ return true;
+ }
+
+ function r_append_U_to_stems_ending_with_d_or_g () : boolean
+ {
+ var v_1 : int;
+ var v_2 : int;
+ var v_3 : int;
+ var v_4 : int;
+ var v_5 : int;
+ var v_6 : int;
+ var v_7 : int;
+ var v_8 : int;
+ var v_9 : int;
+ var v_10 : int;
+ var v_11 : int;
+ var v_12 : int;
+ var v_13 : int;
+ var v_14 : int;
+ var v_15 : int;
+ // (, line 430
+ // test, line 431
+ v_1 = this.limit - this.cursor;
+ // (, line 431
+ // or, line 431
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ v_2 = this.limit - this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ // literal, line 431
+ if (!(this.eq_s_b(1, "d")))
+ {
+ break lab1;
+ }
+ break lab0;
+ }
+ this.cursor = this.limit - v_2;
+ // literal, line 431
+ if (!(this.eq_s_b(1, "g")))
+ {
+ return false;
+ }
+ }
+ this.cursor = this.limit - v_1;
+ // or, line 433
+ var lab2 = true;
+ lab2: while (lab2 == true)
+ {
+ lab2 = false;
+ v_3 = this.limit - this.cursor;
+ var lab3 = true;
+ lab3: while (lab3 == true)
+ {
+ lab3 = false;
+ // (, line 432
+ // test, line 432
+ v_4 = this.limit - this.cursor;
+ // (, line 432
+ // (, line 432
+ // goto, line 432
+ golab4: while(true)
+ {
+ v_5 = this.limit - this.cursor;
+ var lab5 = true;
+ lab5: while (lab5 == true)
+ {
+ lab5 = false;
+ if (!(this.in_grouping_b(TurkishStemmer.g_vowel, 97, 305)))
+ {
+ break lab5;
+ }
+ this.cursor = this.limit - v_5;
+ break golab4;
+ }
+ this.cursor = this.limit - v_5;
+ if (this.cursor <= this.limit_backward)
+ {
+ break lab3;
+ }
+ this.cursor--;
+ }
+ // or, line 432
+ var lab6 = true;
+ lab6: while (lab6 == true)
+ {
+ lab6 = false;
+ v_6 = this.limit - this.cursor;
+ var lab7 = true;
+ lab7: while (lab7 == true)
+ {
+ lab7 = false;
+ // literal, line 432
+ if (!(this.eq_s_b(1, "a")))
+ {
+ break lab7;
+ }
+ break lab6;
+ }
+ this.cursor = this.limit - v_6;
+ // literal, line 432
+ if (!(this.eq_s_b(1, "\u0131")))
+ {
+ break lab3;
+ }
+ }
+ this.cursor = this.limit - v_4;
+ // <+, line 432
+ {
+ var c : int = this.cursor;
+ this.insert(this.cursor, this.cursor, "\u0131");
+ this.cursor = c;
+ }
+ break lab2;
+ }
+ this.cursor = this.limit - v_3;
+ var lab8 = true;
+ lab8: while (lab8 == true)
+ {
+ lab8 = false;
+ // (, line 434
+ // test, line 434
+ v_7 = this.limit - this.cursor;
+ // (, line 434
+ // (, line 434
+ // goto, line 434
+ golab9: while(true)
+ {
+ v_8 = this.limit - this.cursor;
+ var lab10 = true;
+ lab10: while (lab10 == true)
+ {
+ lab10 = false;
+ if (!(this.in_grouping_b(TurkishStemmer.g_vowel, 97, 305)))
+ {
+ break lab10;
+ }
+ this.cursor = this.limit - v_8;
+ break golab9;
+ }
+ this.cursor = this.limit - v_8;
+ if (this.cursor <= this.limit_backward)
+ {
+ break lab8;
+ }
+ this.cursor--;
+ }
+ // or, line 434
+ var lab11 = true;
+ lab11: while (lab11 == true)
+ {
+ lab11 = false;
+ v_9 = this.limit - this.cursor;
+ var lab12 = true;
+ lab12: while (lab12 == true)
+ {
+ lab12 = false;
+ // literal, line 434
+ if (!(this.eq_s_b(1, "e")))
+ {
+ break lab12;
+ }
+ break lab11;
+ }
+ this.cursor = this.limit - v_9;
+ // literal, line 434
+ if (!(this.eq_s_b(1, "i")))
+ {
+ break lab8;
+ }
+ }
+ this.cursor = this.limit - v_7;
+ // <+, line 434
+ {
+ var c : int = this.cursor;
+ this.insert(this.cursor, this.cursor, "i");
+ this.cursor = c;
+ }
+ break lab2;
+ }
+ this.cursor = this.limit - v_3;
+ var lab13 = true;
+ lab13: while (lab13 == true)
+ {
+ lab13 = false;
+ // (, line 436
+ // test, line 436
+ v_10 = this.limit - this.cursor;
+ // (, line 436
+ // (, line 436
+ // goto, line 436
+ golab14: while(true)
+ {
+ v_11 = this.limit - this.cursor;
+ var lab15 = true;
+ lab15: while (lab15 == true)
+ {
+ lab15 = false;
+ if (!(this.in_grouping_b(TurkishStemmer.g_vowel, 97, 305)))
+ {
+ break lab15;
+ }
+ this.cursor = this.limit - v_11;
+ break golab14;
+ }
+ this.cursor = this.limit - v_11;
+ if (this.cursor <= this.limit_backward)
+ {
+ break lab13;
+ }
+ this.cursor--;
+ }
+ // or, line 436
+ var lab16 = true;
+ lab16: while (lab16 == true)
+ {
+ lab16 = false;
+ v_12 = this.limit - this.cursor;
+ var lab17 = true;
+ lab17: while (lab17 == true)
+ {
+ lab17 = false;
+ // literal, line 436
+ if (!(this.eq_s_b(1, "o")))
+ {
+ break lab17;
+ }
+ break lab16;
+ }
+ this.cursor = this.limit - v_12;
+ // literal, line 436
+ if (!(this.eq_s_b(1, "u")))
+ {
+ break lab13;
+ }
+ }
+ this.cursor = this.limit - v_10;
+ // <+, line 436
+ {
+ var c : int = this.cursor;
+ this.insert(this.cursor, this.cursor, "u");
+ this.cursor = c;
+ }
+ break lab2;
+ }
+ this.cursor = this.limit - v_3;
+ // (, line 438
+ // test, line 438
+ v_13 = this.limit - this.cursor;
+ // (, line 438
+ // (, line 438
+ // goto, line 438
+ golab18: while(true)
+ {
+ v_14 = this.limit - this.cursor;
+ var lab19 = true;
+ lab19: while (lab19 == true)
+ {
+ lab19 = false;
+ if (!(this.in_grouping_b(TurkishStemmer.g_vowel, 97, 305)))
+ {
+ break lab19;
+ }
+ this.cursor = this.limit - v_14;
+ break golab18;
+ }
+ this.cursor = this.limit - v_14;
+ if (this.cursor <= this.limit_backward)
+ {
+ return false;
+ }
+ this.cursor--;
+ }
+ // or, line 438
+ var lab20 = true;
+ lab20: while (lab20 == true)
+ {
+ lab20 = false;
+ v_15 = this.limit - this.cursor;
+ var lab21 = true;
+ lab21: while (lab21 == true)
+ {
+ lab21 = false;
+ // literal, line 438
+ if (!(this.eq_s_b(1, "\u00F6")))
+ {
+ break lab21;
+ }
+ break lab20;
+ }
+ this.cursor = this.limit - v_15;
+ // literal, line 438
+ if (!(this.eq_s_b(1, "\u00FC")))
+ {
+ return false;
+ }
+ }
+ this.cursor = this.limit - v_13;
+ // <+, line 438
+ {
+ var c : int = this.cursor;
+ this.insert(this.cursor, this.cursor, "\u00FC");
+ this.cursor = c;
+ }
+ }
+ return true;
+ }
+
+ function r_more_than_one_syllable_word () : boolean
+ {
+ var v_1 : int;
+ var v_3 : int;
+ // (, line 445
+ // test, line 446
+ v_1 = this.cursor;
+ // (, line 446
+ // atleast, line 446
+ {
+ var v_2 = 2;
+ // atleast, line 446
+ replab0: while(true)
+ {
+ v_3 = this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ // (, line 446
+ // gopast, line 446
+ golab2: while(true)
+ {
+ var lab3 = true;
+ lab3: while (lab3 == true)
+ {
+ lab3 = false;
+ if (!(this.in_grouping(TurkishStemmer.g_vowel, 97, 305)))
+ {
+ break lab3;
+ }
+ break golab2;
+ }
+ if (this.cursor >= this.limit)
+ {
+ break lab1;
+ }
+ this.cursor++;
+ }
+ v_2--;
+ continue replab0;
+ }
+ this.cursor = v_3;
+ break replab0;
+ }
+ if (v_2 > 0)
+ {
+ return false;
+ }
+ }
+ this.cursor = v_1;
+ return true;
+ }
+
+ function r_is_reserved_word () : boolean
+ {
+ var v_1 : int;
+ var v_2 : int;
+ var v_4 : int;
+ // (, line 449
+ // or, line 451
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ v_1 = this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ // test, line 450
+ v_2 = this.cursor;
+ // (, line 450
+ // gopast, line 450
+ golab2: while(true)
+ {
+ var lab3 = true;
+ lab3: while (lab3 == true)
+ {
+ lab3 = false;
+ // literal, line 450
+ if (!(this.eq_s(2, "ad")))
+ {
+ break lab3;
+ }
+ break golab2;
+ }
+ if (this.cursor >= this.limit)
+ {
+ break lab1;
+ }
+ this.cursor++;
+ }
+ // (, line 450
+ this.I_strlen = 2;
+ // (, line 450
+ if (!(this.I_strlen == this.limit))
+ {
+ break lab1;
+ }
+ this.cursor = v_2;
+ break lab0;
+ }
+ this.cursor = v_1;
+ // test, line 452
+ v_4 = this.cursor;
+ // (, line 452
+ // gopast, line 452
+ golab4: while(true)
+ {
+ var lab5 = true;
+ lab5: while (lab5 == true)
+ {
+ lab5 = false;
+ // literal, line 452
+ if (!(this.eq_s(5, "soyad")))
+ {
+ break lab5;
+ }
+ break golab4;
+ }
+ if (this.cursor >= this.limit)
+ {
+ return false;
+ }
+ this.cursor++;
+ }
+ // (, line 452
+ this.I_strlen = 5;
+ // (, line 452
+ if (!(this.I_strlen == this.limit))
+ {
+ return false;
+ }
+ this.cursor = v_4;
+ }
+ return true;
+ }
+
+ function r_postlude () : boolean
+ {
+ var v_1 : int;
+ var v_2 : int;
+ var v_3 : int;
+ // (, line 455
+ // not, line 456
+ {
+ v_1 = this.cursor;
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ // (, line 456
+ // call is_reserved_word, line 456
+ if (!this.r_is_reserved_word())
+ {
+ break lab0;
+ }
+ return false;
+ }
+ this.cursor = v_1;
+ }
+ // backwards, line 457
+ this.limit_backward = this.cursor; this.cursor = this.limit;
+ // (, line 457
+ // do, line 458
+ v_2 = this.limit - this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ // call append_U_to_stems_ending_with_d_or_g, line 458
+ if (!this.r_append_U_to_stems_ending_with_d_or_g())
+ {
+ break lab1;
+ }
+ }
+ this.cursor = this.limit - v_2;
+ // do, line 459
+ v_3 = this.limit - this.cursor;
+ var lab2 = true;
+ lab2: while (lab2 == true)
+ {
+ lab2 = false;
+ // call post_process_last_consonants, line 459
+ if (!this.r_post_process_last_consonants())
+ {
+ break lab2;
+ }
+ }
+ this.cursor = this.limit - v_3;
+ this.cursor = this.limit_backward; return true;
+ }
+
+ override function stem () : boolean
+ {
+ var v_1 : int;
+ var v_2 : int;
+ // (, line 464
+ // (, line 465
+ // call more_than_one_syllable_word, line 465
+ if (!this.r_more_than_one_syllable_word())
+ {
+ return false;
+ }
+ // (, line 466
+ // backwards, line 467
+ this.limit_backward = this.cursor; this.cursor = this.limit;
+ // (, line 467
+ // do, line 468
+ v_1 = this.limit - this.cursor;
+ var lab0 = true;
+ lab0: while (lab0 == true)
+ {
+ lab0 = false;
+ // call stem_nominal_verb_suffixes, line 468
+ if (!this.r_stem_nominal_verb_suffixes())
+ {
+ break lab0;
+ }
+ }
+ this.cursor = this.limit - v_1;
+ // Boolean test continue_stemming_noun_suffixes, line 469
+ if (!(this.B_continue_stemming_noun_suffixes))
+ {
+ return false;
+ }
+ // do, line 470
+ v_2 = this.limit - this.cursor;
+ var lab1 = true;
+ lab1: while (lab1 == true)
+ {
+ lab1 = false;
+ // call stem_noun_suffixes, line 470
+ if (!this.r_stem_noun_suffixes())
+ {
+ break lab1;
+ }
+ }
+ this.cursor = this.limit - v_2;
+ this.cursor = this.limit_backward; // call postlude, line 473
+ if (!this.r_postlude())
+ {
+ return false;
+ }
+ return true;
+ }
+
+ function equals (o : variant) : boolean {
+ return o instanceof TurkishStemmer;
+ }
+
+ function hashCode() : int
+ {
+ //http://stackoverflow.com/questions/194846/is-there-any-kind-of-hashcode-function-in-javascript
+ var classname = "TurkishStemmer";
+ var hash = 0;
+ if (classname.length == 0) return hash;
+ for (var i = 0; i < classname.length; i++) {
+ var char = classname.charCodeAt(i);
+ hash = ((hash << 5) - hash) + char;
+ hash = hash & hash; // Convert to 32bit integer
+ }
+ return hash;
+ }
+
+}
+