Generate a region using an alphabet of unigrams and considering provided set of rules.
generate_single_region(alphabet, reg_len, prop_ranges, exactness)
alphabet | the unigram alphabet. Columns are equivalent to unigrams and rows to particular properties. |
---|---|
reg_len | the number of unigrams inside the region. |
prop_ranges | required intervals of properties of unigrams in the region. See Details. |
exactness | a |
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)#> [1] "j" "j" "r" "m" "l" "q" "j" "n" "k" "o"