<div dir="ltr">This email is a rather belated response to the point raised by <span style="color:rgb(0,0,0);white-space:pre-wrap">Alex Kapranoff on Oct 7, 2015 (sorry Alex!). Please see the end for a reminder copy of the relevant email.</span><div><br></div><div>I will first share my thoughts on the point raised by Alex. I will then raise a few other points that I have encountered while using the Turkish hyphenation patterns.</div><div><br></div><div>I agree with Alex that if  "2e2cek." is included, it makes sense to also include "2a2cak." so as to apply the rule uniformly on words such as "ge-le-cek", "ka-la-cak", "su-na-cak", "se-çe-cek" etc. Note that, for these specific four words the application of the "2e2cek." and "2a2cak." rules prevent the last hyphen (hyphenation occurs only at odd values), that is, they lead to "ge-lecek", "ka-lacak", "su-nacak", "se-çecek". Whereas in Turkish the correct hyphenation would have both hyphens, I think McCay makes a judgement call and says that "...nor do we really want the cek of -ecek broken off if it is at the end of a word". I looked at the recommendations of the Turkish Language Association [Türk Dil Kurumu = TDK] on the issue [<a href="http://tdk.org.tr/index.php?option=com_content&view=article&id=208:Hece-Yapisi-ve-Satir-Sonunda-Kelimelerin-Bolunmesi&catid=50:yazm-kurallar&Itemid=132">link to page</a> (in Turkish)] and they only specify that hyphenation should not result in a single letter at the beginning or at the end of a line. According to this rule, there is nothing wrong with splitting from -cek and leaving the -cek at the beginning of the next line. As a result, I think that either "2a2cak." should be added or "2e2cek." should be deleted to have a consistent set of rules.</div><div><br></div><div>***</div><div><br></div><div>Having read the hyphenation rules of TDK, I realized that the current rules do not hyphenate at apostrophes. The correct hyphenation of words with apostrophes in them would be as follows (copied from the link above).<br><br>................................................................................................... Edirne’<br>nin...<br><br>.................................................................................................. Ankara’<br>dan...<br><br>..................................................................................................... 1996’<br>da...<br><br>An important point is that after splitting the word, no hyphen character is used when the split occurs at the apostrophe. I am not sure whether such a rule can be implemented with the current hyphenation algorithms. German seems to have similar requirements as the link below suggests. The use of the \allowbreak command manually could be a solution.</div><div><br></div><div><a href="https://tex.stackexchange.com/questions/26174/allow-line-break-but-without-inserting-a-dash">https://tex.stackexchange.com/questions/26174/allow-line-break-but-without-inserting-a-dash</a></div><div><br></div><div>Also, the fact that there are multiple apostrophe symbols should be taken into consideration.</div><div><br></div><div>***</div><div><br></div><div>Similar to the apostrophe, hyphenation with the em dash is also problematic. I do not know what the best approach to hyphenate words with em dash in them, but the following pages suggest some workarounds.</div><div><br></div><div><a href="https://tex.stackexchange.com/questions/130687/redefining-the-emdash-so-as-to-allow-hyphenation">https://tex.stackexchange.com/questions/130687/redefining-the-emdash-so-as-to-allow-hyphenation</a></div><div><br></div><div><a href="https://tex.stackexchange.com/questions/56657/hyphenation-problem-with-versus-textemdash">https://tex.stackexchange.com/questions/56657/hyphenation-problem-with-versus-textemdash</a></div><div><br></div><div>Would it make sense to add patterns to with em dash in them?</div><div><br></div><div>***</div><div><br></div><div>In addition to the patterns generated by McCay, the following paper lists other patterns for Turkish (take a look at Sec. 5: Syllabus Structure of Turkish Language).</div><div><br></div><div>Güney Gönenç. 1973. Unique decipherability of codes with constraints with application to syllabification of Turkish words. In Proceedings of the 5th conference on Computational linguistics - Volume 1 (COLING '73), A. Zampolli and N. Calzolari (Eds.), Vol. 1. Association for Computational Linguistics, Stroudsburg, PA, USA, 183-194. DOI: <a href="https://doi.org/10.3115/992532.992549">https://doi.org/10.3115/992532.992549</a></div><div><br></div><div>Therefore, it might make sense to test and expand the current set of patterns by using a Turkish corpus. Here are some sources for such a project.</div><div><br></div><div><div>List of Turkish words:</div><div><a href="http://deniz.yuret.com/turkish/sozluk-boun.txt.gz?attredirects=0">http://deniz.yuret.com/turkish/sozluk-boun.txt.gz?attredirects=0</a></div><div><br></div><div>Orwell's 1984 in Turkish:</div><div><a href="https://github.com/bicici/SMTData/blob/master/1984_en-tr_SentenceAligned_ParallelCorpus.zip">https://github.com/bicici/SMTData/blob/master/1984_en-tr_SentenceAligned_ParallelCorpus.zip</a></div><div><br></div><div>One would hyphenate every word using the patterns as well as using the rules in the TDK link above, compile a list of words that differ and update the patterns as a result. This could be a project for those who work on natural language processing for Turkish. (To future Turkish pattern authors who read this thread: the TeX rules for hyphenation are talked about in detail at Frank Liang's thesis, and in a shorter, concise form at Appendix H of the TeXbook by Knuth.)</div><div><br></div><div>I would be interested in the opinions of pattern authors for adding the rules for apostrophe and em dash into the Turkish pattern list. If anyone has parsed a corpus to generate a pattern list, it would be great if they could comment on whether what I described above is sufficient, or if there are other points that one needs to consider. </div><div><br></div><div>Best wishes,</div><div>Ş. Ekin Kocabaş</div><div><br></div><div><br></div><div><br></div><br></div><div>Original thread below:<br><br><a href="http://tug.org/piperma">http://tug.org/piperma</a><span style="white-space:pre-wrap;color:rgb(0,0,0)">il/tex-hyphen/2015-October/001295.html</span><br></div><div><div><font color="#000000"><span style="white-space:pre-wrap"><br></span></font></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">07.10.2015, 01:41, "Alex Kapranoff" <<a href="mailto:kappa@yandex.com">kappa@yandex.com</a>>:<br>Hello.<br>Turkish hyphenation patterns are generated by a simple Ruby script available at<br><a href="http://www.ctan.org/tex-archive/language/hyph-utf8/source/generic/hyph-utf8/languages/tr">http://www.ctan.org/tex-archive/language/hyph-utf8/source/generic/hyph-utf8/languages/tr</a><br>which has this article by Pierre MacKay as its original source: <a href="http://www.tug.org/TUGboat/Articles/tb09-1/tb20mackay.pdf">http://www.tug.org/TUGboat/Articles/tb09-1/tb20mackay.pdf</a><br>A curious special case is mentioned by professor MacKay and then copied through all the incarnations of the algorithm -- that is, the pattern "2e2cek." which is supposed to<br>prevent splitting the "-ecek" suffix at the very end of a word. MacKay writes: "...nor do we really want the cek of -ecek broken off if it is at the end of a word" and then "The pattern<br>2e2cek. is added as a special case".<br>I am not a native Turkish speaker although my level is high enough to notice the omission. In Turkish, many suffixes have variants to satisfy vowel and consonant harmony requirements.<br>The other variant of "-ecek" is "-acak" which is used in words with wide (or back) vowels and there is no sense in adding "2e2cek." without also adding "2a2cak.".<br>I took the liberty to Cc: S. Ekin Kocabas and H. Turgut Uyar who might not be on the list to maybe help and clarify the issue. They are both mentioned as people who participated in development of the current version of Turkish patterns. Unfortunately, Pierre MacKay passed away earlier this year so there is no way to know the original reason of this tiny little inconsistency.</blockquote></div></div>