Logo
Акаша
Ositien se 1.0 uti simama naha!
Ositien语1.0版本正式发布!

Hohahosa mi metii hoheu:
以下是转换代码:

def ositien(zi):
unicode = str(zi.encode('unicode_escape')[2:])
vowel = []
consonant = []
ost = ""
for i in unicode:
if i in "0123456789":
vowel.append(dictionary[i])
if i in "abcdefghijklmnopqrst":
consonant.append(dictionary[i])
del consonant[0]
if len(vowel) == 0:
ost = consonant[0] + "a"
elif len(consonant) == 0:
ost = vowel[0]
else:
for i in range(min(len(vowel),len(consonant))):
ost = ost + consonant[i] + vowel[i]
return ost

dictionary = {'0':'а','1':'i','2':'u','3':'e','4':'o','5':'a','6':'i','7':'u','8':'e','9':'o','a':'k','b':'s','c':'t','d':'n','e':'h','f':'m','g':'y','h':'r','i':'w','j':'g','k':'z','l':'d','m':'b','n':'p','o':'k','p':'s','q':'t','r':'n','s':'h','t':'m','u':'y','v':'r','w':'w','x':'g','y':'z','z':'d'}
chinese = input("输入中文(注意将词用空格分开,不要加标点):")
word = ""
ost_word = ""
sentence = ""
for i in range(len(chinese)):
word += chinese[i]
if chinese[i] == ' ' or i == len(chinese)-1:
for j in word.rstrip():
ost_word += ositien(j)
sentence = sentence + ost_word + ' '
word = ""
ost_word = ""
sentence = sentence.rstrip() + '.'
print(sentence.capitalize())
23 天 前 (E)

还没有任何评论!

该帖子似乎还没有任何评论。如果你想评论 Акаша 的这个帖子, 请点击 即可回复