名字top500字典 各种格式及python脚本

转载原文

原文件名字top500

链接: https://pan.baidu.com/s/1cv0jPYb1-EBceoZz3QNvgg 密码: bat5


中文名字

链接: https://pan.baidu.com/s/1O3j0NxWrEncXlFZ1Li8IpQ 密码: xj7n

全拼 比如:zhangwei

链接: https://pan.baidu.com/s/1q_sZ_FlYu9JCkdSYywskog 密码: t72p

姓全拼 名取首字母 比如:zhangw

链接: https://pan.baidu.com/s/1xzQscNrVNBMpsyBqvrWAYw 密码: kdga

全部取首字母 比如:zw

链接: https://pan.baidu.com/s/1IepYUv9pY3O3gTROMlcDhg 密码: 62j5

全部的下载链接
链接: https://pan.baidu.com/s/1JWbAMZ3x7we2K9coookaxg 密码: b6r8

================================================================

同时用python3写了个脚本

读取name.txt的中文名字

#!/usr/bin/env python
# -*- conding:utf-8 -*-
import re
from xpinyin import Pinyin

def name():
mz=[]
with open(‘name.txt’,’r’) as f:
for i in f.readlines():
#res=re.compile(r'[\u0391-\uFFE5]+’) #匹配中文
#date = res.findall(i)
mz.append(date)
#print(date)
return mz

def zhangwei(date): #zhangwei
with open(‘zhangwei.txt’, ‘a’) as f:
p = Pinyin()
for i in date:
pinyin =p.get_pinyin(i[0])
res = re.compile(r'(\w)’)
pydate = res.findall(pinyin)
for i in pydate:
f.write(i)
f.write(‘\n’)

def zhangw(date): #zhangw
with open(‘zhangw.txt’, ‘a’) as f:
p = Pinyin()
for i in date:
pinyin = p.get_pinyin(i[0])
res = re.compile(r'(.*?)-(.).*?-(.)|(.*?)-(.)’)
pydate = res.findall(pinyin)
for i in pydate[0]:
f.write(i)
print(‘\n’)
f.write(“\n”)

def zw(date): #zw
with open(‘zw.txt’, ‘a’) as f:
p = Pinyin()
for i in date:
pinyin = p.get_pinyin(i[0])
res = re.compile(r'(.).*?-(.).*?-(.)|(.).*?-(.)’)
pydate = res.findall(pinyin)
for i in pydate[0]:
f.write(i)
print(‘\n’)
f.write(“\n”)

date=name()
zhangwei(date)
zhangw(date)
zw(date)

暂无评论

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇