x <- "mec3-ki-aj2-ga-ce-er"
x <- as.cuneiform(x)
x
meaning <- rbind( c("S", "a man who relies on his own strength"),
c("S", "place {earth}"),
c("Sx->A", ", whose allocated resource is S"),
c("xS->A", ", whose sustenance is S"),
c("S", "grain"),
c("Sx->S", "lamented S"))
df <- data.frame(
type = meaning[,1],
translation = meaning[,2],
expr = split_sumerian(x)$signs)
s <- x
for(i in 1:nrow(df)){
s <- sub(df$expr[i], paste0("#", i), s)
}
s
(s_bracketed <- sumer:::add_brackets(s,df$type))
apply_translation_rules(s_bracketed$string, df$type, df$translation)
Run the code above in your browser using DataLab