Skip to contents

If reticulate and numpy are available, computes auxiliary dynamics of the valence series (gradient and cumulative trajectory) in Python and attaches them to the score's enrichment slot. The deterministic core features, arc, and mapping are left untouched — enrichment is additive and never feeds the reproducibility snapshot.

Usage

syn_py_features(score, call = rlang::caller_env())

Arguments

score

A prosody_score from syn_score().

call

The calling environment, for error reporting. Experts only.

Value

The score with score$enrichment$py_features added (a tibble of sentence_id, valence_gradient, valence_cumulative). Requires reticulate + Python numpy.

Examples

if (FALSE) { # \dontrun{
# Not run: needs the reticulate package and a Python installation with
# numpy, which are not available on every system.
score <- syn_score(syn_read_text(syn_example_text("en"), lang = "en"))
syn_py_features(score)$enrichment$py_features
} # }