Skip to contents

Add hesitation marker <HSTN> to a vector of tokenized strings.

Usage

dtag_hesitation(x, regex = "\\berm?\\b|\\berm?_|\\bum\\b|\\bum_")

Arguments

x

A character vector with <HSTN> added, where necessary.

regex

A regular expression (default "\berm?\b|\berm?|\bum\b|\bum"). The regex expression is case insensitive by default.

Value

A character vector with hesitation tags appended.

Examples

dtag_hesitation(c("I'm", "not", "sure",".", "Um" ,"," ,"no"))
#> [1] "I'm"       "not"       "sure"      "."         "Um <HSTN>" ","        
#> [7] "no"