diff options
Diffstat (limited to 'web/server/h2o/libh2o/misc/oktavia/src/stemmer/french-stemmer.jsx')
-rw-r--r-- | web/server/h2o/libh2o/misc/oktavia/src/stemmer/french-stemmer.jsx | 1867 |
1 files changed, 0 insertions, 1867 deletions
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 deleted file mode 100644 index 3d937818b..000000000 --- a/web/server/h2o/libh2o/misc/oktavia/src/stemmer/french-stemmer.jsx +++ /dev/null @@ -1,1867 +0,0 @@ -// 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; - } - -} - |