diff --git a/wordSegment/org/tinos/engine/analysis/Analyzer.java b/wordSegment/org/tinos/engine/analysis/Analyzer.java index 82047ae..0b4a86c 100644 --- a/wordSegment/org/tinos/engine/analysis/Analyzer.java +++ b/wordSegment/org/tinos/engine/analysis/Analyzer.java @@ -26,4 +26,5 @@ public interface Analyzer { List parserMixedString(String mixedString); Map parserMixStringByReturnFrequencyMap(String key); void studyNewWord(String study, String token, String posStudy); + Map getStudyPos(); } \ No newline at end of file diff --git a/wordSegment/org/tinos/engine/analysis/imp/AnalyzerImp.java b/wordSegment/org/tinos/engine/analysis/imp/AnalyzerImp.java index ac8eb64..ddcba77 100644 --- a/wordSegment/org/tinos/engine/analysis/imp/AnalyzerImp.java +++ b/wordSegment/org/tinos/engine/analysis/imp/AnalyzerImp.java @@ -462,4 +462,9 @@ public void studyNewWord(String study, String token, String posStudy) { //learn new pos fHMMList.studyNewPos(study+token, posStudy); } + + @Override + public Map getStudyPos() { + return fHMMList.getStudyPos(); + } } \ No newline at end of file diff --git a/wordSegment/org/tinos/ortho/fhmm/FHMMList.java b/wordSegment/org/tinos/ortho/fhmm/FHMMList.java index 10060ed..a44fe2b 100644 --- a/wordSegment/org/tinos/ortho/fhmm/FHMMList.java +++ b/wordSegment/org/tinos/ortho/fhmm/FHMMList.java @@ -44,5 +44,6 @@ public interface FHMMList { Map getFullPositive(); List englishStringToWordsList(String string); Map> getWordsForests(); - void studyNewPos(String string, String posStudy); + void studyNewPos(String string, String posStudy); + Map getStudyPos(); } \ No newline at end of file diff --git a/wordSegment/org/tinos/ortho/fhmm/imp/FMHMMListImp.java b/wordSegment/org/tinos/ortho/fhmm/imp/FMHMMListImp.java index d7ab34b..3a92a7f 100644 --- a/wordSegment/org/tinos/ortho/fhmm/imp/FMHMMListImp.java +++ b/wordSegment/org/tinos/ortho/fhmm/imp/FMHMMListImp.java @@ -276,4 +276,9 @@ public void studyNewPos(String string, String posStudy) { // TODO Auto-generated method stub } + + @Override + public Map getStudyPos() { + return null; + } } \ No newline at end of file diff --git a/wordSegment/org/tinos/ortho/fhmm/imp/FMHMMListOneTimeImp.java b/wordSegment/org/tinos/ortho/fhmm/imp/FMHMMListOneTimeImp.java index 07d22da..3d235ae 100644 --- a/wordSegment/org/tinos/ortho/fhmm/imp/FMHMMListOneTimeImp.java +++ b/wordSegment/org/tinos/ortho/fhmm/imp/FMHMMListOneTimeImp.java @@ -19,6 +19,7 @@ //I will build a collection class for managing this maps. at the next version. @SuppressWarnings("unchecked") public class FMHMMListOneTimeImp implements FHMMList { + private Map studyPos; private Map posCnToCn; private Map posEnToEn; private Map posEnToCn; @@ -75,6 +76,7 @@ public Map[] getMaps() { } public void indexMixed() throws IOException { + studyPos= new ConcurrentHashMap<>(); posCnToCn= new ConcurrentHashMap<>(); linkedHashMap= new ConcurrentHashMap<>(); listCn= new CopyOnWriteArrayList<>(); @@ -477,6 +479,8 @@ public void indexMixed() throws IOException { .split(StableData.NLP_SYMBO_SLASH)[StableData.INT_ONE]); } } + studyPos.put(cInputString.split(StableData.NLP_SYMBO_SLASH)[StableData.INT_ZERO], cInputString + .split(StableData.NLP_SYMBO_SLASH)[StableData.INT_ONE]); posCnToCn.put(cInputString.split(StableData.NLP_SYMBO_SLASH)[StableData.INT_ZERO], cInputString .split(StableData.NLP_SYMBO_SLASH)[StableData.INT_ONE]); linkedHashMap = loopLoadForest(cInputString); @@ -1058,4 +1062,9 @@ public Map> getWordsForests() { public void studyNewPos(String string, String posStudy) { posCnToCn.put(string, posStudy); } + + @Override + public Map getStudyPos() { + return this.studyPos; + } } \ No newline at end of file diff --git a/wordSegment/org/tinos/ortho/fhmm/imp/poscc.lyg b/wordSegment/org/tinos/ortho/fhmm/imp/poscc.lyg index 7777cb0..fc229e5 100644 --- a/wordSegment/org/tinos/ortho/fhmm/imp/poscc.lyg +++ b/wordSegment/org/tinos/ortho/fhmm/imp/poscc.lyg @@ -26373,4 +26373,29 @@ z/字母   /段落标识标点 同桌/名词代词 睡梦/名词 -反差/名词 \ No newline at end of file +反差/名词 +相传/动词 +瑰宝/名词 +盾盾/形谓词 +又怎/副词 +去接/动词 +力棒/名词 +州娃/名词 +食疗/名词 +”,/标点 +潮头/名词 +带动/动词 +也是/副词 +看到/动词 +,“/标点 +流变/动词 +带来/动词 +惊喜/形谓词 +启超/动词 +:“/标点 +。”/标点 +担负/动词 +负起/动词 +传到/动词 +去关/动词 +血脉/名词 \ No newline at end of file