鹤鸸鹋䳍鸭鹊鸿鹅鸳鸯鸣鸡鹫鹑鹧鸪鹇鹌鸱鹃鸨鹭鸦鸽鸠䴘䴙鹳鸻鸥鹬鹮鹦鳽鹲鹈鸬鹚鹕鹗鸢鵟鹞鸮鸺鹠鴗鹟䴕鹉鹩鸫鹨鵙莺䳭鹛鹎鹂䴓鸲鹪鹡鸰鹀
-
-
Save bczhc/b24ed27f99c94800f37bb582f6f07ba5 to your computer and use it in GitHub Desktop.
`Multiling IOC 15.1_c`中文名用到的带“鸟”部分的字
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/env ruby | |
| require 'csv' | |
| path = '/home/bczhc/Downloads/Multiling IOC 15.1_c.csv' | |
| chars = File.readlines('/home/bczhc/result.txt').map do |x| | |
| x.split(' ')[1] | |
| end | |
| used_chars = [] | |
| csv = CSV.parse(File.read(path)) | |
| index = csv[0].index("Chinese") | |
| for x in csv[1...].map { |x| x[index] } | |
| found = x.chars.find_all {|a| chars.include?(a) } | |
| used_chars += found unless found.empty? | |
| end | |
| used_chars.uniq! | |
| p used_chars.join('') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment