Digital resources in the Social Sciences and Humanities OpenEdition Our platforms OpenEdition Books OpenEdition Journals Hypotheses Calenda Libraries OpenEdition Freemium Follow us

Large Scale Wedge Extraction

Ein Beitrag von Martin Seiler, Hubert Mara, und Bartosz Bogacz

Computational tools for cuneiform analysis using 3D-datasets present numerous challenges including the detection of wedges as basic element of characters. In contrast to modeling and detecting characters as amorphous regions we propose the modeling of wedges as discrete units having relative spatial positions within symbols. Additional to the overall process being part of an Optical Character Recognition in 3D it allows to gather numerical evidence to be utilized in paleography.
An automated computational extraction of wedge-shaped impressions has proven challenging on basis of its unique properties: (i) It is a three-dimensional script that uses no surface markings, (ii) it lacks any whitespace and tokenization is dependent on content thus precluding any segmentation without a language model, and (iii) its free-form arrangement in both spatial directions, with writing evolving more than three thousand years and serving many languages, leaves few invariant patterns that could be exploited for recognition. Breakthroughs in recognition were only achieved after high-resolution 3D scanning of cuneiform tablets, extensive pre-processing methods of the resulting 3D meshes, and robust approaches to pattern matching became all widely used.
We present the extraction of wedge-shaped impressions from 3D scanned cuneiform tablets of the large open-access dataset HeiCuBeDa¹ based on the work of Fisseler². The tablets in this dataset contain extensive meta-data from the Cuneiform Digital Library Initiative (CDLI) including period of origin, literary genre, and language. Additionally, the published tablets are manually oriented to face forward with script levelled horizontally (where possible) and enriched with the noise resistant surface curvature features computed using Multi-Scale Integral Invariants (MSII) of the GigaMesh Software Framework³.
MSII robustly computes where and to what degree a local region of a surface curves. Flat regions have zero curvature, while concave and convex regions are distinguished by the sign of the computed value. We make use of the curvature to locate points of locally maximal concavity. These are deep and narrow recesses created by wedge-shaped impressions.
To further reduce noise, we perform a non-maximum suppression. Each detected local maximum is only kept for further processing if it is truly maximal in a larger, a-priori defined, radius. Then, the remaining local maxima of concavity on the tablet surface identify the deepest points of individual wedge-shaped impressions.
We determine the extents of the individual impressions by expanding a segmentation region beginning with the deepest points and growing it toward surface locations with flat surface curvature, the tablet writing surface. For very densely written script, two regions expanding side by side may collide. In that case, their border persists and the individual regions grow only where there are no other expanding regions, ensuring that constellations of overlapping wedges are not segmented as a single wedge.
Figure 1: Excerpt from cuneiform tablet HS 626 (https://doi.org/10.11588/heidicon/1110942).
(a) Tablet and wedge-shaped impressions colored by the physical color acquired during scanning.
(b) The same tablet and wedge-shaped impressions  colored by detected tetrahedron face, shown as red, green and light-red. Black lines between colored regions denote shores of vertices used to estimate tetrahedron edges.
The idealized geometrical shape of a wedge-shaped impression is a tetrahedron as shown by Cammarosano.⁴ We identify the edges and faces of a tetrahedron in an impression by estimating the parameters of the abstract model based on the MSII features of the scanned tablet. We determine the faces of the tetrahedron by grouping the surface normal (direction the surface is facing) in the previously segmented region of an individual wedge into three distinct groups with k-Means clustering.
Shores of the three distinct and adjoining groups are all points that straddle any two groups. The set of points on the shores forms three line-segments starting from the deepest point (where all three regions meet) in a star-like formation. By estimating the parameters of this abstract geometrical shape with Random Sample Consensus (RANSAC) we are able to fully describe a tetrahedron representing the wedge-shaped impression.
We evaluate our approach on test set of 10 tablets where we manually located and counted wedges providing us with a ground-truth on the contents of the tablets. By comparing our ground-truth to the automatically extracted wedges we report a recall of 96% and a precision of 58%. Given the recency of our implementation, we currently finished the extraction from 800 of the 1977 tablets of the HeiCuBeDa dataset. The data and code used for this computation are both open-access⁵ and open-source⁶.
The distinct extraction of wedges and modeling as tetrahedrons enables us to perform a statistical analysis of wedge metrics and correlate wedge volume and wedge impression deepness to tablet literary genre, period of origin and language. However, due to a large number of outliers in the identified wedges we find no significant correlations. Still, we provide distributions and charts showing the variation of wedge sizes in relation to time periods and/or genres. Together, with a planned a-priori model of feasible wedges shapes and feasible wedge n-grams we will be able to remove false positives and detect only proper wedges. Statistical analyses, as shown by this work, combined with larger amounts of tablets becoming available as high-resolution 3D datasets, will enable new investigations and insights in topics like layout detection or paleography.
Figure 2: BoxWhiskerPlot of Language versus Wedge Depth
Wedge depth is measured as the distance from the deepest vertex of a tetrahedron to its face that is level with the writing surface. Orange lines inside the boxes denote the median of the data. Box themselves contain 50% of the data values while their outer whiskers contain 98%. Black circles are data points beyond the 99th percentile.

 

¹ https://doi.org/10.11588/data/IE8CCN
²
Fisseler, “Contributions to computer-aided analysis of cuneiform tablet fragments”, Thesis 2019, Dortmund University
³ https://gigamesh.eu/
https://cuneiform.neocities.org/CWT/CWT.html
https://gitlab.com/fcgl/releases/-/tree/master/meyer_msc_2020
https://gitlab.com/fcgl/GigaMesh

 

Kurzvitae

Martin Seiler schließt im Frühjahr 2021 sein Masterstudium in Angewandter Informatik an der Ruprecht-Karls Universität Heidelberg ab.
Während seines Studiums haben ihn die Themen Computergraphik, Bildverarbeitung und Software Engineering besonders interessiert.
Er ging in den Niederlanden zur Schule und privat interessieren ihn Fremdsprachen.
Die Themen aus seinem Studium und der Bezug zu Fremdsprachen lassen sich auch in seiner Masterarbeit wiederfinden, was er als glückliche Fügung empfindet.

Bartosz Bogacz promovierte in der Informatik an der Universität Heidelberg mit dem Thema der automatischen Keilschrifterkennung und Analyse.
In nachfolgenden Projekten veröffentlichte Bartosz Bogacz in Bereichen der Computational Archaeology mit Methoden des maschinellen Lernens.
Er entwickelte neuartige Methoden, die die unstrukturierten 3D Daten gescannter Keilschrifttafeln mit neuralen Netzwerken verarbeiten.
Für 3D Scans von ägäischen Siegeln entwarf Bartosz Bogacz Registrationsalgorithmen, um die zugrundeliegende Materialdeformationen sichtbar und quantitativ untersuchbar zu machen.

Zeichenerkennung mithilfe der künstlichen Intelligenz – Computer-unterstützte Keilschriftanalyse

Ein Beitrag von Turna Somel¹, Eugen Rusakov², Christopher Rest³, Denis Fisseler³, Gerfrid G.W. Müller¹, Gernot A. Fink² und Frank Weichert³

1. Einleitung

Der vorliegende Abstract widmet sich der Vorstellung des DFG-Projekts “Computer-unterstützte Keilschriftanalyse (CuKa)”. Das Ziel des Projektes ist, ein langlebiges und erweiterbares Online-Tool zu entwickeln, das öffentlich zugänglich ist. Die Kernfunktion dieses Tools basiert auf ein für Zeichenerkennung trainiertes neuronales Netzwerk, das Fotos und 3D-Modelle von Tontafeln aus kooperierenden online Repositorien Zeichen für Zeichen automatisch annotiert, und das die annotierten Daten aus einer oder mehreren Tafeln in einem sortierbaren Format zurückgeben soll. Damit wird beabsichtigt, größere Datenmengen in einem kürzeren Zeitraum zu bearbeiten. Diese Sammlung an Daten soll nicht als ein endgültiges Resultat, sondern als eine grobe und noch zu verfeinernde Basis für paläographische Arbeiten verwendet werden. Das KI-Modell wurde mit hethitischen Tafeln trainiert.

Durch den Fokus des Projektes auf Zeichenklassifikation im Gegensatz zur automatischen Erkennung der Lautwerte lässt es sich von Forschungsprojekten, die ein OCR-Verfahren für Keilschrifttexte entwickeln, abgrenzen. Ebenfalls grenzt es sich von Forschungsprojekten ab, die ein Tool für Zeichenerkennung bei Autographien entwickeln, da das Quellenmaterial bei CuKa aus Fotos und 3D-Modellen besteht.

2. Methoden und Ergebnisse

Die auf ein Convolutional Neural Network (CNN) basierende Modelle wurden anhand komplett annotierter Tafeln trainiert. Als Quellenmaterial wurden Tontafeln aus Hattusa, aus der zweiten Hälfte des zweiten Jahrtausends v. u. Z. genommen; es wurde besonders darauf geachtet, ein breites Spektrum an Textgattungen zu nehmen, um eine möglichst weite Bandbreite an Zeichenarten und Handschriften einarbeiten zu können. Die Annotationen wurden auf einer Zeichen-Basis durchgeführt.

Da da ein maschinelles Lernen von Keilschriftzeichen von Fotos und 3D-Modellen noch terra incognita ist, sind Experimente für besser funktionierenden Verfahren nötig. Ein bereits von Rusakov et al. (2020) veröffentlichter Versuch, die Präzision der Zeichenerkennung zu erhöhen, stützt sich auf die Erstellung einer Repräsentation der Bestandteile eines Zeichens (d. h. einzelne Keile), die im Folgenden als Attribute bezeichnet werden, durch die Gottstein-Attribute (Gottstein 2013). Diese Testreihe übernimmt eine Liste der Gottstein-Attribute von hethitischen Zeichen, die auf Initiative von M. Cammarosano im Rahmen des Projektes “3D-Joins und Schriftmetrologie” erstellt wurde.

 

(Gottstein 2013: 129, Abb. 1)

Im Rahmen dieses Versuchs wurden die Gottstein-Attribute in Kombination mit den letzten Keilen der Zeichen als die Zeichenklasse beschreibende Attribute verwendet. Dieses Modell, in dem 291 Zeichenklassen trainiert wurden, erreicht ein “mean average precision” (MAP) von 91% in einem Query-by-Example Szenario (d. h. Suchanfragen, die durch Bildeingabe durchgeführt werden), wenn die Gewichtung der Ergebnisse der natürlich vorkommenden Häufigkeit der Zeichenklassen in hethitischen Texten entspricht. Wenn die Gewichtung der Ergebnisse gleichwertig unter allen im Training vorhandenen Zeichenklassen durchgeführt wird, wird ein MAP von 72% in einem Query-by-Example Szenario erreicht. In einem Query-by-Expression Szenario (d. h. Suchanfragen, die durch eine Angabe der Zeichennamen in Transliteration durchgeführt werden) mit einer gleichwertigen Gewichtung aller Zeichenklassen wird ein MAP von 81% erreicht (Rusakov et al. 2020). Diese Ergebnisse zeigen, dass die seltener vorkommenden Zeichen mit einer deutlich geringeren Präzision erkannt werden.

Als weiteres Ergebnis wird eine vorläufige Version des Online-Tools, das noch nicht öffentlich zugänglich ist, während des Workshops vorgestellt.

(Beispiel eine durch ein KI-Modell generierte Annotation)

3. Abschluss

Zusammenfassend lässt sich sagen, dass auf maschinelles Lernen bzw. neuronale Netzwerke basierende Suchmaschinen großes Potenzial haben, den Arbeitsaufwand bei paläographischen Untersuchungen zu verringern. Die immer noch bestehenden Herausforderungen, wie die Unterscheidung zwischen ähnlich aussehenden Zeichen, oder die richtige Erkennung von Zeichen mit kleineren Zeichen als Bestandteile, sollten durch eine größere Menge von annotierten Material und die Weiterentwicklung der KI-Modelle verringert werden.

 

4. Literatur

Gottstein, N. (2013): “Ein stringentes Identifikations- und Suchsystem für Keilschriftzeichen.” MDOG 145: 127-135.

Rusakov, E. et al. (2020): “Towards Query-by-eXpression Retrieval of Cuneiform Signs.” In: Proc. of the ICFHR, Dortmund, NRW, Germany.

 

¹ Akademie der Wissenschaften und der Literatur, Mainz

² Lehrstuhl Informatik 12, Arbeitsgruppe “Mustererkennung in Eingebetteten Systemen”, TU Dortmund

³ Lehrstuhl Informatik 7, Arbeitsgruppe “Graphische Systeme”, TU Dortmund

 

Kurzvita

Turna Somel studierte an der Bilkent Universität, sowie an der Philipps-Universität Marburg, wo sie ihren Master in Sprach- und Kulturwissenschaften des Vorderen Orients machte und 2019 ihr Promotionsstudium begann. Zurzeit arbeitet sie als wissenschaftliche Mitarbeiterin im Forschungsprojekt Computer-unterstützte Keilschriftanalyse an der Akademie der Wissenschaften und der Literatur in Mainz. Ihre Forschungsinteressen beinhalten die Religions- und Wissenschaftsgeschichte des nahen Ostens im 2. und 1. Jahrtausend v. u. Z., sowie die Keilschriftpaläographie.

 

Modeling cuneiform paleography with PaleoCodage

Cuneiform languages and its texts took an interest not only by Near Eastern Studies scholars but also in the computational linguistics major. Cuneiform texts have been edited digitally, cuneiform text corpora have been linguistically classified, information retrieval approaches have been performed, and texts have been annotated in various ways. However, the shape and form of cuneiform signs and other extralinguistic attributes itself usually do not fall into categories of such annotations, despite them playing a possible role in leading to a better understanding of the texts. One major reason for this is the lack of a machine-readable description of cuneiform characters. Other languages like Chinese or Japanese include an encoding of their characters, e.g. in the form of a writing order of strokes and their positioning towards another so that such attributes can be extracted easily (Bishop 2003). These encodings may be used to create, e.g. SVG images for font descriptions and due to the prevailing existence of the given languages can be better formalized per epoch.

A first approach to formalize cuneiform character descriptions by means of cuneiform wedges was developed by Norbert Gottstein. He developed a system which could describe which and how many cuneiform wedges of certain types were included in a cuneiform character. The goal of his work was to create a search system for cuneiform characters which would in many cases give a unique result. He defined four types of cuneiform wedges: Horizontal, vertical, and two diagonal wedge types.

Gottstein System by (Gottstein, 2013). One cuneiform character is described by the number of its corresponding wedge types.

The Near Eastern Studies community took an interest in the Gottstein System, but the system did not find wide adoption in this community. Interestingly, the system has found more of adoption in the computational linguistics community in which some digital tools had been developed using the Gottstein System as a basis.

The tool CuneiPainter is a straightforward Android App which allows the drawing of cuneiform character shapes using a finger on your mobile phone, detects its Gottstein code and presents the user with a list of alternatives of cuneiform characters. The set of cuneiform characters which can be recognized by CuneiPainter was modelled after one particular fonts’ set of characters. Therefore CuneiPainter may only recognize one cuneiform character variant per Unicode code point. For this set of cuneiform characters CuneiPainter acts as a showcase, that to search cuneiform characters, the Gottstein system works without yielding too many ambiguities. 

CuneiPainter also acts as a proof of concept for creating input method engines for cuneiform characters (Homburg, 2015). Input method engines take representations of cuneiform characters either in the Latin alphabet by entering a transliteration or by a Gottstein code possibly recognized from a painted image. The input method engine converts such a representation to its Unicode representation which may be shown using a particular font. An input method engine may also be used to convert an English translation to a Unicode representation.

What the Gottstein system lacks, however, is the inclusion of relations between cuneiform wedges. With a Gottstein code, we may know that a cuneiform character includes 4 horizontal and 4 vertical wedges, but we do not know the relations of these wedges towards another. Are the 4 horizontal wedges above the 4 vertical wedges? Do they cross? If so, how do they cross? In addition, the scientific literature suggests that there are more types of wedges than stated in the Gottstein system, as can be seen in the following pictures. To accurately depict and encode cuneiform signs all wedge variants need to be taken into account.

The positioning of cuneiform characters taken from the literature (Ebeling et. al., 1980). Cuneiform wedges can be found with shown wedge angles which are more granular than Gottsteins suggested rotations of 0°,45° and 90°

To capture and formalize relations between cuneiform wedges, encoding with the following capabilities was developed in a practical study course at Mainz University Of Applied Sciences: The PaleoCodage encoding. Its goals are as follows:

  • Capturing the rotations of all wedges including available angles
  • Capturing relations between wedges
  • Capturing wedge sizes separated into wedge head and the wedge itself
  • A unique identifier for a wedge including its angle
Description of rotations of cuneiform wedges taken from the literature mapped on to PaleoCodage descriptions. Wedges with different angles get different but unique identifiers. Different operators change the angle of

The benefits of such an encoding can be seen in several areas:

  1. The encoding may be used in Machine Learning applications as a classification target to recognize wedge types.
  2. The encoding is a machine-readable way of capturing the shape of cuneiform characters, so that cuneiform characters may be differentiated and possibly classified by computers.
  3. The encoding may be used to capture cuneiform sign variants in a machine-readable way which are often seen on pictures of cuneiform tablets but are rarely systematically collected. Collecting cuneiform character signs systematically allows for more research in the given area.

To show differences in the description of PaleoCodage vs. Gottstein code descriptions the following table gives an idea about its capabilities:

Cuneiform signSign nameGottstein CodePaleoCode
MASZa1b1b-a
BARa1b1;b-a
LALa1b1a-b
MEa1b1a-::b
PaleoCodage vs. Gottstein code examples for the same Gottstein sign code These cuneiform signs include the same cuneiform wedges but in different positions. The PaleoCode allows a distinction between the different forms..

Further information about PaleoCodage and the PaleoCodage JavaScript Testing tool can be found on Github and in an extended abstract which has been submitted to the Digital Humanities Conference 2019 (Homburg, 2019). We may discuss further details and applications of PaleoCodage in further articles here at the IDCS blog.

  1. Bishop, T. and Cook, R. (2003) ‘A Specification for CDL Character Description Language’, in Glyph and Typesetting Workshop.
  2. Ebeling, E. et al. (1980) ‘Reallexikon der Assyriologie und Vorderasiatischen Archäologie. Zweiter Band’.
  3. Gottstein, N. (2013) ‘Ein stringentes Identifikations- und Suchsystem für Keilschriftzeichen’, in Mitteilungen der deutschen Orientgesellschaft. Berlin.
  4. Homburg, T. et al. (2015) Learning Cuneiform The Modern Way. Graz, Austria: DHd, 2015. Available at: http://gams.uni-graz.at/o:dhd2015.p.55.
  5. Paleo Codage – A machine-readable way to describe cuneiform characters paleographically. Homburg, T. In Utrecht, Netherlands, July 2019.