Skip to content

Commit

Permalink
修正日语中文繁体与中文简体的词性 混合参照标识.20190427
Browse files Browse the repository at this point in the history
  • Loading branch information
yaoguangluo committed Apr 27, 2019
1 parent cf0d994 commit 5c6f0eb
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions wordSegment/org/tinos/ortho/fhmm/imp/FMHMMListOneTimeImp.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public class FMHMMListOneTimeImp implements FHMMList {
public Map<Long, FMHMMNode> getMap() {
return this.linkedHashMap;
}

public Map<Long, FMHMMNode>[] getMaps() {
int segment= this.linkedHashMap.size();
int perRatio= segment/ StableData.INT_SIX;
Expand Down Expand Up @@ -486,14 +486,19 @@ public void indexMixed() throws IOException {
linkedHashMap = loopLoadForest(cInputStringKorea);
}
if(null!= cInputStringJapan) {
posCnToCn.put(cInputStringJapan.split(StableData.NLP_SYMBO_SLASH)[StableData.INT_ZERO], cInputString
.split(StableData.NLP_SYMBO_SLASH)[StableData.INT_ONE]);
linkedHashMap = loopLoadForest(cInputStringJapan);
if(!posCnToCn.containsKey(cInputStringJapan.split(StableData.NLP_SYMBO_SLASH)[StableData.INT_ZERO])) {
posCnToCn.put(cInputStringJapan.split(StableData.NLP_SYMBO_SLASH)[StableData.INT_ZERO],cInputStringJapan
.split(StableData.NLP_SYMBO_SLASH).length> StableData.INT_ONE?cInputStringJapan
.split(StableData.NLP_SYMBO_SLASH)[StableData.INT_ONE]:"未知");
linkedHashMap = loopLoadForest(cInputStringJapan);
}
}
if(null!= cInputStringTrandition) {
posCnToCn.put(cInputStringTrandition.split(StableData.NLP_SYMBO_SLASH)[StableData.INT_ZERO], cInputString
.split(StableData.NLP_SYMBO_SLASH)[StableData.INT_ONE]);
linkedHashMap = loopLoadForest(cInputStringTrandition);
if(!posCnToCn.containsKey(cInputStringTrandition.split(StableData.NLP_SYMBO_SLASH)[StableData.INT_ZERO])) {
posCnToCn.put(cInputStringTrandition.split(StableData.NLP_SYMBO_SLASH)[StableData.INT_ZERO], cInputString
.split(StableData.NLP_SYMBO_SLASH)[StableData.INT_ONE]);
linkedHashMap = loopLoadForest(cInputStringTrandition);
}
}
if(null!= cInputStringEnglish) {
posCnToCn.put(cInputStringEnglish.split(StableData.NLP_SYMBO_SLASH)[StableData.INT_ZERO].toLowerCase(), cInputString
Expand All @@ -502,7 +507,7 @@ public void indexMixed() throws IOException {
}
cReader.close();
}


public void index() throws IOException {
posCnToCn= new ConcurrentHashMap<>();
Expand Down

0 comments on commit 5c6f0eb

Please sign in to comment.