<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>emre şahin's digital garden 🍃 - Ottoman Turkish</title>
    <link>https://emresahin.net/categories/ottoman-turkish/</link>
    <description>Posts in the Ottoman Turkish category</description>
    <language>en</language>
    <managingEditor>contact@emresahin.net (Emre Şahin)</managingEditor>
    <lastBuildDate>Tue, 15 Sep 2026 19:46:32 +0000</lastBuildDate>
    <atom:link href="https://emresahin.net/categories/ottoman-turkish/rss.xml" rel="self" type="application/rss+xml"/>
    <item>
      <title>Translating Ottoman Turkish Spelling to Latin Alphabet using Surface Forms</title>
      <published>2020-05-14T21:44:25+00:00</published>
      <updated>2020-05-14T21:44:25+00:00</updated>
      <author>Emre Şahin</author>
      <pubDate>Thu, 14 May 2020 21:44:25 +0000</pubDate>
      <link>https://emresahin.net/translating-ottoman-turkish-spelling-to-latin-alphabet-24600/</link>
      <guid isPermaLink="true">https://emresahin.net/translating-ottoman-turkish-spelling-to-latin-alphabet-24600/</guid>
      <description>dervaze is a project I started during my Ph.D. work in 2015 to translate Ottoman Turkish to modern Turkish spelling and to provide an OCR/ICR/handwriting recognition engine for the Ottoman language. The reason I had to stop was the lack of data, since without a considerable amount of data, statis...</description>
      <category>Language Processing</category>
      <category>Ottoman Turkish</category>
      <category>Ottoman Turkish</category>
      <category>Natural Language Processing</category>
      <category>Dart</category>
      <category>Morphology</category>
      <category>Transliteration</category>
      <content:encoded><![CDATA[<p>dervaze is a project I started during my Ph.D. work in 2015 to translate Ottoman
Turkish to modern Turkish spelling and to provide an OCR/ICR/handwriting recognition engine for the
Ottoman language.</p>
<p>The reason I had to stop was the lack of data, since without a considerable amount of data,
statistical methods for both Natural Language Processing and Computer Vision fail. Producing and
maintaining data seemed a much greater burden than providing technical solutions, so I mostly
gave up the idea that a working solution is obtainable with classical OCR techniques. The
research is still waiting for me to finish.</p>
<p>I am beginning this series of explorations in Computer Vision, Machine Learning, and related fields to
document my achievements and provide a basis for further research. From time to time, I will provide
results regarding the ideas discussed here. Currently, this is mostly a hobby/side project.</p>
<p>My current endeavor is to write a robust translation engine between Ottoman and Turkish in
Dart.<sup class="footnote-reference" id="fr-dart-1"><a href="#footnote-dart">1</a></sup></p>
<p>Instead of performing a full-fledged morphological analysis like <a href="https://github.com/coltekin/TRmorph">TRMorph</a>, <a href="https://github.com/google-research/turkish-morphology">Google Research
Morphological Analyzer</a>, or <a href="https://github.com/StarlangSoftware/TurkishMorphologicalAnalysis">Starlang Morphological Analyzer</a>, our aim is to
provide a surface-level to surface-level translation between Arabic and Turkish scripts.</p>
<p>It is true that it’s possible to use something like:</p>
<pre><code>
+-----------------+                +----------------+                 +---------------+
|                 |                |                |                 |               |
|                 |                |                |                 |               |
|    kelimeler    |    +-------&gt;   |  kelime+PLU    |  +-----------&gt;  |   کلمهلر      |
|                 |                |                |                 |               |
|                 |                |                |                 |               |
+-----------------+                +----------------+                 +---------------+

</code></pre>
<p>to translate between Turkish Latin and Ottoman, but there are two problems here:</p>
<ol>
<li>
<p>There is no Ottoman morphological analyzer, and although grammatically Turkish, surface-level
forms should be translated. Even morphological analyzers for Turkish in the Latin alphabet are
relatively recent.</p>
</li>
<li>
<p>Translating the output of a Turkish Latin morphological analyzer to Ottoman seems like more work
than writing a translation method itself.</p>
</li>
</ol>
<p>For example, for the query <code>kelimeler</code> <a href="https://github.com/coltekin/TRmorph">TRMorph</a> gives</p>
<pre><code>    kelime&lt;N&gt;&lt;pl&gt;
    kel&lt;Adj&gt;&lt;0&gt;&lt;N&gt;&lt;p1s&gt;&lt;dat&gt;&lt;0&gt;&lt;V&gt;&lt;cpl:pres&gt;&lt;3p&gt;
    kel&lt;Adj&gt;&lt;p1s&gt;&lt;Prn&gt;&lt;dat&gt;&lt;0&gt;&lt;V&gt;&lt;cpl:pres&gt;&lt;3p&gt;
    kelime&lt;N&gt;&lt;0&gt;&lt;V&gt;&lt;cpl:pres&gt;&lt;3p&gt;
    kelime&lt;N&gt;&lt;pl&gt;&lt;0&gt;&lt;V&gt;
    kelime&lt;N&gt;&lt;pl&gt;&lt;0&gt;&lt;V&gt;&lt;cpl:pres&gt;&lt;3p&gt;
    kelime&lt;N&gt;&lt;pl&gt;&lt;0&gt;&lt;V&gt;&lt;cpl:pres&gt;&lt;3s&gt;
</code></pre>
<p>and although most of the items’ surface forms are identical, we need to work through all suffixes
and their different kinds of connections. Also, as the surface form of Ottoman Turkish has less
information, Ottoman morphological analysis would yield many more results than its corresponding
counterpart.</p>
<p>Because of these hindrances and trying to come up with a quick-and-dirty yet workable solution, I
have made the following observations:</p>
<ol>
<li>
<p>Our part-of-speech system does not need to be highly specialized. Actually, we only need to have
three classes: Nouns, verbs, and proper nouns. Proper nouns are grammatically nouns, but their
orthography may require different rules. We will call these three <em>word classes.</em></p>
</li>
<li>
<p>We can get away with a set of surface-level rules to translate suffixes for each word class.
These rules use attributes that can be derived from Turkish Latin orthography.</p>
</li>
</ol>
<p>These rules are:</p>
<ul>
<li><strong>Part of Speech</strong>: The root class we discussed above.</li>
<li><strong>Last Vowel</strong>: The last vowel in a Turkish root that is required to find the actual suffix when
vowel harmony is utilized.</li>
<li><strong>Last Consonant</strong>: The last consonant of the Turkish root. This is needed to find the
palatalization/softening of certain consonants.</li>
<li><strong>Ends with Vowel</strong>: Whether the root ends with a vowel, like <em>ata</em>, or not.</li>
<li><strong>Has Single Vowel</strong>: Whether the root has a single vowel. This is important for aorist inflection
irregularities in verbs.</li>
<li><strong>Last Vowel Hard</strong>: Whether the last vowel is one of <em>a, ı, o, u</em> (back vowels) or not.</li>
<li><strong>Last Consonant Hard</strong>: Whether the last consonant is one of <em>p, ç, t, k</em> and undergoes softening
when it receives a suffix starting with a vowel.</li>
<li><strong>Has Consonant Softening</strong>: The inverse of the <em>last consonant hard</em> rule, occurring when a root ends with <em>b,
c, d, g</em> and receives a suffix.</li>
</ul>
<p>From these rules, which can be derived from the Turkish Latin forms of the words using regular
expressions, we can write rules to translate Turkish to Ottoman and vice versa.</p>
<p>To be continued.</p>
<hr>
<ol class="footnote-definition">
<li id="footnote-dart">
<p>Dart has the <em>little</em> benefit of being able to run both on mobile (in Android and iOS) and
servers with support for the web, so <em>write once, run on Linux, iOS and Android</em> is feasible
without much architecture jumping. I hope Flutter gains more traction and becomes the mainstream
way of writing mobile applications. <a href="#fr-dart-1">↩</a></p>
</li>
</ol>]]></content:encoded>
    </item>
    <item>
      <title>Dervaze: A Transliteration System for Ottoman</title>
      <published>2014-01-07T22:00:00+00:00</published>
      <updated>2014-01-07T22:00:00+00:00</updated>
      <author>Emre Şahin</author>
      <pubDate>Tue, 07 Jan 2014 22:00:00 +0000</pubDate>
      <link>https://emresahin.net/transliteration-pipeline/</link>
      <guid isPermaLink="true">https://emresahin.net/transliteration-pipeline/</guid>
      <description>Dervaze (meaning “the portal”) is a set of tools that aims to transliterate historical Ottoman documents to Modern Turkish. Here, I describe the transliteration system. The system is organized as a pipeline in which the tools at a stage produce the input for the next stage. The input to the syste...</description>
      <category>Development</category>
      <category>Ottoman Turkish</category>
      <category>Language Processing</category>
      <category>Dervaze</category>
      <category>Transliteration</category>
      <category>Binarization</category>
      <category>OCR</category>
      <category>Image Processing</category>
      <content:encoded><![CDATA[<p><em>Dervaze</em> (meaning “the portal”) is a set of tools that aims to
transliterate historical Ottoman documents to Modern Turkish.</p>
<p>Here, I describe the transliteration system.
The system is organized as a pipeline in which the tools at a stage produce the input
for the next stage.
The input to the system is a set of historical document images.
The output is either a search result or a textual representation of these documents.</p>
<p>The sections below describe these stages briefly.</p>
<h2 id="binarize-color-images-to-binary-images">Binarize Color Images to Binary Images</h2>
<p>Binarization is the process of converting color or grayscale images to black-and-white binary images.
Document images come in various flavors, mostly as color images.
Color information is mostly noise for further stages.
It is better to remove the color while keeping the textual representation intact.</p>
<p>Although seemingly easy at first, this stage includes challenges like determining the ink color or removing ink stains from images.</p>
<p>In the literature, the standard idea is to use a mathematical model, like <em>Otsu’s method</em>, to convert color to binary.
We approach this problem differently, as a classification problem.
The idea is briefly as follows:</p>
<p>Color images consist of 3 channels.
The <em>ink color</em> of a region should be persistently <em>present</em> or <em>absent</em> in these channels.
For example, a dark blue ink should be represented within similar numeric ranges in each of these channels, and a red ink should be represented more in the red channel than others.
A standard binarization approach tries to come up with a cumulative ink color value using all three channels.
We do it differently.</p>
<p>Instead of trying to find a cumulative threshold for binarization, we detect edges in each channel, considering each channel as a separate binary image.
When components in each channel are found, they are evaluated by various features (like size, presence in other channels) and classified as <em>text</em> or <em>non-text</em>.</p>
<p>After classification, the <em>text</em> elements are drawn to a canvas in black, and the document hence becomes binarized.</p>
<h2 id="extract-components-convert-binary-images-to-components">Extract Components: Convert Binary Images to Components</h2>
<p>Although the components are extracted during the <em>binarization stage</em>, we extract them in an independent stage to have a definite input and output.
The primary reason for this is to evaluate the performance of different binarization options.
This stage works even if the binarization part uses another (standard) approach.</p>
<p>Binarized document images are converted to sets of components by finding their edges.
Each component is recorded with its location and binary image.</p>
<h2 id="extract-features-find-features-of-components-for-comparison">Extract Features: Find Features of Components for Comparison</h2>
<p>Each component can have several different features, such as height, width, number of holes, number of ascenders and descenders, etc.
Some of these features work better than others in classification.
However, we don’t know beforehand which ones work better than others.</p>
<p>In order to find a set of good features, we extract all the features we can think of and run a Principal Component Analysis (PCA) on them.
Previously, since we lacked classifications for these components, it was impossible to find good features, and we had to check the outputs manually.
However, now that we have labeled around 11,000 components from 50 handwritten pages, we can
determine which features are better than others.</p>
<p><code>extract-features</code> extracts a large set of features from the component set.
These features are stored in CSV files and analyzed for their classification value.</p>]]></content:encoded>
    </item>
  </channel>
</rss>
