knitr::opts_chunk$set(echo = TRUE) require(quanteda)
toks2 <- tokens(data_corpus_inaugural) toks2 <- tokens_remove(toks2, stopwords("english"), padding = TRUE) microbenchmark::microbenchmark(path_R = textstat_collocations(toks2, size = 2, tolower = FALSE, method="all", path=1), path_C = textstat_collocations(toks2, size = 2, tolower = FALSE, method="all", path=2), times = 2, unit = "relative")
toks2 <- tokens(quantedaData::data_corpus_SOTU) toks2 <- tokens_remove(toks2, stopwords("english"), padding = TRUE) microbenchmark::microbenchmark(path_R = textstat_collocations(toks2, size = 3, tolower = FALSE, method="lambda", min_count = 2, path=2), path_C = textstat_collocations(toks2, size = 3, tolower = FALSE, method="lambda", min_count = 1, path=2), times = 2, unit = "relative")
toks2 <- tokens(data_corpus_inaugural) toks2 <- tokens_remove(toks2, stopwords("english"), padding = TRUE) microbenchmark::microbenchmark(path_R = textstat_collocations(toks2, size = 3, tolower = FALSE, method="all", path=1), path_C = textstat_collocations(toks2, size = 3, tolower = FALSE, method="all", path=2), times = 2, unit = "relative")
toks2 <- tokens(data_corpus_inaugural) toks2 <- tokens_remove(toks2, stopwords("english"), padding = TRUE) microbenchmark::microbenchmark(path_R = textstat_collocations(toks2, size = 4, tolower = FALSE, method="all", path=1), path_C = textstat_collocations(toks2, size = 4, tolower = FALSE, method="all", path=2), times = 2, unit = "relative")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.