All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.tartarus.snowball.ext.arabicStemmer Maven / Gradle / Ivy

The newest version!
// This file was generated automatically by the Snowball to Java compiler
// http://snowballstem.org/

package org.tartarus.snowball.ext;

import org.tartarus.snowball.Among;

 /**
  * This class was automatically generated by a Snowball to Java compiler
  * It implements the stemming algorithm defined by a snowball script.
  */

public class arabicStemmer extends org.tartarus.snowball.SnowballStemmer {

    private static final long serialVersionUID = 1L;

    private final static Among a_0[] = {
        new Among ( "!", -1, 3 ),
        new Among ( "\"", -1, 3 ),
        new Among ( "%", -1, 3 ),
        new Among ( "*", -1, 3 ),
        new Among ( ",", -1, 3 ),
        new Among ( ".", -1, 3 ),
        new Among ( "/", -1, 3 ),
        new Among ( ":", -1, 3 ),
        new Among ( ";", -1, 3 ),
        new Among ( "?", -1, 3 ),
        new Among ( "\\", -1, 3 ),
        new Among ( "\u060C", -1, 4 ),
        new Among ( "\u061B", -1, 4 ),
        new Among ( "\u061F", -1, 4 ),
        new Among ( "\u0640", -1, 2 ),
        new Among ( "\u064B", -1, 1 ),
        new Among ( "\u064C", -1, 1 ),
        new Among ( "\u064D", -1, 1 ),
        new Among ( "\u064E", -1, 1 ),
        new Among ( "\u064F", -1, 1 ),
        new Among ( "\u0650", -1, 1 ),
        new Among ( "\u0651", -1, 1 ),
        new Among ( "\u0652", -1, 1 ),
        new Among ( "\u0660", -1, 5 ),
        new Among ( "\u0661", -1, 6 ),
        new Among ( "\u0662", -1, 7 ),
        new Among ( "\u0663", -1, 8 ),
        new Among ( "\u0664", -1, 9 ),
        new Among ( "\u0665", -1, 10 ),
        new Among ( "\u0666", -1, 11 ),
        new Among ( "\u0667", -1, 12 ),
        new Among ( "\u0668", -1, 13 ),
        new Among ( "\u0669", -1, 14 ),
        new Among ( "\u066A", -1, 15 ),
        new Among ( "\u066B", -1, 15 ),
        new Among ( "\u066C", -1, 15 ),
        new Among ( "\uFE80", -1, 16 ),
        new Among ( "\uFE81", -1, 20 ),
        new Among ( "\uFE82", -1, 20 ),
        new Among ( "\uFE83", -1, 17 ),
        new Among ( "\uFE84", -1, 17 ),
        new Among ( "\uFE85", -1, 21 ),
        new Among ( "\uFE86", -1, 21 ),
        new Among ( "\uFE87", -1, 18 ),
        new Among ( "\uFE88", -1, 18 ),
        new Among ( "\uFE89", -1, 19 ),
        new Among ( "\uFE8A", -1, 19 ),
        new Among ( "\uFE8B", -1, 19 ),
        new Among ( "\uFE8C", -1, 19 ),
        new Among ( "\uFE8D", -1, 22 ),
        new Among ( "\uFE8E", -1, 22 ),
        new Among ( "\uFE8F", -1, 23 ),
        new Among ( "\uFE90", -1, 23 ),
        new Among ( "\uFE91", -1, 23 ),
        new Among ( "\uFE92", -1, 23 ),
        new Among ( "\uFE93", -1, 24 ),
        new Among ( "\uFE94", -1, 24 ),
        new Among ( "\uFE95", -1, 25 ),
        new Among ( "\uFE96", -1, 25 ),
        new Among ( "\uFE97", -1, 25 ),
        new Among ( "\uFE98", -1, 25 ),
        new Among ( "\uFE99", -1, 26 ),
        new Among ( "\uFE9A", -1, 26 ),
        new Among ( "\uFE9B", -1, 26 ),
        new Among ( "\uFE9C", -1, 26 ),
        new Among ( "\uFE9D", -1, 27 ),
        new Among ( "\uFE9E", -1, 27 ),
        new Among ( "\uFE9F", -1, 27 ),
        new Among ( "\uFEA0", -1, 27 ),
        new Among ( "\uFEA1", -1, 28 ),
        new Among ( "\uFEA2", -1, 28 ),
        new Among ( "\uFEA3", -1, 28 ),
        new Among ( "\uFEA4", -1, 28 ),
        new Among ( "\uFEA5", -1, 29 ),
        new Among ( "\uFEA6", -1, 29 ),
        new Among ( "\uFEA7", -1, 29 ),
        new Among ( "\uFEA8", -1, 29 ),
        new Among ( "\uFEA9", -1, 30 ),
        new Among ( "\uFEAA", -1, 30 ),
        new Among ( "\uFEAB", -1, 31 ),
        new Among ( "\uFEAC", -1, 31 ),
        new Among ( "\uFEAD", -1, 32 ),
        new Among ( "\uFEAE", -1, 32 ),
        new Among ( "\uFEAF", -1, 33 ),
        new Among ( "\uFEB0", -1, 33 ),
        new Among ( "\uFEB1", -1, 34 ),
        new Among ( "\uFEB2", -1, 34 ),
        new Among ( "\uFEB3", -1, 34 ),
        new Among ( "\uFEB4", -1, 34 ),
        new Among ( "\uFEB5", -1, 35 ),
        new Among ( "\uFEB6", -1, 35 ),
        new Among ( "\uFEB7", -1, 35 ),
        new Among ( "\uFEB8", -1, 35 ),
        new Among ( "\uFEB9", -1, 36 ),
        new Among ( "\uFEBA", -1, 36 ),
        new Among ( "\uFEBB", -1, 36 ),
        new Among ( "\uFEBC", -1, 36 ),
        new Among ( "\uFEBD", -1, 37 ),
        new Among ( "\uFEBE", -1, 37 ),
        new Among ( "\uFEBF", -1, 37 ),
        new Among ( "\uFEC0", -1, 37 ),
        new Among ( "\uFEC1", -1, 38 ),
        new Among ( "\uFEC2", -1, 38 ),
        new Among ( "\uFEC3", -1, 38 ),
        new Among ( "\uFEC4", -1, 38 ),
        new Among ( "\uFEC5", -1, 39 ),
        new Among ( "\uFEC6", -1, 39 ),
        new Among ( "\uFEC7", -1, 39 ),
        new Among ( "\uFEC8", -1, 39 ),
        new Among ( "\uFEC9", -1, 40 ),
        new Among ( "\uFECA", -1, 40 ),
        new Among ( "\uFECB", -1, 40 ),
        new Among ( "\uFECC", -1, 40 ),
        new Among ( "\uFECD", -1, 41 ),
        new Among ( "\uFECE", -1, 41 ),
        new Among ( "\uFECF", -1, 41 ),
        new Among ( "\uFED0", -1, 41 ),
        new Among ( "\uFED1", -1, 42 ),
        new Among ( "\uFED2", -1, 42 ),
        new Among ( "\uFED3", -1, 42 ),
        new Among ( "\uFED4", -1, 42 ),
        new Among ( "\uFED5", -1, 43 ),
        new Among ( "\uFED6", -1, 43 ),
        new Among ( "\uFED7", -1, 43 ),
        new Among ( "\uFED8", -1, 43 ),
        new Among ( "\uFED9", -1, 44 ),
        new Among ( "\uFEDA", -1, 44 ),
        new Among ( "\uFEDB", -1, 44 ),
        new Among ( "\uFEDC", -1, 44 ),
        new Among ( "\uFEDD", -1, 45 ),
        new Among ( "\uFEDE", -1, 45 ),
        new Among ( "\uFEDF", -1, 45 ),
        new Among ( "\uFEE0", -1, 45 ),
        new Among ( "\uFEE1", -1, 46 ),
        new Among ( "\uFEE2", -1, 46 ),
        new Among ( "\uFEE3", -1, 46 ),
        new Among ( "\uFEE4", -1, 46 ),
        new Among ( "\uFEE5", -1, 47 ),
        new Among ( "\uFEE6", -1, 47 ),
        new Among ( "\uFEE7", -1, 47 ),
        new Among ( "\uFEE8", -1, 47 ),
        new Among ( "\uFEE9", -1, 48 ),
        new Among ( "\uFEEA", -1, 48 ),
        new Among ( "\uFEEB", -1, 48 ),
        new Among ( "\uFEEC", -1, 48 ),
        new Among ( "\uFEED", -1, 49 ),
        new Among ( "\uFEEE", -1, 49 ),
        new Among ( "\uFEEF", -1, 50 ),
        new Among ( "\uFEF0", -1, 50 ),
        new Among ( "\uFEF1", -1, 51 ),
        new Among ( "\uFEF2", -1, 51 ),
        new Among ( "\uFEF3", -1, 51 ),
        new Among ( "\uFEF4", -1, 51 ),
        new Among ( "\uFEF5", -1, 55 ),
        new Among ( "\uFEF6", -1, 55 ),
        new Among ( "\uFEF7", -1, 53 ),
        new Among ( "\uFEF8", -1, 53 ),
        new Among ( "\uFEF9", -1, 54 ),
        new Among ( "\uFEFA", -1, 54 ),
        new Among ( "\uFEFB", -1, 52 ),
        new Among ( "\uFEFC", -1, 52 )
    };

    private final static Among a_1[] = {
        new Among ( "\u0622", -1, 1 ),
        new Among ( "\u0623", -1, 1 ),
        new Among ( "\u0624", -1, 2 ),
        new Among ( "\u0625", -1, 1 ),
        new Among ( "\u0626", -1, 3 )
    };

    private final static Among a_2[] = {
        new Among ( "\u0622", -1, 1 ),
        new Among ( "\u0623", -1, 1 ),
        new Among ( "\u0624", -1, 2 ),
        new Among ( "\u0625", -1, 1 ),
        new Among ( "\u0626", -1, 3 )
    };

    private final static Among a_3[] = {
        new Among ( "\u0627\u0644", -1, 2 ),
        new Among ( "\u0628\u0627\u0644", -1, 1 ),
        new Among ( "\u0643\u0627\u0644", -1, 1 ),
        new Among ( "\u0644\u0644", -1, 2 )
    };

    private final static Among a_4[] = {
        new Among ( "\u0623\u0622", -1, 2 ),
        new Among ( "\u0623\u0623", -1, 1 ),
        new Among ( "\u0623\u0624", -1, 3 ),
        new Among ( "\u0623\u0625", -1, 5 ),
        new Among ( "\u0623\u0627", -1, 4 )
    };

    private final static Among a_5[] = {
        new Among ( "\u0641", -1, 1 ),
        new Among ( "\u0648", -1, 2 )
    };

    private final static Among a_6[] = {
        new Among ( "\u0627\u0644", -1, 2 ),
        new Among ( "\u0628\u0627\u0644", -1, 1 ),
        new Among ( "\u0643\u0627\u0644", -1, 1 ),
        new Among ( "\u0644\u0644", -1, 2 )
    };

    private final static Among a_7[] = {
        new Among ( "\u0628", -1, 1 ),
        new Among ( "\u0628\u0628", 0, 2 ),
        new Among ( "\u0643\u0643", -1, 3 )
    };

    private final static Among a_8[] = {
        new Among ( "\u0633\u0623", -1, 4 ),
        new Among ( "\u0633\u062A", -1, 2 ),
        new Among ( "\u0633\u0646", -1, 3 ),
        new Among ( "\u0633\u064A", -1, 1 )
    };

    private final static Among a_9[] = {
        new Among ( "\u062A\u0633\u062A", -1, 1 ),
        new Among ( "\u0646\u0633\u062A", -1, 1 ),
        new Among ( "\u064A\u0633\u062A", -1, 1 )
    };

    private final static Among a_10[] = {
        new Among ( "\u0643\u0645\u0627", -1, 3 ),
        new Among ( "\u0647\u0645\u0627", -1, 3 ),
        new Among ( "\u0646\u0627", -1, 2 ),
        new Among ( "\u0647\u0627", -1, 2 ),
        new Among ( "\u0643", -1, 1 ),
        new Among ( "\u0643\u0645", -1, 2 ),
        new Among ( "\u0647\u0645", -1, 2 ),
        new Among ( "\u0647\u0646", -1, 2 ),
        new Among ( "\u0647", -1, 1 ),
        new Among ( "\u064A", -1, 1 )
    };

    private final static Among a_11[] = {
        new Among ( "\u0646", -1, 1 )
    };

    private final static Among a_12[] = {
        new Among ( "\u0627", -1, 1 ),
        new Among ( "\u0648", -1, 1 ),
        new Among ( "\u064A", -1, 1 )
    };

    private final static Among a_13[] = {
        new Among ( "\u0627\u062A", -1, 1 )
    };

    private final static Among a_14[] = {
        new Among ( "\u062A", -1, 1 )
    };

    private final static Among a_15[] = {
        new Among ( "\u0629", -1, 1 )
    };

    private final static Among a_16[] = {
        new Among ( "\u064A", -1, 1 )
    };

    private final static Among a_17[] = {
        new Among ( "\u0643\u0645\u0627", -1, 3 ),
        new Among ( "\u0647\u0645\u0627", -1, 3 ),
        new Among ( "\u0646\u0627", -1, 2 ),
        new Among ( "\u0647\u0627", -1, 2 ),
        new Among ( "\u0643", -1, 1 ),
        new Among ( "\u0643\u0645", -1, 2 ),
        new Among ( "\u0647\u0645", -1, 2 ),
        new Among ( "\u0643\u0646", -1, 2 ),
        new Among ( "\u0647\u0646", -1, 2 ),
        new Among ( "\u0647", -1, 1 ),
        new Among ( "\u0643\u0645\u0648", -1, 3 ),
        new Among ( "\u0646\u064A", -1, 2 )
    };

    private final static Among a_18[] = {
        new Among ( "\u0627", -1, 2 ),
        new Among ( "\u062A\u0627", 0, 3 ),
        new Among ( "\u062A\u0645\u0627", 0, 5 ),
        new Among ( "\u0646\u0627", 0, 3 ),
        new Among ( "\u062A", -1, 1 ),
        new Among ( "\u0646", -1, 2 ),
        new Among ( "\u0627\u0646", 5, 4 ),
        new Among ( "\u062A\u0646", 5, 3 ),
        new Among ( "\u0648\u0646", 5, 4 ),
        new Among ( "\u064A\u0646", 5, 4 ),
        new Among ( "\u064A", -1, 2 )
    };

    private final static Among a_19[] = {
        new Among ( "\u0648\u0627", -1, 1 ),
        new Among ( "\u062A\u0645", -1, 1 )
    };

    private final static Among a_20[] = {
        new Among ( "\u0648", -1, 1 ),
        new Among ( "\u062A\u0645\u0648", 0, 2 )
    };

    private final static Among a_21[] = {
        new Among ( "\u0649", -1, 1 )
    };

    private boolean B_is_defined;
    private boolean B_is_verb;
    private boolean B_is_noun;
    private int I_word_len;


    private boolean r_Normalize_pre() {
        int among_var;
        int v_1;
        int v_2;
        // (, line 258
        // loop, line 259
        for (v_1 = (current.length()); v_1 > 0; v_1--)
        {
            // (, line 259
            // or, line 328
            lab0: do {
                v_2 = cursor;
                lab1: do {
                    // (, line 260
                    // [, line 261
                    bra = cursor;
                    // substring, line 261
                    among_var = find_among(a_0);
                    if (among_var == 0)
                    {
                        break lab1;
                    }
                    // ], line 261
                    ket = cursor;
                    switch (among_var) {
                        case 0:
                            break lab1;
                        case 1:
                            // (, line 262
                            // delete, line 262
                            slice_del();
                            break;
                        case 2:
                            // (, line 263
                            // delete, line 263
                            slice_del();
                            break;
                        case 3:
                            // (, line 266
                            // delete, line 266
                            slice_del();
                            break;
                        case 4:
                            // (, line 267
                            // delete, line 267
                            slice_del();
                            break;
                        case 5:
                            // (, line 270
                            // <-, line 270
                            slice_from("0");
                            break;
                        case 6:
                            // (, line 271
                            // <-, line 271
                            slice_from("1");
                            break;
                        case 7:
                            // (, line 272
                            // <-, line 272
                            slice_from("2");
                            break;
                        case 8:
                            // (, line 273
                            // <-, line 273
                            slice_from("3");
                            break;
                        case 9:
                            // (, line 274
                            // <-, line 274
                            slice_from("4");
                            break;
                        case 10:
                            // (, line 275
                            // <-, line 275
                            slice_from("5");
                            break;
                        case 11:
                            // (, line 276
                            // <-, line 276
                            slice_from("6");
                            break;
                        case 12:
                            // (, line 277
                            // <-, line 277
                            slice_from("7");
                            break;
                        case 13:
                            // (, line 278
                            // <-, line 278
                            slice_from("8");
                            break;
                        case 14:
                            // (, line 279
                            // <-, line 279
                            slice_from("9");
                            break;
                        case 15:
                            // (, line 280
                            // delete, line 280
                            slice_del();
                            break;
                        case 16:
                            // (, line 283
                            // <-, line 283
                            slice_from("\u0621");
                            break;
                        case 17:
                            // (, line 284
                            // <-, line 284
                            slice_from("\u0623");
                            break;
                        case 18:
                            // (, line 285
                            // <-, line 285
                            slice_from("\u0625");
                            break;
                        case 19:
                            // (, line 286
                            // <-, line 286
                            slice_from("\u0626");
                            break;
                        case 20:
                            // (, line 287
                            // <-, line 287
                            slice_from("\u0622");
                            break;
                        case 21:
                            // (, line 288
                            // <-, line 288
                            slice_from("\u0624");
                            break;
                        case 22:
                            // (, line 289
                            // <-, line 289
                            slice_from("\u0627");
                            break;
                        case 23:
                            // (, line 290
                            // <-, line 290
                            slice_from("\u0628");
                            break;
                        case 24:
                            // (, line 291
                            // <-, line 291
                            slice_from("\u0629");
                            break;
                        case 25:
                            // (, line 292
                            // <-, line 292
                            slice_from("\u062A");
                            break;
                        case 26:
                            // (, line 293
                            // <-, line 293
                            slice_from("\u062B");
                            break;
                        case 27:
                            // (, line 294
                            // <-, line 294
                            slice_from("\u062C");
                            break;
                        case 28:
                            // (, line 295
                            // <-, line 295
                            slice_from("\u062D");
                            break;
                        case 29:
                            // (, line 296
                            // <-, line 296
                            slice_from("\u062E");
                            break;
                        case 30:
                            // (, line 297
                            // <-, line 297
                            slice_from("\u062F");
                            break;
                        case 31:
                            // (, line 298
                            // <-, line 298
                            slice_from("\u0630");
                            break;
                        case 32:
                            // (, line 299
                            // <-, line 299
                            slice_from("\u0631");
                            break;
                        case 33:
                            // (, line 300
                            // <-, line 300
                            slice_from("\u0632");
                            break;
                        case 34:
                            // (, line 301
                            // <-, line 301
                            slice_from("\u0633");
                            break;
                        case 35:
                            // (, line 302
                            // <-, line 302
                            slice_from("\u0634");
                            break;
                        case 36:
                            // (, line 303
                            // <-, line 303
                            slice_from("\u0635");
                            break;
                        case 37:
                            // (, line 304
                            // <-, line 304
                            slice_from("\u0636");
                            break;
                        case 38:
                            // (, line 305
                            // <-, line 305
                            slice_from("\u0637");
                            break;
                        case 39:
                            // (, line 306
                            // <-, line 306
                            slice_from("\u0638");
                            break;
                        case 40:
                            // (, line 307
                            // <-, line 307
                            slice_from("\u0639");
                            break;
                        case 41:
                            // (, line 308
                            // <-, line 308
                            slice_from("\u063A");
                            break;
                        case 42:
                            // (, line 309
                            // <-, line 309
                            slice_from("\u0641");
                            break;
                        case 43:
                            // (, line 310
                            // <-, line 310
                            slice_from("\u0642");
                            break;
                        case 44:
                            // (, line 311
                            // <-, line 311
                            slice_from("\u0643");
                            break;
                        case 45:
                            // (, line 312
                            // <-, line 312
                            slice_from("\u0644");
                            break;
                        case 46:
                            // (, line 313
                            // <-, line 313
                            slice_from("\u0645");
                            break;
                        case 47:
                            // (, line 314
                            // <-, line 314
                            slice_from("\u0646");
                            break;
                        case 48:
                            // (, line 315
                            // <-, line 315
                            slice_from("\u0647");
                            break;
                        case 49:
                            // (, line 316
                            // <-, line 316
                            slice_from("\u0648");
                            break;
                        case 50:
                            // (, line 317
                            // <-, line 317
                            slice_from("\u0649");
                            break;
                        case 51:
                            // (, line 318
                            // <-, line 318
                            slice_from("\u064A");
                            break;
                        case 52:
                            // (, line 321
                            // <-, line 321
                            slice_from("\u0644\u0627");
                            break;
                        case 53:
                            // (, line 322
                            // <-, line 322
                            slice_from("\u0644\u0623");
                            break;
                        case 54:
                            // (, line 323
                            // <-, line 323
                            slice_from("\u0644\u0625");
                            break;
                        case 55:
                            // (, line 324
                            // <-, line 324
                            slice_from("\u0644\u0622");
                            break;
                    }
                    break lab0;
                } while (false);
                cursor = v_2;
                // next, line 329
                if (cursor >= limit)
                {
                    return false;
                }
                cursor++;
            } while (false);
        }
        return true;
    }

    private boolean r_Normalize_post() {
        int among_var;
        int v_1;
        int v_2;
        int v_3;
        int v_4;
        // (, line 333
        // do, line 335
        v_1 = cursor;
        lab0: do {
            // (, line 335
            // backwards, line 337
            limit_backward = cursor; cursor = limit;
            // (, line 337
            // [, line 338
            ket = cursor;
            // substring, line 338
            among_var = find_among_b(a_1);
            if (among_var == 0)
            {
                break lab0;
            }
            // ], line 338
            bra = cursor;
            switch (among_var) {
                case 0:
                    break lab0;
                case 1:
                    // (, line 339
                    // <-, line 339
                    slice_from("\u0621");
                    break;
                case 2:
                    // (, line 340
                    // <-, line 340
                    slice_from("\u0621");
                    break;
                case 3:
                    // (, line 341
                    // <-, line 341
                    slice_from("\u0621");
                    break;
            }
            cursor = limit_backward;        } while (false);
        cursor = v_1;
        // do, line 346
        v_2 = cursor;
        lab1: do {
            // loop, line 346
            for (v_3 = I_word_len; v_3 > 0; v_3--)
            {
                // (, line 346
                // or, line 355
                lab2: do {
                    v_4 = cursor;
                    lab3: do {
                        // (, line 347
                        // [, line 349
                        bra = cursor;
                        // substring, line 349
                        among_var = find_among(a_2);
                        if (among_var == 0)
                        {
                            break lab3;
                        }
                        // ], line 349
                        ket = cursor;
                        switch (among_var) {
                            case 0:
                                break lab3;
                            case 1:
                                // (, line 350
                                // <-, line 350
                                slice_from("\u0627");
                                break;
                            case 2:
                                // (, line 351
                                // <-, line 351
                                slice_from("\u0648");
                                break;
                            case 3:
                                // (, line 352
                                // <-, line 352
                                slice_from("\u064A");
                                break;
                        }
                        break lab2;
                    } while (false);
                    cursor = v_4;
                    // next, line 356
                    if (cursor >= limit)
                    {
                        break lab1;
                    }
                    cursor++;
                } while (false);
            }
        } while (false);
        cursor = v_2;
        return true;
    }

    private boolean r_Checks1() {
        int among_var;
        // (, line 361
        I_word_len = (current.length());
        // [, line 363
        bra = cursor;
        // substring, line 363
        among_var = find_among(a_3);
        if (among_var == 0)
        {
            return false;
        }
        // ], line 363
        ket = cursor;
        switch (among_var) {
            case 0:
                return false;
            case 1:
                // (, line 364
                if (!(I_word_len > 4))
                {
                    return false;
                }
                // set is_noun, line 364
                B_is_noun = true;
                // unset is_verb, line 364
                B_is_verb = false;
                // set is_defined, line 364
                B_is_defined = true;
                break;
            case 2:
                // (, line 365
                if (!(I_word_len > 3))
                {
                    return false;
                }
                // set is_noun, line 365
                B_is_noun = true;
                // unset is_verb, line 365
                B_is_verb = false;
                // set is_defined, line 365
                B_is_defined = true;
                break;
        }
        return true;
    }

    private boolean r_Prefix_Step1() {
        int among_var;
        // (, line 371
        I_word_len = (current.length());
        // [, line 373
        bra = cursor;
        // substring, line 373
        among_var = find_among(a_4);
        if (among_var == 0)
        {
            return false;
        }
        // ], line 373
        ket = cursor;
        switch (among_var) {
            case 0:
                return false;
            case 1:
                // (, line 374
                if (!(I_word_len > 3))
                {
                    return false;
                }
                // <-, line 374
                slice_from("\u0623");
                break;
            case 2:
                // (, line 375
                if (!(I_word_len > 3))
                {
                    return false;
                }
                // <-, line 375
                slice_from("\u0622");
                break;
            case 3:
                // (, line 376
                if (!(I_word_len > 3))
                {
                    return false;
                }
                // <-, line 376
                slice_from("\u0623");
                break;
            case 4:
                // (, line 377
                if (!(I_word_len > 3))
                {
                    return false;
                }
                // <-, line 377
                slice_from("\u0627");
                break;
            case 5:
                // (, line 378
                if (!(I_word_len > 3))
                {
                    return false;
                }
                // <-, line 378
                slice_from("\u0625");
                break;
        }
        return true;
    }

    private boolean r_Prefix_Step2() {
        int among_var;
        int v_1;
        int v_2;
        // (, line 383
        I_word_len = (current.length());
        // not, line 385
        {
            v_1 = cursor;
            lab0: do {
                // literal, line 385
                if (!(eq_s("\u0641\u0627")))
                {
                    break lab0;
                }
                return false;
            } while (false);
            cursor = v_1;
        }
        // not, line 386
        {
            v_2 = cursor;
            lab1: do {
                // literal, line 386
                if (!(eq_s("\u0648\u0627")))
                {
                    break lab1;
                }
                return false;
            } while (false);
            cursor = v_2;
        }
        // [, line 387
        bra = cursor;
        // substring, line 387
        among_var = find_among(a_5);
        if (among_var == 0)
        {
            return false;
        }
        // ], line 387
        ket = cursor;
        switch (among_var) {
            case 0:
                return false;
            case 1:
                // (, line 388
                if (!(I_word_len > 3))
                {
                    return false;
                }
                // delete, line 388
                slice_del();
                break;
            case 2:
                // (, line 389
                if (!(I_word_len > 3))
                {
                    return false;
                }
                // delete, line 389
                slice_del();
                break;
        }
        return true;
    }

    private boolean r_Prefix_Step3a_Noun() {
        int among_var;
        // (, line 393
        I_word_len = (current.length());
        // [, line 395
        bra = cursor;
        // substring, line 395
        among_var = find_among(a_6);
        if (among_var == 0)
        {
            return false;
        }
        // ], line 395
        ket = cursor;
        switch (among_var) {
            case 0:
                return false;
            case 1:
                // (, line 396
                if (!(I_word_len > 5))
                {
                    return false;
                }
                // delete, line 396
                slice_del();
                break;
            case 2:
                // (, line 397
                if (!(I_word_len > 4))
                {
                    return false;
                }
                // delete, line 397
                slice_del();
                break;
        }
        return true;
    }

    private boolean r_Prefix_Step3b_Noun() {
        int among_var;
        int v_1;
        // (, line 401
        I_word_len = (current.length());
        // not, line 403
        {
            v_1 = cursor;
            lab0: do {
                // literal, line 403
                if (!(eq_s("\u0628\u0627")))
                {
                    break lab0;
                }
                return false;
            } while (false);
            cursor = v_1;
        }
        // [, line 404
        bra = cursor;
        // substring, line 404
        among_var = find_among(a_7);
        if (among_var == 0)
        {
            return false;
        }
        // ], line 404
        ket = cursor;
        switch (among_var) {
            case 0:
                return false;
            case 1:
                // (, line 405
                if (!(I_word_len > 3))
                {
                    return false;
                }
                // delete, line 405
                slice_del();
                break;
            case 2:
                // (, line 407
                if (!(I_word_len > 3))
                {
                    return false;
                }
                // <-, line 407
                slice_from("\u0628");
                break;
            case 3:
                // (, line 408
                if (!(I_word_len > 3))
                {
                    return false;
                }
                // <-, line 408
                slice_from("\u0643");
                break;
        }
        return true;
    }

    private boolean r_Prefix_Step3_Verb() {
        int among_var;
        // (, line 413
        I_word_len = (current.length());
        // [, line 415
        bra = cursor;
        // substring, line 415
        among_var = find_among(a_8);
        if (among_var == 0)
        {
            return false;
        }
        // ], line 415
        ket = cursor;
        switch (among_var) {
            case 0:
                return false;
            case 1:
                // (, line 417
                if (!(I_word_len > 4))
                {
                    return false;
                }
                // <-, line 417
                slice_from("\u064A");
                break;
            case 2:
                // (, line 418
                if (!(I_word_len > 4))
                {
                    return false;
                }
                // <-, line 418
                slice_from("\u062A");
                break;
            case 3:
                // (, line 419
                if (!(I_word_len > 4))
                {
                    return false;
                }
                // <-, line 419
                slice_from("\u0646");
                break;
            case 4:
                // (, line 420
                if (!(I_word_len > 4))
                {
                    return false;
                }
                // <-, line 420
                slice_from("\u0623");
                break;
        }
        return true;
    }

    private boolean r_Prefix_Step4_Verb() {
        int among_var;
        // (, line 424
        I_word_len = (current.length());
        // [, line 426
        bra = cursor;
        // substring, line 426
        among_var = find_among(a_9);
        if (among_var == 0)
        {
            return false;
        }
        // ], line 426
        ket = cursor;
        switch (among_var) {
            case 0:
                return false;
            case 1:
                // (, line 427
                if (!(I_word_len > 4))
                {
                    return false;
                }
                // set is_verb, line 427
                B_is_verb = true;
                // unset is_noun, line 427
                B_is_noun = false;
                // <-, line 427
                slice_from("\u0627\u0633\u062A");
                break;
        }
        return true;
    }

    private boolean r_Suffix_Noun_Step1a() {
        int among_var;
        // (, line 434
        I_word_len = (current.length());
        // [, line 436
        ket = cursor;
        // substring, line 436
        among_var = find_among_b(a_10);
        if (among_var == 0)
        {
            return false;
        }
        // ], line 436
        bra = cursor;
        switch (among_var) {
            case 0:
                return false;
            case 1:
                // (, line 437
                if (!(I_word_len >= 4))
                {
                    return false;
                }
                // delete, line 437
                slice_del();
                break;
            case 2:
                // (, line 438
                if (!(I_word_len >= 5))
                {
                    return false;
                }
                // delete, line 438
                slice_del();
                break;
            case 3:
                // (, line 439
                if (!(I_word_len >= 6))
                {
                    return false;
                }
                // delete, line 439
                slice_del();
                break;
        }
        return true;
    }

    private boolean r_Suffix_Noun_Step1b() {
        int among_var;
        // (, line 442
        I_word_len = (current.length());
        // [, line 444
        ket = cursor;
        // substring, line 444
        among_var = find_among_b(a_11);
        if (among_var == 0)
        {
            return false;
        }
        // ], line 444
        bra = cursor;
        switch (among_var) {
            case 0:
                return false;
            case 1:
                // (, line 445
                if (!(I_word_len > 5))
                {
                    return false;
                }
                // delete, line 445
                slice_del();
                break;
        }
        return true;
    }

    private boolean r_Suffix_Noun_Step2a() {
        int among_var;
        // (, line 449
        I_word_len = (current.length());
        // [, line 451
        ket = cursor;
        // substring, line 451
        among_var = find_among_b(a_12);
        if (among_var == 0)
        {
            return false;
        }
        // ], line 451
        bra = cursor;
        switch (among_var) {
            case 0:
                return false;
            case 1:
                // (, line 452
                if (!(I_word_len > 4))
                {
                    return false;
                }
                // delete, line 452
                slice_del();
                break;
        }
        return true;
    }

    private boolean r_Suffix_Noun_Step2b() {
        int among_var;
        // (, line 456
        I_word_len = (current.length());
        // [, line 458
        ket = cursor;
        // substring, line 458
        among_var = find_among_b(a_13);
        if (among_var == 0)
        {
            return false;
        }
        // ], line 458
        bra = cursor;
        switch (among_var) {
            case 0:
                return false;
            case 1:
                // (, line 459
                if (!(I_word_len >= 5))
                {
                    return false;
                }
                // delete, line 459
                slice_del();
                break;
        }
        return true;
    }

    private boolean r_Suffix_Noun_Step2c1() {
        int among_var;
        // (, line 463
        I_word_len = (current.length());
        // [, line 465
        ket = cursor;
        // substring, line 465
        among_var = find_among_b(a_14);
        if (among_var == 0)
        {
            return false;
        }
        // ], line 465
        bra = cursor;
        switch (among_var) {
            case 0:
                return false;
            case 1:
                // (, line 466
                if (!(I_word_len >= 4))
                {
                    return false;
                }
                // delete, line 466
                slice_del();
                break;
        }
        return true;
    }

    private boolean r_Suffix_Noun_Step2c2() {
        int among_var;
        // (, line 469
        I_word_len = (current.length());
        // [, line 471
        ket = cursor;
        // substring, line 471
        among_var = find_among_b(a_15);
        if (among_var == 0)
        {
            return false;
        }
        // ], line 471
        bra = cursor;
        switch (among_var) {
            case 0:
                return false;
            case 1:
                // (, line 472
                if (!(I_word_len >= 4))
                {
                    return false;
                }
                // delete, line 472
                slice_del();
                break;
        }
        return true;
    }

    private boolean r_Suffix_Noun_Step3() {
        int among_var;
        // (, line 475
        I_word_len = (current.length());
        // [, line 477
        ket = cursor;
        // substring, line 477
        among_var = find_among_b(a_16);
        if (among_var == 0)
        {
            return false;
        }
        // ], line 477
        bra = cursor;
        switch (among_var) {
            case 0:
                return false;
            case 1:
                // (, line 478
                if (!(I_word_len >= 3))
                {
                    return false;
                }
                // delete, line 478
                slice_del();
                break;
        }
        return true;
    }

    private boolean r_Suffix_Verb_Step1() {
        int among_var;
        // (, line 482
        I_word_len = (current.length());
        // [, line 484
        ket = cursor;
        // substring, line 484
        among_var = find_among_b(a_17);
        if (among_var == 0)
        {
            return false;
        }
        // ], line 484
        bra = cursor;
        switch (among_var) {
            case 0:
                return false;
            case 1:
                // (, line 485
                if (!(I_word_len >= 4))
                {
                    return false;
                }
                // delete, line 485
                slice_del();
                break;
            case 2:
                // (, line 486
                if (!(I_word_len >= 5))
                {
                    return false;
                }
                // delete, line 486
                slice_del();
                break;
            case 3:
                // (, line 487
                if (!(I_word_len >= 6))
                {
                    return false;
                }
                // delete, line 487
                slice_del();
                break;
        }
        return true;
    }

    private boolean r_Suffix_Verb_Step2a() {
        int among_var;
        // (, line 490
        I_word_len = (current.length());
        // [, line 492
        ket = cursor;
        // substring, line 492
        among_var = find_among_b(a_18);
        if (among_var == 0)
        {
            return false;
        }
        // ], line 492
        bra = cursor;
        switch (among_var) {
            case 0:
                return false;
            case 1:
                // (, line 493
                if (!(I_word_len >= 4))
                {
                    return false;
                }
                // delete, line 493
                slice_del();
                break;
            case 2:
                // (, line 494
                if (!(I_word_len >= 4))
                {
                    return false;
                }
                // delete, line 494
                slice_del();
                break;
            case 3:
                // (, line 495
                if (!(I_word_len >= 5))
                {
                    return false;
                }
                // delete, line 495
                slice_del();
                break;
            case 4:
                // (, line 496
                if (!(I_word_len > 5))
                {
                    return false;
                }
                // delete, line 496
                slice_del();
                break;
            case 5:
                // (, line 497
                if (!(I_word_len >= 6))
                {
                    return false;
                }
                // delete, line 497
                slice_del();
                break;
        }
        return true;
    }

    private boolean r_Suffix_Verb_Step2b() {
        int among_var;
        // (, line 501
        I_word_len = (current.length());
        // [, line 503
        ket = cursor;
        // substring, line 503
        among_var = find_among_b(a_19);
        if (among_var == 0)
        {
            return false;
        }
        // ], line 503
        bra = cursor;
        switch (among_var) {
            case 0:
                return false;
            case 1:
                // (, line 504
                if (!(I_word_len >= 5))
                {
                    return false;
                }
                // delete, line 504
                slice_del();
                break;
        }
        return true;
    }

    private boolean r_Suffix_Verb_Step2c() {
        int among_var;
        // (, line 509
        I_word_len = (current.length());
        // [, line 511
        ket = cursor;
        // substring, line 511
        among_var = find_among_b(a_20);
        if (among_var == 0)
        {
            return false;
        }
        // ], line 511
        bra = cursor;
        switch (among_var) {
            case 0:
                return false;
            case 1:
                // (, line 512
                if (!(I_word_len >= 4))
                {
                    return false;
                }
                // delete, line 512
                slice_del();
                break;
            case 2:
                // (, line 513
                if (!(I_word_len >= 6))
                {
                    return false;
                }
                // delete, line 513
                slice_del();
                break;
        }
        return true;
    }

    private boolean r_Suffix_All_alef_maqsura() {
        int among_var;
        // (, line 517
        I_word_len = (current.length());
        // [, line 519
        ket = cursor;
        // substring, line 519
        among_var = find_among_b(a_21);
        if (among_var == 0)
        {
            return false;
        }
        // ], line 519
        bra = cursor;
        switch (among_var) {
            case 0:
                return false;
            case 1:
                // (, line 520
                // <-, line 520
                slice_from("\u064A");
                break;
        }
        return true;
    }

    public boolean stem() {
        int v_1;
        int v_2;
        int v_3;
        int v_4;
        int v_5;
        int v_7;
        int v_8;
        int v_9;
        int v_10;
        int v_12;
        int v_13;
        int v_15;
        int v_16;
        int v_17;
        int v_18;
        int v_19;
        int v_20;
        // (, line 527
        // set is_noun, line 529
        B_is_noun = true;
        // set is_verb, line 530
        B_is_verb = true;
        // unset is_defined, line 531
        B_is_defined = false;
        // do, line 534
        v_1 = cursor;
        lab0: do {
            // call Checks1, line 534
            if (!r_Checks1())
            {
                break lab0;
            }
        } while (false);
        cursor = v_1;
        // do, line 537
        v_2 = cursor;
        lab1: do {
            // call Normalize_pre, line 537
            if (!r_Normalize_pre())
            {
                break lab1;
            }
        } while (false);
        cursor = v_2;
        // backwards, line 540
        limit_backward = cursor; cursor = limit;
        // (, line 540
        // do, line 542
        v_3 = limit - cursor;
        lab2: do {
            // (, line 542
            // or, line 556
            lab3: do {
                v_4 = limit - cursor;
                lab4: do {
                    // (, line 544
                    // Boolean test is_verb, line 545
                    if (!(B_is_verb))
                    {
                        break lab4;
                    }
                    // (, line 546
                    // or, line 551
                    lab5: do {
                        v_5 = limit - cursor;
                        lab6: do {
                            // (, line 547
                            // (, line 548
                            // atleast, line 548
                            {
                                int v_6 = 1;
                                // atleast, line 548
                                replab7: while(true)
                                {
                                    v_7 = limit - cursor;
                                    lab8: do {
                                        // call Suffix_Verb_Step1, line 548
                                        if (!r_Suffix_Verb_Step1())
                                        {
                                            break lab8;
                                        }
                                        v_6--;
                                        continue replab7;
                                    } while (false);
                                    cursor = limit - v_7;
                                    break replab7;
                                }
                                if (v_6 > 0)
                                {
                                    break lab6;
                                }
                            }
                            // (, line 549
                            // or, line 549
                            lab9: do {
                                v_8 = limit - cursor;
                                lab10: do {
                                    // call Suffix_Verb_Step2a, line 549
                                    if (!r_Suffix_Verb_Step2a())
                                    {
                                        break lab10;
                                    }
                                    break lab9;
                                } while (false);
                                cursor = limit - v_8;
                                lab11: do {
                                    // call Suffix_Verb_Step2c, line 549
                                    if (!r_Suffix_Verb_Step2c())
                                    {
                                        break lab11;
                                    }
                                    break lab9;
                                } while (false);
                                cursor = limit - v_8;
                                // next, line 549
                                if (cursor <= limit_backward)
                                {
                                    break lab6;
                                }
                                cursor--;
                            } while (false);
                            break lab5;
                        } while (false);
                        cursor = limit - v_5;
                        lab12: do {
                            // call Suffix_Verb_Step2b, line 551
                            if (!r_Suffix_Verb_Step2b())
                            {
                                break lab12;
                            }
                            break lab5;
                        } while (false);
                        cursor = limit - v_5;
                        // call Suffix_Verb_Step2a, line 552
                        if (!r_Suffix_Verb_Step2a())
                        {
                            break lab4;
                        }
                    } while (false);
                    break lab3;
                } while (false);
                cursor = limit - v_4;
                lab13: do {
                    // (, line 556
                    // Boolean test is_noun, line 557
                    if (!(B_is_noun))
                    {
                        break lab13;
                    }
                    // (, line 558
                    // try, line 560
                    v_9 = limit - cursor;
                    lab14: do {
                        // (, line 560
                        // or, line 562
                        lab15: do {
                            v_10 = limit - cursor;
                            lab16: do {
                                // call Suffix_Noun_Step2c2, line 561
                                if (!r_Suffix_Noun_Step2c2())
                                {
                                    break lab16;
                                }
                                break lab15;
                            } while (false);
                            cursor = limit - v_10;
                            lab17: do {
                                // (, line 562
                                // not, line 562
                                lab18: do {
                                    // Boolean test is_defined, line 562
                                    if (!(B_is_defined))
                                    {
                                        break lab18;
                                    }
                                    break lab17;
                                } while (false);
                                // call Suffix_Noun_Step1a, line 562
                                if (!r_Suffix_Noun_Step1a())
                                {
                                    break lab17;
                                }
                                // (, line 562
                                // or, line 564
                                lab19: do {
                                    v_12 = limit - cursor;
                                    lab20: do {
                                        // call Suffix_Noun_Step2a, line 563
                                        if (!r_Suffix_Noun_Step2a())
                                        {
                                            break lab20;
                                        }
                                        break lab19;
                                    } while (false);
                                    cursor = limit - v_12;
                                    lab21: do {
                                        // call Suffix_Noun_Step2b, line 564
                                        if (!r_Suffix_Noun_Step2b())
                                        {
                                            break lab21;
                                        }
                                        break lab19;
                                    } while (false);
                                    cursor = limit - v_12;
                                    lab22: do {
                                        // call Suffix_Noun_Step2c1, line 565
                                        if (!r_Suffix_Noun_Step2c1())
                                        {
                                            break lab22;
                                        }
                                        break lab19;
                                    } while (false);
                                    cursor = limit - v_12;
                                    // next, line 566
                                    if (cursor <= limit_backward)
                                    {
                                        break lab17;
                                    }
                                    cursor--;
                                } while (false);
                                break lab15;
                            } while (false);
                            cursor = limit - v_10;
                            lab23: do {
                                // (, line 567
                                // call Suffix_Noun_Step1b, line 567
                                if (!r_Suffix_Noun_Step1b())
                                {
                                    break lab23;
                                }
                                // (, line 567
                                // or, line 569
                                lab24: do {
                                    v_13 = limit - cursor;
                                    lab25: do {
                                        // call Suffix_Noun_Step2a, line 568
                                        if (!r_Suffix_Noun_Step2a())
                                        {
                                            break lab25;
                                        }
                                        break lab24;
                                    } while (false);
                                    cursor = limit - v_13;
                                    lab26: do {
                                        // call Suffix_Noun_Step2b, line 569
                                        if (!r_Suffix_Noun_Step2b())
                                        {
                                            break lab26;
                                        }
                                        break lab24;
                                    } while (false);
                                    cursor = limit - v_13;
                                    // call Suffix_Noun_Step2c1, line 570
                                    if (!r_Suffix_Noun_Step2c1())
                                    {
                                        break lab23;
                                    }
                                } while (false);
                                break lab15;
                            } while (false);
                            cursor = limit - v_10;
                            lab27: do {
                                // (, line 571
                                // not, line 571
                                lab28: do {
                                    // Boolean test is_defined, line 571
                                    if (!(B_is_defined))
                                    {
                                        break lab28;
                                    }
                                    break lab27;
                                } while (false);
                                // call Suffix_Noun_Step2a, line 571
                                if (!r_Suffix_Noun_Step2a())
                                {
                                    break lab27;
                                }
                                break lab15;
                            } while (false);
                            cursor = limit - v_10;
                            // (, line 572
                            // call Suffix_Noun_Step2b, line 572
                            if (!r_Suffix_Noun_Step2b())
                            {
                                cursor = limit - v_9;
                                break lab14;
                            }
                        } while (false);
                    } while (false);
                    // call Suffix_Noun_Step3, line 574
                    if (!r_Suffix_Noun_Step3())
                    {
                        break lab13;
                    }
                    break lab3;
                } while (false);
                cursor = limit - v_4;
                // call Suffix_All_alef_maqsura, line 580
                if (!r_Suffix_All_alef_maqsura())
                {
                    break lab2;
                }
            } while (false);
        } while (false);
        cursor = limit - v_3;
        cursor = limit_backward;        // do, line 585
        v_15 = cursor;
        lab29: do {
            // (, line 585
            // try, line 586
            v_16 = cursor;
            lab30: do {
                // call Prefix_Step1, line 586
                if (!r_Prefix_Step1())
                {
                    cursor = v_16;
                    break lab30;
                }
            } while (false);
            // try, line 587
            v_17 = cursor;
            lab31: do {
                // call Prefix_Step2, line 587
                if (!r_Prefix_Step2())
                {
                    cursor = v_17;
                    break lab31;
                }
            } while (false);
            // (, line 588
            // or, line 589
            lab32: do {
                v_18 = cursor;
                lab33: do {
                    // call Prefix_Step3a_Noun, line 588
                    if (!r_Prefix_Step3a_Noun())
                    {
                        break lab33;
                    }
                    break lab32;
                } while (false);
                cursor = v_18;
                lab34: do {
                    // (, line 589
                    // Boolean test is_noun, line 589
                    if (!(B_is_noun))
                    {
                        break lab34;
                    }
                    // call Prefix_Step3b_Noun, line 589
                    if (!r_Prefix_Step3b_Noun())
                    {
                        break lab34;
                    }
                    break lab32;
                } while (false);
                cursor = v_18;
                // (, line 590
                // Boolean test is_verb, line 590
                if (!(B_is_verb))
                {
                    break lab29;
                }
                // try, line 590
                v_19 = cursor;
                lab35: do {
                    // call Prefix_Step3_Verb, line 590
                    if (!r_Prefix_Step3_Verb())
                    {
                        cursor = v_19;
                        break lab35;
                    }
                } while (false);
                // call Prefix_Step4_Verb, line 590
                if (!r_Prefix_Step4_Verb())
                {
                    break lab29;
                }
            } while (false);
        } while (false);
        cursor = v_15;
        // do, line 595
        v_20 = cursor;
        lab36: do {
            // call Normalize_post, line 595
            if (!r_Normalize_post())
            {
                break lab36;
            }
        } while (false);
        cursor = v_20;
        return true;
    }

    public boolean equals( Object o ) {
        return o instanceof arabicStemmer;
    }

    public int hashCode() {
        return arabicStemmer.class.getName().hashCode();
    }



}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy