欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

java 怎么读取细胞词库scel

程序员文章站 2022-06-30 12:54:31
...
	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);
			}
		}
	}

相关文件下载