`
nnnnon
  • 浏览: 147656 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

一个把紫光输入法的词库格式变为谷歌词库格式的ruby程序

    博客分类:
  • RORs
阅读更多
outfile = File.new("out.txt","w")
	File.open(gets.chomp) do |file|
		file.each_line do |line|
			a,b,c=line.chomp.split(/\t/)
			outfile.write a+" "+c+" "+b+"\n"
		end
	end
outfile.close
 
分享到:
评论
1 楼 rainux 2008-10-12  
为什么不直接 line.gsub("\t", ' ')

相关推荐

Global site tag (gtag.js) - Google Analytics