⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 portuguesestemmer.java

📁 一个很不错的词频统计程序,目前只支持英文,中文的本人正在修改中.改好后上传给大家分享
💻 JAVA
📖 第 1 页 / 共 3 页
字号:
// This file was generated automatically by the Snowball to Java compiler

package org.tartarus.snowball.ext;
import org.tartarus.snowball.SnowballProgram;
import org.tartarus.snowball.Among;

/**
 * Generated class implementing code defined by a snowball script.
 */
public class portugueseStemmer extends SnowballProgram {

        private Among a_0[] = {
            new Among ( "", -1, 3, "", this),
            new Among ( "\u00E3", 0, 1, "", this),
            new Among ( "\u00F5", 0, 2, "", this)
        };

        private Among a_1[] = {
            new Among ( "", -1, 3, "", this),
            new Among ( "a~", 0, 1, "", this),
            new Among ( "o~", 0, 2, "", this)
        };

        private Among a_2[] = {
            new Among ( "ic", -1, -1, "", this),
            new Among ( "ad", -1, -1, "", this),
            new Among ( "os", -1, -1, "", this),
            new Among ( "iv", -1, 1, "", this)
        };

        private Among a_3[] = {
            new Among ( "ante", -1, 1, "", this),
            new Among ( "avel", -1, 1, "", this),
            new Among ( "\u00EDvel", -1, 1, "", this)
        };

        private Among a_4[] = {
            new Among ( "ic", -1, 1, "", this),
            new Among ( "abil", -1, 1, "", this),
            new Among ( "iv", -1, 1, "", this)
        };

        private Among a_5[] = {
            new Among ( "ica", -1, 1, "", this),
            new Among ( "\u00E2ncia", -1, 1, "", this),
            new Among ( "\u00EAncia", -1, 4, "", this),
            new Among ( "ira", -1, 9, "", this),
            new Among ( "adora", -1, 1, "", this),
            new Among ( "osa", -1, 1, "", this),
            new Among ( "ista", -1, 1, "", this),
            new Among ( "iva", -1, 8, "", this),
            new Among ( "eza", -1, 1, "", this),
            new Among ( "log\u00EDa", -1, 2, "", this),
            new Among ( "idade", -1, 7, "", this),
            new Among ( "ante", -1, 1, "", this),
            new Among ( "mente", -1, 6, "", this),
            new Among ( "amente", 12, 5, "", this),
            new Among ( "\u00E1vel", -1, 1, "", this),
            new Among ( "\u00EDvel", -1, 1, "", this),
            new Among ( "uci\u00F3n", -1, 3, "", this),
            new Among ( "ico", -1, 1, "", this),
            new Among ( "ismo", -1, 1, "", this),
            new Among ( "oso", -1, 1, "", this),
            new Among ( "amento", -1, 1, "", this),
            new Among ( "imento", -1, 1, "", this),
            new Among ( "ivo", -1, 8, "", this),
            new Among ( "a\u00E7a~o", -1, 1, "", this),
            new Among ( "ador", -1, 1, "", this),
            new Among ( "icas", -1, 1, "", this),
            new Among ( "\u00EAncias", -1, 4, "", this),
            new Among ( "iras", -1, 9, "", this),
            new Among ( "adoras", -1, 1, "", this),
            new Among ( "osas", -1, 1, "", this),
            new Among ( "istas", -1, 1, "", this),
            new Among ( "ivas", -1, 8, "", this),
            new Among ( "ezas", -1, 1, "", this),
            new Among ( "log\u00EDas", -1, 2, "", this),
            new Among ( "idades", -1, 7, "", this),
            new Among ( "uciones", -1, 3, "", this),
            new Among ( "adores", -1, 1, "", this),
            new Among ( "antes", -1, 1, "", this),
            new Among ( "a\u00E7o~es", -1, 1, "", this),
            new Among ( "icos", -1, 1, "", this),
            new Among ( "ismos", -1, 1, "", this),
            new Among ( "osos", -1, 1, "", this),
            new Among ( "amentos", -1, 1, "", this),
            new Among ( "imentos", -1, 1, "", this),
            new Among ( "ivos", -1, 8, "", this)
        };

        private Among a_6[] = {
            new Among ( "ada", -1, 1, "", this),
            new Among ( "ida", -1, 1, "", this),
            new Among ( "ia", -1, 1, "", this),
            new Among ( "aria", 2, 1, "", this),
            new Among ( "eria", 2, 1, "", this),
            new Among ( "iria", 2, 1, "", this),
            new Among ( "ara", -1, 1, "", this),
            new Among ( "era", -1, 1, "", this),
            new Among ( "ira", -1, 1, "", this),
            new Among ( "ava", -1, 1, "", this),
            new Among ( "asse", -1, 1, "", this),
            new Among ( "esse", -1, 1, "", this),
            new Among ( "isse", -1, 1, "", this),
            new Among ( "aste", -1, 1, "", this),
            new Among ( "este", -1, 1, "", this),
            new Among ( "iste", -1, 1, "", this),
            new Among ( "ei", -1, 1, "", this),
            new Among ( "arei", 16, 1, "", this),
            new Among ( "erei", 16, 1, "", this),
            new Among ( "irei", 16, 1, "", this),
            new Among ( "am", -1, 1, "", this),
            new Among ( "iam", 20, 1, "", this),
            new Among ( "ariam", 21, 1, "", this),
            new Among ( "eriam", 21, 1, "", this),
            new Among ( "iriam", 21, 1, "", this),
            new Among ( "aram", 20, 1, "", this),
            new Among ( "eram", 20, 1, "", this),
            new Among ( "iram", 20, 1, "", this),
            new Among ( "avam", 20, 1, "", this),
            new Among ( "em", -1, 1, "", this),
            new Among ( "arem", 29, 1, "", this),
            new Among ( "erem", 29, 1, "", this),
            new Among ( "irem", 29, 1, "", this),
            new Among ( "assem", 29, 1, "", this),
            new Among ( "essem", 29, 1, "", this),
            new Among ( "issem", 29, 1, "", this),
            new Among ( "ado", -1, 1, "", this),
            new Among ( "ido", -1, 1, "", this),
            new Among ( "ando", -1, 1, "", this),
            new Among ( "endo", -1, 1, "", this),
            new Among ( "indo", -1, 1, "", this),
            new Among ( "ara~o", -1, 1, "", this),
            new Among ( "era~o", -1, 1, "", this),
            new Among ( "ira~o", -1, 1, "", this),
            new Among ( "ar", -1, 1, "", this),
            new Among ( "er", -1, 1, "", this),
            new Among ( "ir", -1, 1, "", this),
            new Among ( "as", -1, 1, "", this),
            new Among ( "adas", 47, 1, "", this),
            new Among ( "idas", 47, 1, "", this),
            new Among ( "ias", 47, 1, "", this),
            new Among ( "arias", 50, 1, "", this),
            new Among ( "erias", 50, 1, "", this),
            new Among ( "irias", 50, 1, "", this),
            new Among ( "aras", 47, 1, "", this),
            new Among ( "eras", 47, 1, "", this),
            new Among ( "iras", 47, 1, "", this),
            new Among ( "avas", 47, 1, "", this),
            new Among ( "es", -1, 1, "", this),
            new Among ( "ardes", 58, 1, "", this),
            new Among ( "erdes", 58, 1, "", this),
            new Among ( "irdes", 58, 1, "", this),
            new Among ( "ares", 58, 1, "", this),
            new Among ( "eres", 58, 1, "", this),
            new Among ( "ires", 58, 1, "", this),
            new Among ( "asses", 58, 1, "", this),
            new Among ( "esses", 58, 1, "", this),
            new Among ( "isses", 58, 1, "", this),
            new Among ( "astes", 58, 1, "", this),
            new Among ( "estes", 58, 1, "", this),
            new Among ( "istes", 58, 1, "", this),
            new Among ( "is", -1, 1, "", this),
            new Among ( "ais", 71, 1, "", this),
            new Among ( "eis", 71, 1, "", this),
            new Among ( "areis", 73, 1, "", this),
            new Among ( "ereis", 73, 1, "", this),
            new Among ( "ireis", 73, 1, "", this),
            new Among ( "\u00E1reis", 73, 1, "", this),
            new Among ( "\u00E9reis", 73, 1, "", this),
            new Among ( "\u00EDreis", 73, 1, "", this),
            new Among ( "\u00E1sseis", 73, 1, "", this),
            new Among ( "\u00E9sseis", 73, 1, "", this),
            new Among ( "\u00EDsseis", 73, 1, "", this),
            new Among ( "\u00E1veis", 73, 1, "", this),
            new Among ( "\u00EDeis", 73, 1, "", this),
            new Among ( "ar\u00EDeis", 84, 1, "", this),
            new Among ( "er\u00EDeis", 84, 1, "", this),
            new Among ( "ir\u00EDeis", 84, 1, "", this),
            new Among ( "ados", -1, 1, "", this),
            new Among ( "idos", -1, 1, "", this),
            new Among ( "amos", -1, 1, "", this),
            new Among ( "\u00E1ramos", 90, 1, "", this),
            new Among ( "\u00E9ramos", 90, 1, "", this),
            new Among ( "\u00EDramos", 90, 1, "", this),
            new Among ( "\u00E1vamos", 90, 1, "", this),
            new Among ( "\u00EDamos", 90, 1, "", this),
            new Among ( "ar\u00EDamos", 95, 1, "", this),
            new Among ( "er\u00EDamos", 95, 1, "", this),
            new Among ( "ir\u00EDamos", 95, 1, "", this),
            new Among ( "emos", -1, 1, "", this),
            new Among ( "aremos", 99, 1, "", this),
            new Among ( "eremos", 99, 1, "", this),
            new Among ( "iremos", 99, 1, "", this),
            new Among ( "\u00E1ssemos", 99, 1, "", this),
            new Among ( "\u00EAssemos", 99, 1, "", this),
            new Among ( "\u00EDssemos", 99, 1, "", this),
            new Among ( "imos", -1, 1, "", this),
            new Among ( "armos", -1, 1, "", this),
            new Among ( "ermos", -1, 1, "", this),
            new Among ( "irmos", -1, 1, "", this),
            new Among ( "\u00E1mos", -1, 1, "", this),
            new Among ( "ar\u00E1s", -1, 1, "", this),
            new Among ( "er\u00E1s", -1, 1, "", this),
            new Among ( "ir\u00E1s", -1, 1, "", this),
            new Among ( "eu", -1, 1, "", this),
            new Among ( "iu", -1, 1, "", this),
            new Among ( "ou", -1, 1, "", this),
            new Among ( "ar\u00E1", -1, 1, "", this),
            new Among ( "er\u00E1", -1, 1, "", this),
            new Among ( "ir\u00E1", -1, 1, "", this)
        };

        private Among a_7[] = {
            new Among ( "a", -1, 1, "", this),
            new Among ( "i", -1, 1, "", this),
            new Among ( "o", -1, 1, "", this),
            new Among ( "os", -1, 1, "", this),
            new Among ( "\u00E1", -1, 1, "", this),
            new Among ( "\u00ED", -1, 1, "", this),
            new Among ( "\u00F3", -1, 1, "", this)
        };

        private Among a_8[] = {
            new Among ( "e", -1, 1, "", this),
            new Among ( "\u00E7", -1, 2, "", this),
            new Among ( "\u00E9", -1, 1, "", this),
            new Among ( "\u00EA", -1, 1, "", this)
        };

        private static final char g_v[] = {17, 65, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 19, 12, 2 };

        private int I_p2;
        private int I_p1;
        private int I_pV;

        private void copy_from(portugueseStemmer other) {
            I_p2 = other.I_p2;
            I_p1 = other.I_p1;
            I_pV = other.I_pV;
            super.copy_from(other);
        }

        private boolean r_prelude() {
            int among_var;
            int v_1;
            // repeat, line 36
            replab0: while(true)
            {
                v_1 = cursor;
                lab1: do {
                    // (, line 36
                    // [, line 37
                    bra = cursor;
                    // substring, line 37
                    among_var = find_among(a_0, 3);
                    if (among_var == 0)
                    {
                        break lab1;
                    }
                    // ], line 37
                    ket = cursor;
                    switch(among_var) {
                        case 0:
                            break lab1;
                        case 1:
                            // (, line 38
                            // <-, line 38
                            slice_from("a~");
                            break;
                        case 2:
                            // (, line 39
                            // <-, line 39
                            slice_from("o~");
                            break;
                        case 3:
                            // (, line 40
                            // next, line 40
                            if (cursor >= limit)
                            {
                                break lab1;
                            }
                            cursor++;
                            break;
                    }
                    continue replab0;
                } while (false);
                cursor = v_1;
                break replab0;
            }
            return true;
        }

        private boolean r_mark_regions() {
            int v_1;
            int v_2;
            int v_3;
            int v_6;
            int v_8;
            // (, line 44
            I_pV = limit;
            I_p1 = limit;
            I_p2 = limit;
            // do, line 50
            v_1 = cursor;
            lab0: do {
                // (, line 50
                // or, line 52
                lab1: do {
                    v_2 = cursor;
                    lab2: do {
                        // (, line 51
                        if (!(in_grouping(g_v, 97, 250)))
                        {
                            break lab2;
                        }
                        // or, line 51
                        lab3: do {
                            v_3 = cursor;
                            lab4: do {
                                // (, line 51
                                if (!(out_grouping(g_v, 97, 250)))
                                {
                                    break lab4;
                                }
                                // gopast, line 51
                                golab5: while(true)
                                {
                                    lab6: do {
                                        if (!(in_grouping(g_v, 97, 250)))
                                        {
                                            break lab6;
                                        }
                                        break golab5;
                                    } while (false);
                                    if (cursor >= limit)
                                    {
                                        break lab4;
                                    }
                                    cursor++;
                                }
                                break lab3;
                            } while (false);
                            cursor = v_3;
                            // (, line 51
                            if (!(in_grouping(g_v, 97, 250)))
                            {
                                break lab2;
                            }
                            // gopast, line 51
                            golab7: while(true)
                            {
                                lab8: do {
                                    if (!(out_grouping(g_v, 97, 250)))
                                    {
                                        break lab8;
                                    }
                                    break golab7;
                                } while (false);
                                if (cursor >= limit)
                                {
                                    break lab2;
                                }
                                cursor++;
                            }
                        } while (false);
                        break lab1;
                    } while (false);
                    cursor = v_2;
                    // (, line 53
                    if (!(out_grouping(g_v, 97, 250)))
                    {
                        break lab0;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -