static void InitAllDics() { if (thaiDicBreakingEngine == null) { var customDic = new CustomDic(); thaiDicBreakingEngine = new ThaiDictionaryBreakingEngine(); thaiDicBreakingEngine.SetDictionaryData(customDic);//add customdic to the breaker customDic.SetCharRange(thaiDicBreakingEngine.FirstUnicodeChar, thaiDicBreakingEngine.LastUnicodeChar); customDic.LoadFromTextfile(DataDir + "/thaidict.txt"); } if (laoDicBreakingEngine == null) { var customDic = new CustomDic(); laoDicBreakingEngine = new LaoDictionaryBreakingEngine(); laoDicBreakingEngine.SetDictionaryData(customDic);//add customdic to the breaker customDic.SetCharRange(laoDicBreakingEngine.FirstUnicodeChar, laoDicBreakingEngine.LastUnicodeChar); customDic.LoadFromTextfile(DataDir + "/laodict.txt"); } }
static void InitAllDics() { if (thaiDicBreakingEngine == null) { var customDic = new CustomDic(); thaiDicBreakingEngine = new ThaiDictionaryBreakingEngine(); thaiDicBreakingEngine.SetDictionaryData(customDic);//add customdic to the breaker customDic.SetCharRange(thaiDicBreakingEngine.FirstUnicodeChar, thaiDicBreakingEngine.LastUnicodeChar); customDic.LoadFromTextfile(DataDir + "/thaidict.txt"); //customDic.LoadFromTextfile(DataDir + "/thaidict_testonly.txt"); } if (laoDicBreakingEngine == null) { var customDic = new CustomDic(); laoDicBreakingEngine = new LaoDictionaryBreakingEngine(); laoDicBreakingEngine.SetDictionaryData(customDic);//add customdic to the breaker customDic.SetCharRange(laoDicBreakingEngine.FirstUnicodeChar, laoDicBreakingEngine.LastUnicodeChar); customDic.LoadFromTextfile(DataDir + "/laodict.txt"); } }