Description Usage Arguments Value Examples
preText plots for each preprocessing specification.
1 2 | preText_score_plot(preText_results, display_raw_rankings = FALSE,
remove_labels = FALSE, num_docs = NULL, text_size = 1)
|
preText_results |
The output from the 'preText_test()' or 'preText()' functions. |
display_raw_rankings |
Logical indicating whether raw ranking differences should be displayed (as opposed to relative differences). |
remove_labels |
Option to remove preprocessing step labels. Defaults to FALSE. |
num_docs |
If display_raw_rankings = TRUE, the number of documents in the corpus. |
text_size |
The 'cex' for text in dot plot generated by function. Defaults to 1. |
A plot
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ## Not run:
# load the package
library(preText)
# load in the data
data("UK_Manifestos")
# preprocess data
preprocessed_documents <- factorial_preprocessing(
UK_Manifestos,
use_ngrams = TRUE,
infrequent_term_threshold = 0.02,
verbose = TRUE)
# run preText
preText_results <- preText(
preprocessed_documents,
dataset_name = "Inaugural Speeches",
distance_method = "cosine",
num_comparisons = 100,
verbose = TRUE)
# generate preText score plot
preText_score_plot(preText_results)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.