为了解决中英文混合文本断行时中文和英文各自断行算法需求冲突的问题,研究适应中文断行的基于贪心策略的断行算法和适应英文断行的基于动态规划的断行算法的各自特点,通过中文汉字不同于英文单词的等宽特性,提出一种结合2种算法的针对中英文混合文本的改进断行算法。相对于原有的2种断行算法,改进断行算法能够兼顾混合文本中中文文本的断行效率和英文文本断行效果。
To solve the conflict of demand for different line-breaking algorithms of Chinese and English part in the mixed text, different characteristics of line-breaking algorithm based on greedy strategy for Chinese text and the algorithm based on dynamic programming for English text are studied. According to monospaced characteristics of Chinese characters, an improved line-breaking algorithm which combines the two algorithms is proposed for mixed Chinese and English text. With respect to the original two line-breaking algorithms, the improved algorithm ensures both the efficiency of Chinese line- breaking and the effect of English line-breaking.