<?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/tags/ottoman-turkish/</link>
    <description>Posts in the Ottoman Turkish tag</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/tags/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>Development Journal, June 9</title>
      <published>2018-06-09T23:42:56+00:00</published>
      <updated>2018-06-09T23:42:56+00:00</updated>
      <author>Emre Şahin</author>
      <pubDate>Sat, 09 Jun 2018 23:42:56 +0000</pubDate>
      <link>https://emresahin.net/dev-journal-14209-35016/</link>
      <guid isPermaLink="true">https://emresahin.net/dev-journal-14209-35016/</guid>
      <description>I began implementing an Ottoman translator using Finite State Transducers via OpenFST . Instead of using ad-hoc algorithms to translate between Ottoman and Turkish, I’ll be creating FSTs. In the past, I have used FOMA and TRmorph as a building block and basis for Ottoman conversion. However, I sa...</description>
      <category>Development</category>
      <category>Linguistics</category>
      <category>Ottoman Turkish</category>
      <category>FST</category>
      <category>OpenFST</category>
      <category>Common Lisp</category>
      <category>mocl</category>
      <category>dervaze</category>
      <content:encoded><![CDATA[<p>I began implementing an Ottoman translator using Finite State Transducers via
<a href="http://www.openfst.org/twiki/bin/view/FST/WebHome">OpenFST</a>. Instead of using ad-hoc algorithms to translate between
Ottoman and Turkish, I’ll be creating FSTs.</p>
<p>In the past, I have used <a href="https://fomafst.github.io/">FOMA</a> and <a href="http://coltekin.net/cagri/trmorph/">TRmorph</a> as a building block
and basis for Ottoman conversion. However, I saw that writing something on top of
a morphological analyzer to convert Ottoman to Turkish requires almost another
morphological analyzer. (This is also true for Turkish to Ottoman conversion as
well, because spelling rules of Ottoman require another layer of FSTs.)</p>
<p>After that initial failure, I decided to write an ad-hoc algorithm that uses
surface-level representations of Turkish and Ottoman. The result has been running in
<a href="http://dervaze.com">dervaze</a> for two years now.</p>
<p>But as it can be observed, it’s slow. I was working to replace it with a C
library that will also be used in mobile applications. I have completed the
dictionary part that’s used to search for words. In this version of the library,
I was using trie structures.</p>
<p>I have decided, however, that using FSTs to translate may be more robust and
formal in the long run. When you use tries, it’s almost like using half of FSTs
without much thought on states. As I’m developing this solo and my main concern
is expandability, converting ad-hoc rules to states seemed easier than writing a
C library.</p>
<p>I will be writing about this experience in the coming days.</p>
<hr>
<p>I’ve learned that there is a specialized Common Lisp implementation for mobile
devices, <a href="https://wukix.com/mocl">mocl</a>.</p>
<p>It should also be possible to write C-compatible shared libraries in CL and use
them in iOS and Android. Although I began to prefer writing libraries in plain C
(instead of any other language), I may switch to CL if there is enough
motivation.</p>]]></content:encoded>
    </item>
    <item>
      <title>Progress on Ottoman Translation - Week 6, 2018</title>
      <published>2018-02-05T07:23:43+00:00</published>
      <updated>2018-02-05T07:23:43+00:00</updated>
      <author>Emre Şahin</author>
      <pubDate>Mon, 05 Feb 2018 07:23:43 +0000</pubDate>
      <link>https://emresahin.net/dervaze-progress-2018-6-14084-62774/</link>
      <guid isPermaLink="true">https://emresahin.net/dervaze-progress-2018-6-14084-62774/</guid>
      <description>Some of the upcoming posts will serve as a TODO list for the coming months, outlining my plans for Dervaze and its mobile versions. As a solo developer, I’ll share my experiences with this problem here to help those interested. The technology for Ottoman OCR was mostly ready before my family obli...</description>
      <category>NLP</category>
      <category>History</category>
      <category>Ottoman Turkish</category>
      <category>OCR</category>
      <category>C</category>
      <category>Dervaze</category>
      <category>Linguistics</category>
      <content:encoded><![CDATA[<p>Some of the upcoming posts will serve as a TODO list for the coming months, outlining my plans for <a href="http://dervaze.com">Dervaze</a> and its mobile versions. As a solo developer, I’ll share my experiences with this problem here to help those interested.</p>
<p>The technology for Ottoman OCR was mostly ready before my family obligations interrupted the project. I need to re-evaluate what is currently available, but a more pressing problem for me is the <em>speed</em> of translation; currently, it is so slow that it’s barely usable.</p>
<p>I have written the dictionary as a C library without any database dependencies and integrated it into the Android version. I’m currently updating the search functionality in the mobile app to use this library instead of a web service. It will be orders of magnitude faster than the current version because it’s offline and uses a <a href="https://en.wikipedia.org/wiki/Trie">trie</a> to store the words—making it both small and fast.</p>
<p>In my experience, having a single data structure with dedicated functions for transforming and indexing is much simpler than managing multiple data structures. In my case, the core structure is:</p>
<pre><code class="language-c">typedef struct _dervaze_lexical_item {
  int index;
  bstr latin_search_key;
  bstr latin;
  bstr visenc_search_key;
  bstr visenc_dotless_search_key;
  bstr visenc;
  bstr annotation;
  bstr meaning;
  bstr abjad;
  lexical_role role;
  int last_vowel;
  int props;
} dervaze_lexical_item;
</code></pre>
<p><code>visenc</code> is our abbreviation for <em>visual encoding</em>, which is used to represent Arabic/Ottoman/Farsi words using basic ASCII letters. It is documented on its <a href="https://emresahin.net/visual-encoding-for-ottoman/">own page</a>.</p>
<p><code>index</code> is a unique identifier assigned to each word. Search keys for Latin, Visenc, and <em>Dotless Visenc</em> (e.g., searching for ﺥ using letters like ح, چ, or ج) are used to locate these lexical items via the tries mentioned earlier.</p>
<p>I’m intentionally avoiding UTF-8 or other Unicode encodings because terminal output is often not well-suited for displaying Arabic text correctly.</p>
<p>When I began writing this software, one of my goals was to enable searching for words by their traditional numeric values (Abjad). These are often used in classical Ottoman poetry to encode a date within a verse. For example, the letter Alif corresponds to 1, Ba (ب) to 2, and so on. To search for words by these numerals—for instance, typing 246 to find words with that total value—we store the value here as well.</p>
<p>The <code>lexical_role</code> is used during translation; currently, we use two roles to distinguish between noun and verb suffixes in Turkish.</p>
<p><code>last_vowel</code>, as the name implies, represents the last vowel of the word. Since vowel harmony in Turkish is not always reflected in Ottoman spelling, we check the last vowel when converting an Ottoman word to its Latin Turkish equivalent to ensure the correct suffix is added (e.g., <em>gemiler</em> instead of <em>gemilar</em>).</p>
<p><code>props</code> is a bit field used to represent various properties of the lexical item, such as:</p>
<pre><code class="language-c">#define HAS_FINAL_VOWEL 0x01
#define HAS_SINGLE_VOWEL 0x02
#define IS_LAST_VOWEL_HARD 0x04
#define IS_FINAL_CONSONANT_HARD 0x08
#define HAS_CONSONANT_SOFTENING 0x10
</code></pre>
<p>These properties are particularly important when converting Ottoman text to modern Turkish.</p>
<p>The current version of the translation engine is written in Python, but I plan to rewrite it in C this week. As this is the third rewrite, I don’t expect it to pose a major algorithmic challenge, although debugging the C version may be more demanding.</p>]]></content:encoded>
    </item>
    <item>
      <title>Visual Transliteration for Ottoman</title>
      <published>2013-08-01T21:00:00+00:00</published>
      <updated>2013-08-01T21:00:00+00:00</updated>
      <author>Emre Şahin</author>
      <pubDate>Thu, 01 Aug 2013 21:00:00 +0000</pubDate>
      <link>https://emresahin.net/visual-encoding-for-ottoman/</link>
      <guid isPermaLink="true">https://emresahin.net/visual-encoding-for-ottoman/</guid>
      <description>There are already various transliteration systems for Arabic-based scripts to represent them in the Roman alphabet. However, all of them aim to represent phonemes in transliteration, without paying attention to distinct visual elements. When we are manually transcribing these texts, the method is...</description>
      <category>Ottoman</category>
      <category>Digital Humanities</category>
      <category>Ottoman Turkish</category>
      <category>Transliteration</category>
      <category>Visual Encoding</category>
      <category>Computer Vision</category>
      <category>Arabic Script</category>
      <content:encoded><![CDATA[<p>There are already various transliteration systems for Arabic-based
scripts to represent them in the Roman alphabet. However, all of them aim to represent
<em>phonemes</em> in transliteration, without paying attention to distinct
visual elements. When we are manually transcribing these texts, the
method is fine. However, when we try to represent visual elements in
scanned handwritten documents, we face some problems regarding these
transliteration systems.</p>
<p>Since conventional systems aim to represent phonemes, a correct
<em>reading</em> is necessary and this requires expertise in the language being represented.
For Ottoman, this is a deeper problem since the writing system
is not actively used.</p>
<p>Labels should correspond to classes in the classification of visual
elements. For example, in some cases we label ى, ي and ـيـ identically
as <em>y</em> but their visual features are distinct from each other. In other
cases, an identical letter is coded as <em>y</em>, <em>e</em> or <em>i</em> albeit
represented identically in visual terms, because of their difference in
reading. This makes visual classes mixed and fuzzy, and any measurement of
performance gives little clue about the effectiveness of features or
classifiers.</p>
<p>Here we document a new transliteration system for visual items in
Ottoman Turkish. In this work, our aim is to provide a simple visual
approach to transliteration and then devise necessary conversion tables
into phonetic transliteration or transcription systems.</p>
<p>Except for numerals, words in Arabic-based writing systems are composed of
items in two categories. The first category is a large letter group
composed of a continuous movement of the pen, like کلمه. The other category
is the smaller elements like dots and diacritics found around these
larger items.</p>
<p>A visual transliteration should represent distinct visual elements
differently. In order to keep simplicity in labeling and application,
<em>dotless</em> letters will be used as <em>base letters</em> and the other letters
will be written in terms of these dotless items.</p>
<p>A full letter code is composed of one <em>base letter</em> code and an
optional set of diacritic codes. The base letter code is a small Roman
letter. The diacritic codes have two parts: the first part is one of
<code>o</code>, <code>u</code> or <code>i</code>, which mean <em>over</em>, <em>under</em> or <em>ligature</em> respectively.
The second part of the diacritic code shows the type of diacritics and is a
string of digits or letters. A full letter code conforms to the following
regular expression:
<code>[a-h,j-n,p-t,v-z](([ou][0-9]+)|(i[a-h,j-n,p-t,v-z]))*</code></p>
<p>The letters <code>o</code>, <code>u</code> and <code>i</code> are not used as base letter codes, so there
is no ambiguity in parsing the elements.</p>
<p>The tables for all visual elements can be found in Tables
tab:baseletters, tab:diacritics and tab:numerals.</p>
<hr>
<p>Letter Shape Transliteration Used in Letters</p>
<hr>
<p>ا e ا</p>
<p>ٮ b ب, ت, ث, ن, پ, یـ</p>
<p>ح x ح, خ, ج, چ</p>
<p>د d د, ذ</p>
<p>ر r ر, ز</p>
<p>س s س, ش</p>
<p>ص z ص, ض</p>
<p>ط t ط, ظ</p>
<p>ع a ع, غ</p>
<p>ٯ f ف, ق</p>
<p>ک k ک, گ</p>
<p>ل l ل, ك</p>
<p>م m م</p>
<p>و w و</p>
<p>ه h ه, ة</p>
<p>ی y ی</p>
<p>ﺀ c ﺀ</p>
<hr>
<p>Table: The Transliterations of Base Letters</p>
<hr>
<p>Transliteration Description</p>
<hr>
<p>1 Dot of ب, ن or خ</p>
<p>2 Dots of ق, ت or یـ</p>
<p>3 Dots of ث, ش or چ</p>
<p>5 ء <em>hamza</em> and also in ك</p>
<p>8 ـّ <em>shadda</em></p>
<p>0 ـْ <em>sukun</em></p>
<p>6 ـٓ <em>madda</em></p>
<p>7 / sign above گ</p>
<p>4 ـَ <em>fatha</em> and ـِ <em>kasra</em></p>
<p>9 ـُ <em>damma</em></p>
<p>44 ـً <em>fathatan</em> and ـٍ <em>kasratan</em></p>
<p>99 ـٌ <em>dammatan</em></p>
<hr>
<p>Table: Transliterations for Diacritics</p>
<hr>
<p>Description Transliteration</p>
<p>۱ n1</p>
<p>۲ n2</p>
<p>۳ n3</p>
<p>۴ n4</p>
<p>۵ n5</p>
<p>۶ n6</p>
<p>۷ n7</p>
<p>۸ n8</p>
<p>۹ n9</p>
<p>۰ n0</p>
<hr>
<p>Table: Transliterations for Numerals</p>
<p>The advantages of using this transliteration instead of a phonetic
transliteration can be summarized as follows:</p>
<p>Representing visual elements in a phonetic way is not an optimal
representation for Computer Vision research. The information from the
phonetic representation slips into visual information which results in
classes that bear no direct connection with visual features. In turn,
these classes become harder to classify and understand.</p>
<p>The transliteration system described in this paper does not need
expertise in the language. Anyone who recognizes the letters should be
able to transliterate word images.</p>
<p>It is possible to denote single elements which do not represent a
sound in the language with visual transliteration. No transliteration
system for Arabic and similar languages represents diacritics as in Table
tab:diacritics. This is important for Computer Vision, since these items
are as legitimate visual elements on a paper as others. Without
independent representation, these items would have to be represented <em>along</em>
with others, and their classification could not be done independently.</p>
<p>The system is much more flexible than a phonetic transliteration system.
It allows for the development of new letter signs by combining existing diacritics
with base letters. For example, ﭪ is a letter not found in historical
documents, but can be seen in modern Arabic to represent the <em>v</em> sound.
Although not thought of beforehand, this can be represented as <strong>fo3</strong> in
the system we describe. There are also writing variations, for example,
in Maghribi (Western) Arabic, the letter ف is written as ڢ but is
phonetically identical. In a phonetic transliteration this difference is
lost, but the visual transliteration is able to represent the usual case
with <strong>fo1</strong> and the specific case with <strong>fu1</strong>.</p>
<p>It is common in handwriting to attribute diacritics of one letter to
another. For example, three dots in the middle of سر may be read as شر or
سژ. In a phonetic transliteration system, the first might be represented
as <strong>şr</strong> and the second as <strong>sj</strong>. This leads to complexity in describing such
middle cases. In a visual transliteration system, these two
are represented as <strong>so3r</strong> and <strong>sro3</strong>, in which we are able to write
rules that exchange <strong>o3</strong> between neighboring letters and decide for the
best reading in later stages.</p>
<p>In handwriting and print, diacritics are especially written loosely. For
example, three dots above ث are written as three separate dots in print,
but usually contracted as a single shape in handwriting. For the print
case, we can have <strong>so1o1o1</strong> denoting three dots separately while for
the handwriting case <strong>so3</strong> is used and in an upper level, the former
is converted to the latter by a rule specifying <em>three separate dots
mean a single three dot</em>.</p>
<p>Table tab:ottoman-letters shows all letters of the Ottoman alphabet.</p>
<hr>
<p>**Ottoman **Transliteration** <strong>Ottoman <strong>Transliteration</strong>
Letter</strong> Letter** \\</p>
<hr>
<p>ا e اَ eo4</p>
<p>اِ eu4 اُ eo9</p>
<p>أ eo5 إ eu5</p>
<p>آ eo6 ب bu1</p>
<p>پ bu3 ت bo2</p>
<p>ث bo3 ج xu1</p>
<p>چ xu3 ح x</p>
<p>خ xo1 د d</p>
<p>ذ do1 ر r</p>
<p>ز ro1 ژ ro3</p>
<p>س s ش so3</p>
<p>ص z ض zo1</p>
<p>ط t ظ to1</p>
<p>ع a غ ao1</p>
<p>ف fo1 ق fo2</p>
<p>ك lo5 گ ko7</p>
<p>ل l م m</p>
<p>ن bo1 ڭ lo5o3</p>
<p>ه h و w</p>
<p>ی y ـیـ bu2</p>
<p>لا lie ک k</p>
<hr>
<p>Table: Ottoman Letters and Transliterations</p>]]></content:encoded>
    </item>
  </channel>
</rss>
