Learn R Programming

sumer (version 1.0.0)

sumer-package: Tools for Working with Sumerian Cuneiform Texts

Description

A toolkit for analyzing and translating Sumerian cuneiform texts. The package provides functions for converting sign names to cuneiform characters, creating and querying dictionaries, and analyzing the structure of Sumerian words.

Arguments

Getting Started

Load the package and explore the built-in dictionary:


library(sumer)

# Load the built-in dictionary dic <- read_dictionary()

# Look up a Sumerian word look_up("d-suen", dic)

# Search for a term in translations look_up("water", dic, "en")

Cuneiform Conversion and Analysis

Functions for converting sign names to cuneiform and analyzing sign structure:

as.cuneiform

Converts Sumerian text to cuneiform characters.


as.cuneiform("lugal")
as.cuneiform("AN.EN.ZU")

as.sign_name

Converts Sumerian text to sign names.


as.sign_name("lugal")

split_sumerian

Splits compound sign names into individual components.


split_sumerian("AN.EN.ZU")

info

Displays detailed information about a Sumerian text.


info("jic-tukul")

Dictionary Creation

Functions for creating dictionaries from annotated translation files:

read_translated_text

Reads annotated translation files (.docx or .txt) and extracts sign names, grammatical types, and meanings.


filename     <- system.file("extdata", "text_with_translations.txt", package = "sumer")
translations <- read_translated_text(filename)

convert_to_dictionary

Converts translation data into dictionary format, adding cuneiform representations and phonetic readings.


dictionary <- convert_to_dictionary(translations)

make_dictionary

Convenience function that combines reading and conversion in one step.


dictionary <- make_dictionary(filename)

Dictionary Input/Output

Functions for saving and loading dictionaries:

save_dictionary

Saves a dictionary to a text file with metadata header.


save_dictionary(dic, "my_dictionary.txt",
                author = "John Doe",
                version = "1.0")

read_dictionary

Loads a dictionary from file. Without arguments, loads the built-in dictionary.


dic <- read_dictionary()
dic <- read_dictionary("my_dictionary.txt")

Dictionary Lookup

look_up

Interactive dictionary search. Supports both forward lookup (Sumerian to English) and reverse lookup (English to Sumerian).


# Forward lookup: Sumerian sign name
look_up("AN", dic)
look_up("AN.EN.ZU", dic)

# Reverse lookup: search in translations look_up("king", dic, "en") look_up("Gilgamesh", dic, "en")

skeleton

Creates a structured template (skeleton) for translating Sumerian text.


skeleton("e-ta-na an-ce3 ba-ed3-de3")

Typical Workflows

Workflow A: Analyze and translate a text


library(sumer)

# Convert sign name to cuneiform as.cuneiform("d-en-líl")

# Load dictionary dic <- read_dictionary()

# Look up the meaning look_up("d-en-líl", dic)

# Get information about individual signs info("d-en-líl") info("lil") info("lil2")

Workflow B: Create your own dictionary


library(sumer)

# Read annotated translations from file filename <- system.file("extdata", "text_with_translations.txt", package = "sumer") translations <- read_translated_text(filename)

# Convert to dictionary format dictionary <- convert_to_dictionary(translations)

# Save for later use save_dictionary(dictionary, "my_dictionary.txt", author = "My Name", year = "2025", version = "1.0")

# Load and use my_dic <- read_dictionary("my_dictionary.txt") look_up("ki", my_dic)

Author

Maintainer: [Robin Wellmann] ro.wellmann@gmail.com

See Also

Core functions: info, read_dictionary, look_up

Dictionary creation: read_translated_text, convert_to_dictionary, make_dictionary, save_dictionary skeleton

Analysis tools: split_sumerian, as.cuneiform, as.sign_name