lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dna...@apache.org
Subject cvs commit: jakarta-lucene/src/java/org/apache/lucene/analysis/ru RussianAnalyzer.java RussianStemmer.java
Date Sun, 15 Aug 2004 11:47:26 GMT
dnaber      2004/08/15 04:47:26

  Modified:    src/java/org/apache/lucene/analysis/ru RussianAnalyzer.java
                        RussianStemmer.java
  Log:
  make constants final
  
  Revision  Changes    Path
  1.9       +35 -35    jakarta-lucene/src/java/org/apache/lucene/analysis/ru/RussianAnalyzer.java
  
  Index: RussianAnalyzer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/java/org/apache/lucene/analysis/ru/RussianAnalyzer.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- RussianAnalyzer.java	14 Aug 2004 11:14:37 -0000	1.8
  +++ RussianAnalyzer.java	15 Aug 2004 11:47:26 -0000	1.9
  @@ -35,39 +35,39 @@
    */
   public final class RussianAnalyzer extends Analyzer
   {
  -    // letters
  -    private static char A = 0;
  -    private static char B = 1;
  -    private static char V = 2;
  -    private static char G = 3;
  -    private static char D = 4;
  -    private static char E = 5;
  -    private static char ZH = 6;
  -    private static char Z = 7;
  -    private static char I = 8;
  -    private static char I_ = 9;
  -    private static char K = 10;
  -    private static char L = 11;
  -    private static char M = 12;
  -    private static char N = 13;
  -    private static char O = 14;
  -    private static char P = 15;
  -    private static char R = 16;
  -    private static char S = 17;
  -    private static char T = 18;
  -    private static char U = 19;
  -    //private static char F = 20;
  -    private static char X = 21;
  -    //private static char TS = 22;
  -    private static char CH = 23;
  -    private static char SH = 24;
  -    private static char SHCH = 25;
  -    //private static char HARD = 26;
  -    private static char Y = 27;
  -    private static char SOFT = 28;
  -    private static char AE = 29;
  -    private static char IU = 30;
  -    private static char IA = 31;
  +    // letters (currently unused letters are commented out)
  +    private final static char A = 0;
  +    private final static char B = 1;
  +    private final static char V = 2;
  +    private final static char G = 3;
  +    private final static char D = 4;
  +    private final static char E = 5;
  +    private final static char ZH = 6;
  +    private final static char Z = 7;
  +    private final static char I = 8;
  +    private final static char I_ = 9;
  +    private final static char K = 10;
  +    private final static char L = 11;
  +    private final static char M = 12;
  +    private final static char N = 13;
  +    private final static char O = 14;
  +    private final static char P = 15;
  +    private final static char R = 16;
  +    private final static char S = 17;
  +    private final static char T = 18;
  +    private final static char U = 19;
  +    //private final static char F = 20;
  +    private final static char X = 21;
  +    //private final static char TS = 22;
  +    private final static char CH = 23;
  +    private final static char SH = 24;
  +    private final static char SHCH = 25;
  +    //private final static char HARD = 26;
  +    private final static char Y = 27;
  +    private final static char SOFT = 28;
  +    private final static char AE = 29;
  +    private final static char IU = 30;
  +    private final static char IA = 31;
   
       /**
        * List of typical Russian stopwords.
  @@ -221,7 +221,7 @@
           for (int i = 0; i < res.length; i++)
           {
               char[] theStopWord = RUSSIAN_STOP_WORDS[i];
  -            // translate the word,using the charset
  +            // translate the word, using the charset
               StringBuffer theWord = new StringBuffer();
               for (int j = 0; j < theStopWord.length; j++)
               {
  
  
  
  1.8       +34 -34    jakarta-lucene/src/java/org/apache/lucene/analysis/ru/RussianStemmer.java
  
  Index: RussianStemmer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/java/org/apache/lucene/analysis/ru/RussianStemmer.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- RussianStemmer.java	14 Aug 2004 14:14:45 -0000	1.7
  +++ RussianStemmer.java	15 Aug 2004 11:47:26 -0000	1.8
  @@ -29,39 +29,39 @@
       // positions of RV, R1 and R2 respectively
       private int RV, R1, R2;
   
  -    // letters
  -    private static char A = 0;
  -    //private static char B = 1;
  -    private static char V = 2;
  -    private static char G = 3;
  -    //private static char D = 4;
  -    private static char E = 5;
  -    //private static char ZH = 6;
  -    //private static char Z = 7;
  -    private static char I = 8;
  -    private static char I_ = 9;
  -    //private static char K = 10;
  -    private static char L = 11;
  -    private static char M = 12;
  -    private static char N = 13;
  -    private static char O = 14;
  -    //private static char P = 15;
  -    //private static char R = 16;
  -    private static char S = 17;
  -    private static char T = 18;
  -    private static char U = 19;
  -    //private static char F = 20;
  -    private static char X = 21;
  -    //private static char TS = 22;
  -    //private static char CH = 23;
  -    private static char SH = 24;
  -    private static char SHCH = 25;
  -    //private static char HARD = 26;
  -    private static char Y = 27;
  -    private static char SOFT = 28;
  -    private static char AE = 29;
  -    private static char IU = 30;
  -    private static char IA = 31;
  +    // letters (currently unused letters are commented out)
  +    private final static char A = 0;
  +    //private final static char B = 1;
  +    private final static char V = 2;
  +    private final static char G = 3;
  +    //private final static char D = 4;
  +    private final static char E = 5;
  +    //private final static char ZH = 6;
  +    //private final static char Z = 7;
  +    private final static char I = 8;
  +    private final static char I_ = 9;
  +    //private final static char K = 10;
  +    private final static char L = 11;
  +    private final static char M = 12;
  +    private final static char N = 13;
  +    private final static char O = 14;
  +    //private final static char P = 15;
  +    //private final static char R = 16;
  +    private final static char S = 17;
  +    private final static char T = 18;
  +    private final static char U = 19;
  +    //private final static char F = 20;
  +    private final static char X = 21;
  +    //private final static char TS = 22;
  +    //private final static char CH = 23;
  +    private final static char SH = 24;
  +    private final static char SHCH = 25;
  +    //private final static char HARD = 26;
  +    private final static char Y = 27;
  +    private final static char SOFT = 28;
  +    private final static char AE = 29;
  +    private final static char IU = 30;
  +    private final static char IA = 31;
   
       // stem definitions
       private static char[] vowels = { A, E, I, O, U, Y, AE, IU, IA };
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


Mime
View raw message