skeleton_file <- system.file("extdata", "project/lines/Line_29.txt", package = "sumer")
the_skeleton <- readLines(skeleton_file)
#Get the cuneiform text of the line:
x <- sub("^Structure: ", "", the_skeleton[1])
x
#See the whole file:
cat(the_skeleton, sep="\n")
df_fill <- fill_substr_info(skeleton_file)
if (FALSE) {
#Use the result of the function to revise the translation:
dict_file <- system.file("extdata", "sumer-dictionary.txt", package = "sumer")
text_file <- system.file("extdata", "project", "enki_and_the_world_order.txt", package = "sumer")
result <- translate(x,
text = text_file,
dic = dict_file,
fill = df_fill,
min_freq = c(6, 4, 2),
sentence_prob = 0.25)
print(result)
# Now you may save the result with writeLines.
}
Run the code above in your browser using DataLab