private void sogou(String path) throws IOException{
File file=new File(path);
SougouScelMdel model = new SougouScelReader().read(file);
Map<String,List<String>> words = model.getWordMap(); //词<拼音,词>
Set<Entry<String,List<String>>> set = words.entrySet();
Iterator<Entry<String,List<String>>> iter = set.iterator();
while(iter.hasNext()){
Entry<String,List<String>> entry = iter.next();
List<String> list = entry.getValue();
int size = list.size();
for(int i = 0; i < size; i++){
String word = list.get(i);
System.out.println(word);
}
}
}
相关文件下载