@Test public void testGetWordFrequencyMap() { fail("Not yet implemented"); }
public Map<String, WordFrequency> getWordFrequencyMap(List<String> sets) throws IOException { Map<String, WordFrequency> map = new ConcurrentHashMap<>(); Iterator <String> iterator = sets.iterator(); Here: while(iterator.hasNext()){ String setOfi = iterator.next(); if (map.containsKey(setOfi)) { WordFrequency wordFrequency = map.get(setOfi); wordFrequency.setFrequency(wordFrequency.getFrequency() + StableData.INT_ONE); map.put(setOfi, wordFrequency); continue Here; } WordFrequency wordFrequency = new WordFrequency(); wordFrequency.setFrequency(StableData.INT_ONE); wordFrequency.setWord(setOfi); map.put(setOfi, wordFrequency); } return map; }
AnalyzerImp implements Analyzer { public Map<String, WordFrequency> getWordFrequencyMap(List<String> sets) throws IOException { Map<String, WordFrequency> map = new ConcurrentHashMap<>(); Iterator <String> iterator = sets.iterator(); Here: while(iterator.hasNext()){ String setOfi = iterator.next(); if (map.containsKey(setOfi)) { WordFrequency wordFrequency = map.get(setOfi); wordFrequency.setFrequency(wordFrequency.getFrequency() + StableData.INT_ONE); map.put(setOfi, wordFrequency); continue Here; } WordFrequency wordFrequency = new WordFrequency(); wordFrequency.setFrequency(StableData.INT_ONE); wordFrequency.setWord(setOfi); map.put(setOfi, wordFrequency); } return map; } }
AnalyzerImp implements Analyzer { public Map<String, WordFrequency> getWordFrequencyMap(List<String> sets) throws IOException { Map<String, WordFrequency> map = new ConcurrentHashMap<>(); Iterator <String> iterator = sets.iterator(); Here: while(iterator.hasNext()){ String setOfi = iterator.next(); if (map.containsKey(setOfi)) { WordFrequency wordFrequency = map.get(setOfi); wordFrequency.setFrequency(wordFrequency.getFrequency() + StableData.INT_ONE); map.put(setOfi, wordFrequency); continue Here; } WordFrequency wordFrequency = new WordFrequency(); wordFrequency.setFrequency(StableData.INT_ONE); wordFrequency.setWord(setOfi); map.put(setOfi, wordFrequency); } return map; }  }
AnalyzerImp implements Analyzer { public Map<String, WordFrequency> getWordFrequencyMap(List<String> sets) throws IOException { Map<String, WordFrequency> map = new ConcurrentHashMap<>(); Iterator <String> iterator = sets.iterator(); Here: while(iterator.hasNext()){ String setOfi = iterator.next(); if (map.containsKey(setOfi)) { WordFrequency wordFrequency = map.get(setOfi); wordFrequency.setFrequency(wordFrequency.getFrequency() + StableData.INT_ONE); map.put(setOfi, wordFrequency); continue Here; } WordFrequency wordFrequency = new WordFrequency(); wordFrequency.setFrequency(StableData.INT_ONE); wordFrequency.setWord(setOfi); map.put(setOfi, wordFrequency); } return map; }  void init(); void initMixed(); List<String> parserMixedString(String mixedString); List<String> parserString(String inputString); Map<String, WordFrequency> parserStringByReturnFrequencyMap(String inputString); void addFixWords(int charPosition, String inputString, StringBuilder[] fixWords); Map<String, String> getEnToCn(); Map<String, String> getCnToEn(); Map<String, WordFrequency> getWordFrequencyMap(List<String> sets); List<WordFrequency> sortWordFrequencyMap(Map<String, WordFrequency> map); List<WordFrequency> getWordFrequency(List<String> sets); Map<Integer, WordFrequency> getWordFrequencyByReturnSortMap(List<String> sets); Map<Integer, WordFrequency> sortWordFrequencyMapToUnsortMap(Map<String, WordFrequency> map); Map<Integer, WordFrequency> sortWordFrequencyMapToSortMap(Map<String, WordFrequency> map); String[] parserEnglishString(String englishString); Map<String, String> getPosEnToCn(); Map<String, String> getPosEnToEn(); Map<String, String> getPosCnToCn(); Map<String, String> getFullEnToCn(); Map<String, String> getFullCnToEn(); Map<String, WordFrequency> parserMixStringByReturnFrequencyMap(String mixedString); void studyNewWord(String study, String token, String posStudy); @Override Map<String, String> getStudyPos(); }
AnalyzerImp implements Analyzer { public Map<String, WordFrequency> getWordFrequencyMap(List<String> sets) throws IOException { Map<String, WordFrequency> map = new ConcurrentHashMap<>(); Iterator <String> iterator = sets.iterator(); Here: while(iterator.hasNext()){ String setOfi = iterator.next(); if (map.containsKey(setOfi)) { WordFrequency wordFrequency = map.get(setOfi); wordFrequency.setFrequency(wordFrequency.getFrequency() + StableData.INT_ONE); map.put(setOfi, wordFrequency); continue Here; } WordFrequency wordFrequency = new WordFrequency(); wordFrequency.setFrequency(StableData.INT_ONE); wordFrequency.setWord(setOfi); map.put(setOfi, wordFrequency); } return map; }  void init(); void initMixed(); List<String> parserMixedString(String mixedString); List<String> parserString(String inputString); Map<String, WordFrequency> parserStringByReturnFrequencyMap(String inputString); void addFixWords(int charPosition, String inputString, StringBuilder[] fixWords); Map<String, String> getEnToCn(); Map<String, String> getCnToEn(); Map<String, WordFrequency> getWordFrequencyMap(List<String> sets); List<WordFrequency> sortWordFrequencyMap(Map<String, WordFrequency> map); List<WordFrequency> getWordFrequency(List<String> sets); Map<Integer, WordFrequency> getWordFrequencyByReturnSortMap(List<String> sets); Map<Integer, WordFrequency> sortWordFrequencyMapToUnsortMap(Map<String, WordFrequency> map); Map<Integer, WordFrequency> sortWordFrequencyMapToSortMap(Map<String, WordFrequency> map); String[] parserEnglishString(String englishString); Map<String, String> getPosEnToCn(); Map<String, String> getPosEnToEn(); Map<String, String> getPosCnToCn(); Map<String, String> getFullEnToCn(); Map<String, String> getFullCnToEn(); Map<String, WordFrequency> parserMixStringByReturnFrequencyMap(String mixedString); void studyNewWord(String study, String token, String posStudy); @Override Map<String, String> getStudyPos();  }