# NOT RUN {
props1 <- list(P1 = c(0, 0.5),
P2 = c(0.2, 0.4),
P3 = c(0.5, 1),
P4 = c(0, 0))
props2 <- list(P1 = c(0.5, 1),
P2 = c(0.4, 1),
P3 = c(0, 0.5),
P4 = c(1, 1))
alph <- generate_unigrams(c(replicate(8, props1, simplify = FALSE),
replicate(12, props2, simplify = FALSE)),
unigram_names = letters[1L:20])
rules1 <- list(P1 = c(0.5, 1),
P2 = c(0.4, 1),
P3 = c(0, 0.5),
P4 = c(1, 1))
generate_single_region(alph, 10, rules1, 0.9)
# }
Run the code above in your browser using DataLab