// Path: src/main/java/org/apache/lucene/analysis/kr/morph/MorphException.java
// public class MorphException extends RuntimeException {
// 
//     private static final long serialVersionUID = 7605164221652820591L;
// 
//     public MorphException() {
//         super();
//     }
// 
//     public MorphException(String message) {
//         super(message);
//     }
// 
//     public MorphException(String message, Throwable cause) {
//         super(message, cause);
//     }
// 
//     public MorphException(Throwable cause) {
//         super(cause);
//     }
// }
// 
// Path: src/main/java/org/apache/lucene/analysis/kr/morph/WordEntry.java
// public class WordEntry implements Serializable {
// 
//     private static final long serialVersionUID = -5847413036811319308L;
// 
//     public static final int IDX_NOUN = 0;
//     public static final int IDX_VERB = 1;
//     public static final int IDX_BUSA = 2;
//     public static final int IDX_DOV = 3;
//     public static final int IDX_BEV = 4;
//     public static final int IDX_NE = 5;
//     public static final int IDX_ADJ = 6; // 형용사
//     public static final int IDX_NPR = 7;  // 명사의 분류 (M:Measure)
//     public static final int IDX_CNOUNX = 8;
//     public static final int IDX_REGURA = 9;
// 
//     /** 단어 */
//     private String word;
// 
//     /** 단어특성 */
//     private char[] features;
// 
//     private List<CompoundEntry> compounds = new ArrayList<CompoundEntry>();
// 
//     public WordEntry() { }
// 
//     public WordEntry(String word) {
//         this.word = word;
//     }
// 
//     public WordEntry(String word, char[] cs) {
//         this.word = word;
//         this.features = Arrays.copyOf(cs, cs.length);
//     }
// 
//     public WordEntry(String word, List<CompoundEntry> c) {
//         this.word = word;
//         this.compounds = c;
//     }
// 
//     public void setWord(String w) {
//         this.word = w;
//     }
// 
//     public String getWord() {
//         return this.word;
//     }
// 
//     public void setFeatures(char[] cs) {
//         this.features = cs;
//     }
// 
//     public char getFeature(int index) {
//         if (features == null || features.length < index) return '0';
//         return features[index];
//     }
// 
//     public char[] getFeatures() {
//         return this.features;
//     }
// 
//     public void setCompounds(List<CompoundEntry> c) {
//         this.compounds = c;
//     }
// 
//     public List<CompoundEntry> getCompounds() {
//         return this.compounds;
//     }
// }


import org.apache.lucene.analysis.kr.morph.MorphException;
import org.apache.lucene.analysis.kr.morph.WordEntry;
/*
 * Copyright 2011-2013 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.apache.lucene.analysis.kr.utils;


/**
 * 동사의 불규칙 변형을 처리하는 Utility Class
 *
 * @author S.M.Lee
 */
public class IrregularUtil {

    // ㅂ 불규칙
    public static final char IRR_TYPE_BIUP = 'B';

    // ㅎ 불규칙
    public static final char IRR_TYPE_HIOOT = 'H';

    // ㄹ 불규칙
    public static final char IRR_TYPE_LIUL = 'U';

    // 르 불규칙
    public static final char IRR_TYPE_LOO = 'L';

    // ㅅ 불규칙
    public static final char IRR_TYPE_SIUT = 'S';

    // ㄷ 불규칙
    public static final char IRR_TYPE_DI = 'D';

    // 러 불규칙
    public static final char IRR_TYPE_RU = 'R';

    // 으 탈락
    public static final char IRR_TYPE_UI = 'X';

    // 규칙형
    public static final char IRR_TYPE_REGULAR = 'X';

// Path: src/main/java/org/apache/lucene/analysis/kr/morph/MorphException.java
// public class MorphException extends RuntimeException {
// 
//     private static final long serialVersionUID = 7605164221652820591L;
// 
//     public MorphException() {
//         super();
//     }
// 
//     public MorphException(String message) {
//         super(message);
//     }
// 
//     public MorphException(String message, Throwable cause) {
//         super(message, cause);
//     }
// 
//     public MorphException(Throwable cause) {
//         super(cause);
//     }
// }
// 
// Path: src/main/java/org/apache/lucene/analysis/kr/morph/WordEntry.java
// public class WordEntry implements Serializable {
// 
//     private static final long serialVersionUID = -5847413036811319308L;
// 
//     public static final int IDX_NOUN = 0;
//     public static final int IDX_VERB = 1;
//     public static final int IDX_BUSA = 2;
//     public static final int IDX_DOV = 3;
//     public static final int IDX_BEV = 4;
//     public static final int IDX_NE = 5;
//     public static final int IDX_ADJ = 6; // 형용사
//     public static final int IDX_NPR = 7;  // 명사의 분류 (M:Measure)
//     public static final int IDX_CNOUNX = 8;
//     public static final int IDX_REGURA = 9;
// 
//     /** 단어 */
//     private String word;
// 
//     /** 단어특성 */
//     private char[] features;
// 
//     private List<CompoundEntry> compounds = new ArrayList<CompoundEntry>();
// 
//     public WordEntry() { }
// 
//     public WordEntry(String word) {
//         this.word = word;
//     }
// 
//     public WordEntry(String word, char[] cs) {
//         this.word = word;
//         this.features = Arrays.copyOf(cs, cs.length);
//     }
// 
//     public WordEntry(String word, List<CompoundEntry> c) {
//         this.word = word;
//         this.compounds = c;
//     }
// 
//     public void setWord(String w) {
//         this.word = w;
//     }
// 
//     public String getWord() {
//         return this.word;
//     }
// 
//     public void setFeatures(char[] cs) {
//         this.features = cs;
//     }
// 
//     public char getFeature(int index) {
//         if (features == null || features.length < index) return '0';
//         return features[index];
//     }
// 
//     public char[] getFeatures() {
//         return this.features;
//     }
// 
//     public void setCompounds(List<CompoundEntry> c) {
//         this.compounds = c;
//     }
// 
//     public List<CompoundEntry> getCompounds() {
//         return this.compounds;
//     }
// }


// Path: src/main/java/org/apache/lucene/analysis/kr/utils/IrregularUtil.java
import org.apache.lucene.analysis.kr.morph.MorphException;
import org.apache.lucene.analysis.kr.morph.WordEntry;

/*
 * Copyright 2011-2013 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.apache.lucene.analysis.kr.utils;


/**
 * 동사의 불규칙 변형을 처리하는 Utility Class
 *
 * @author S.M.Lee
 */
public class IrregularUtil {

    // ㅂ 불규칙
    public static final char IRR_TYPE_BIUP = 'B';

    // ㅎ 불규칙
    public static final char IRR_TYPE_HIOOT = 'H';

    // ㄹ 불규칙
    public static final char IRR_TYPE_LIUL = 'U';

    // 르 불규칙
    public static final char IRR_TYPE_LOO = 'L';

    // ㅅ 불규칙
    public static final char IRR_TYPE_SIUT = 'S';

    // ㄷ 불규칙
    public static final char IRR_TYPE_DI = 'D';

    // 러 불규칙
    public static final char IRR_TYPE_RU = 'R';

    // 으 탈락
    public static final char IRR_TYPE_UI = 'X';

    // 규칙형
    public static final char IRR_TYPE_REGULAR = 'X';

    public static String[] restoreIrregularVerb(String start, String end) throws MorphException {