반고 dll 재작성 라이브러리 읽기 및 신조어 삭제 및 수정 방법

4877 단어
#region +            InsertPanGuDict | DeleteWord | UpdateWord | UpdateWord         /// <summary>         ///                  /// </summary>         /// <param name="name"></param>         /// <param name="_posStr"></param>         /// <param name="frequency"></param>         public static void InsertPanGuDict(string word, double frequency, string _posStr)         {             POS _pos = DisplayPos.GetChsPos(_posStr);             WordDictionary wd = new WordDictionary();             wd.Load(Dictpath);             wd.InsertWord(word, frequency, _pos);             wd.Save(Dictpath);         }          /// <summary>         ///                    /// </summary>         /// <param name="word"></param>         public static void DeleteWord(string word)         {             WordDictionary wd = new WordDictionary();             wd.Load(Dictpath);             wd.DeleteWord(word);             wd.Save(Dictpath);         }          /// <summary>         ///                    /// </summary>         /// <param name="word"></param>         /// <param name="frequency"></param>         /// <param name="_posStr"></param>         public static void UpdateWord(string word, double frequency, string _posStr)         {             POS _pos = DisplayPos.GetChsPos(_posStr);             WordDictionary wd = new WordDictionary();             wd.Load(Dictpath);             wd.UpdateWord(word, frequency, _pos);             wd.Save(Dictpath);         }          public static List<string> SearchWord(string word)         {             List<string> wordList = new List<string>();             WordDictionary wd = new WordDictionary();             wd.Load(Dictpath);             List<SearchWordResult> result = wd.Search(word.Trim());             result.Sort();             foreach (SearchWordResult w in result)             {                 wordList.Add(w.ToString());             }             return wordList;         }          #endregion

POS 매개 변수는 반고분사 코드의 PosDisplay Ctrl 라이브러리 아래의 PosCtrl을 참조하십시오.cs GetChsPos 메서드
public static string GetChsPosStr(POS pos)         {             switch (pos)             {                 case POS.POS_UNK:                     return "    ";                  case POS.POS_D_K:                     return "    ";                  case POS.POS_D_H:                     return "    ";                  case POS.POS_A_NZ:                     return "    ";                  case POS.POS_A_NX:                     return "    ";                  case POS.POS_A_NR:                     return "  ";                  case POS.POS_D_Z:                     return "   ";                  case POS.POS_A_NT:                     return "    ";                  case POS.POS_A_NS:                     return "  ";                  case POS.POS_D_Y:                     return "        ";                  case POS.POS_D_X:                     return "    ";                  case POS.POS_D_W:                     return "    ";                  case POS.POS_D_T:                     return "   ";                  case POS.POS_D_S:                     return "   ";                  case POS.POS_D_V:                     return "      ";                  case POS.POS_D_U:                     return "      ";                  case POS.POS_D_R:                     return "      ";                  case POS.POS_A_Q:                     return "      ";                  case POS.POS_D_P:                     return "  ";                  case POS.POS_D_MQ:                     return "   ";                  case POS.POS_A_M:                     return "      ";                  case POS.POS_D_O:                     return "   ";                  case POS.POS_D_N:                     return "      ";                  case POS.POS_D_F:                     return "        ";                  case POS.POS_D_E:                     return "      ";                  case POS.POS_D_L:                     return "  ";                  case POS.POS_D_I:                     return "  ";                  case POS.POS_D_D:                     return "      ";                  case POS.POS_D_C:                     return "      ";                  case POS.POS_D_B:                     return "        ";                  case POS.POS_D_A:                     return "       ";             }             return "    ";          }

 

좋은 웹페이지 즐겨찾기