Debian Codegraph @

resources/hyphen/license/hyph-bg.info

raw
1 % copyright: Copyright (C) 2000, 2004, 2017 Anton Zinoviev
2 % title: Hyphenation patterns for Bulgarian
3 % version: 21 October 2017
4 % language:
5 % name: Bulgarian
6 % tag: bg
7 % notice: >
8 % This file is part of the hyph-utf8 package.
9 % See http://www.hyphenation.org/tex for more information.
10 % The Bulgarian patterns used to come from another file,
11 % by Georgi Boshnakov, named bghyphen.tex
12 % authors:
13 % -
14 % name: Anton Zinoviev
15 % contact: anton:lml.bas.bg
16 % licence:
17 % text: > # Seems equivalent to 3-clause BSD
18 % This software may be used, modified, copied, distributed, and sold,
19 % both in source and binary form provided that the above copyright
20 % notice and these terms are retained. The name of the author may not
21 % be used to endorse or promote products derived from this software
22 % without prior permission. THIS SOFTWARE IS PROVIDES "AS IS" AND
23 % ANY EXPRESS OR IMPLIED WARRANTIES ARE DISCLAIMED. IN NO EVENT
24 % SHALL THE AUTHOR BE LIABLE FOR ANY DAMAGES ARISING IN ANY WAY OUT
25 % OF THE USE OF THIS SOFTWARE.
26 % hyphenmins:
27 % typesetting:
28 % left: 2
29 % right: 2
30 % changes: See below
31 % texlive:
32 % encoding: t2a
33 % message: Bulgarian hyphenation patterns
34 % description: Hyphenation patterns for Bulgarian in T2A and UTF-8 encodings.
35 % babelname: bulgarian
36 % ==========================================
37 % Copyright (C) 2000,2004,2017 by Anton Zinoviev <[email protected]>
38 %
39 % This software may be used, modified, copied, distributed, and sold,
40 % both in source and binary form provided that the above copyright
41 % notice and these terms are retained. The name of the author may not
42 % be used to endorse or promote products derived from this software
43 % without prior permission. THIS SOFTWARE IS PROVIDES "AS IS" AND
44 % ANY EXPRESS OR IMPLIED WARRANTIES ARE DISCLAIMED. IN NO EVENT
45 % SHALL THE AUTHOR BE LIABLE FOR ANY DAMAGES ARISING IN ANY WAY OUT
46 % OF THE USE OF THIS SOFTWARE.
47 %
48 % Bulgarian hyphenation patterns
49 %
50 % Generated by ./hyph-bg.sh --safe-morphology --standalone-tex
51 %
52 % Both left and right hyphenmins should be set to 2.
53 %
54 % % Automated Bulgarian Hyphenation
55 % % Anton Zinoviev
56 % % 21 October 2017
57 %
58 % Principles of the Bulgarian hyphenation
59 % =======================================
60 %
61 % One specificity of the Bulgarian language is that the average length
62 % of the words is greater than in English. When typesetting a Bulgarian
63 % text, hyphenation is more important than when typesetting an English
64 % text. Knuth's algorithm for line-breaking is such that in most
65 % English paragraphs no hyphenation will be used. With a Bulgarian
66 % text, however, even the Knuth's algorithm will use hyphenation in most
67 % paragraphs. Hyphenation becomes an absolute necessity if we want to
68 % obtain nice, justified paragraphs when using a software with dumb
69 % line-breaking algorithm, such as LibreOffice.
70 %
71 % According to Decree 936 of the Council of Ministers promulgated on 27
72 % November 1950, the Institute for Bulgarian Language at the Bulgarian
73 % Academy of Sciences is authorised to publish the rules of the
74 % orthography of the Bulgarian language (within certain limits).
75 %
76 % Hyphenation rules between 1945 and 1983
77 % ---------------------------------------
78 %
79 % Between 1945 and 1983 Bulgarian used syllable hyphenation with two
80 % morphological exceptions: hyphenation is preferred between a prefix
81 % and a stem and at the boundary of compound words. The following were
82 % the rules governing the hyphenation:
83 %
84 % 1. One letter does not stay alone. Words of one syllable can not be
85 % hyphenated.
86 % 2. No hyphenation before or after ь.
87 % 3. In a sequence of vowels at least one vowel stays before the
88 % hyphen.
89 % 4. A single consonant between two vowels links with the second vowel.
90 % For example по-ле /po-le/, ра-бо-та /ra-bo-ta/.
91 % 5. In a sequence of consonants between two vowels, at least one
92 % consonant stays with the second vowel. For example те-сто /te-sto/
93 % or тес-то /tes-to/.[^b]
94 % 6. In a sequence of consonants between two vowels, if the first
95 % consonant is sonorant (й /y/, л /l/, м /m/, н /n/, р /r/), then it
96 % stays with the first vowel. For example гер-дан /ger-dan/, сен-ки
97 % /sen-ki/.
98 % 7. The hyphenation separates two successive equal consonants. For
99 % example времен-но /vremen-no/, пролет-та /prolet-ta/.
100 % 8. When the letters дж /dzh/ and дз /dz/ denote a single consonant,
101 % then they are not separated. For example боя-джия /boya-dzhiya/
102 % but not бояд-жия /boyad-zhiya/. When these letters denote two
103 % consonants, then the normal rules apply: над-живявам
104 % /nad-zhivyavam/.
105 % 9. Word prefixes may not be broken. Compound words are hyphenated
106 % either at the boundary of the components or the hyphenation rules
107 % are applied to each of the components separately. For example:
108 % пред-упреждавам /pred-uprezhdavam/ (not пре-дупреждавам
109 % /pre-duprezhdavam/), пред-известие /pred-izvestie/ (not
110 % пре-дизвестие /pre-dizvestie/), за-движвам /za-dvizhvam/ (not
111 % зад-вижвам /zad-vizhvam/), авто-клуб /avto-klub/ (not авток-луб
112 % /avtok-lub/), вакуум-апарат /vakuum-aparat/ (not вакуу-мапарат
113 % /vakuu-maparat/).
114 %
115 % In some rare cases the proper application of rule 9 depends on the
116 % semantics of the word. For example пре-дреша /pre-dresha/ 'change
117 % clothes' but пред-реша /pred-resha/ 'predetermine' or прес-пите
118 % /pres-pite/ 'the snow-drifts' but пре-спите /pre-spite/ 'sleep for a
119 % while/overnight'.
120 %
121 % [^b]: In several publications this rule is formulated with the
122 % additional restriction that the sequence of consonants begins with
123 % an obstruent. I believe this restriction is unintentional. It
124 % makes no sense to forbid a hyphenation of the form AB-A but to
125 % permit ABB-A (A denotes a vowel and B – a consonant).
126 %
127 % Hyphenation rules between 1983 and 2012
128 % ---------------------------------------
129 %
130 % The Orthographic dictionary published by the Institute for Bulgarian
131 % language in 1983 introduced new hyphenation rules. The complexity of
132 % the previous rules was the main reason for the change. The new rules
133 % aimed at two objectives: simplicity and unambiguity.
134 %
135 % The new rules are:
136 %
137 % 1. A consonant between two vowels links with the second vowel. For
138 % example ви-со-чи-на /vi-so-chi-na/.
139 % 2. In a sequence of two or more consonants between two vowels, at
140 % least one consonant stays with first vowel and at least one with
141 % the second vowel. For example сес-тра /ses-tra/ and сест-ра
142 % /sest-ra/.
143 % 3. Two equal consonants are separated. For example плен-ник
144 % /plen-nik/.
145 % 4. In a sequence of two or more vowels, the first vowel stays before
146 % the hyphen. For example пре-одолея /pre-odoleya/ and прео-долея
147 % /preo-doleya/.
148 % 5. In a sequence of three or more vowels, the last vowel stays after
149 % the hyphen. For example мао-изъм /mao-izam/ but not маои-зъм
150 % /maoi-zam/.
151 % 6. The letter й /y/ between a vowel and a consonant stays with the
152 % vowel. For example май-ка /may-ka/.
153 % 7. When a sequence of two or more consonants follows й /y/ then at
154 % least one consonant links with й /y/. For example айс-берг
155 % /ays-berg/ (not ай-сберг /ay-sberg/).
156 % 8. The letter й /y/ between two vowels links with the second vowel.
157 % For example ма-йор /ma-yor/.
158 % 9. No hyphenation before or after ь.
159 % 10. When the letters дж /dzh/ denote a single consonant, then they are
160 % not separated. For example су-джук /su-dzhuk/ (not суд-жук
161 % /sud-zhuk/) but над-живея /nad-zhiveya/.
162 % 11. There must be at least one vowel before and after the hyphen.
163 % 12. One letter does not stay alone.
164 %
165 % The total disregard of the morphology by these rules leads to some
166 % strange results. For example пре-дизвестие /pre-dizvestie/ is
167 % permitted and пред-известие /pred-izvestie/ is forbidden, зад-вижвам
168 % /zad-vizhvam/ is permitted and за-движвам /za-dvizhvam/ is forbidden,
169 % авток-луб /avtok-lub/ is permitted and авто-клуб /avto-klub/ is
170 % forbidden, вакуу-мапарат /vakuu-maparat/ is permitted and
171 % вакуум-апарат /vakuum-aparat/ is forbidden. Because of this, the new
172 % rules were not universally accepted. The old rules are still
173 % mentioned in various places in Internet, they are included even in
174 % some grammar books published by the publishing houses of the Ministry
175 % of Education and of Sofia University. The software developers,
176 % however, soon came into love with the new hyphenation rules.
177 %
178 % Hyphenation rules after 2012
179 % ----------------------------
180 %
181 % In 2012 new rules came into force. There are two differences with
182 % respect to the previous rules:
183 %
184 % 1. Rule 5 of the previous rules is revoked. For example маои-зъм
185 % /maoi-zam/ becomes a valid hyphenation.
186 % 2. The new rules permit morphologically based hyphenation (however it
187 % is not obligatory). For example пред-известие /pred-izvestie/,
188 % за-движвам /za-dvizhvam/, авто-клуб /avto-klub/, вакуум-апарат
189 % /vakuum-aparat/ are valid hyphenations.
190 %
191 % Good hyphenation is a complex matter and it seems the linguists at the
192 % Institute for Bulgarian Language have recognised this. They no longer
193 % attempt to provide universal rules about everything. Instead, they
194 % provide some very permissible rules while the good application of
195 % these rules is leaved to the discretion and the experience of the
196 % printers and the developers of hyphenation software.
197 %
198 % It makes sense to use at least two different sets of hyphenation rules
199 % for Bulgarian. In most cases a more restrictive version should be
200 % used, one which attempts to eliminate the controversial cases of
201 % hyphenation. When typesetting a Bulgarian text in a narrow newspaper
202 % column, however, it will be appropriate to use more liberal
203 % hyphenation rules. It should be noted that one of the reasons for the
204 % hyphenation reform in 1983 was the desire to fix the chaotic
205 % hyphenation in the Bulgarian newspapers at that time.
206 %
207 % Computer implementations
208 % ========================
209 %
210 % Mathematical analysis of the Bulgarian hyphenation
211 % --------------------------------------------------
212 %
213 % The earliest mathematical analysis of the Bulgarian hyphenation rules
214 % belongs to Veska Noncheva.[^1] In 1988 she proposed a mathematical
215 % formalisation of the hyphenation rules in a table with 22 rows.[^2]
216 %
217 % [^1]: <http://www.researchgate.net/profile/Veska_Noncheva>
218 %
219 % [^2]: Нончева В. Алгоритъм за автоматично пренасяне на думи в
220 % българския език. Математика и математическо
221 % образование. Сб. доклади на 17. ПК на СМБ. С., БАН, 1988, 479-482.
222 %
223 % In the same year Eugene Belogay[^3] proposed an alternative
224 % formalisation with only 9 rules.[^4] Belogay proved that his rules are
225 % consistent and that they form a minimal set. The rules of Belogay
226 % have negative character – every hyphenation which is not forbidden by
227 % a rule is possible hyphenation.
228 %
229 % [^3]: <http://www.linkedin.com/in/belogay>
230 %
231 % [^4]: Белогай Е. Алгоритъм за автоматично пренасяне на думи. Компютър
232 % за вас (1988) 3, 12-14.
233 %
234 % The following are the first 7 rules, as formulated by Belogay:
235 %
236 % 1. Б-А
237 % 2. А-ББ
238 % 3. Б-ТТ, ТТ-Б
239 % 4. ААА-Б
240 % 5. й-ББ
241 % 6. Б-ь
242 % 7. д-ж
243 %
244 % Here А denotes an arbitrary vowel letter, Б denotes an arbitrary
245 % consonant letter (including ь and й), ТТ denotes a sequence of two
246 % equal consonant letters and the letters й, ь, д and ж denote
247 % themselves. For example the rule "Б-А" says that we are not permitted
248 % to separate a consonant letter from immediately following vowel
249 % letter.
250 %
251 % The eighth rule of Belogay says that hyphenation is forbidden before
252 % the first and after the last vowel letter. The ninth rule of Belogay
253 % says that hyphenation is forbidden immediately after the first or
254 % immediately before the last letter of the word.
255 %
256 % Notice that is is very easy to translate the rules of Belogay in the
257 % form, required for the hyphenation algorithm of Knuth and Liang used
258 % in TeX.[^a] Let us remind that this algorithm matches the word with a
259 % set of string patterns in which the odd numbers say hyphenation is
260 % permitted in this position and even numbers say the hyphenation is
261 % forbidden. When two patterns give conflicting numbers for the same
262 % position, then the greater number wins.
263 %
264 % First, since the rules of Belogay are negative (they say where
265 % hyphenation is forbidden, not where it is permitted), we have to
266 % permit the hyphenation everywhere:
267 %
268 % 1. А1
269 % 2. Б1
270 %
271 % Then, the first seven rules of Belogay obtain the form:
272 %
273 % 1. Б2А
274 % 2. А2ББ
275 % 3. Б2ТТ ТТ2Б
276 % 4. ААА2Б
277 % 5. й2ББ
278 % 6. Б2ь
279 % 7. д2ж
280 %
281 % Since no Bulgarian word starts with more that four consonants and no
282 % Bulgarian word ends with more than three consonants, the eighth rule
283 % of Belogay can be translated in the following way:
284 %
285 % 1. .Б2
286 % 2. .ББ2
287 % 3. .БББ2
288 % 4. 2Б.
289 % 5. 2ББ.
290 %
291 % The ninth rule of Belogay means that left and right hyphen mins should
292 % be set to 2.
293 %
294 % The work of Eugene Belogay was not limited to merely a mathematical
295 % analysis of the Bulgarian hyphenation rules. In his paper he
296 % published a short algorithm in Pascal which implements these rules.
297 % It didn't take long for this algorithm to be used in various text
298 % processing software. The algorithm of Belogay was famous for many
299 % years. Even as late as 1997 in one book about TeX, the author didn't
300 % care to give any explanations but simply wrote about "the algorithm of
301 % Belogay" as something well known to the reader.[^5]
302 %
303 % [^a]: Liang, Franklin Mark. Word Hy-phen-a-tion by
304 % Com-put-er (Doctoral Dissertation). Stanford University, 1983
305 %
306 % [^5]: Василев В. Ултимативният ТеХ. Удоволствието да правим
307 % предпечатна подготовка сами. София, Интела, 1997, 36
308 %
309 % Bulgarian hyphenation in TeX
310 % ----------------------------
311 %
312 % One unfortunate design decision of Knuth was that the hyphenation
313 % algorithm of TeX applied the hyphenation patterns not to the input
314 % character codes but to the internal codes of the glyphs in the font.
315 % This created a problem for the Cyrillic languages because in TeX the
316 % Cyrillic fonts did not have standardised encoding. Perhaps this is
317 % one of the reasons why the earliest implementations of the Bulgarian
318 % hyphenation in TeX did not rely on the internal hyphenation algorithm
319 % of TeX. Instead, external tools were used to insert soft hyphens in
320 % all Bulgarian words. For example such a tool would replace the word
321 % сричкопренасяне /srichkoprenasyane/ with
322 % срич\\-коп\\-ре\\-на\\-ся\\-не /srich\\-kop\\-re\\-na\\-sya\\-ne/.
323 % The saying "To every disadvantage there is a corresponding advantage"
324 % is true – since Cyrillic and Latin letters use different character
325 % codes, an external tool could easily insert soft hyphens in all
326 % Bulgarian words while leaving the TeX commands intact.
327 %
328 % The earliest known attempt to use the hyphenation algorithm of TeX for
329 % Bulgarian was made by Ognyan Tonev in 1990.[^6] He described his work
330 % as "a not very good translation of the rules. I work in this
331 % direction. But I don't have a 100% working complect of patterns. So,
332 % the copy I send to you[^7] is only a beta-version." The hyphenation
333 % patterns of Tonev don't work correctly and it seems he never completed
334 % his work.
335 %
336 % [^6]: The author of this text was unable to find current information
337 % about Ognyan Tonev in Internet. Apparently in 1990 he worked in
338 % the Center of Informatics and Computer Technology of the Bulgarian
339 % Academy of Sciences.
340 %
341 % [^7]: To Yannis Haralambous,
342 % <http://perso.telecom-bretagne.eu/yannisharalambous>
343 %
344 % The first usable Bulgarian hyphenation patterns for TeX were developed
345 % by Georgi Boshnakov[^8] in 1994. In order to solve the encoding
346 % problem, Boshnakov had developed TeX fonts supporting the MIK encoding
347 % (the prevalent encoding at that time in Bulgaria). This allowed him
348 % to introduce a fully working implementation only a few months after
349 % LaTeX2e became the official LaTeX version. Later Boshnakov modified
350 % his work with the Babel system. The hyphenation patterns of Boshnakov
351 % did their job well enough, so that for almost quarter a century after
352 % their initial creation, they remained the only Bulgarian hyphenation
353 % patterns in the standard distributions of TeX and CTAN.
354 %
355 % [^8]: <http://www.maths.manchester.ac.uk/~gb/>
356 %
357 % There are some similarities between the patterns of Boshnakov and the
358 % patterns of Belogay. The following are the main differences.
359 %
360 % First, Boshnakov used an ingenious and more compact implementation of
361 % the second and the third rule. Instead of {А2ББ, Б2ТТ, ТТ2Б}, or
362 % 8×22×22+22×22+22×22=4840 patterns in total, Boshnakov has patterns of
363 % the form 2Б3Б2 and 4Т3Т4, or only 22×22=484 in total, with the same
364 % effect.
365 %
366 % The second main difference between the patterns of Boshnakov and the
367 % patterns of Belogay concerns the letter combination дж /dzh/. In
368 % Bulgarian this letter combination can denote either a single
369 % consonant, or a sequence of two consonants and the hyphenation rules
370 % change respectively. Unfortunately, it is impossible to know the
371 % meaning of дж /dzh/ without a vocabulary. The solution of Belogay was
372 % a cautious one – his rules do the hyphenation in a way which will be
373 % correct regardless of whether дж /dzh/ is a single consonant or a
374 % sequence of two consonant. On the other hand, the approach of
375 % Boshnakov is a bold one – since дж /dzh/ is more often a single
376 % consonant, his rules assume that it is always a single consonant. The
377 % number of the cases when this decision leads to bad hyphenations is
378 % insignificant in comparison with the cases in which we obtain improved
379 % hyphenation.
380 %
381 % The third main difference between the patterns of Boshnakov and the
382 % patterns of Belogay concerns the eighth rule – its implementation in
383 % the rules of Boshnakov is rather limited which leads to wrong
384 % hyphenations like бри-дж /bri-dzh/. A full implementation of this
385 % rule would require 11660 patterns in total and this would be too much
386 % for the computers in 1994.
387 %
388 % Later developments
389 % ------------------
390 %
391 % In 1995 Atanas Topalov defended a Masters thesis in the Faculty of
392 % Mathematics and Informatics at Sofia University titled "Algorithms and
393 % software about text processing".[^9] One of the main topics in his
394 % thesis was the Bulgarian hyphenation. Topalov criticised vehemently
395 % the official hyphenation rules and their total disregard of the
396 % morphology. He wrote:
397 %
398 % > If we look at the history of the problems of the hyphenation, we
399 % > will discover something very strange. Instead of the expected
400 % > involvement with the depths and aspiration for more admissible and
401 % > satisfactory style, we can find a growing tendency for
402 % > simplification. One unpleasant discovery is that the development of
403 % > the hyphenation software stays firmly on the principle "let us do
404 % > the easiest thing". The earliest works which have been studied are
405 % > from 1978. It turned out that they present the best approach
406 % > concerning the automated hyphenation. The authors have chosen the
407 % > most difficult but the most correct (from literary point of view)
408 % > method for hyphenation, namely the morphological approach.
409 %
410 % Topalov proposed his own hyphenation algorithm. The hyphenation it
411 % generated was smooth and easy to read. One obvious defect of the
412 % algorithm of Topalov was that it contradicted the official hyphenation
413 % rules at that time. One can argue, however, that his algorithm is
414 % compatible with the current hyphenation rules.
415 %
416 % [^9]: The thesis of Atanas Topalov can be accessed at the author's
417 % website <http://www.mind-print.com>
418 %
419 % In 1999 Svetla Koeva[^10] wrote a paper about the automated Bulgarian
420 % hyphenation.[^11] At that time she was a junior member of the
421 % Department of Computational Linguistics at the Institute for Bulgarian
422 % Language but now she is a director of the whole institute. The paper
423 % of Koeva contains a list of hyphenation patterns which can be used as
424 % a basis of automated hyphenation. In 2004 with the help of Stoyan
425 % Mihov[^12] the rules of Koeva were formalised with regular relations
426 % and rewriting rules. They were implemented in a software product
427 % named ItaEst which provided Bulgarian hyphenation and grammar checking
428 % for various software products of Microsoft and Apple.
429 %
430 % [^10]: <http://dcl.bas.bg/svetla_koeva/>
431 %
432 % [^11]: Коева, Светла. Правила за пренасяне на части от думите на нов
433 % ред. Български език. 1999/2000, 1, 84-86
434 %
435 % [^12]: <http://lml.bas.bg/~stoyan/>
436 %
437 % The main differences between the hyphenation of Koeva and the official
438 % hyphenation rules effective after 2012 is that the separation of a
439 % long sequence of consonants between two vowels is done according to
440 % the rules valid before 1983. For example се-стра /se-stra/ and
441 % ай-сберг /ay-sberg/ are permitted. The main difference between the
442 % hyphenation of Koeva and the official hyphenation rules effective
443 % before 1983 is that the rules of Koeva disregard the morphology of the
444 % words. The following rule of Koeva is specific: in a sequence of two
445 % sonorant consonants between two vowels, we are permitted to separate
446 % the first vowel from the first consonant, for example материа-лна
447 % /materia-lna/.
448 %
449 % In 2000 Anton Zinoviev[^13] created new hyphenation patterns for TeX.
450 % He didn't know about the previous work of Boshnakov and he didn't
451 % bother to make his work available in the various TeX distributions and
452 % CTAN. His work was used mostly by the local Linux enthusiasts and the
453 % colleagues of Zinoviev. In 2001 Radostin Radnev[^14] created a free
454 % grammar dictionary of Bulgarian[^15] where he used the hyphenation
455 % patterns of Zinoviev. From there the work of Zinoviev propagated to
456 % OpenOffice, LibreOffice and various online dictionaries, including
457 % <http://bg.wiktionary.org> and <http://rechnik.chitanka.info>.
458 %
459 % [^13]: The author of this text.
460 %
461 % [^14]: <http://bg.linkedin.com/in/radostinradnev>
462 %
463 % [^15]: <http://bgoffice.sourceforge.net/>
464 %
465 % The following are the main differences between the hyphenation of
466 % Zinoviev and the hyphenation of Boshnakov.
467 %
468 % First, the eighth rule of Belogay is fully implemented.
469 %
470 % Second, the rules of Zinoviev try to detect when the letters дж /dzh/
471 % (and дз /dz/) denote a single consonant and when they denote a
472 % sequence of two consonants. By default, however, Zinoviev (like
473 % Boshnakov) assumes that дж /dzh/ is a single consonant and hyphenates
474 % accordingly.
475 %
476 % Third, the rules of Zinoviev disable some cases of unpleasant
477 % hyphenations:
478 %
479 % 1. In a consonant sequence like тст /tst/, the two equal consonants т
480 % /t/ are separated. For example братст-во /bratst-vo/ is forbidden
481 % while братс-тво /brats-tvo/ and брат-ство /brat-stvo/ are
482 % permitted.
483 % 2. The hyphenation is forbidden after a sonorant consonant following
484 % an obstruent consonant. For example отм-ра /otm-ra/ is forbidden
485 % and от-мра /ot-mra/ is permitted.
486 % 3. The hyphenation separates two consecutive kindred voiced/voiceless
487 % consonants. For example субп-родукт /subp-roduct/ is forbidden and
488 % суб-продукт /sub-product/ is permitted.
489 %
490 % At the start of his work on the Bulgarian hyphenation, Zinoviev had
491 % the opportunity to discuss the hyphenation with Svetla Koeva. He
492 % remembers that some cases of unpleasant hyphenation were suggested to
493 % him by Koeva. Unfortunately, he hasn't taken notes so now he doesn't
494 % know which cases of unpleasant hyphenation have been suggested to him
495 % by Koeva and which are his own findings.
496 %
497 % The present work
498 % ================
499 %
500 % Motivation
501 % ----------
502 %
503 % The present work was carried out on the initiative of the leader of
504 % the Bulgarian localisation team of Mozilla, who contacted Zinoviev,
505 % Boshnakov and the maintainers of the TeX hyphenation patterns.[^17]
506 % This work pursues the following main objectives:
507 %
508 % 1. to update the hyphenation patterns in accordance with the current
509 % hyphenation rules;
510 % 2. to generate the hyphenation patterns by a publicly available
511 % script;
512 % 3. to make the hyphenation patterns customisable;
513 % 4. to provide documentation for the future developers.
514 %
515 % [^16]: <http://mozillians.org/en-US/u/stoyan/>
516 %
517 % [^17]: <http://hyphenation.org>
518 %
519 % The current official hyphenating rules for Bulgarian are rather
520 % liberal. Very often, in a long sequence of consonants we are
521 % permitted to split the word at any position, for example аген-т-с-т-во
522 % /agen-t-s-t-vo/. This is prone to many unusual and unexpected results
523 % that interrupt the attention of the reader or deceive his expectations
524 % during the movement of his eyes to the next line. On the other hand,
525 % in order to produce nice justified paragraphs there is no need for so
526 % many hyphenation possibilities. It would be sufficient even if only
527 % one possible separation between any two syllables was permitted.
528 %
529 % Therefore, it makes sense to use a more restrictive version of the
530 % Bulgarian hyphenation, one which eliminates the controversial cases of
531 % hyphenation. Only when typesetting a Bulgarian text in a very narrow
532 % newspaper column it will be appropriate to use a more liberal version.
533 % It should be noted that some specialised English dictionaries also
534 % separate the word-division positions into two categories – preferred
535 % positions and less recommended positions.
536 %
537 % There are two methods to determine the optimal division within a
538 % sequence of consonants between two vowels:
539 %
540 % * we can hyphenate according to the syllables in the word or
541 % * we can hyphenate morphologically.
542 %
543 % Hyphenation according to the syllables in the word
544 % --------------------------------------------------
545 %
546 % Let us look at the properties of the Bulgarian syllables. All
547 % syllables have the following structure:
548 %
549 % > onset - nucleus - code
550 %
551 % The nucleus in Bulgarian is always a vowel. Both the onset and the
552 % code are (possibly empty) sequences of consonants.
553 %
554 % The Bulgarian syllables adhere to the Sonority Sequencing Principle.
555 % According to this principle, the consonants within the onset have
556 % raising sonority and the consonants within the code have decreasing
557 % sonority.
558 %
559 % Several grammar books agree that the following sonority scale is valid
560 % for Bulgarian:
561 %
562 % > voiceless obtrusive < voiced obtrusive < sonorant consonant < vowel
563 %
564 % According to the investigations of the author, the only exception to
565 % this law is due to the letter в /v/ which is a voiced obtrusive but it
566 % can be used also as a voiceless obtrusive. This exception is due to a
567 % spelling particularity of the Bulgarian language. Whenever the letter
568 % в /v/ seemingly violates the Sonority Sequencing Principle, in the
569 % spoken language this letter is read as ф /f/, that is as a voiceless
570 % obtrusive (for example the word отвсякъде /otvsyakade/ is read as
571 % отфсякъде /otfsyakade/).[^18]
572 %
573 % [^18]: No Primitive Slavonic word contains the phoneme ф /f/.
574 % Therefore, we can safely assume that in the Primitive Slavonic
575 % language the consonant ф /f/ was a positional variant of the consonant
576 % в /v/.
577 %
578 % The author has found that the sonorant consonants in Bulgarian have
579 % their own sonority scale:
580 %
581 % > м /m/ < н /n/ < л /l/ < р /r/ < й /y/
582 %
583 % Only a few words such as жанр /zhanr/ and химн /himn/ violate this
584 % scale. Such words are always loan-words and their pronunciation is
585 % somewhat problematic for the native Bulgarian speakers.
586 %
587 % In addition to the Sonority Sequencing Principle, the consonant
588 % clusters within the Bulgarian syllable adhere to the following
589 % additional principles:
590 %
591 % 1. Both in the onset and in the code, the labial and dorsal plosives
592 % precede the coronal plosives and affricates.
593 % 2. If the onset or the code contains two plosives or affricates, then
594 % there are no fricatives between them. Few words with the Latin
595 % root 'text' are exceptions: контекст /kontekst/.
596 % 3. If the onset or the code contains two fricatives other than в /v/,
597 % then there are no plosives or affricates between them.
598 % 4. If the onset or the code contains two plosives or affricates, then
599 % they both have equal sonority (both are voiced, or both are
600 % voiceless).
601 % 5. If the onset or the code contains two fricatives other than в /v/,
602 % then they both have equal sonority (both are voiced, or both are
603 % voiceless).
604 % 6. Neither the onset, nor the code may contain two labial plosives, or
605 % two coronal plosives or affricates or two dorsal plosives.
606 % 7. Neither the onset, nor the code may contain two equal consonants
607 % with the exception of в /v/ (for example втвърди /vtvardi/).[^19]
608 %
609 % [^19]: Actually, the letter в /v/ is not a real exception because in
610 % all such cases this letter denotes two different consonants – в /v/
611 % and ф /f/. Only in the Russian loan-word взвод /vzvod/ the two
612 % letters в /v/ denote a repeating consonant в /v/.
613 %
614 % From all these properties of the Bulgarian syllable we can deduce the
615 % following hyphenation rules:
616 %
617 % 1. In a sequence МК where М is a consonant with higher sonority than
618 % K, we are not permitted to hyphenate before М. Exception: when М
619 % is в /v/ and К is a voiceless consonant.
620 % 2. In a sequence КМ where М is a consonant with higher sonority than
621 % K, we are not permitted to hyphenate after М.
622 % 3. In a sequence KBT where K and T are plosives or affricates and B is
623 % fricative, we separate K from T.
624 % 4. In a sequence CKB where K is a plosive or affricate and C and B are
625 % fricatives other than в /v/, we separate C from B.
626 % 5. If in a consonant sequence a coronal plosive or affricate Т is
627 % followed by a labial or dorsal plosive К, then we separate Т from К.
628 % 6. If a consonant sequence contains two plosives or affricates, one
629 % voiced and one voiceless, then we separate them.
630 % 7. If a consonant sequence contains two fricatives other than в /v/,
631 % one voiced and one voiceless, then we separate them.
632 % 8. If a consonant sequence contains two labial plosives or two coronal
633 % plosives or affricates or two dorsal plosives then they are
634 % separated.
635 % 9. If a consonant sequence contains two equal consonants (not
636 % necessarily consecutive), then they are separated.
637 %
638 % With so many prohibitive rules, a question arises: if we apply all
639 % these rules, aren't we going to eliminate too many hyphenation
640 % possibilities? The answer is no. It can be demonstrated that between
641 % any two consecutive syllables at least one separation point will be
642 % permitted.
643 %
644 %
645 % Hyphenation according to the morphology
646 % ---------------------------------------
647 %
648 % Between 1983 and 2012 the official orthographic rules of the
649 % Bulgarian language forbade morphologically based hyphenation. After
650 % 2012 such hyphenation is permitted (but not obligatory).
651 %
652 % The most important case when it is very desirable to use
653 % morphologically based hyphenation is the case of the compound words.
654 % Divisions such as авток-луб /avtok-lub/ and вакуу-мапарат
655 % /vakuu-maparat/ are extremely irritating even if they are formally
656 % correct. Unfortunately, we do not have a vocabulary of the compound
657 % Bulgarian words that would permit us to produce rules for automated
658 % hyphenation. Therefore, the current Bulgarian hyphenation patterns do
659 % not attempt to apply morphological hyphenation to such words.
660 %
661 % Second in importance (but far more significant in terms of numbers) is
662 % the case with the word prefixes. While the eyes of the reader still
663 % look at the start of the word, the word is still unknown to him. At
664 % this point, it is very important not to deceive his expectations. For
665 % example, when the reader sees над- /nad-/ at the end of the line, he
666 % will expect that this is the prefix над- /nad-/ with semantics 'attain
667 % more than'. This expectation will be fooled if this wasn't really a
668 % prefix, but a deceiving (while formally correct) hyphenation of the
669 % word надремя /nadremya/ 'have dozed enough' where the real prefix is
670 % not над- /nad-/ but на- /na-/ with semantics 'achieve a state after
671 % accumulation'. Such hyphenation distracts the reader and makes the
672 % reading more difficult.
673 %
674 % Third in importance is the case with the word suffixes. With respect
675 % to the hyphenation rules we can divide the suffixes into three
676 % categories:
677 %
678 % 1. Suffixes starting with a vowel, for example -ар /-ar/. It is not
679 % appropriate to follow the morphology with such suffixes because
680 % this will contradict the whole hyphenation tradition of the
681 % Bulgarian language. For example крав-ар /krav-ar/ is unwarranted.
682 % 2. Suffixes starting with one consonant, for example -ка /-ka/.
683 % Usually with such suffixes the syllable boundary in the word
684 % coincides with morpheme boundary so no specific cares are
685 % necessary, for example кравар-ка /kravar-ka/. The exceptions are
686 % rare, for example: обек-тната /obek-tnata/ instead of обект-ната
687 % /obekt-nata/.
688 % 3. Suffixes starting with more than one consonant (-ски /-ski/, -ство
689 % /-stvo/). It is possible to use morphological hyphenation rules
690 % with such suffixes.
691 %
692 % Even if it is possible to use morphological hyphenation with the
693 % suffixes of the third category, it turns out, this is not as useful as
694 % it is with the case of the prefixes. When the eyes of the reader have
695 % reached this part of the word, the word is already more or less known
696 % to the reader. Therefore, at this point the morphological hyphenation
697 % does not provide any significant advantages in comparison to the
698 % simpler hyphenation based only on the syllables in the word. Consider
699 % for example the word геройс-тво /geroys-tvo/ with suffix -ство
700 % /-stvo/. When the reader sees геройс- /geroys-/ at the end of the
701 % line this will give him an early clue that the suffix of the word is
702 % -ство /-stvo/. Such non-morphological hyphenation does not deceive
703 % the expectations of the reader. On the contrary, it makes the reading
704 % easier because it gives clues to the reader about what follows on the
705 % next line.
706 %
707 % Because of these considerations, the current Bulgarian hyphenation
708 % patterns do not attempt to use morphological hyphenation with respect
709 % to the suffixes of the words. Though it would be useful to implement
710 % rules about the suffixes of the second cateogory. Hopefully, some
711 % future version will have such rules.
712 %
713 % Occasionally,[^20] a fourth morphological requirement is stated: that
714 % hyphenation should conform with the boundary between the word and the
715 % definitive articles -та /-ta/ and -те /-te/ (postfixed in Bulgarian).
716 % There is no need to pay attention to this rule because it seems to be
717 % satisfied by its own nature. The author has searched in a dictionary
718 % with over 860000 Bulgarian words for cases when the hyphenation rules
719 % would hyphenate badly with respect to the definitive article. He was
720 % unable to find even one such case with the hyphenation rules valid
721 % after 1983 and only about 10 cases with the rules valid before 1983
722 % (one of them is живопи-ста /zhivopi-sta/ instead of живопис-та
723 % /zhivopis-ta/).
724 %
725 % One unavoidable characteristic of any morphologically based automated
726 % hyphenation is that it can create wrong hyphenations. Because of
727 % this, one useful option is to use the morphology in a safe way – to
728 % use it in order to forbid bad hyphenations but to create no new
729 % hyphenation possibilities solely on the basis of the morphology.
730 %
731 % Take for example the word дозрея /dozreya/ 'ripen fully'. According
732 % to the phonological rules, we should hyphenate it as доз-рея
733 % /doz-reya/. According to the morphology, however, we should hyphenate
734 % as до-зрея /do-zreyq/ because this word is formed with the prefix до-
735 % /do-/ with semantics 'complete or supplement' and this semantics would
736 % be lost if the reader sees доз- /doz-/ at the end of the line.
737 % Therefore, there are three methods to hyphenate this word:
738 %
739 % 1. доз-рея /doz-reya/ when morphology is not used;
740 % 2. до-зрея /do-zreya/ when morphology is fully used;
741 % 3. дозрея /dozreya/ (no hyphenation) when morphology is used in a safe
742 % way.
743 %
744 % The option to use the morphology in a safe way is very attractive when
745 % the software uses a smart line-breaking algorithm which can produce
746 % good results even with less hyphenation possibilities. TeX is one
747 % such software. It should be noted that this option does not eliminate
748 % too many hyphenation possibilities because the morpheme boundaries
749 % most of the time are also syllable boundaries.
750 %
751 % [^20]: Правописен и правоговорен наръчник. Състав. Иван Хаджов,
752 % Цв. Минков; Ред. Ив. Хаджов и др. София, Бълг. кн., 1945
753 %
754 % The following are results of a statistics about the quality of the
755 % morphological rules (the number after the sign ± is the expected
756 % standard deviation of our estimations):
757 %
758 % With the option `--morphology`:
759 %
760 % * in 0.1% ±0.3% of the dictionary words the morphological patterns
761 % create very wrong hyphenation;
762 % * in 89.8% ±0.1% of the dictionary words the morphological patterns
763 % hyphenate identically with the case when no morphology patterns are
764 % used;
765 % * in 0.3% ±0.2% of the dictionary words the morphological patterns
766 % hyphenate differently in comparison to the case when no morphology
767 % patterns are used and the word is hyphenated in a way which
768 % contradicts the morphology;
769 % * in 0.6% ±0.1% of the dictionary words the morphological patterns
770 % hyphenate differently in comparison to the case when no morphology
771 % patterns are used and there is a possible hyphenation which is
772 % compatible with the word morphology but which is nevertheless
773 % forbidden by the morphology patterns.
774 %
775 % With the option `--safe-morphology`:
776 %
777 % * in 0% of the dictionary words the morphological patterns create very
778 % wrong hyphenation;
779 % * in 90.0% ±0.1% of the dictionary words the morphological patterns
780 % hyphenate identically with the case when no morphology patterns are
781 % used;
782 % * in 0.3% ±0.2% of the dictionary words the morphological patterns
783 % hyphenate differently in comparison to the case when no morphology
784 % patterns are used and the word is hyphenated in a way which
785 % contradicts the morphology;
786 % * in 0.6% ±0.1% of the dictionary words the morphological patterns
787 % hyphenate differently in comparison to the case when no morphology
788 % patterns are used and there is a possible hyphenation which is
789 % compatible both with the word morphology and with the syllable
790 % boundaries but which is nevertheless forbidden by the morphology
791 % patterns.
792 %
793 % Notice that the morphological patterns create a different hyphenation
794 % only in about 10% of the words. The following explanation can be
795 % given for this surprising fact. First, the natural evolution of the
796 % human languages tends to simplify the complex sequences of consonants.
797 % Therefore, no morpheme contains a complex sequence of consonants. And
798 % second, the Bulgarian orthography is morphological. This means that
799 % the morphemes are written according to their actual pronunciation,
800 % however the simplifications in the spoken languages which take place
801 % at the morpheme boundaries are not taken into account in the
802 % orthography. The independent operation of these two factors leads to
803 % the result that most of the time the morpheme boundaries coincide with
804 % the conventional syllable boundaries. The main exception to this is
805 % when a morpheme starts with a vowel, in this case its syllable will
806 % include one or more consonants of the preceeding morpheme. The second
807 % exception is when a morpheme ends with a vowel and the next morpheme
808 % starts with a sequence of two or more consonants.
809 %
810 % Usage of the script `hyph-bg.sh`
811 % --------------------------------
812 %
813 % The `hyph-bg.sh` is all-in-one script which can generate both
814 % documentation (this text) and Bulgarian hyphenation patterns. When
815 % given the option `--help` the script gives short usage instructions:
816 %
817 % ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
818 % hyph-bg.sh --help
819 % Show this info
820 % hyph-bg.sh [--doc-html | --doc-latex | --doc-txt]
821 % Print documentation in various formats
822 % hyph-bg.sh [other options]
823 % Generate Bulgarian hyphenation patterns
824 %
825 % Options when generating hyphenation patterns:
826 %
827 % --standalone-tex
828 % Produce hyphenation patterns for TeX with \patterns{ ... }.
829 %
830 % --no-hyphen-mins
831 % Hyphenation patterns which do not require hyphen mins.
832 % Otherwise: both left and right hyphen mins should be set to 2.
833 %
834 % --safe-dz
835 % Do not try to guess whether DZ is a single consonant or not.
836 % Only use hyphenation which will be correct in both cases.
837 %
838 % --permissible
839 % Permit any formally correct hyphenation, including unnatural
840 % divisions, such as studen-tstvo. Useful for educational tools
841 % or when typesetting Bulgarian text in a very short column.
842 %
843 % --morphology
844 % Apply morphology when hyphenating, for example: za-dvizhvam.
845 % May hyphenate incorrectly in some cases.
846 %
847 % --safe-morphology
848 % Apply morphology when hyphenating. Never hyphenates incorrectly
849 % but may prohibit some correct hyphenations.
850 %
851 % --no-morphology
852 % Disregard the morphology. Default.
853 %
854 % --1945
855 % Hyphenate according to the rules effective between 1945 and 1982
856 %
857 % --1983
858 % Hyphenate according to the rules effective between 1983 and 2011
859 %
860 % --2012
861 % Hyphenate according to the rules effective after 2012. Default.
862 % ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
863 %
864 % The following are the recommended ways to generate hyphenation
865 % patterns by this script:
866 %
867 % `hyph-bg.sh --standalone-tex --safe-morphology`
868 % : For TeX. Apply the morphology in a safe way when the software
869 % uses a smart line-breaking algorithm.
870 %
871 % `hyph-bg.sh`
872 % : For most other software.
873 %
874 % `hyph-bg.sh --no-hyphen-mins`
875 % : The current versions of Mozilla (as of 2017) seem to ignore the
876 % hyphen mins in words that contain a dash.
877 %
878 % `hyph-bg.sh --morphology`
879 % : For professional typography with human proof-reader.
880 %
881 % `hyph-bg.sh --permissible`
882 % : For educational tools and online dictionaries which can show only one
883 % kind of hyphenation.
884 %
885 % Notice that some specialised English dictionaries separate the
886 % word-division positions into two categories – preferred positions and
887 % less recommended positions. It would be best if the Bulgarian online
888 % dictionaries could do the same. For example hyphen "-" can be used to
889 % display the preferred positions and dot "." – the less recommended
890 % positions. If a word-division position is permitted only by the
891 % patterns of `hyph-bg.sh --permissible`, then this position is less
892 % recommended.
893 %