# NOT RUN {
# Constructing test data frame:
dates <- as.Date(paste(2011:2020, 1:10, 21:30, sep = "-"))
texts <- paste0(
"This is a document about ", month.name[1:10], ". ",
"This is not a document about ", rev(month.name[1:10]), "."
)
titles <- paste("Text", 1:10)
test_df <- tibble::tibble(Date = dates, Text = texts, Title = titles)
# Converting to corporaexplorerobject:
corpus <- prepare_data(test_df, corpus_name = "Test corpus")
if(interactive()){
# Running exploration app:
explore(corpus)
explore(corpus,
search_options = list(optional_info = TRUE),
ui_options = list(font_size = "10px"),
search_input = list(search_terms = c("Tottenham", "Spurs")),
plot_options = list(max_docs_in_wall_view = 12001,
colours = c("gray", "green")))
# Running app to extract documents:
run_document_extractor(corpus)
}
if (interactive()) {
explore0(rep(sample(LETTERS), 10))
explore0(rep(sample(LETTERS), 10),
arguments_explore = list(search_input = list(search_terms = "Z"))
)
}
# }
Run the code above in your browser using DataLab