Paip. Importing data into the English voice database MySQL road to solve the empty principle problem

Source: Internet
Author: User
Tags mysql import

Paip. Importing data into the English voice database MySQL road to solve the empty principle problem

#---Reason: MySQL import tool bug

#---Resolution: Do not use double quotes around phonetic notation.

The author old Java Claw Attilax Ayron. Email:[email protected]
Reprint please indicate source: 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 ("Ah? b?

' Rei?

? n ")
Filehandle.close ()

Copyright notice: This article Bo Master original articles, blogs, without consent may not be reproduced.

Paip. Importing data into the English voice database MySQL road to solve the empty principle problem

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.