Android Open Source - MYKey_SoftKeyboard Phoneme Category Converter






From Project

Back to project page MYKey_SoftKeyboard.

License

The source code is released under:

Apache License

If you think the Android project MYKey_SoftKeyboard listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package korean_automata;
/*  w  ww. ja va  2  s. c om*/
/**
 * ?? ?? ?????????? Idx?? static method? ?? ?????
 * @author Administrator
 *
 */
public class PhonemeCategoryConverter {

  /**
   * ????? Index? ????? Index? ??
   * @param phonemeIdx
   * @return
   */
  public static int changePhonemeIdxFrToFn(int phonemeIdx) {
    int finalPhoneme = phonemeIdx;

    switch (phonemeIdx) {

    // ?
    case 4000:
      finalPhoneme = 4201;
      break;

    // ?
    case 4001:
      finalPhoneme = 4202;
      break;

    // ?
    case 4002:
      finalPhoneme = 4204;
      break;

    // ?
    case 4003:
      finalPhoneme = 4207;
      break;

    // ?
    case 4005:
      finalPhoneme = 4208;
      break;

    // ??
    case 4006:
      finalPhoneme = 4216;
      break;

    // ?
    case 4007:
      finalPhoneme = 4217;
      break;

    // ?
    case 4009:
      finalPhoneme = 4219;
      break;

    // ?
    case 4010:
      finalPhoneme = 4220;
      break;

    // ?
    case 4011:
      finalPhoneme = 4221;
      break;

    // ?
    case 4012:
      finalPhoneme = 4222;
      break;

    // ?
    case 4014:
      finalPhoneme = 4223;
      break;

    // ?
    case 4015:
      finalPhoneme = 4224;
      break;

    // ?
    case 4016:
      finalPhoneme = 4225;
      break;

    // ??
    case 4017:
      finalPhoneme = 4226;
      break;

    // ?
    case 4018:
      finalPhoneme = 4227;
      break;
    }

    return finalPhoneme;
  }

  

  /**
   * ????? Idx? ????? Idx? ??
   * @param phonemeIdx
   * @return
   */
  public static int changePhonemeIdxFnToFr(int phonemeIdx) {
    int firstPhoneme = phonemeIdx;

    switch (phonemeIdx) {

    // ?
    case 4201:
      firstPhoneme = 4000;
      break;

    // ?
    case 4202:
      firstPhoneme = 4001;
      break;

    // ?
    case 4204:
      firstPhoneme = 4002;
      break;

    // ?
    case 4207:
      firstPhoneme = 4003;
      break;

    // ?
    case 4208:
      firstPhoneme = 4005;
      break;

    // ??
    case 4216:
      firstPhoneme = 4006;
      break;

    // ?
    case 4217:
      firstPhoneme = 4007;
      break;

    // ?
    case 4219:
      firstPhoneme = 4009;
      break;

    // ?
    case 4220:
      firstPhoneme = 4010;
      break;

    // ?
    case 4221:
      firstPhoneme = 4011;
      break;

    // ?
    case 4222:
      firstPhoneme = 4012;
      break;

    // ?
    case 4223:
      firstPhoneme = 4014;
      break;

    // ?
    case 4224:
      firstPhoneme = 4015;
      break;

    // ?
    case 4225:
      firstPhoneme = 4016;
      break;

    // ??
    case 4226:
      firstPhoneme = 4017;
      break;

    // ?
    case 4227:
      firstPhoneme = 4018;
      break;
    }

    return firstPhoneme;
  }


  /**
   * ?????? ????? Idx? ????????? Idx? ??
   * @param phonemeIdx
   * @return
   */
  public static int changePhonemeFnAFrToAl(int phonemeIdx) {
    int alonePhoneme = phonemeIdx;

    switch (phonemeIdx) {

    // ?
    case 4000:
    case 4201:
      alonePhoneme = 0;
      break;

    // ?
    case 4001:
    case 4202:
      alonePhoneme = 1;
      break;

    // ?
    case 4203:
      alonePhoneme = 2;
      break;

    // ?
    case 4002:
    case 4204:
      alonePhoneme = 3;
      break;

    // ?
    case 4205:
      alonePhoneme = 4;
      break;

    // ?
    case 4206:
      alonePhoneme = 5;
      break;

    // ?
    case 4003:
    case 4207:
      alonePhoneme = 6;
      break;

    // ?
    case 4004:
      alonePhoneme = 7;
      break;

    // ?
    case 4005:
    case 4208:
      alonePhoneme = 8;
      break;

    // ?
    case 4209:
      alonePhoneme = 9;
      break;

    // ?
    case 4210:
      alonePhoneme = 10;
      break;

    // ?
    case 4211:
      alonePhoneme = 11;
      break;

    // ?
    case 4212:
      alonePhoneme = 12;
      break;

    // ?
    case 4213:
      alonePhoneme = 13;
      break;

    // ?
    case 4214:
      alonePhoneme = 14;
      break;

    // ?
    case 4215:
      alonePhoneme = 15;
      break;

    // ??
    case 4006:
    case 4216:
      alonePhoneme = 16;
      break;

    // ?
    case 4007:
    case 4217:
      alonePhoneme = 17;
      break;

    // ?
    case 4008:
      alonePhoneme = 18;
      break;

    // ?
    case 4218:
      alonePhoneme = 19;
      break;

    // ?
    case 4009:
    case 4219:
      alonePhoneme = 20;
      break;

    // ?
    case 4010:
    case 4220:
      alonePhoneme = 21;
      break;

    // ?
    case 4011:
    case 4221:
      alonePhoneme = 22;
      break;

    // ?
    case 4012:
    case 4222:
      alonePhoneme = 23;
      break;

    // ?
    case 4013:
      alonePhoneme = 24;
      break;

    // ?
    case 4014:
    case 4223:
      alonePhoneme = 25;
      break;

    // ?
    case 4015:
    case 4224:
      alonePhoneme = 26;
      break;

    // ?
    case 4016:
    case 4225:
      alonePhoneme = 27;
      break;

    // ??
    case 4017:
    case 4226:
      alonePhoneme = 28;
      break;

    // ?
    case 4018:
    case 4227:
      alonePhoneme = 29;
      break;
    }

    return alonePhoneme;
  }
}




Java Source Code List

com.android.mykey.LatinKeyboardView.java
com.android.mykey.LatinKeyboard.java
com.android.mykey.SoftKeyboard.java
ime_preferences.ImePreferencesActivity.java
key_process.Buffer.java
key_process.FinalCombinationInfo.java
key_process.KeyInfo.java
key_process.KeyMap.java
key_process.KeyProcessor.java
korean_automata.CombinationState.java
korean_automata.KoreanAutomata.java
korean_automata.PhonemeCategoryConverter.java
korean_automata.Proc1.java
korean_automata.Proc2.java
korean_automata.Proc3.java
korean_automata.Proc4.java
korean_automata.StArea.java
korean_automata.StEmpty.java
korean_automata.StError.java
korean_automata.StFirstArea.java
korean_automata.StFirstVowelAndFirst.java
korean_automata.StFirstVowel.java
korean_automata.StFirst.java
korean_automata.StMultiFinal.java
korean_automata.StSingleFinalAndFirst.java
korean_automata.StSingleFinal.java
korean_automata.StVowel.java
korean_automata.VerifyComb.java
string_Key.StringKeyHandler.java
string_Key.StringKeyListAdapter.java
string_Key.StringKeyModifyActivity.java