Description Usage Arguments Value Examples
AKA the trie with failure attributes built in. This will need to be run one time and then can be used for both find and replace functions.
1 | trie_create(keys, values, to_lower = TRUE, whole_words_only = TRUE)
|
keys |
these are the words that you want to search for in the trie |
values |
these are optional, but if you will need to supply them if you want to use the replace method. |
to_lower |
are your keys case sensitive? If so, this should be false. |
whole_words_only |
do you want to pad your keys with whitespace to find only those that are whole words? If so select this should be true |
a reference class object of class node from the data.tree package.
1 2 3 4 5 | keys <- c("a", "ab", "bab", "bc", "bca", "c", "caa", "abc")
values <- c("foo", "bar", "foo", "bar", "foo", "bar", "foo", "bar")
example_trie <- trie_create(keys, value = values)
example_trie
example_trie$a$b$fail
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.