#---原因:mysql 导入工具bug
#---解决:不要使用双引号括注音.
笔者 老哇爪 Attilax 艾龙。 EMAIL:[email protected]
转载请注明来源: http://blog.csdn.net/attilax
from log import *
iniLog (r"c:\enWzPhonetic.log")
n=0
for line in lines:
if(n>100000 ):break;
if( not isContain(line, "[")):continue;
word= left_ByFirstChar(line, r"[")
word=trim(word)
logging.info(" start to word:"+word)
phonetic=subStrNtrim(line, r"[", r"]")
phonetic=replace_multiple(phonetic,splitor, spltrFinal )
phonetic=trim_multi(phonetic, "@ ")
logging.info(word+"---\""+phonetic+"\"")
#todox import mysql5.6 empty, in phntc ,so .must include use doubleQuot
line=word+"\t\""+phonetic+"\""
fileHandle.write(line+"\n")
n=n+1
#endfor
print ("啊?b?
‘rei?
?n")
fileHandle.close()
版权声明:本文博主原创文章,博客,未经同意不得转载。
时间: 2024-10-15 21:40:43