Skip to contents

Adds <MDA> tags to a given text. The text must already include _ST tags and tokenized.

Usage

add_mda_tags(x, mda_hesitation = TRUE, progress = FALSE, ...)

Arguments

x

character string

mda_hesitation

logical. If TRUE, hesitation markers are extracted from the text. Experimental feature - should hesitation markers be excluded before tagging? Regex for the hesitation markers is the same as the default for dtag_hesitation, but can be set using the regex argument. See dtag_hesitation for details.

progress

logical. If TRUE, a progress message is printed

...

Additional arguments to pass on.

Value

character string with <MDA> tags added

Examples

if (FALSE) {
# Simple example:
text <- c("I_PPSS", "have_VB", "a_DET", "dog_NN")
add_mda_tags(text)
# More detailed example:
# Generate some text
text <- "This example is short and sweet. This means that not all the tags will
have been included, which is why this is really only a guide and it should
be used with that in mind. Otherwise, I think it may lead to disappointment."
# Load udpipe model into the global environment for _ST tagging
init_udpipe_model()
# Add Stanford tags to text
text <- add_st_tags(text)
# Add <MDA> tags
add_mda_tags(text)}