# Load dictionary
dic <- read_dictionary()
# Forward lookup: search by phonetic spelling
look_up("d-suen", dic)
# Forward lookup: search by Sumerian sign name
look_up("AN", dic)
look_up("AN.EN.ZU", dic)
# Forward lookup: search by cuneiform character string
AN.NA <- paste0(intToUtf8(0x1202D), intToUtf8(0x1223E))
AN.NA
look_up(AN.NA, dic)
# Reverse lookup: search in translations
look_up("Gilgamesh", dic, "en")
# Adjust output width for narrow terminals
look_up("water", dic, "en", width = 50)
# Store results for later use
result <- look_up("lugal", dic)
result$cuneiform
result$translations
# Print stored results
print(result)
Run the code above in your browser using DataLab