lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uschind...@apache.org
Subject svn commit: r1227386 - /lucene/dev/branches/lucene3305/modules/analysis/kuromoji/src/java/org/apache/lucene/analysis/kuromoji/dict/CharacterDefinition.java
Date Wed, 04 Jan 2012 23:33:35 GMT
Author: uschindler
Date: Wed Jan  4 23:33:34 2012
New Revision: 1227386

URL: http://svn.apache.org/viewvc?rev=1227386&view=rev
Log:
LUCENE-3305: fix indent

Modified:
    lucene/dev/branches/lucene3305/modules/analysis/kuromoji/src/java/org/apache/lucene/analysis/kuromoji/dict/CharacterDefinition.java

Modified: lucene/dev/branches/lucene3305/modules/analysis/kuromoji/src/java/org/apache/lucene/analysis/kuromoji/dict/CharacterDefinition.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3305/modules/analysis/kuromoji/src/java/org/apache/lucene/analysis/kuromoji/dict/CharacterDefinition.java?rev=1227386&r1=1227385&r2=1227386&view=diff
==============================================================================
--- lucene/dev/branches/lucene3305/modules/analysis/kuromoji/src/java/org/apache/lucene/analysis/kuromoji/dict/CharacterDefinition.java
(original)
+++ lucene/dev/branches/lucene3305/modules/analysis/kuromoji/src/java/org/apache/lucene/analysis/kuromoji/dict/CharacterDefinition.java
Wed Jan  4 23:33:34 2012
@@ -28,71 +28,71 @@ public final class CharacterDefinition i
   private final EnumMap<CharacterClass, int[]> invokeDefinitionMap =
       new EnumMap<CharacterClass, int[]>(CharacterClass.class); // invoke, group, length
       
-      public enum CharacterClass {
-        NGRAM, DEFAULT, SPACE, SYMBOL, NUMERIC, ALPHA, CYRILLIC, GREEK, HIRAGANA, KATAKANA,
KANJI, KANJINUMERIC;
-        
-        public int getId() {
-          return ordinal();
-        }
-      }
-      
-      /**
-       * Constructor
-       */
-      public CharacterDefinition() {
-        for (int i = 0; i < characterCategoryMap.length; i++) {
-          characterCategoryMap[i] = CharacterClass.DEFAULT;
-        }
-      }
-      
-      public int lookup(char c) {
-        return characterCategoryMap[c].getId();
-      }
-      
-      public CharacterClass getCharacterClass(char c) {
-        return characterCategoryMap[c];
-      }
-      
-      public boolean isInvoke(char c) {
-        CharacterClass characterClass = characterCategoryMap[c];
-        int[] invokeDefinition = invokeDefinitionMap.get(characterClass);
-        return invokeDefinition[0] == 1;
-      }
-      
-      public boolean isGroup(char c) {
-        CharacterClass characterClass = characterCategoryMap[c];
-        int[] invokeDefinition = invokeDefinitionMap.get(characterClass);
-        return invokeDefinition[1] == 1;
-      }
-      
-      public boolean isKanji(char c) {
-        return characterCategoryMap[c] == CharacterClass.KANJI ||
-            characterCategoryMap[c] == CharacterClass.KANJINUMERIC;
-      }
-      
-      /**
-       * Put mapping from unicode code point to character class.
-       * 
-       * @param codePoint
-       *            code point
-       * @param characterClassName character class name
-       */
-      public void putCharacterCategory(int codePoint, String characterClassName) {
-        characterClassName = characterClassName.split(" ")[0]; // use first
-        // category
-        // class
-        
-        // Override Nakaguro
-        if (codePoint == 0x30FB) {
-          characterClassName = "SYMBOL";
-        }
-        characterCategoryMap[codePoint] = CharacterClass.valueOf(characterClassName);
-      }
-      
-      public void putInvokeDefinition(String characterClassName, int invoke, int group, int
length) {
-        CharacterClass characterClass = CharacterClass
-            .valueOf(characterClassName);
-        int[] values = { invoke, group, length };
-        invokeDefinitionMap.put(characterClass, values);
-      }
+  public enum CharacterClass {
+    NGRAM, DEFAULT, SPACE, SYMBOL, NUMERIC, ALPHA, CYRILLIC, GREEK, HIRAGANA, KATAKANA, KANJI,
KANJINUMERIC;
+    
+    public int getId() {
+      return ordinal();
+    }
+  }
+      
+  /**
+   * Constructor
+   */
+  public CharacterDefinition() {
+    for (int i = 0; i < characterCategoryMap.length; i++) {
+      characterCategoryMap[i] = CharacterClass.DEFAULT;
+    }
+  }
+  
+  public int lookup(char c) {
+    return characterCategoryMap[c].getId();
+  }
+  
+  public CharacterClass getCharacterClass(char c) {
+    return characterCategoryMap[c];
+  }
+  
+  public boolean isInvoke(char c) {
+    CharacterClass characterClass = characterCategoryMap[c];
+    int[] invokeDefinition = invokeDefinitionMap.get(characterClass);
+    return invokeDefinition[0] == 1;
+  }
+  
+  public boolean isGroup(char c) {
+    CharacterClass characterClass = characterCategoryMap[c];
+    int[] invokeDefinition = invokeDefinitionMap.get(characterClass);
+    return invokeDefinition[1] == 1;
+  }
+  
+  public boolean isKanji(char c) {
+    return characterCategoryMap[c] == CharacterClass.KANJI ||
+        characterCategoryMap[c] == CharacterClass.KANJINUMERIC;
+  }
+  
+  /**
+   * Put mapping from unicode code point to character class.
+   * 
+   * @param codePoint
+   *            code point
+   * @param characterClassName character class name
+   */
+  public void putCharacterCategory(int codePoint, String characterClassName) {
+    characterClassName = characterClassName.split(" ")[0]; // use first
+    // category
+    // class
+    
+    // Override Nakaguro
+    if (codePoint == 0x30FB) {
+      characterClassName = "SYMBOL";
+    }
+    characterCategoryMap[codePoint] = CharacterClass.valueOf(characterClassName);
+  }
+  
+  public void putInvokeDefinition(String characterClassName, int invoke, int group, int length)
{
+    CharacterClass characterClass = CharacterClass
+        .valueOf(characterClassName);
+    int[] values = { invoke, group, length };
+    invokeDefinitionMap.put(characterClass, values);
+  }
 }



Mime
View raw message