[英]How is a hyphenation dictionary used for hyphenation?
I've read about hyphenation and I came to know that the hyphenation depends on the dictionary , we are using for the particular language. 我已经阅读了有关断字的知识,并且知道断字取决于字典 ,我们将其用于特定的语言。 For some words Microsoft Office hyphenates differently than LibreOffice.
某些词,Microsoft Office与LibreOffice不同。 I tried to open the dictionary
hyph_en_US.dic
but couldn't understand the content. 我试图打开字典
hyph_en_US.dic
但无法理解内容。 What I didn't get is, how the dictionary is used. 我没有得到的是如何使用字典。
Note: I know they use algorithms as well to make the hyphenation better but to what extent does the dictionary play a role? 注意:我知道他们也使用算法来使连字更好,但是字典在何种程度上起作用?
Any help will be much appreciated. 任何帮助都感激不尽。
Regards, Ankur Vashishtha 问候,Ankur Vashishtha
LibreOffice like TeX and a lot of other programs use the hyphenation algorithm created by Franklin M. Liang. LibreOffice(例如TeX)和许多其他程序都使用Franklin M. Liang创建的连字符算法。 This algorithm uses a pattern matching technique to find hyphenation points in words.
该算法使用模式匹配技术来查找单词中的连字符点。 A separate dictionary file containing the patterns is used for each language.
每种语言都使用一个单独的包含模式的字典文件。 According to Franklin M. Liang's thesis :
根据富兰克林·M·梁的论文 :
These patterns find 89% of the hyphens in a pocket dictionary word list, with essentially no error.
这些模式在袖珍字典单词列表中找到89%的连字符,基本上没有错误。
As to how Word does it, it is hard to tell, since it is proprietary software. 至于Word是如何做到的,很难说,因为它是专有软件。 My guess is that it does not use such an algorithm but a real dictionary with the 100% correct hyphenation points added in. This would explain why the hyphenation is different and more accurate in Word.
我的猜测是,它不使用这种算法,而是使用添加了100%正确连字符点的真实字典。这可以解释为什么连字在Word中是不同的并且更准确。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.