rehash | R Documentation |
Given a TextReuseTextDocument
or a
TextReuseCorpus
, this function recomputes either the hashes or
the minhashes with the function specified. This implies that you have
retained the tokens with the keep_tokens = TRUE
parameter.
rehash(x, func, type = c("hashes", "minhashes"))
x |
A |
func |
A function to either hash the tokens or to generate the minhash
signature. See |
type |
Recompute the |
The modified TextReuseTextDocument
or
TextReuseCorpus
.
dir <- system.file("extdata/legal", package = "textreuse")
minhash1 <- minhash_generator(seed = 1)
corpus <- TextReuseCorpus(dir = dir, minhash_func = minhash1, keep_tokens = TRUE)
head(minhashes(corpus[[1]]))
minhash2 <- minhash_generator(seed = 2)
corpus <- rehash(corpus, minhash2, type = "minhashes")
head(minhashes(corpus[[2]]))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.