Chinese phonetic alphabet
In normal applications, you may need to enable automatic phonetic injection for some Chinese characters. This program is implemented according to this requirement.
Thoughts
The idea of the Chinese phonetic alphabet program is mainly dependent on the phonetic vocabulary of some existing commonly used words. For a given Chinese character string text that requires sound injection, text is first segmented. The word segmentation method here adopts the methods to combine forward and reverse maximum matching. Then, based on the probability that each word in the phonetic alphabet is a certain sound, a maximum possible phonetic result is obtained.
The idea is very simple. After implementation, the results are good. For the convenience of the application, I typed the program into the jar package, pylabeler_v1.0.jar.
Call Method
Import COM. ICT. cl. pinyinlabeler; public class laber {public static void main (string [] ARGs) {string text = "attend meeting"; system. out. println (Text + "-->" + pinyinlabeler. getpinyin (text);} attended the meeting --> can Jia Hui Yi
Very easy to use.
If you want to know the code, you can come here to see the https://github.com/talentlei/PinYinLabeler
Automatic Chinese phonetic transcription Program