str_to_repair_grammar: Runs the repair on a string.

Description Usage Arguments References Examples

View source: R/RcppExports.R

Description

Runs the repair on a string.

Usage

1

Arguments

str

the input string.

References

N.J. Larsson and A. Moffat. Offline dictionary-based compression. In Data Compression Conference, 1999.

Examples

1
str_to_repair_grammar("abc abc cba cba bac xxx abc abc cba cba bac")

Example output

Loading required package: Rcpp
[[1]]
[[1]]$rule_name
[1] "R0"

[[1]]$rule_string
[1] "R4 xxx R4"

[[1]]$expanded_rule_string
[1] "abc abc cba cba bac xxx abc abc cba cba bac "

[[1]]$rule_interval_starts
[1] -1

[[1]]$rule_interval_ends
[1] 10


[[2]]
[[2]]$rule_name
[1] "R1"

[[2]]$rule_string
[1] "R1"

[[2]]$expanded_rule_string
[1] "abc abc"

[[2]]$rule_interval_starts
[1] 6 0

[[2]]$rule_interval_ends
[1] 7 1


[[3]]
[[3]]$rule_name
[1] "R2"

[[3]]$rule_string
[1] "R2"

[[3]]$expanded_rule_string
[1] "abc abc cba"

[[3]]$rule_interval_starts
[1] 0 6

[[3]]$rule_interval_ends
[1] 2 8


[[4]]
[[4]]$rule_name
[1] "R3"

[[4]]$rule_string
[1] "R3"

[[4]]$expanded_rule_string
[1] "abc abc cba cba"

[[4]]$rule_interval_starts
[1] 6 0

[[4]]$rule_interval_ends
[1] 9 3


[[5]]
[[5]]$rule_name
[1] "R4"

[[5]]$rule_string
[1] "R4"

[[5]]$expanded_rule_string
[1] "abc abc cba cba bac"

[[5]]$rule_interval_starts
[1] 0 6

[[5]]$rule_interval_ends
[1]  4 10

jmotif documentation built on March 26, 2020, 7:23 p.m.