16

GitHub - RimoChan/yinglish: 【yinglish】淫语翻译机!

 2 years ago
source link: https://github.com/RimoChan/yinglish
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

淫语翻译机!

能把中文翻译成淫语的翻译机!

(其实灵感是来自北京地铁站,那个写站名的告示牌真的好色啊2333)

import yinglish

s = '不行,那里不行。'
print(yinglish.chs2yin(s))
# 不行,那……那里不行……

s2 = '吃葡萄不吐葡萄皮。'
print(yinglish.chs2yin(s2))
# ……吃〇〇不吐葡……葡萄皮……
def chs2yin(s, 淫乱度=0.5):

s是原字符串,淫乱度是0~1的实数,越大越淫乱,表示每个词语被转化的概率。

首先,你需要安装一个Python(3.6以上版本)。

pip install git+https://github.com/RimoChan/yinglish.git

最后import yinglish就行了。

就这样,大家88(溜了溜了)。


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK