@Test public void testEnglishStringToChineseString() { fail("Not yet implemented"); }
public String EnglishStringToChineseString(Analyzer analyzer, String EnglishString) { String[] nodes = analyzer.parserEnglishString(EnglishString); StringBuilder sb = new StringBuilder(); for(String temp:nodes) { char[] caseTemp = temp.toCharArray(); caseTemp[StableData.INT_ONE] = String.valueOf(caseTemp[StableData.INT_ONE]) .toUpperCase().charAt(StableData.INT_ONE); if(etc.containsKey(temp)) { sb.append(etc.get(temp).split(StableData.NLP_DOT)[StableData.INT_ONE]); }else if(fulletc.containsKey(String.valueOf(caseTemp))){ sb.append(fulletc.get(String.valueOf(caseTemp))); }else { sb.append(temp); } sb.append(StableData.SPACE_STRING); } return sb.toString(); }
TranslatorImp implements Translator { public String EnglishStringToChineseString(Analyzer analyzer, String EnglishString) { String[] nodes = analyzer.parserEnglishString(EnglishString); StringBuilder sb = new StringBuilder(); for(String temp:nodes) { char[] caseTemp = temp.toCharArray(); caseTemp[StableData.INT_ONE] = String.valueOf(caseTemp[StableData.INT_ONE]) .toUpperCase().charAt(StableData.INT_ONE); if(etc.containsKey(temp)) { sb.append(etc.get(temp).split(StableData.NLP_DOT)[StableData.INT_ONE]); }else if(fulletc.containsKey(String.valueOf(caseTemp))){ sb.append(fulletc.get(String.valueOf(caseTemp))); }else { sb.append(temp); } sb.append(StableData.SPACE_STRING); } return sb.toString(); } }
TranslatorImp implements Translator { public String EnglishStringToChineseString(Analyzer analyzer, String EnglishString) { String[] nodes = analyzer.parserEnglishString(EnglishString); StringBuilder sb = new StringBuilder(); for(String temp:nodes) { char[] caseTemp = temp.toCharArray(); caseTemp[StableData.INT_ONE] = String.valueOf(caseTemp[StableData.INT_ONE]) .toUpperCase().charAt(StableData.INT_ONE); if(etc.containsKey(temp)) { sb.append(etc.get(temp).split(StableData.NLP_DOT)[StableData.INT_ONE]); }else if(fulletc.containsKey(String.valueOf(caseTemp))){ sb.append(fulletc.get(String.valueOf(caseTemp))); }else { sb.append(temp); } sb.append(StableData.SPACE_STRING); } return sb.toString(); }  }
TranslatorImp implements Translator { public String EnglishStringToChineseString(Analyzer analyzer, String EnglishString) { String[] nodes = analyzer.parserEnglishString(EnglishString); StringBuilder sb = new StringBuilder(); for(String temp:nodes) { char[] caseTemp = temp.toCharArray(); caseTemp[StableData.INT_ONE] = String.valueOf(caseTemp[StableData.INT_ONE]) .toUpperCase().charAt(StableData.INT_ONE); if(etc.containsKey(temp)) { sb.append(etc.get(temp).split(StableData.NLP_DOT)[StableData.INT_ONE]); }else if(fulletc.containsKey(String.valueOf(caseTemp))){ sb.append(fulletc.get(String.valueOf(caseTemp))); }else { sb.append(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 EnglishStringToChineseString(Analyzer analyzer, String EnglishString) { String[] nodes = analyzer.parserEnglishString(EnglishString); StringBuilder sb = new StringBuilder(); for(String temp:nodes) { char[] caseTemp = temp.toCharArray(); caseTemp[StableData.INT_ONE] = String.valueOf(caseTemp[StableData.INT_ONE]) .toUpperCase().charAt(StableData.INT_ONE); if(etc.containsKey(temp)) { sb.append(etc.get(temp).split(StableData.NLP_DOT)[StableData.INT_ONE]); }else if(fulletc.containsKey(String.valueOf(caseTemp))){ sb.append(fulletc.get(String.valueOf(caseTemp))); }else { sb.append(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; }