---
title: "一个把紫光输入法的词库格式变为谷歌词库格式的ruby程序"
author: "nnnnon"
date: "2008-10-11T20:52:05Z"
tags: []
slug: "ruby"
draft: false
lastmod: "2008-10-11T20:52:05Z"
id: 251678
url: "https://malijun.iteye.com/blog/251678"
---

```
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
```