Learn R Programming

sumer (version 1.0.0)

skeleton: Create a Translation Template for Sumerian Text

Description

Creates a structured template (skeleton) for translating Sumerian text. The template displays each word and syllable with its sign name and cuneiform representation, providing a framework for adding translations.

The function skeleton computes the template and returns an object of class "skeleton". The print method displays the template in the console.

Usage

skeleton(x, mapping = NULL)

# S3 method for skeleton print(x, ...)

Value

skeleton returns a character vector of class c("skeleton", "character") containing the template lines.

print.skeleton prints the template to the console and returns x invisibly.

Arguments

x

For skeleton: A character string of length 1 containing transliterated Sumerian text. Words are separated by spaces, syllables within words by hyphens or other separators.

For print.skeleton: An object of class "skeleton" as returned by skeleton.

mapping

A data frame containing the sign mapping table with columns syllables, name, and cuneiform. If NULL (the default), the package's internal mapping file etcsl_mapping.txt is loaded.

...

Additional arguments passed to the print method (currently unused).

Details

The function generates a hierarchical template with different levels of detail depending on the input type:

Multiple words

The template includes a header line with the original text, followed by entries for each word, its syllables (indented with one tab), and sub-signs for multi-sign syllables (indented with two tabs).

Single word (multiple syllables)

The word equation serves as the header, followed by syllable entries (one tab) and sub-sign entries (two tabs). No redundant header line is generated.

Single syllable

Only the syllable equation is shown (no indentation), with sub-sign entries indented by one tab if applicable.

Each line in the template follows the format

|[tabs]reading=SIGN.NAME=cuneiform::

The template should be filled in as follows:

  • Between the two colons: the grammatical type of the expression (e.g., S for noun phrases, V for verbs, etc.). See make_dictionary for details.

  • After the second colon: the translation

For example, a filled-in line might look like:

|an=AN=<cuneiform sign for AN>:S: god of heaven

Redundant lines are automatically omitted: if a word consists of only one syllable, no separate syllable line is generated.

This function is intended to be used together with look_up for translating Sumerian texts: first create a template with skeleton, then use look_up to find the meanings of words and signs, and fill in the template accordingly.

The template format is designed to be saved as a text file (.txt) or Word document (.docx), filled in manually, and can then be used as input for make_dictionary to create a custom dictionary.

See Also

look_up for looking up translations of Sumerian signs and words, make_dictionary for creating a dictionary from filled-in templates, info for retrieving detailed sign information

Examples

Run this code
# Create a template for a multi-word phrase
skeleton("e-ta-na an-ce3 ba-ed3-de3")

# Create a template for a single word
skeleton("lugal-e")

# Create a template for a single syllable
skeleton("an")

# Store the template for further use
tmpl <- skeleton("lu2 du")
tmpl

# Typical workflow: create template, then look up meanings
dic <- read_dictionary()
tmpl <- skeleton("lugal kur-ra-ke4")
print(tmpl)
look_up("lugal", dic)
look_up("kur", dic)

Run the code above in your browser using DataLab