Skip to contents

Creates a bar chart showing the distribution of a morphological feature using consistent package styling.

Usage

plot_morphology_feature(data, feature, title = NULL, colors = NULL)

Arguments

data

Data frame with morph_* columns from extract_morphology().

feature

Character; feature name (e.g., "Number", "Tense").

title

Character; plot title (auto-generated if NULL).

colors

Named character vector of custom colors for feature values.

Value

A plotly object.

Examples

if (FALSE) { # \dontrun{
morph_data <- extract_morphology(tokens)
plot_morphology_feature(morph_data, "Tense")
} # }