# Note: The folder containing the built-in project
# is copied to a temporary directory.
# This prevents you from altering the package files.
path <- system.file("extdata", package = "sumer")
file.copy(
from = file.path(path, "project"),
to = tempdir(),
recursive = TRUE
)
ctx <- translation_context(
project_dir = file.path(tempdir(), "project"),
text = "enki_and_the_world_order.txt",
dic = file.path(path, "sumer-dictionary.txt"),
sentence_prob = 0.25
)
ctx
if (FALSE) {
# Translate line 29 (opens interactive translator)
translate_line(29, ctx)
# Confirm that your changes are still there:
translate_line(29, ctx)
# Continue with the next line:
translate_line(30, ctx)
}
Run the code above in your browser using DataLab