中文分词检索系统

时间:2020-12-12 05:45:41
【文件属性】:

文件名称:中文分词检索系统

文件大小:4.22MB

文件格式:RAR

更新时间:2020-12-12 05:45:41

中文 分词 检索 java

public static void main (String[] args) throws ParserException { try { TravelWordTable(RadarSpecialSearchEngine.fdz+"/字典.txt"); } catch(Exception e) { e.printStackTrace(); } } public static void TravelWordTable(String filename) throws IOException { try{ String buffer ; FileWriter resultFile = null; PrintWriter myFile = null; String dstfile = filename+ "_dsturl.txt" ; File writefile = new File(dstfile); if(!writefile.exists()) { writefile.createNewFile(); } resultFile=new FileWriter(writefile); myFile = new PrintWriter(resultFile); BufferedReader reader = new BufferedReader(new FileReader(filename)); while((buffer = reader.readLine())!=null) { String b = buffer; System.out.println("开始检索关键字:"+b); buffer = URLEncoder.encode(buffer, "UTF-8"); String url = "http://s.wanfangdata.com.cn/Paper.aspx?q=" + buffer + "&f=top"; getWanFangUrls(url,"UTF-8",myFile); System.out.println("关键字:"+b+" 检索完成"); } if( myFile != null) myFile.close(); if( resultFile != null) resultFile.close(); } catch (ParserException e) { e.printStackTrace(); }


【文件预览】:
2.jpg
6.jpg
1.jpg
4.jpg
5.jpg
需要系统可以联系QQ463850032.txt
7.jpg
3.jpg

网友评论