import(csv)
import(re)
Person = struct(name_j:string, kana:string, email:string, gender:string, age:number,
	birthday:string, marriage:string, prefecture:string,
	mobilephone:string, mobilecarrier:string, custom:string, rest*)
//begin = time.clock()
csv.read(open(sys.argv[1])):iter {|line|
	person = Person * line
	m = re.compile("([^_]+)_([^@]+)@.*").match(person.email)
	name_e = m.group(1).capitalize() + " " + m.group(2).capitalize()
	csv.writee(sys.stdout, [name_e, person.email,
		chooseif(person.gender == "’j", "male", "female"),
		person.age, person.birthday, person.mobilephone])
}
//end = time.clock()
//sys.stderr.printf("%f\n", end - begin)
