Skip to contents

Counts high-complexity (HC) and low-complexity (LC) markers in the text, using word stems, phrases, and exact words with negation-aware counting.

Usage

get_complex(
  text,
  bootstrap = FALSE,
  B = 1000,
  quote_strip = TRUE,
  window_chars = 40
)

Arguments

text

A character string containing the speech text to analyse.

bootstrap

Logical; if TRUE, return bootstrapped mean and variance estimates. Default is FALSE.

B

Integer; number of bootstrap replicates. Default is 1000.

quote_strip

Logical; if TRUE, remove quoted text before counting. Default is TRUE.

window_chars

Integer; number of characters to look back for negation context. Default is 40.

Value

A one-row tibble. When bootstrap = FALSE, columns are HC and LC. When bootstrap = TRUE, columns are meanHC, varHC, meanLC, varLC.