www.dopod.cn-智能手机资源分享平台
诺基亚5220扩展功能设置攻略(手绘版)
8501
ppc数字智能手机i-mate 8501免费送 空中-Opera3.0手机浏览器免费下载
发新话题
打印

[软件] 中文 WIKI for Zdic/Kdic 最新版(12月版)发布! 感谢randax !

引用:
joshdu1125 写道:

再顶。。。。楼主可以透露预计wiki的大小吗?
至少在100M以上了

我宣誓:在我挂掉的时候,要火葬,同时带上M500,和我一起上天堂,或者下地狱>< 补充一下,再带上650,唔,还有电池,充电器什么的,应该够了吧
是最新的中文wiki, 2006-08-08.
我估计应该是200MB左右(见一楼), 当然如果转换成zdic,可能小于200MB.

import java.io.*; public class Trim { public static void main(String[] args) throws Exception { if(args == null || args.length == 0) System.out.println("command format:java Trim inputFile outputFile"); BufferedReader in = new BufferedReader(new FileReader(args[0]), 4048); BufferedWriter out = new BufferedWriter(new FileWriter(args[1]), 4048); String line; int n = 0; String word = null; while((line = in.readLine()) != null) { if(n == 0) { n = 1; word = line; int index = word.indexOf("///"); if(index == -1) { System.out.println("source file format error"); return; } word = word.substring(0, index); } else { n = 0; save(out, word, line); } } in.close(); out.close(); } public static void save(BufferedWriter out, String word, String line) throws Exception { if(line.length() <= 4048) { out.write(word + "/// \n" + line + "\r\n"); return; } String subline; int lineno = 1; while(line.length() > 4048) { int n = 4048; while(true) { if(-1 != ",.;!,。;!”’".indexOf(line.charAt(n))) { n --; } else break; } if(-1 != "“‘".indexOf(line.charAt(n - 1))) n --; subline = line.substring(0, n); line = line.substring(n); out.write(word + lineno + " /// \n"); if(lineno > 1) { out.write("cont'd\n"); } out.write(subline + "\r\n"); lineno ++; } out.write(word + lineno + " /// \ncont'd\n" + line + "\r\n"); } } 写了个java程序,不知道有没有bug,因为没有可测试的文件,也不清楚是不是符合楼主的意思,呵呵,贴出来供大家参考修正。
看来好像大家都不会啊!我也不会,有心而无力!很佩服楼主的精神!帮顶!

中南林业科技大学
randax: 谢谢你工作,我对电脑不太懂,告诉我怎么用吧.

稍微详细点,比如:需要安装什么软件,执行什么命令等.谢!!

如果不太懂的话,讲起来就比较麻烦了;不如把要转的文件给我,我来转吧。可以发到我的邮箱:randax@gmail.com

加油了

QQ:13676969
路过,看看

配置,成色,保修,包邮底价,
pm
请附带链接,谢谢
我也可以帮忙。请楼主给我pm...

zdic兼容的是kdic的字典,kdic天生不足造成了4k的限制,这个好像没有办法吧?

烧掉IIIc的倒霉蛋
发新话题