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

📄 englishstemmer.java

📁 lucene2.2.0版本
💻 JAVA
📖 第 1 页 / 共 3 页
字号:
// This file was generated automatically by the Snowball to Java compilerpackage net.sf.snowball.ext;import net.sf.snowball.SnowballProgram;import net.sf.snowball.Among;/** * Generated class implementing code defined by a snowball script. */public class EnglishStemmer extends SnowballProgram {        private Among a_0[] = {            new Among ( "gener", -1, -1, "", this)        };        private Among a_1[] = {            new Among ( "ied", -1, 2, "", this),            new Among ( "s", -1, 3, "", this),            new Among ( "ies", 1, 2, "", this),            new Among ( "sses", 1, 1, "", this),            new Among ( "ss", 1, -1, "", this),            new Among ( "us", 1, -1, "", this)        };        private Among a_2[] = {            new Among ( "", -1, 3, "", this),            new Among ( "bb", 0, 2, "", this),            new Among ( "dd", 0, 2, "", this),            new Among ( "ff", 0, 2, "", this),            new Among ( "gg", 0, 2, "", this),            new Among ( "bl", 0, 1, "", this),            new Among ( "mm", 0, 2, "", this),            new Among ( "nn", 0, 2, "", this),            new Among ( "pp", 0, 2, "", this),            new Among ( "rr", 0, 2, "", this),            new Among ( "at", 0, 1, "", this),            new Among ( "tt", 0, 2, "", this),            new Among ( "iz", 0, 1, "", this)        };        private Among a_3[] = {            new Among ( "ed", -1, 2, "", this),            new Among ( "eed", 0, 1, "", this),            new Among ( "ing", -1, 2, "", this),            new Among ( "edly", -1, 2, "", this),            new Among ( "eedly", 3, 1, "", this),            new Among ( "ingly", -1, 2, "", this)        };        private Among a_4[] = {            new Among ( "anci", -1, 3, "", this),            new Among ( "enci", -1, 2, "", this),            new Among ( "ogi", -1, 13, "", this),            new Among ( "li", -1, 16, "", this),            new Among ( "bli", 3, 12, "", this),            new Among ( "abli", 4, 4, "", this),            new Among ( "alli", 3, 8, "", this),            new Among ( "fulli", 3, 14, "", this),            new Among ( "lessli", 3, 15, "", this),            new Among ( "ousli", 3, 10, "", this),            new Among ( "entli", 3, 5, "", this),            new Among ( "aliti", -1, 8, "", this),            new Among ( "biliti", -1, 12, "", this),            new Among ( "iviti", -1, 11, "", this),            new Among ( "tional", -1, 1, "", this),            new Among ( "ational", 14, 7, "", this),            new Among ( "alism", -1, 8, "", this),            new Among ( "ation", -1, 7, "", this),            new Among ( "ization", 17, 6, "", this),            new Among ( "izer", -1, 6, "", this),            new Among ( "ator", -1, 7, "", this),            new Among ( "iveness", -1, 11, "", this),            new Among ( "fulness", -1, 9, "", this),            new Among ( "ousness", -1, 10, "", this)        };        private Among a_5[] = {            new Among ( "icate", -1, 4, "", this),            new Among ( "ative", -1, 6, "", this),            new Among ( "alize", -1, 3, "", this),            new Among ( "iciti", -1, 4, "", this),            new Among ( "ical", -1, 4, "", this),            new Among ( "tional", -1, 1, "", this),            new Among ( "ational", 5, 2, "", this),            new Among ( "ful", -1, 5, "", this),            new Among ( "ness", -1, 5, "", this)        };        private Among a_6[] = {            new Among ( "ic", -1, 1, "", this),            new Among ( "ance", -1, 1, "", this),            new Among ( "ence", -1, 1, "", this),            new Among ( "able", -1, 1, "", this),            new Among ( "ible", -1, 1, "", this),            new Among ( "ate", -1, 1, "", this),            new Among ( "ive", -1, 1, "", this),            new Among ( "ize", -1, 1, "", this),            new Among ( "iti", -1, 1, "", this),            new Among ( "al", -1, 1, "", this),            new Among ( "ism", -1, 1, "", this),            new Among ( "ion", -1, 2, "", this),            new Among ( "er", -1, 1, "", this),            new Among ( "ous", -1, 1, "", this),            new Among ( "ant", -1, 1, "", this),            new Among ( "ent", -1, 1, "", this),            new Among ( "ment", 15, 1, "", this),            new Among ( "ement", 16, 1, "", this)        };        private Among a_7[] = {            new Among ( "e", -1, 1, "", this),            new Among ( "l", -1, 2, "", this)        };        private Among a_8[] = {            new Among ( "succeed", -1, -1, "", this),            new Among ( "proceed", -1, -1, "", this),            new Among ( "exceed", -1, -1, "", this),            new Among ( "canning", -1, -1, "", this),            new Among ( "inning", -1, -1, "", this),            new Among ( "earring", -1, -1, "", this),            new Among ( "herring", -1, -1, "", this),            new Among ( "outing", -1, -1, "", this)        };        private Among a_9[] = {            new Among ( "andes", -1, -1, "", this),            new Among ( "atlas", -1, -1, "", this),            new Among ( "bias", -1, -1, "", this),            new Among ( "cosmos", -1, -1, "", this),            new Among ( "dying", -1, 3, "", this),            new Among ( "early", -1, 9, "", this),            new Among ( "gently", -1, 7, "", this),            new Among ( "howe", -1, -1, "", this),            new Among ( "idly", -1, 6, "", this),            new Among ( "lying", -1, 4, "", this),            new Among ( "news", -1, -1, "", this),            new Among ( "only", -1, 10, "", this),            new Among ( "singly", -1, 11, "", this),            new Among ( "skies", -1, 2, "", this),            new Among ( "skis", -1, 1, "", this),            new Among ( "sky", -1, -1, "", this),            new Among ( "tying", -1, 5, "", this),            new Among ( "ugly", -1, 8, "", this)        };        private static final char g_v[] = {17, 65, 16, 1 };        private static final char g_v_WXY[] = {1, 17, 65, 208, 1 };        private static final char g_valid_LI[] = {55, 141, 2 };        private boolean B_Y_found;        private int I_p2;        private int I_p1;        private void copy_from(EnglishStemmer other) {            B_Y_found = other.B_Y_found;            I_p2 = other.I_p2;            I_p1 = other.I_p1;            super.copy_from(other);        }        private boolean r_prelude() {            int v_1;            int v_2;            int v_3;            int v_4;            // (, line 23            // unset Y_found, line 24            B_Y_found = false;            // do, line 25            v_1 = cursor;            lab0: do {                // (, line 25                // [, line 25                bra = cursor;                // literal, line 25                if (!(eq_s(1, "y")))                {                    break lab0;                }                // ], line 25                ket = cursor;                if (!(in_grouping(g_v, 97, 121)))                {                    break lab0;                }                // <-, line 25                slice_from("Y");                // set Y_found, line 25                B_Y_found = true;            } while (false);            cursor = v_1;            // do, line 26            v_2 = cursor;            lab1: do {                // repeat, line 26                replab2: while(true)                {                    v_3 = cursor;                    lab3: do {                        // (, line 26                        // goto, line 26                        golab4: while(true)                        {                            v_4 = cursor;                            lab5: do {                                // (, line 26                                if (!(in_grouping(g_v, 97, 121)))                                {                                    break lab5;                                }                                // [, line 26                                bra = cursor;                                // literal, line 26                                if (!(eq_s(1, "y")))                                {                                    break lab5;                                }                                // ], line 26                                ket = cursor;                                cursor = v_4;                                break golab4;                            } while (false);                            cursor = v_4;                            if (cursor >= limit)                            {                                break lab3;                            }                            cursor++;                        }                        // <-, line 26                        slice_from("Y");                        // set Y_found, line 26                        B_Y_found = true;                        continue replab2;                    } while (false);                    cursor = v_3;                    break replab2;                }            } while (false);            cursor = v_2;            return true;        }        private boolean r_mark_regions() {            int v_1;            int v_2;            // (, line 29            I_p1 = limit;            I_p2 = limit;            // do, line 32            v_1 = cursor;            lab0: do {                // (, line 32                // or, line 36                lab1: do {                    v_2 = cursor;                    lab2: do {                        // among, line 33                        if (find_among(a_0, 1) == 0)                        {                            break lab2;                        }                        break lab1;                    } while (false);                    cursor = v_2;                    // (, line 36                    // gopast, line 36                    golab3: while(true)                    {                        lab4: do {                            if (!(in_grouping(g_v, 97, 121)))                            {                                break lab4;                            }                            break golab3;                        } while (false);                        if (cursor >= limit)                        {                            break lab0;                        }                        cursor++;                    }                    // gopast, line 36                    golab5: while(true)                    {                        lab6: do {                            if (!(out_grouping(g_v, 97, 121)))                            {                                break lab6;                            }                            break golab5;                        } while (false);                        if (cursor >= limit)                        {                            break lab0;                        }                        cursor++;                    }                } while (false);                // setmark p1, line 37                I_p1 = cursor;                // gopast, line 38                golab7: while(true)                {                    lab8: do {                        if (!(in_grouping(g_v, 97, 121)))                        {                            break lab8;                        }                        break golab7;                    } while (false);                    if (cursor >= limit)                    {                        break lab0;                    }                    cursor++;                }                // gopast, line 38                golab9: while(true)                {                    lab10: do {                        if (!(out_grouping(g_v, 97, 121)))                        {                            break lab10;                        }                        break golab9;                    } while (false);                    if (cursor >= limit)                    {                        break lab0;                    }                    cursor++;                }                // setmark p2, line 38                I_p2 = cursor;            } while (false);            cursor = v_1;            return true;        }        private boolean r_shortv() {            int v_1;            // (, line 44            // or, line 46            lab0: do {                v_1 = limit - cursor;                lab1: do {                    // (, line 45                    if (!(out_grouping_b(g_v_WXY, 89, 121)))                    {                        break lab1;                    }                    if (!(in_grouping_b(g_v, 97, 121)))                    {                        break lab1;                    }                    if (!(out_grouping_b(g_v, 97, 121)))                    {                        break lab1;                    }                    break lab0;                } while (false);                cursor = limit - v_1;                // (, line 47                if (!(out_grouping_b(g_v, 97, 121)))                {                    return false;                }                if (!(in_grouping_b(g_v, 97, 121)))                {                    return false;                }                // atlimit, line 47                if (cursor > limit_backward)                {                    return false;                }            } while (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_Step_1a() {            int among_var;            int v_1;            // (, line 53            // [, line 54            ket = cursor;            // substring, line 54            among_var = find_among_b(a_1, 6);            if (among_var == 0)            {                return false;            }            // ], line 54            bra = cursor;            switch(among_var) {                case 0:                    return false;                case 1:                    // (, line 55                    // <-, line 55

⌨️ 快捷键说明

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