Skip to content

Commit

Permalink
transfer log message from chinese to english (#746)
Browse files Browse the repository at this point in the history
  • Loading branch information
howardhuanghua authored and medcl committed Dec 19, 2019
1 parent 5f53f1a commit 4619eff
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/main/java/org/wltea/analyzer/dic/DictSegment.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class DictSegment implements Comparable<DictSegment>{

DictSegment(Character nodeChar){
if(nodeChar == null){
throw new IllegalArgumentException("参数为空异常,字符不能为空");
throw new IllegalArgumentException("node char cannot be empty");
}
this.nodeChar = nodeChar;
}
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/org/wltea/analyzer/dic/Dictionary.java
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ private String getDictRoot() {
*/
public static Dictionary getSingleton() {
if (singleton == null) {
throw new IllegalStateException("词典尚未初始化,请先调用initial方法");
throw new IllegalStateException("ik dict has not been initialized yet, please call initial method first.");
}
return singleton;
}
Expand Down Expand Up @@ -419,7 +419,7 @@ private void loadRemoteExtDict() {
List<String> lists = getRemoteWords(location);
// 如果找不到扩展的字典,则忽略
if (lists == null) {
logger.error("[Dict Loading] " + location + "加载失败");
logger.error("[Dict Loading] " + location + " load failed");
continue;
}
for (String theWord : lists) {
Expand Down Expand Up @@ -518,7 +518,7 @@ private void loadStopWordDict() {
List<String> lists = getRemoteWords(location);
// 如果找不到扩展的字典,则忽略
if (lists == null) {
logger.error("[Dict Loading] " + location + "加载失败");
logger.error("[Dict Loading] " + location + " load failed");
continue;
}
for (String theWord : lists) {
Expand Down Expand Up @@ -562,15 +562,15 @@ private void loadPrepDict() {
}

void reLoadMainDict() {
logger.info("重新加载词典...");
logger.info("start to reload ik dict.");
// 新开一个实例加载词典,减少加载过程对当前词典使用的影响
Dictionary tmpDict = new Dictionary(configuration);
tmpDict.configuration = getSingleton().configuration;
tmpDict.loadMainDict();
tmpDict.loadStopWordDict();
_MainDict = tmpDict._MainDict;
_StopWords = tmpDict._StopWords;
logger.info("重新加载词典完毕...");
logger.info("reload ik dict finished.");
}

}

0 comments on commit 4619eff

Please sign in to comment.