You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opennlp.apache.org by jo...@apache.org on 2013/11/20 12:47:08 UTC

svn commit: r1543793 [10/11] - /opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/stemmer/snowball/

Added: opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/stemmer/snowball/spanishStemmer.java
URL: http://svn.apache.org/viewvc/opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/stemmer/snowball/spanishStemmer.java?rev=1543793&view=auto
==============================================================================
--- opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/stemmer/snowball/spanishStemmer.java (added)
+++ opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/stemmer/snowball/spanishStemmer.java Wed Nov 20 11:47:08 2013
@@ -0,0 +1,1228 @@
+/*
+
+Copyright (c) 2001, Dr Martin Porter
+Copyright (c) 2002, Richard Boulton
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+    * this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+    * notice, this list of conditions and the following disclaimer in the
+    * documentation and/or other materials provided with the distribution.
+    * Neither the name of the copyright holders nor the names of its contributors
+    * may be used to endorse or promote products derived from this software
+    * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ */
+
+// This file was generated automatically by the Snowball to Java compiler
+
+package opennlp.tools.stemmer.snowball;
+
+
+ /**
+  * This class was automatically generated by a Snowball to Java compiler 
+  * It implements the stemming algorithm defined by a snowball script.
+  */
+
+class spanishStemmer extends opennlp.tools.stemmer.snowball.AbstractSnowballStemmer {
+
+private static final long serialVersionUID = 1L;
+
+        private final static spanishStemmer methodObject = new spanishStemmer ();
+
+                private final static Among a_0[] = {
+                    new Among ( "", -1, 6, "", methodObject ),
+                    new Among ( "\u00E1", 0, 1, "", methodObject ),
+                    new Among ( "\u00E9", 0, 2, "", methodObject ),
+                    new Among ( "\u00ED", 0, 3, "", methodObject ),
+                    new Among ( "\u00F3", 0, 4, "", methodObject ),
+                    new Among ( "\u00FA", 0, 5, "", methodObject )
+                };
+
+                private final static Among a_1[] = {
+                    new Among ( "la", -1, -1, "", methodObject ),
+                    new Among ( "sela", 0, -1, "", methodObject ),
+                    new Among ( "le", -1, -1, "", methodObject ),
+                    new Among ( "me", -1, -1, "", methodObject ),
+                    new Among ( "se", -1, -1, "", methodObject ),
+                    new Among ( "lo", -1, -1, "", methodObject ),
+                    new Among ( "selo", 5, -1, "", methodObject ),
+                    new Among ( "las", -1, -1, "", methodObject ),
+                    new Among ( "selas", 7, -1, "", methodObject ),
+                    new Among ( "les", -1, -1, "", methodObject ),
+                    new Among ( "los", -1, -1, "", methodObject ),
+                    new Among ( "selos", 10, -1, "", methodObject ),
+                    new Among ( "nos", -1, -1, "", methodObject )
+                };
+
+                private final static Among a_2[] = {
+                    new Among ( "ando", -1, 6, "", methodObject ),
+                    new Among ( "iendo", -1, 6, "", methodObject ),
+                    new Among ( "yendo", -1, 7, "", methodObject ),
+                    new Among ( "\u00E1ndo", -1, 2, "", methodObject ),
+                    new Among ( "i\u00E9ndo", -1, 1, "", methodObject ),
+                    new Among ( "ar", -1, 6, "", methodObject ),
+                    new Among ( "er", -1, 6, "", methodObject ),
+                    new Among ( "ir", -1, 6, "", methodObject ),
+                    new Among ( "\u00E1r", -1, 3, "", methodObject ),
+                    new Among ( "\u00E9r", -1, 4, "", methodObject ),
+                    new Among ( "\u00EDr", -1, 5, "", methodObject )
+                };
+
+                private final static Among a_3[] = {
+                    new Among ( "ic", -1, -1, "", methodObject ),
+                    new Among ( "ad", -1, -1, "", methodObject ),
+                    new Among ( "os", -1, -1, "", methodObject ),
+                    new Among ( "iv", -1, 1, "", methodObject )
+                };
+
+                private final static Among a_4[] = {
+                    new Among ( "able", -1, 1, "", methodObject ),
+                    new Among ( "ible", -1, 1, "", methodObject ),
+                    new Among ( "ante", -1, 1, "", methodObject )
+                };
+
+                private final static Among a_5[] = {
+                    new Among ( "ic", -1, 1, "", methodObject ),
+                    new Among ( "abil", -1, 1, "", methodObject ),
+                    new Among ( "iv", -1, 1, "", methodObject )
+                };
+
+                private final static Among a_6[] = {
+                    new Among ( "ica", -1, 1, "", methodObject ),
+                    new Among ( "ancia", -1, 2, "", methodObject ),
+                    new Among ( "encia", -1, 5, "", methodObject ),
+                    new Among ( "adora", -1, 2, "", methodObject ),
+                    new Among ( "osa", -1, 1, "", methodObject ),
+                    new Among ( "ista", -1, 1, "", methodObject ),
+                    new Among ( "iva", -1, 9, "", methodObject ),
+                    new Among ( "anza", -1, 1, "", methodObject ),
+                    new Among ( "log\u00EDa", -1, 3, "", methodObject ),
+                    new Among ( "idad", -1, 8, "", methodObject ),
+                    new Among ( "able", -1, 1, "", methodObject ),
+                    new Among ( "ible", -1, 1, "", methodObject ),
+                    new Among ( "ante", -1, 2, "", methodObject ),
+                    new Among ( "mente", -1, 7, "", methodObject ),
+                    new Among ( "amente", 13, 6, "", methodObject ),
+                    new Among ( "aci\u00F3n", -1, 2, "", methodObject ),
+                    new Among ( "uci\u00F3n", -1, 4, "", methodObject ),
+                    new Among ( "ico", -1, 1, "", methodObject ),
+                    new Among ( "ismo", -1, 1, "", methodObject ),
+                    new Among ( "oso", -1, 1, "", methodObject ),
+                    new Among ( "amiento", -1, 1, "", methodObject ),
+                    new Among ( "imiento", -1, 1, "", methodObject ),
+                    new Among ( "ivo", -1, 9, "", methodObject ),
+                    new Among ( "ador", -1, 2, "", methodObject ),
+                    new Among ( "icas", -1, 1, "", methodObject ),
+                    new Among ( "ancias", -1, 2, "", methodObject ),
+                    new Among ( "encias", -1, 5, "", methodObject ),
+                    new Among ( "adoras", -1, 2, "", methodObject ),
+                    new Among ( "osas", -1, 1, "", methodObject ),
+                    new Among ( "istas", -1, 1, "", methodObject ),
+                    new Among ( "ivas", -1, 9, "", methodObject ),
+                    new Among ( "anzas", -1, 1, "", methodObject ),
+                    new Among ( "log\u00EDas", -1, 3, "", methodObject ),
+                    new Among ( "idades", -1, 8, "", methodObject ),
+                    new Among ( "ables", -1, 1, "", methodObject ),
+                    new Among ( "ibles", -1, 1, "", methodObject ),
+                    new Among ( "aciones", -1, 2, "", methodObject ),
+                    new Among ( "uciones", -1, 4, "", methodObject ),
+                    new Among ( "adores", -1, 2, "", methodObject ),
+                    new Among ( "antes", -1, 2, "", methodObject ),
+                    new Among ( "icos", -1, 1, "", methodObject ),
+                    new Among ( "ismos", -1, 1, "", methodObject ),
+                    new Among ( "osos", -1, 1, "", methodObject ),
+                    new Among ( "amientos", -1, 1, "", methodObject ),
+                    new Among ( "imientos", -1, 1, "", methodObject ),
+                    new Among ( "ivos", -1, 9, "", methodObject )
+                };
+
+                private final static Among a_7[] = {
+                    new Among ( "ya", -1, 1, "", methodObject ),
+                    new Among ( "ye", -1, 1, "", methodObject ),
+                    new Among ( "yan", -1, 1, "", methodObject ),
+                    new Among ( "yen", -1, 1, "", methodObject ),
+                    new Among ( "yeron", -1, 1, "", methodObject ),
+                    new Among ( "yendo", -1, 1, "", methodObject ),
+                    new Among ( "yo", -1, 1, "", methodObject ),
+                    new Among ( "yas", -1, 1, "", methodObject ),
+                    new Among ( "yes", -1, 1, "", methodObject ),
+                    new Among ( "yais", -1, 1, "", methodObject ),
+                    new Among ( "yamos", -1, 1, "", methodObject ),
+                    new Among ( "y\u00F3", -1, 1, "", methodObject )
+                };
+
+                private final static Among a_8[] = {
+                    new Among ( "aba", -1, 2, "", methodObject ),
+                    new Among ( "ada", -1, 2, "", methodObject ),
+                    new Among ( "ida", -1, 2, "", methodObject ),
+                    new Among ( "ara", -1, 2, "", methodObject ),
+                    new Among ( "iera", -1, 2, "", methodObject ),
+                    new Among ( "\u00EDa", -1, 2, "", methodObject ),
+                    new Among ( "ar\u00EDa", 5, 2, "", methodObject ),
+                    new Among ( "er\u00EDa", 5, 2, "", methodObject ),
+                    new Among ( "ir\u00EDa", 5, 2, "", methodObject ),
+                    new Among ( "ad", -1, 2, "", methodObject ),
+                    new Among ( "ed", -1, 2, "", methodObject ),
+                    new Among ( "id", -1, 2, "", methodObject ),
+                    new Among ( "ase", -1, 2, "", methodObject ),
+                    new Among ( "iese", -1, 2, "", methodObject ),
+                    new Among ( "aste", -1, 2, "", methodObject ),
+                    new Among ( "iste", -1, 2, "", methodObject ),
+                    new Among ( "an", -1, 2, "", methodObject ),
+                    new Among ( "aban", 16, 2, "", methodObject ),
+                    new Among ( "aran", 16, 2, "", methodObject ),
+                    new Among ( "ieran", 16, 2, "", methodObject ),
+                    new Among ( "\u00EDan", 16, 2, "", methodObject ),
+                    new Among ( "ar\u00EDan", 20, 2, "", methodObject ),
+                    new Among ( "er\u00EDan", 20, 2, "", methodObject ),
+                    new Among ( "ir\u00EDan", 20, 2, "", methodObject ),
+                    new Among ( "en", -1, 1, "", methodObject ),
+                    new Among ( "asen", 24, 2, "", methodObject ),
+                    new Among ( "iesen", 24, 2, "", methodObject ),
+                    new Among ( "aron", -1, 2, "", methodObject ),
+                    new Among ( "ieron", -1, 2, "", methodObject ),
+                    new Among ( "ar\u00E1n", -1, 2, "", methodObject ),
+                    new Among ( "er\u00E1n", -1, 2, "", methodObject ),
+                    new Among ( "ir\u00E1n", -1, 2, "", methodObject ),
+                    new Among ( "ado", -1, 2, "", methodObject ),
+                    new Among ( "ido", -1, 2, "", methodObject ),
+                    new Among ( "ando", -1, 2, "", methodObject ),
+                    new Among ( "iendo", -1, 2, "", methodObject ),
+                    new Among ( "ar", -1, 2, "", methodObject ),
+                    new Among ( "er", -1, 2, "", methodObject ),
+                    new Among ( "ir", -1, 2, "", methodObject ),
+                    new Among ( "as", -1, 2, "", methodObject ),
+                    new Among ( "abas", 39, 2, "", methodObject ),
+                    new Among ( "adas", 39, 2, "", methodObject ),
+                    new Among ( "idas", 39, 2, "", methodObject ),
+                    new Among ( "aras", 39, 2, "", methodObject ),
+                    new Among ( "ieras", 39, 2, "", methodObject ),
+                    new Among ( "\u00EDas", 39, 2, "", methodObject ),
+                    new Among ( "ar\u00EDas", 45, 2, "", methodObject ),
+                    new Among ( "er\u00EDas", 45, 2, "", methodObject ),
+                    new Among ( "ir\u00EDas", 45, 2, "", methodObject ),
+                    new Among ( "es", -1, 1, "", methodObject ),
+                    new Among ( "ases", 49, 2, "", methodObject ),
+                    new Among ( "ieses", 49, 2, "", methodObject ),
+                    new Among ( "abais", -1, 2, "", methodObject ),
+                    new Among ( "arais", -1, 2, "", methodObject ),
+                    new Among ( "ierais", -1, 2, "", methodObject ),
+                    new Among ( "\u00EDais", -1, 2, "", methodObject ),
+                    new Among ( "ar\u00EDais", 55, 2, "", methodObject ),
+                    new Among ( "er\u00EDais", 55, 2, "", methodObject ),
+                    new Among ( "ir\u00EDais", 55, 2, "", methodObject ),
+                    new Among ( "aseis", -1, 2, "", methodObject ),
+                    new Among ( "ieseis", -1, 2, "", methodObject ),
+                    new Among ( "asteis", -1, 2, "", methodObject ),
+                    new Among ( "isteis", -1, 2, "", methodObject ),
+                    new Among ( "\u00E1is", -1, 2, "", methodObject ),
+                    new Among ( "\u00E9is", -1, 1, "", methodObject ),
+                    new Among ( "ar\u00E9is", 64, 2, "", methodObject ),
+                    new Among ( "er\u00E9is", 64, 2, "", methodObject ),
+                    new Among ( "ir\u00E9is", 64, 2, "", methodObject ),
+                    new Among ( "ados", -1, 2, "", methodObject ),
+                    new Among ( "idos", -1, 2, "", methodObject ),
+                    new Among ( "amos", -1, 2, "", methodObject ),
+                    new Among ( "\u00E1bamos", 70, 2, "", methodObject ),
+                    new Among ( "\u00E1ramos", 70, 2, "", methodObject ),
+                    new Among ( "i\u00E9ramos", 70, 2, "", methodObject ),
+                    new Among ( "\u00EDamos", 70, 2, "", methodObject ),
+                    new Among ( "ar\u00EDamos", 74, 2, "", methodObject ),
+                    new Among ( "er\u00EDamos", 74, 2, "", methodObject ),
+                    new Among ( "ir\u00EDamos", 74, 2, "", methodObject ),
+                    new Among ( "emos", -1, 1, "", methodObject ),
+                    new Among ( "aremos", 78, 2, "", methodObject ),
+                    new Among ( "eremos", 78, 2, "", methodObject ),
+                    new Among ( "iremos", 78, 2, "", methodObject ),
+                    new Among ( "\u00E1semos", 78, 2, "", methodObject ),
+                    new Among ( "i\u00E9semos", 78, 2, "", methodObject ),
+                    new Among ( "imos", -1, 2, "", methodObject ),
+                    new Among ( "ar\u00E1s", -1, 2, "", methodObject ),
+                    new Among ( "er\u00E1s", -1, 2, "", methodObject ),
+                    new Among ( "ir\u00E1s", -1, 2, "", methodObject ),
+                    new Among ( "\u00EDs", -1, 2, "", methodObject ),
+                    new Among ( "ar\u00E1", -1, 2, "", methodObject ),
+                    new Among ( "er\u00E1", -1, 2, "", methodObject ),
+                    new Among ( "ir\u00E1", -1, 2, "", methodObject ),
+                    new Among ( "ar\u00E9", -1, 2, "", methodObject ),
+                    new Among ( "er\u00E9", -1, 2, "", methodObject ),
+                    new Among ( "ir\u00E9", -1, 2, "", methodObject ),
+                    new Among ( "i\u00F3", -1, 2, "", methodObject )
+                };
+
+                private final static Among a_9[] = {
+                    new Among ( "a", -1, 1, "", methodObject ),
+                    new Among ( "e", -1, 2, "", methodObject ),
+                    new Among ( "o", -1, 1, "", methodObject ),
+                    new Among ( "os", -1, 1, "", methodObject ),
+                    new Among ( "\u00E1", -1, 1, "", methodObject ),
+                    new Among ( "\u00E9", -1, 2, "", methodObject ),
+                    new Among ( "\u00ED", -1, 1, "", methodObject ),
+                    new Among ( "\u00F3", -1, 1, "", methodObject )
+                };
+
+                private static final char g_v[] = {17, 65, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 17, 4, 10 };
+
+        private int I_p2;
+        private int I_p1;
+        private int I_pV;
+
+                private void copy_from(spanishStemmer other) {
+                    I_p2 = other.I_p2;
+                    I_p1 = other.I_p1;
+                    I_pV = other.I_pV;
+                    super.copy_from(other);
+                }
+
+                private boolean r_mark_regions() {
+            int v_1;
+            int v_2;
+            int v_3;
+            int v_6;
+            int v_8;
+                    // (, line 31
+                    I_pV = limit;
+                    I_p1 = limit;
+                    I_p2 = limit;
+                    // do, line 37
+                    v_1 = cursor;
+                    lab0: do {
+                        // (, line 37
+                        // or, line 39
+                        lab1: do {
+                            v_2 = cursor;
+                            lab2: do {
+                                // (, line 38
+                                if (!(in_grouping(g_v, 97, 252)))
+                                {
+                                    break lab2;
+                                }
+                                // or, line 38
+                                lab3: do {
+                                    v_3 = cursor;
+                                    lab4: do {
+                                        // (, line 38
+                                        if (!(out_grouping(g_v, 97, 252)))
+                                        {
+                                            break lab4;
+                                        }
+                                        // gopast, line 38
+                                        golab5: while(true)
+                                        {
+                                            lab6: do {
+                                                if (!(in_grouping(g_v, 97, 252)))
+                                                {
+                                                    break lab6;
+                                                }
+                                                break golab5;
+                                            } while (false);
+                                            if (cursor >= limit)
+                                            {
+                                                break lab4;
+                                            }
+                                            cursor++;
+                                        }
+                                        break lab3;
+                                    } while (false);
+                                    cursor = v_3;
+                                    // (, line 38
+                                    if (!(in_grouping(g_v, 97, 252)))
+                                    {
+                                        break lab2;
+                                    }
+                                    // gopast, line 38
+                                    golab7: while(true)
+                                    {
+                                        lab8: do {
+                                            if (!(out_grouping(g_v, 97, 252)))
+                                            {
+                                                break lab8;
+                                            }
+                                            break golab7;
+                                        } while (false);
+                                        if (cursor >= limit)
+                                        {
+                                            break lab2;
+                                        }
+                                        cursor++;
+                                    }
+                                } while (false);
+                                break lab1;
+                            } while (false);
+                            cursor = v_2;
+                            // (, line 40
+                            if (!(out_grouping(g_v, 97, 252)))
+                            {
+                                break lab0;
+                            }
+                            // or, line 40
+                            lab9: do {
+                                v_6 = cursor;
+                                lab10: do {
+                                    // (, line 40
+                                    if (!(out_grouping(g_v, 97, 252)))
+                                    {
+                                        break lab10;
+                                    }
+                                    // gopast, line 40
+                                    golab11: while(true)
+                                    {
+                                        lab12: do {
+                                            if (!(in_grouping(g_v, 97, 252)))
+                                            {
+                                                break lab12;
+                                            }
+                                            break golab11;
+                                        } while (false);
+                                        if (cursor >= limit)
+                                        {
+                                            break lab10;
+                                        }
+                                        cursor++;
+                                    }
+                                    break lab9;
+                                } while (false);
+                                cursor = v_6;
+                                // (, line 40
+                                if (!(in_grouping(g_v, 97, 252)))
+                                {
+                                    break lab0;
+                                }
+                                // next, line 40
+                                if (cursor >= limit)
+                                {
+                                    break lab0;
+                                }
+                                cursor++;
+                            } while (false);
+                        } while (false);
+                        // setmark pV, line 41
+                        I_pV = cursor;
+                    } while (false);
+                    cursor = v_1;
+                    // do, line 43
+                    v_8 = cursor;
+                    lab13: do {
+                        // (, line 43
+                        // gopast, line 44
+                        golab14: while(true)
+                        {
+                            lab15: do {
+                                if (!(in_grouping(g_v, 97, 252)))
+                                {
+                                    break lab15;
+                                }
+                                break golab14;
+                            } while (false);
+                            if (cursor >= limit)
+                            {
+                                break lab13;
+                            }
+                            cursor++;
+                        }
+                        // gopast, line 44
+                        golab16: while(true)
+                        {
+                            lab17: do {
+                                if (!(out_grouping(g_v, 97, 252)))
+                                {
+                                    break lab17;
+                                }
+                                break golab16;
+                            } while (false);
+                            if (cursor >= limit)
+                            {
+                                break lab13;
+                            }
+                            cursor++;
+                        }
+                        // setmark p1, line 44
+                        I_p1 = cursor;
+                        // gopast, line 45
+                        golab18: while(true)
+                        {
+                            lab19: do {
+                                if (!(in_grouping(g_v, 97, 252)))
+                                {
+                                    break lab19;
+                                }
+                                break golab18;
+                            } while (false);
+                            if (cursor >= limit)
+                            {
+                                break lab13;
+                            }
+                            cursor++;
+                        }
+                        // gopast, line 45
+                        golab20: while(true)
+                        {
+                            lab21: do {
+                                if (!(out_grouping(g_v, 97, 252)))
+                                {
+                                    break lab21;
+                                }
+                                break golab20;
+                            } while (false);
+                            if (cursor >= limit)
+                            {
+                                break lab13;
+                            }
+                            cursor++;
+                        }
+                        // setmark p2, line 45
+                        I_p2 = cursor;
+                    } while (false);
+                    cursor = v_8;
+                    return true;
+                }
+
+                private boolean r_postlude() {
+            int among_var;
+            int v_1;
+                    // repeat, line 49
+                    replab0: while(true)
+                    {
+                        v_1 = cursor;
+                        lab1: do {
+                            // (, line 49
+                            // [, line 50
+                            bra = cursor;
+                            // substring, line 50
+                            among_var = find_among(a_0, 6);
+                            if (among_var == 0)
+                            {
+                                break lab1;
+                            }
+                            // ], line 50
+                            ket = cursor;
+                            switch(among_var) {
+                                case 0:
+                                    break lab1;
+                                case 1:
+                                    // (, line 51
+                                    // <-, line 51
+                                    slice_from("a");
+                                    break;
+                                case 2:
+                                    // (, line 52
+                                    // <-, line 52
+                                    slice_from("e");
+                                    break;
+                                case 3:
+                                    // (, line 53
+                                    // <-, line 53
+                                    slice_from("i");
+                                    break;
+                                case 4:
+                                    // (, line 54
+                                    // <-, line 54
+                                    slice_from("o");
+                                    break;
+                                case 5:
+                                    // (, line 55
+                                    // <-, line 55
+                                    slice_from("u");
+                                    break;
+                                case 6:
+                                    // (, line 57
+                                    // next, line 57
+                                    if (cursor >= limit)
+                                    {
+                                        break lab1;
+                                    }
+                                    cursor++;
+                                    break;
+                            }
+                            continue replab0;
+                        } while (false);
+                        cursor = v_1;
+                        break replab0;
+                    }
+                    return true;
+                }
+
+                private boolean r_RV() {
+                    if (!(I_pV <= cursor))
+                    {
+                        return false;
+                    }
+                    return true;
+                }
+
+                private boolean r_R1() {
+                    if (!(I_p1 <= cursor))
+                    {
+                        return false;
+                    }
+                    return true;
+                }
+
+                private boolean r_R2() {
+                    if (!(I_p2 <= cursor))
+                    {
+                        return false;
+                    }
+                    return true;
+                }
+
+                private boolean r_attached_pronoun() {
+            int among_var;
+                    // (, line 67
+                    // [, line 68
+                    ket = cursor;
+                    // substring, line 68
+                    if (find_among_b(a_1, 13) == 0)
+                    {
+                        return false;
+                    }
+                    // ], line 68
+                    bra = cursor;
+                    // substring, line 72
+                    among_var = find_among_b(a_2, 11);
+                    if (among_var == 0)
+                    {
+                        return false;
+                    }
+                    // call RV, line 72
+                    if (!r_RV())
+                    {
+                        return false;
+                    }
+                    switch(among_var) {
+                        case 0:
+                            return false;
+                        case 1:
+                            // (, line 73
+                            // ], line 73
+                            bra = cursor;
+                            // <-, line 73
+                            slice_from("iendo");
+                            break;
+                        case 2:
+                            // (, line 74
+                            // ], line 74
+                            bra = cursor;
+                            // <-, line 74
+                            slice_from("ando");
+                            break;
+                        case 3:
+                            // (, line 75
+                            // ], line 75
+                            bra = cursor;
+                            // <-, line 75
+                            slice_from("ar");
+                            break;
+                        case 4:
+                            // (, line 76
+                            // ], line 76
+                            bra = cursor;
+                            // <-, line 76
+                            slice_from("er");
+                            break;
+                        case 5:
+                            // (, line 77
+                            // ], line 77
+                            bra = cursor;
+                            // <-, line 77
+                            slice_from("ir");
+                            break;
+                        case 6:
+                            // (, line 81
+                            // delete, line 81
+                            slice_del();
+                            break;
+                        case 7:
+                            // (, line 82
+                            // literal, line 82
+                            if (!(eq_s_b(1, "u")))
+                            {
+                                return false;
+                            }
+                            // delete, line 82
+                            slice_del();
+                            break;
+                    }
+                    return true;
+                }
+
+                private boolean r_standard_suffix() {
+            int among_var;
+            int v_1;
+            int v_2;
+            int v_3;
+            int v_4;
+            int v_5;
+                    // (, line 86
+                    // [, line 87
+                    ket = cursor;
+                    // substring, line 87
+                    among_var = find_among_b(a_6, 46);
+                    if (among_var == 0)
+                    {
+                        return false;
+                    }
+                    // ], line 87
+                    bra = cursor;
+                    switch(among_var) {
+                        case 0:
+                            return false;
+                        case 1:
+                            // (, line 98
+                            // call R2, line 99
+                            if (!r_R2())
+                            {
+                                return false;
+                            }
+                            // delete, line 99
+                            slice_del();
+                            break;
+                        case 2:
+                            // (, line 104
+                            // call R2, line 105
+                            if (!r_R2())
+                            {
+                                return false;
+                            }
+                            // delete, line 105
+                            slice_del();
+                            // try, line 106
+                            v_1 = limit - cursor;
+                            lab0: do {
+                                // (, line 106
+                                // [, line 106
+                                ket = cursor;
+                                // literal, line 106
+                                if (!(eq_s_b(2, "ic")))
+                                {
+                                    cursor = limit - v_1;
+                                    break lab0;
+                                }
+                                // ], line 106
+                                bra = cursor;
+                                // call R2, line 106
+                                if (!r_R2())
+                                {
+                                    cursor = limit - v_1;
+                                    break lab0;
+                                }
+                                // delete, line 106
+                                slice_del();
+                            } while (false);
+                            break;
+                        case 3:
+                            // (, line 110
+                            // call R2, line 111
+                            if (!r_R2())
+                            {
+                                return false;
+                            }
+                            // <-, line 111
+                            slice_from("log");
+                            break;
+                        case 4:
+                            // (, line 114
+                            // call R2, line 115
+                            if (!r_R2())
+                            {
+                                return false;
+                            }
+                            // <-, line 115
+                            slice_from("u");
+                            break;
+                        case 5:
+                            // (, line 118
+                            // call R2, line 119
+                            if (!r_R2())
+                            {
+                                return false;
+                            }
+                            // <-, line 119
+                            slice_from("ente");
+                            break;
+                        case 6:
+                            // (, line 122
+                            // call R1, line 123
+                            if (!r_R1())
+                            {
+                                return false;
+                            }
+                            // delete, line 123
+                            slice_del();
+                            // try, line 124
+                            v_2 = limit - cursor;
+                            lab1: do {
+                                // (, line 124
+                                // [, line 125
+                                ket = cursor;
+                                // substring, line 125
+                                among_var = find_among_b(a_3, 4);
+                                if (among_var == 0)
+                                {
+                                    cursor = limit - v_2;
+                                    break lab1;
+                                }
+                                // ], line 125
+                                bra = cursor;
+                                // call R2, line 125
+                                if (!r_R2())
+                                {
+                                    cursor = limit - v_2;
+                                    break lab1;
+                                }
+                                // delete, line 125
+                                slice_del();
+                                switch(among_var) {
+                                    case 0:
+                                        cursor = limit - v_2;
+                                        break lab1;
+                                    case 1:
+                                        // (, line 126
+                                        // [, line 126
+                                        ket = cursor;
+                                        // literal, line 126
+                                        if (!(eq_s_b(2, "at")))
+                                        {
+                                            cursor = limit - v_2;
+                                            break lab1;
+                                        }
+                                        // ], line 126
+                                        bra = cursor;
+                                        // call R2, line 126
+                                        if (!r_R2())
+                                        {
+                                            cursor = limit - v_2;
+                                            break lab1;
+                                        }
+                                        // delete, line 126
+                                        slice_del();
+                                        break;
+                                }
+                            } while (false);
+                            break;
+                        case 7:
+                            // (, line 134
+                            // call R2, line 135
+                            if (!r_R2())
+                            {
+                                return false;
+                            }
+                            // delete, line 135
+                            slice_del();
+                            // try, line 136
+                            v_3 = limit - cursor;
+                            lab2: do {
+                                // (, line 136
+                                // [, line 137
+                                ket = cursor;
+                                // substring, line 137
+                                among_var = find_among_b(a_4, 3);
+                                if (among_var == 0)
+                                {
+                                    cursor = limit - v_3;
+                                    break lab2;
+                                }
+                                // ], line 137
+                                bra = cursor;
+                                switch(among_var) {
+                                    case 0:
+                                        cursor = limit - v_3;
+                                        break lab2;
+                                    case 1:
+                                        // (, line 140
+                                        // call R2, line 140
+                                        if (!r_R2())
+                                        {
+                                            cursor = limit - v_3;
+                                            break lab2;
+                                        }
+                                        // delete, line 140
+                                        slice_del();
+                                        break;
+                                }
+                            } while (false);
+                            break;
+                        case 8:
+                            // (, line 146
+                            // call R2, line 147
+                            if (!r_R2())
+                            {
+                                return false;
+                            }
+                            // delete, line 147
+                            slice_del();
+                            // try, line 148
+                            v_4 = limit - cursor;
+                            lab3: do {
+                                // (, line 148
+                                // [, line 149
+                                ket = cursor;
+                                // substring, line 149
+                                among_var = find_among_b(a_5, 3);
+                                if (among_var == 0)
+                                {
+                                    cursor = limit - v_4;
+                                    break lab3;
+                                }
+                                // ], line 149
+                                bra = cursor;
+                                switch(among_var) {
+                                    case 0:
+                                        cursor = limit - v_4;
+                                        break lab3;
+                                    case 1:
+                                        // (, line 152
+                                        // call R2, line 152
+                                        if (!r_R2())
+                                        {
+                                            cursor = limit - v_4;
+                                            break lab3;
+                                        }
+                                        // delete, line 152
+                                        slice_del();
+                                        break;
+                                }
+                            } while (false);
+                            break;
+                        case 9:
+                            // (, line 158
+                            // call R2, line 159
+                            if (!r_R2())
+                            {
+                                return false;
+                            }
+                            // delete, line 159
+                            slice_del();
+                            // try, line 160
+                            v_5 = limit - cursor;
+                            lab4: do {
+                                // (, line 160
+                                // [, line 161
+                                ket = cursor;
+                                // literal, line 161
+                                if (!(eq_s_b(2, "at")))
+                                {
+                                    cursor = limit - v_5;
+                                    break lab4;
+                                }
+                                // ], line 161
+                                bra = cursor;
+                                // call R2, line 161
+                                if (!r_R2())
+                                {
+                                    cursor = limit - v_5;
+                                    break lab4;
+                                }
+                                // delete, line 161
+                                slice_del();
+                            } while (false);
+                            break;
+                    }
+                    return true;
+                }
+
+                private boolean r_y_verb_suffix() {
+            int among_var;
+            int v_1;
+            int v_2;
+                    // (, line 167
+                    // setlimit, line 168
+                    v_1 = limit - cursor;
+                    // tomark, line 168
+                    if (cursor < I_pV)
+                    {
+                        return false;
+                    }
+                    cursor = I_pV;
+                    v_2 = limit_backward;
+                    limit_backward = cursor;
+                    cursor = limit - v_1;
+                    // (, line 168
+                    // [, line 168
+                    ket = cursor;
+                    // substring, line 168
+                    among_var = find_among_b(a_7, 12);
+                    if (among_var == 0)
+                    {
+                        limit_backward = v_2;
+                        return false;
+                    }
+                    // ], line 168
+                    bra = cursor;
+                    limit_backward = v_2;
+                    switch(among_var) {
+                        case 0:
+                            return false;
+                        case 1:
+                            // (, line 171
+                            // literal, line 171
+                            if (!(eq_s_b(1, "u")))
+                            {
+                                return false;
+                            }
+                            // delete, line 171
+                            slice_del();
+                            break;
+                    }
+                    return true;
+                }
+
+                private boolean r_verb_suffix() {
+            int among_var;
+            int v_1;
+            int v_2;
+            int v_3;
+            int v_4;
+                    // (, line 175
+                    // setlimit, line 176
+                    v_1 = limit - cursor;
+                    // tomark, line 176
+                    if (cursor < I_pV)
+                    {
+                        return false;
+                    }
+                    cursor = I_pV;
+                    v_2 = limit_backward;
+                    limit_backward = cursor;
+                    cursor = limit - v_1;
+                    // (, line 176
+                    // [, line 176
+                    ket = cursor;
+                    // substring, line 176
+                    among_var = find_among_b(a_8, 96);
+                    if (among_var == 0)
+                    {
+                        limit_backward = v_2;
+                        return false;
+                    }
+                    // ], line 176
+                    bra = cursor;
+                    limit_backward = v_2;
+                    switch(among_var) {
+                        case 0:
+                            return false;
+                        case 1:
+                            // (, line 179
+                            // try, line 179
+                            v_3 = limit - cursor;
+                            lab0: do {
+                                // (, line 179
+                                // literal, line 179
+                                if (!(eq_s_b(1, "u")))
+                                {
+                                    cursor = limit - v_3;
+                                    break lab0;
+                                }
+                                // test, line 179
+                                v_4 = limit - cursor;
+                                // literal, line 179
+                                if (!(eq_s_b(1, "g")))
+                                {
+                                    cursor = limit - v_3;
+                                    break lab0;
+                                }
+                                cursor = limit - v_4;
+                            } while (false);
+                            // ], line 179
+                            bra = cursor;
+                            // delete, line 179
+                            slice_del();
+                            break;
+                        case 2:
+                            // (, line 200
+                            // delete, line 200
+                            slice_del();
+                            break;
+                    }
+                    return true;
+                }
+
+                private boolean r_residual_suffix() {
+            int among_var;
+            int v_1;
+            int v_2;
+                    // (, line 204
+                    // [, line 205
+                    ket = cursor;
+                    // substring, line 205
+                    among_var = find_among_b(a_9, 8);
+                    if (among_var == 0)
+                    {
+                        return false;
+                    }
+                    // ], line 205
+                    bra = cursor;
+                    switch(among_var) {
+                        case 0:
+                            return false;
+                        case 1:
+                            // (, line 208
+                            // call RV, line 208
+                            if (!r_RV())
+                            {
+                                return false;
+                            }
+                            // delete, line 208
+                            slice_del();
+                            break;
+                        case 2:
+                            // (, line 210
+                            // call RV, line 210
+                            if (!r_RV())
+                            {
+                                return false;
+                            }
+                            // delete, line 210
+                            slice_del();
+                            // try, line 210
+                            v_1 = limit - cursor;
+                            lab0: do {
+                                // (, line 210
+                                // [, line 210
+                                ket = cursor;
+                                // literal, line 210
+                                if (!(eq_s_b(1, "u")))
+                                {
+                                    cursor = limit - v_1;
+                                    break lab0;
+                                }
+                                // ], line 210
+                                bra = cursor;
+                                // test, line 210
+                                v_2 = limit - cursor;
+                                // literal, line 210
+                                if (!(eq_s_b(1, "g")))
+                                {
+                                    cursor = limit - v_1;
+                                    break lab0;
+                                }
+                                cursor = limit - v_2;
+                                // call RV, line 210
+                                if (!r_RV())
+                                {
+                                    cursor = limit - v_1;
+                                    break lab0;
+                                }
+                                // delete, line 210
+                                slice_del();
+                            } while (false);
+                            break;
+                    }
+                    return true;
+                }
+
+                public boolean stem() {
+            int v_1;
+            int v_2;
+            int v_3;
+            int v_4;
+            int v_5;
+            int v_6;
+                    // (, line 215
+                    // do, line 216
+                    v_1 = cursor;
+                    lab0: do {
+                        // call mark_regions, line 216
+                        if (!r_mark_regions())
+                        {
+                            break lab0;
+                        }
+                    } while (false);
+                    cursor = v_1;
+                    // backwards, line 217
+                    limit_backward = cursor; cursor = limit;
+                    // (, line 217
+                    // do, line 218
+                    v_2 = limit - cursor;
+                    lab1: do {
+                        // call attached_pronoun, line 218
+                        if (!r_attached_pronoun())
+                        {
+                            break lab1;
+                        }
+                    } while (false);
+                    cursor = limit - v_2;
+                    // do, line 219
+                    v_3 = limit - cursor;
+                    lab2: do {
+                        // (, line 219
+                        // or, line 219
+                        lab3: do {
+                            v_4 = limit - cursor;
+                            lab4: do {
+                                // call standard_suffix, line 219
+                                if (!r_standard_suffix())
+                                {
+                                    break lab4;
+                                }
+                                break lab3;
+                            } while (false);
+                            cursor = limit - v_4;
+                            lab5: do {
+                                // call y_verb_suffix, line 220
+                                if (!r_y_verb_suffix())
+                                {
+                                    break lab5;
+                                }
+                                break lab3;
+                            } while (false);
+                            cursor = limit - v_4;
+                            // call verb_suffix, line 221
+                            if (!r_verb_suffix())
+                            {
+                                break lab2;
+                            }
+                        } while (false);
+                    } while (false);
+                    cursor = limit - v_3;
+                    // do, line 223
+                    v_5 = limit - cursor;
+                    lab6: do {
+                        // call residual_suffix, line 223
+                        if (!r_residual_suffix())
+                        {
+                            break lab6;
+                        }
+                    } while (false);
+                    cursor = limit - v_5;
+                    cursor = limit_backward;                    // do, line 225
+                    v_6 = cursor;
+                    lab7: do {
+                        // call postlude, line 225
+                        if (!r_postlude())
+                        {
+                            break lab7;
+                        }
+                    } while (false);
+                    cursor = v_6;
+                    return true;
+                }
+
+        public boolean equals( Object o ) {
+            return o instanceof spanishStemmer;
+        }
+
+        public int hashCode() {
+            return spanishStemmer.class.getName().hashCode();
+        }
+
+
+
+}
+

Added: opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/stemmer/snowball/swedishStemmer.java
URL: http://svn.apache.org/viewvc/opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/stemmer/snowball/swedishStemmer.java?rev=1543793&view=auto
==============================================================================
--- opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/stemmer/snowball/swedishStemmer.java (added)
+++ opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/stemmer/snowball/swedishStemmer.java Wed Nov 20 11:47:08 2013
@@ -0,0 +1,395 @@
+/*
+
+Copyright (c) 2001, Dr Martin Porter
+Copyright (c) 2002, Richard Boulton
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+    * this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+    * notice, this list of conditions and the following disclaimer in the
+    * documentation and/or other materials provided with the distribution.
+    * Neither the name of the copyright holders nor the names of its contributors
+    * may be used to endorse or promote products derived from this software
+    * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ */
+
+// This file was generated automatically by the Snowball to Java compiler
+
+package opennlp.tools.stemmer.snowball;
+
+
+ /**
+  * This class was automatically generated by a Snowball to Java compiler 
+  * It implements the stemming algorithm defined by a snowball script.
+  */
+
+class swedishStemmer extends opennlp.tools.stemmer.snowball.AbstractSnowballStemmer {
+
+private static final long serialVersionUID = 1L;
+
+        private final static swedishStemmer methodObject = new swedishStemmer ();
+
+                private final static Among a_0[] = {
+                    new Among ( "a", -1, 1, "", methodObject ),
+                    new Among ( "arna", 0, 1, "", methodObject ),
+                    new Among ( "erna", 0, 1, "", methodObject ),
+                    new Among ( "heterna", 2, 1, "", methodObject ),
+                    new Among ( "orna", 0, 1, "", methodObject ),
+                    new Among ( "ad", -1, 1, "", methodObject ),
+                    new Among ( "e", -1, 1, "", methodObject ),
+                    new Among ( "ade", 6, 1, "", methodObject ),
+                    new Among ( "ande", 6, 1, "", methodObject ),
+                    new Among ( "arne", 6, 1, "", methodObject ),
+                    new Among ( "are", 6, 1, "", methodObject ),
+                    new Among ( "aste", 6, 1, "", methodObject ),
+                    new Among ( "en", -1, 1, "", methodObject ),
+                    new Among ( "anden", 12, 1, "", methodObject ),
+                    new Among ( "aren", 12, 1, "", methodObject ),
+                    new Among ( "heten", 12, 1, "", methodObject ),
+                    new Among ( "ern", -1, 1, "", methodObject ),
+                    new Among ( "ar", -1, 1, "", methodObject ),
+                    new Among ( "er", -1, 1, "", methodObject ),
+                    new Among ( "heter", 18, 1, "", methodObject ),
+                    new Among ( "or", -1, 1, "", methodObject ),
+                    new Among ( "s", -1, 2, "", methodObject ),
+                    new Among ( "as", 21, 1, "", methodObject ),
+                    new Among ( "arnas", 22, 1, "", methodObject ),
+                    new Among ( "ernas", 22, 1, "", methodObject ),
+                    new Among ( "ornas", 22, 1, "", methodObject ),
+                    new Among ( "es", 21, 1, "", methodObject ),
+                    new Among ( "ades", 26, 1, "", methodObject ),
+                    new Among ( "andes", 26, 1, "", methodObject ),
+                    new Among ( "ens", 21, 1, "", methodObject ),
+                    new Among ( "arens", 29, 1, "", methodObject ),
+                    new Among ( "hetens", 29, 1, "", methodObject ),
+                    new Among ( "erns", 21, 1, "", methodObject ),
+                    new Among ( "at", -1, 1, "", methodObject ),
+                    new Among ( "andet", -1, 1, "", methodObject ),
+                    new Among ( "het", -1, 1, "", methodObject ),
+                    new Among ( "ast", -1, 1, "", methodObject )
+                };
+
+                private final static Among a_1[] = {
+                    new Among ( "dd", -1, -1, "", methodObject ),
+                    new Among ( "gd", -1, -1, "", methodObject ),
+                    new Among ( "nn", -1, -1, "", methodObject ),
+                    new Among ( "dt", -1, -1, "", methodObject ),
+                    new Among ( "gt", -1, -1, "", methodObject ),
+                    new Among ( "kt", -1, -1, "", methodObject ),
+                    new Among ( "tt", -1, -1, "", methodObject )
+                };
+
+                private final static Among a_2[] = {
+                    new Among ( "ig", -1, 1, "", methodObject ),
+                    new Among ( "lig", 0, 1, "", methodObject ),
+                    new Among ( "els", -1, 1, "", methodObject ),
+                    new Among ( "fullt", -1, 3, "", methodObject ),
+                    new Among ( "l\u00F6st", -1, 2, "", methodObject )
+                };
+
+                private static final char g_v[] = {17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 32 };
+
+                private static final char g_s_ending[] = {119, 127, 149 };
+
+        private int I_x;
+        private int I_p1;
+
+                private void copy_from(swedishStemmer other) {
+                    I_x = other.I_x;
+                    I_p1 = other.I_p1;
+                    super.copy_from(other);
+                }
+
+                private boolean r_mark_regions() {
+            int v_1;
+            int v_2;
+                    // (, line 26
+                    I_p1 = limit;
+                    // test, line 29
+                    v_1 = cursor;
+                    // (, line 29
+                    // hop, line 29
+                    {
+                        int c = cursor + 3;
+                        if (0 > c || c > limit)
+                        {
+                            return false;
+                        }
+                        cursor = c;
+                    }
+                    // setmark x, line 29
+                    I_x = cursor;
+                    cursor = v_1;
+                    // goto, line 30
+                    golab0: while(true)
+                    {
+                        v_2 = cursor;
+                        lab1: do {
+                            if (!(in_grouping(g_v, 97, 246)))
+                            {
+                                break lab1;
+                            }
+                            cursor = v_2;
+                            break golab0;
+                        } while (false);
+                        cursor = v_2;
+                        if (cursor >= limit)
+                        {
+                            return false;
+                        }
+                        cursor++;
+                    }
+                    // gopast, line 30
+                    golab2: while(true)
+                    {
+                        lab3: do {
+                            if (!(out_grouping(g_v, 97, 246)))
+                            {
+                                break lab3;
+                            }
+                            break golab2;
+                        } while (false);
+                        if (cursor >= limit)
+                        {
+                            return false;
+                        }
+                        cursor++;
+                    }
+                    // setmark p1, line 30
+                    I_p1 = cursor;
+                    // try, line 31
+                    lab4: do {
+                        // (, line 31
+                        if (!(I_p1 < I_x))
+                        {
+                            break lab4;
+                        }
+                        I_p1 = I_x;
+                    } while (false);
+                    return true;
+                }
+
+                private boolean r_main_suffix() {
+            int among_var;
+            int v_1;
+            int v_2;
+                    // (, line 36
+                    // setlimit, line 37
+                    v_1 = limit - cursor;
+                    // tomark, line 37
+                    if (cursor < I_p1)
+                    {
+                        return false;
+                    }
+                    cursor = I_p1;
+                    v_2 = limit_backward;
+                    limit_backward = cursor;
+                    cursor = limit - v_1;
+                    // (, line 37
+                    // [, line 37
+                    ket = cursor;
+                    // substring, line 37
+                    among_var = find_among_b(a_0, 37);
+                    if (among_var == 0)
+                    {
+                        limit_backward = v_2;
+                        return false;
+                    }
+                    // ], line 37
+                    bra = cursor;
+                    limit_backward = v_2;
+                    switch(among_var) {
+                        case 0:
+                            return false;
+                        case 1:
+                            // (, line 44
+                            // delete, line 44
+                            slice_del();
+                            break;
+                        case 2:
+                            // (, line 46
+                            if (!(in_grouping_b(g_s_ending, 98, 121)))
+                            {
+                                return false;
+                            }
+                            // delete, line 46
+                            slice_del();
+                            break;
+                    }
+                    return true;
+                }
+
+                private boolean r_consonant_pair() {
+            int v_1;
+            int v_2;
+            int v_3;
+                    // setlimit, line 50
+                    v_1 = limit - cursor;
+                    // tomark, line 50
+                    if (cursor < I_p1)
+                    {
+                        return false;
+                    }
+                    cursor = I_p1;
+                    v_2 = limit_backward;
+                    limit_backward = cursor;
+                    cursor = limit - v_1;
+                    // (, line 50
+                    // and, line 52
+                    v_3 = limit - cursor;
+                    // among, line 51
+                    if (find_among_b(a_1, 7) == 0)
+                    {
+                        limit_backward = v_2;
+                        return false;
+                    }
+                    cursor = limit - v_3;
+                    // (, line 52
+                    // [, line 52
+                    ket = cursor;
+                    // next, line 52
+                    if (cursor <= limit_backward)
+                    {
+                        limit_backward = v_2;
+                        return false;
+                    }
+                    cursor--;
+                    // ], line 52
+                    bra = cursor;
+                    // delete, line 52
+                    slice_del();
+                    limit_backward = v_2;
+                    return true;
+                }
+
+                private boolean r_other_suffix() {
+            int among_var;
+            int v_1;
+            int v_2;
+                    // setlimit, line 55
+                    v_1 = limit - cursor;
+                    // tomark, line 55
+                    if (cursor < I_p1)
+                    {
+                        return false;
+                    }
+                    cursor = I_p1;
+                    v_2 = limit_backward;
+                    limit_backward = cursor;
+                    cursor = limit - v_1;
+                    // (, line 55
+                    // [, line 56
+                    ket = cursor;
+                    // substring, line 56
+                    among_var = find_among_b(a_2, 5);
+                    if (among_var == 0)
+                    {
+                        limit_backward = v_2;
+                        return false;
+                    }
+                    // ], line 56
+                    bra = cursor;
+                    switch(among_var) {
+                        case 0:
+                            limit_backward = v_2;
+                            return false;
+                        case 1:
+                            // (, line 57
+                            // delete, line 57
+                            slice_del();
+                            break;
+                        case 2:
+                            // (, line 58
+                            // <-, line 58
+                            slice_from("l\u00F6s");
+                            break;
+                        case 3:
+                            // (, line 59
+                            // <-, line 59
+                            slice_from("full");
+                            break;
+                    }
+                    limit_backward = v_2;
+                    return true;
+                }
+
+                public boolean stem() {
+            int v_1;
+            int v_2;
+            int v_3;
+            int v_4;
+                    // (, line 64
+                    // do, line 66
+                    v_1 = cursor;
+                    lab0: do {
+                        // call mark_regions, line 66
+                        if (!r_mark_regions())
+                        {
+                            break lab0;
+                        }
+                    } while (false);
+                    cursor = v_1;
+                    // backwards, line 67
+                    limit_backward = cursor; cursor = limit;
+                    // (, line 67
+                    // do, line 68
+                    v_2 = limit - cursor;
+                    lab1: do {
+                        // call main_suffix, line 68
+                        if (!r_main_suffix())
+                        {
+                            break lab1;
+                        }
+                    } while (false);
+                    cursor = limit - v_2;
+                    // do, line 69
+                    v_3 = limit - cursor;
+                    lab2: do {
+                        // call consonant_pair, line 69
+                        if (!r_consonant_pair())
+                        {
+                            break lab2;
+                        }
+                    } while (false);
+                    cursor = limit - v_3;
+                    // do, line 70
+                    v_4 = limit - cursor;
+                    lab3: do {
+                        // call other_suffix, line 70
+                        if (!r_other_suffix())
+                        {
+                            break lab3;
+                        }
+                    } while (false);
+                    cursor = limit - v_4;
+                    cursor = limit_backward;                    return true;
+                }
+
+        public boolean equals( Object o ) {
+            return o instanceof swedishStemmer;
+        }
+
+        public int hashCode() {
+            return swedishStemmer.class.getName().hashCode();
+        }
+
+
+
+}
+