Creates a bar plot showing the frequency distribution of part-of-speech tags.
Usage
plot_pos_frequencies(
pos_data,
top_n = 20,
title = "Part-of-Speech Tag Frequency",
color = "#337ab7",
height = 500,
width = NULL
)Arguments
- pos_data
Data frame containing POS data with columns:
pos: Part-of-speech tagn: (optional) Pre-computed frequency count
If
nis not present, frequencies will be computed from the data.- top_n
Number of top POS tags to display (default: 20)
- title
Plot title (default: "Part-of-Speech Tag Frequency")
- color
Bar color (default: "#337ab7")
- height
Plot height in pixels (default: 500)
- width
Plot width in pixels (default: NULL for auto)
See also
Other visualization:
apply_standard_plotly_layout(),
create_empty_plot_message(),
create_message_table(),
create_standard_ggplot_theme(),
get_dt_options(),
get_plotly_hover_config(),
get_sentiment_color(),
get_sentiment_colors(),
plot_cluster_terms(),
plot_cross_category_heatmap(),
plot_entity_frequencies(),
plot_mwe_frequency(),
plot_ngram_frequency(),
plot_semantic_viz(),
plot_similarity_heatmap(),
plot_term_trends_continuous(),
plot_word_frequency()
Examples
if (interactive()) {
pos_df <- data.frame(
pos = c("NOUN", "VERB", "ADJ", "ADV", "PRON"),
n = c(500, 400, 250, 150, 100)
)
plot_pos_frequencies(pos_df)
}
