uncontract_negations: Uncontrtact negations, e.g., "don't" to "do not"

View source: R/uncontract_negations.R

uncontract_negationsR Documentation

Uncontrtact negations, e.g., "don't" to "do not"

Description

Uncontrtact negations, e.g., "don't" to "do not"

Usage

uncontract_negations(x, negation_forms = "default")

Arguments

x

The string whose negations shall be uncontracted.

negation_forms

A matrix with two columns of mode character The first column contains the contracted form, the second the uncontracted form. The default is "default", which considers the following negations: "isn.t","aren.t","wasn.t","weren.t","hasn.t" , "haven.t", "hadn.t" , "doesn.t" , "don.t" , "didn.t" , "won.t" , "wouldn.t", "shan.t" , "shouldn.t" ,"can.t" , "couldn.t" ,"mustn.t" , "cannot"

Value

The string with uncontracted negations.

Examples

txt <- c("I don`t want this.",  "I won`t accept it.")
uncontract_negations(txt)
#[1] "I do not want this."   "I will not accept it."

manuelbickel/textility documentation built on Nov. 25, 2022, 9:07 p.m.