Replace text using rule based proper name. Given a text and the proper name connectors (`connectors()`), it returns the text with its proper names as one single word, with underscore biding them. For example, the text "John Does lives in New York in United States of America" becomes "John_Does lives in New_York in United_States_of_America."
Usage
txt_subst(txt, connect = connectors("all"), sw = "", underscore = TRUE)Examples
t <- txt_subst("John Does lives in New York in United States of America.")
t
#> [1] "John_Does lives in New_York in United_States_of_America."
strsplit(t, " ")
#> [[1]]
#> [1] "John_Does" "lives"
#> [3] "in" "New_York"
#> [5] "in" "United_States_of_America."
#>