@Test public void testChineseStringToEnglishStringWithPOS() { fail("Not yet implemented"); }
public String ChineseStringToEnglishStringWithPOS(Analyzer analyzer, String ChineseString) { List<String> nodes = analyzer.parserString(ChineseString); StringBuilder sb = new StringBuilder(); Iterator<String> it = nodes.iterator(); while(it.hasNext()) { String temp = it.next(); if(cte.containsKey(temp)) { sb.append(cte.get(temp)); }else if(fullcte.containsKey(temp)){ sb.append(fullcte.get(temp)); }else { sb.append(temp); } if(poscc.containsKey(temp)) { sb.append(StableData.NLP_SYMBO_SLASH); sb.append(poscc.get(temp)); } sb.append(StableData.SPACE_STRING); } return sb.toString(); }
TranslatorImp implements Translator { public String ChineseStringToEnglishStringWithPOS(Analyzer analyzer, String ChineseString) { List<String> nodes = analyzer.parserString(ChineseString); StringBuilder sb = new StringBuilder(); Iterator<String> it = nodes.iterator(); while(it.hasNext()) { String temp = it.next(); if(cte.containsKey(temp)) { sb.append(cte.get(temp)); }else if(fullcte.containsKey(temp)){ sb.append(fullcte.get(temp)); }else { sb.append(temp); } if(poscc.containsKey(temp)) { sb.append(StableData.NLP_SYMBO_SLASH); sb.append(poscc.get(temp)); } sb.append(StableData.SPACE_STRING); } return sb.toString(); } }
TranslatorImp implements Translator { public String ChineseStringToEnglishStringWithPOS(Analyzer analyzer, String ChineseString) { List<String> nodes = analyzer.parserString(ChineseString); StringBuilder sb = new StringBuilder(); Iterator<String> it = nodes.iterator(); while(it.hasNext()) { String temp = it.next(); if(cte.containsKey(temp)) { sb.append(cte.get(temp)); }else if(fullcte.containsKey(temp)){ sb.append(fullcte.get(temp)); }else { sb.append(temp); } if(poscc.containsKey(temp)) { sb.append(StableData.NLP_SYMBO_SLASH); sb.append(poscc.get(temp)); } sb.append(StableData.SPACE_STRING); } return sb.toString(); }  }
TranslatorImp implements Translator { public String ChineseStringToEnglishStringWithPOS(Analyzer analyzer, String ChineseString) { List<String> nodes = analyzer.parserString(ChineseString); StringBuilder sb = new StringBuilder(); Iterator<String> it = nodes.iterator(); while(it.hasNext()) { String temp = it.next(); if(cte.containsKey(temp)) { sb.append(cte.get(temp)); }else if(fullcte.containsKey(temp)){ sb.append(fullcte.get(temp)); }else { sb.append(temp); } if(poscc.containsKey(temp)) { sb.append(StableData.NLP_SYMBO_SLASH); sb.append(poscc.get(temp)); } sb.append(StableData.SPACE_STRING); } return sb.toString(); }  void init(Analyzer analyzer); String EnglishStringToChineseString(Analyzer analyzer, String EnglishString); String ChineseStringToEnglishString(Analyzer analyzer, String ChineseString); String MixedStringToChineseString(Analyzer analyzer, String mixedString); String ChineseStringToEnglishStringWithPOS(Analyzer analyzer, String ChineseString); List<Verbal> index(Analyzer analyzer, String mixedString); List<Verbal> fixPos(List<Verbal> verbals); String getChineseSentenseFromVerbalList(List<Verbal> verbals); String getEnglishSentenseFromVerbalFixList(List<Verbal> verbalsFix); }
TranslatorImp implements Translator { public String ChineseStringToEnglishStringWithPOS(Analyzer analyzer, String ChineseString) { List<String> nodes = analyzer.parserString(ChineseString); StringBuilder sb = new StringBuilder(); Iterator<String> it = nodes.iterator(); while(it.hasNext()) { String temp = it.next(); if(cte.containsKey(temp)) { sb.append(cte.get(temp)); }else if(fullcte.containsKey(temp)){ sb.append(fullcte.get(temp)); }else { sb.append(temp); } if(poscc.containsKey(temp)) { sb.append(StableData.NLP_SYMBO_SLASH); sb.append(poscc.get(temp)); } sb.append(StableData.SPACE_STRING); } return sb.toString(); }  void init(Analyzer analyzer); String EnglishStringToChineseString(Analyzer analyzer, String EnglishString); String ChineseStringToEnglishString(Analyzer analyzer, String ChineseString); String MixedStringToChineseString(Analyzer analyzer, String mixedString); String ChineseStringToEnglishStringWithPOS(Analyzer analyzer, String ChineseString); List<Verbal> index(Analyzer analyzer, String mixedString); List<Verbal> fixPos(List<Verbal> verbals); String getChineseSentenseFromVerbalList(List<Verbal> verbals); String getEnglishSentenseFromVerbalFixList(List<Verbal> verbalsFix); public Map<String, String> poscc; public Map<String, String> posec; public Map<String, String> posee; public Map<String, String> etc; public Map<String, String> cte; public Map<String, String> fulletc; public Map<String, String> fullcte; }