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

📄 russianstemmer.java

📁 一个很不错的词频统计程序,目前只支持英文,中文的本人正在修改中.改好后上传给大家分享
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
// 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 russianStemmer extends SnowballProgram {

        private Among a_0[] = {
            new Among ( "\u0432", -1, 1, "", this),
            new Among ( "\u0438\u0432", 0, 2, "", this),
            new Among ( "\u044B\u0432", 0, 2, "", this),
            new Among ( "\u0432\u0448\u0438", -1, 1, "", this),
            new Among ( "\u0438\u0432\u0448\u0438", 3, 2, "", this),
            new Among ( "\u044B\u0432\u0448\u0438", 3, 2, "", this),
            new Among ( "\u0432\u0448\u0438\u0441\u044C", -1, 1, "", this),
            new Among ( "\u0438\u0432\u0448\u0438\u0441\u044C", 6, 2, "", this),
            new Among ( "\u044B\u0432\u0448\u0438\u0441\u044C", 6, 2, "", this)
        };

        private Among a_1[] = {
            new Among ( "\u0435\u0435", -1, 1, "", this),
            new Among ( "\u0438\u0435", -1, 1, "", this),
            new Among ( "\u043E\u0435", -1, 1, "", this),
            new Among ( "\u044B\u0435", -1, 1, "", this),
            new Among ( "\u0438\u043C\u0438", -1, 1, "", this),
            new Among ( "\u044B\u043C\u0438", -1, 1, "", this),
            new Among ( "\u0435\u0439", -1, 1, "", this),
            new Among ( "\u0438\u0439", -1, 1, "", this),
            new Among ( "\u043E\u0439", -1, 1, "", this),
            new Among ( "\u044B\u0439", -1, 1, "", this),
            new Among ( "\u0435\u043C", -1, 1, "", this),
            new Among ( "\u0438\u043C", -1, 1, "", this),
            new Among ( "\u043E\u043C", -1, 1, "", this),
            new Among ( "\u044B\u043C", -1, 1, "", this),
            new Among ( "\u0435\u0433\u043E", -1, 1, "", this),
            new Among ( "\u043E\u0433\u043E", -1, 1, "", this),
            new Among ( "\u0435\u043C\u0443", -1, 1, "", this),
            new Among ( "\u043E\u043C\u0443", -1, 1, "", this),
            new Among ( "\u0438\u0445", -1, 1, "", this),
            new Among ( "\u044B\u0445", -1, 1, "", this),
            new Among ( "\u0435\u044E", -1, 1, "", this),
            new Among ( "\u043E\u044E", -1, 1, "", this),
            new Among ( "\u0443\u044E", -1, 1, "", this),
            new Among ( "\u044E\u044E", -1, 1, "", this),
            new Among ( "\u0430\u044F", -1, 1, "", this),
            new Among ( "\u044F\u044F", -1, 1, "", this)
        };

        private Among a_2[] = {
            new Among ( "\u0435\u043C", -1, 1, "", this),
            new Among ( "\u043D\u043D", -1, 1, "", this),
            new Among ( "\u0432\u0448", -1, 1, "", this),
            new Among ( "\u0438\u0432\u0448", 2, 2, "", this),
            new Among ( "\u044B\u0432\u0448", 2, 2, "", this),
            new Among ( "\u0449", -1, 1, "", this),
            new Among ( "\u044E\u0449", 5, 1, "", this),
            new Among ( "\u0443\u044E\u0449", 6, 2, "", this)
        };

        private Among a_3[] = {
            new Among ( "\u0441\u044C", -1, 1, "", this),
            new Among ( "\u0441\u044F", -1, 1, "", this)
        };

        private Among a_4[] = {
            new Among ( "\u043B\u0430", -1, 1, "", this),
            new Among ( "\u0438\u043B\u0430", 0, 2, "", this),
            new Among ( "\u044B\u043B\u0430", 0, 2, "", this),
            new Among ( "\u043D\u0430", -1, 1, "", this),
            new Among ( "\u0435\u043D\u0430", 3, 2, "", this),
            new Among ( "\u0435\u0442\u0435", -1, 1, "", this),
            new Among ( "\u0438\u0442\u0435", -1, 2, "", this),
            new Among ( "\u0439\u0442\u0435", -1, 1, "", this),
            new Among ( "\u0435\u0439\u0442\u0435", 7, 2, "", this),
            new Among ( "\u0443\u0439\u0442\u0435", 7, 2, "", this),
            new Among ( "\u043B\u0438", -1, 1, "", this),
            new Among ( "\u0438\u043B\u0438", 10, 2, "", this),
            new Among ( "\u044B\u043B\u0438", 10, 2, "", this),
            new Among ( "\u0439", -1, 1, "", this),
            new Among ( "\u0435\u0439", 13, 2, "", this),
            new Among ( "\u0443\u0439", 13, 2, "", this),
            new Among ( "\u043B", -1, 1, "", this),
            new Among ( "\u0438\u043B", 16, 2, "", this),
            new Among ( "\u044B\u043B", 16, 2, "", this),
            new Among ( "\u0435\u043C", -1, 1, "", this),
            new Among ( "\u0438\u043C", -1, 2, "", this),
            new Among ( "\u044B\u043C", -1, 2, "", this),
            new Among ( "\u043D", -1, 1, "", this),
            new Among ( "\u0435\u043D", 22, 2, "", this),
            new Among ( "\u043B\u043E", -1, 1, "", this),
            new Among ( "\u0438\u043B\u043E", 24, 2, "", this),
            new Among ( "\u044B\u043B\u043E", 24, 2, "", this),
            new Among ( "\u043D\u043E", -1, 1, "", this),
            new Among ( "\u0435\u043D\u043E", 27, 2, "", this),
            new Among ( "\u043D\u043D\u043E", 27, 1, "", this),
            new Among ( "\u0435\u0442", -1, 1, "", this),
            new Among ( "\u0443\u0435\u0442", 30, 2, "", this),
            new Among ( "\u0438\u0442", -1, 2, "", this),
            new Among ( "\u044B\u0442", -1, 2, "", this),
            new Among ( "\u044E\u0442", -1, 1, "", this),
            new Among ( "\u0443\u044E\u0442", 34, 2, "", this),
            new Among ( "\u044F\u0442", -1, 2, "", this),
            new Among ( "\u043D\u044B", -1, 1, "", this),
            new Among ( "\u0435\u043D\u044B", 37, 2, "", this),
            new Among ( "\u0442\u044C", -1, 1, "", this),
            new Among ( "\u0438\u0442\u044C", 39, 2, "", this),
            new Among ( "\u044B\u0442\u044C", 39, 2, "", this),
            new Among ( "\u0435\u0448\u044C", -1, 1, "", this),
            new Among ( "\u0438\u0448\u044C", -1, 2, "", this),
            new Among ( "\u044E", -1, 2, "", this),
            new Among ( "\u0443\u044E", 44, 2, "", this)
        };

        private Among a_5[] = {
            new Among ( "\u0430", -1, 1, "", this),
            new Among ( "\u0435\u0432", -1, 1, "", this),
            new Among ( "\u043E\u0432", -1, 1, "", this),
            new Among ( "\u0435", -1, 1, "", this),
            new Among ( "\u0438\u0435", 3, 1, "", this),
            new Among ( "\u044C\u0435", 3, 1, "", this),
            new Among ( "\u0438", -1, 1, "", this),
            new Among ( "\u0435\u0438", 6, 1, "", this),
            new Among ( "\u0438\u0438", 6, 1, "", this),
            new Among ( "\u0430\u043C\u0438", 6, 1, "", this),
            new Among ( "\u044F\u043C\u0438", 6, 1, "", this),
            new Among ( "\u0438\u044F\u043C\u0438", 10, 1, "", this),
            new Among ( "\u0439", -1, 1, "", this),
            new Among ( "\u0435\u0439", 12, 1, "", this),
            new Among ( "\u0438\u0435\u0439", 13, 1, "", this),
            new Among ( "\u0438\u0439", 12, 1, "", this),
            new Among ( "\u043E\u0439", 12, 1, "", this),
            new Among ( "\u0430\u043C", -1, 1, "", this),
            new Among ( "\u0435\u043C", -1, 1, "", this),
            new Among ( "\u0438\u0435\u043C", 18, 1, "", this),
            new Among ( "\u043E\u043C", -1, 1, "", this),
            new Among ( "\u044F\u043C", -1, 1, "", this),
            new Among ( "\u0438\u044F\u043C", 21, 1, "", this),
            new Among ( "\u043E", -1, 1, "", this),
            new Among ( "\u0443", -1, 1, "", this),
            new Among ( "\u0430\u0445", -1, 1, "", this),
            new Among ( "\u044F\u0445", -1, 1, "", this),
            new Among ( "\u0438\u044F\u0445", 26, 1, "", this),
            new Among ( "\u044B", -1, 1, "", this),
            new Among ( "\u044C", -1, 1, "", this),
            new Among ( "\u044E", -1, 1, "", this),
            new Among ( "\u0438\u044E", 30, 1, "", this),
            new Among ( "\u044C\u044E", 30, 1, "", this),
            new Among ( "\u044F", -1, 1, "", this),
            new Among ( "\u0438\u044F", 33, 1, "", this),
            new Among ( "\u044C\u044F", 33, 1, "", this)
        };

        private Among a_6[] = {
            new Among ( "\u043E\u0441\u0442", -1, 1, "", this),
            new Among ( "\u043E\u0441\u0442\u044C", -1, 1, "", this)
        };

        private Among a_7[] = {
            new Among ( "\u0435\u0439\u0448\u0435", -1, 1, "", this),
            new Among ( "\u043D", -1, 2, "", this),
            new Among ( "\u0435\u0439\u0448", -1, 1, "", this),
            new Among ( "\u044C", -1, 3, "", this)
        };

        private static final char g_v[] = {33, 65, 8, 232 };

        private int I_p2;
        private int I_pV;

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

        private boolean r_mark_regions() {
            int v_1;
            // (, line 57
            I_pV = limit;
            I_p2 = limit;
            // do, line 61
            v_1 = cursor;
            lab0: do {
                // (, line 61
                // gopast, line 62
                golab1: while(true)
                {
                    lab2: do {
                        if (!(in_grouping(g_v, 1072, 1103)))
                        {
                            break lab2;
                        }
                        break golab1;
                    } while (false);
                    if (cursor >= limit)
                    {
                        break lab0;
                    }
                    cursor++;
                }
                // setmark pV, line 62
                I_pV = cursor;
                // gopast, line 62
                golab3: while(true)
                {
                    lab4: do {
                        if (!(out_grouping(g_v, 1072, 1103)))
                        {
                            break lab4;
                        }
                        break golab3;
                    } while (false);
                    if (cursor >= limit)
                    {
                        break lab0;
                    }
                    cursor++;
                }
                // gopast, line 63
                golab5: while(true)
                {
                    lab6: do {
                        if (!(in_grouping(g_v, 1072, 1103)))
                        {
                            break lab6;
                        }
                        break golab5;
                    } while (false);
                    if (cursor >= limit)
                    {
                        break lab0;
                    }
                    cursor++;
                }
                // gopast, line 63
                golab7: while(true)
                {
                    lab8: do {
                        if (!(out_grouping(g_v, 1072, 1103)))
                        {
                            break lab8;
                        }
                        break golab7;
                    } while (false);
                    if (cursor >= limit)
                    {
                        break lab0;
                    }
                    cursor++;
                }
                // setmark p2, line 63
                I_p2 = cursor;
            } while (false);
            cursor = v_1;
            return true;
        }

        private boolean r_R2() {
            if (!(I_p2 <= cursor))
            {
                return false;
            }
            return true;
        }

        private boolean r_perfective_gerund() {
            int among_var;
            int v_1;
            // (, line 71
            // [, line 72
            ket = cursor;
            // substring, line 72
            among_var = find_among_b(a_0, 9);
            if (among_var == 0)
            {
                return false;
            }
            // ], line 72
            bra = cursor;
            switch(among_var) {
                case 0:
                    return false;
                case 1:
                    // (, line 76
                    // or, line 76
                    lab0: do {
                        v_1 = limit - cursor;
                        lab1: do {
                            // literal, line 76
                            if (!(eq_s_b(1, "\u0430")))
                            {
                                break lab1;
                            }
                            break lab0;
                        } while (false);
                        cursor = limit - v_1;
                        // literal, line 76
                        if (!(eq_s_b(1, "\u044F")))
                        {
                            return false;
                        }
                    } while (false);
                    // delete, line 76
                    slice_del();
                    break;
                case 2:
                    // (, line 83
                    // delete, line 83
                    slice_del();
                    break;
            }
            return true;
        }

        private boolean r_adjective() {
            int among_var;
            // (, line 87
            // [, line 88
            ket = cursor;
            // substring, line 88
            among_var = find_among_b(a_1, 26);
            if (among_var == 0)
            {
                return false;
            }
            // ], line 88
            bra = cursor;
            switch(among_var) {
                case 0:
                    return false;
                case 1:
                    // (, line 97
                    // delete, line 97
                    slice_del();
                    break;
            }
            return true;
        }

        private boolean r_adjectival() {
            int among_var;
            int v_1;
            int v_2;
            // (, line 101
            // call adjective, line 102
            if (!r_adjective())
            {
                return false;
            }
            // try, line 109
            v_1 = limit - cursor;
            lab0: do {
                // (, line 109
                // [, line 110
                ket = cursor;
                // substring, line 110
                among_var = find_among_b(a_2, 8);
                if (among_var == 0)
                {
                    cursor = limit - v_1;

⌨️ 快捷键说明

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