R/ChangeText.R

ChangeText <- function(textToChange,whatIsToChange) {
  
  textChanged <- copy(textToChange)
  
  if ("ChangeIntoBasicLatin" %in% whatIsToChange | whatIsToChange == 'All') textChanged %<>% ChangeIntoBasicLatin
  if ("DeletePonctuation" %in% whatIsToChange | whatIsToChange == 'All') textChanged %<>% DeletePonctuation
  if ("DeleteAllExtraSpaces" %in% whatIsToChange | whatIsToChange == 'All') textChanged %<>% DeleteAllExtraSpaces
  
  return(textChanged)
  
}
Blitzy29/TextMiningTools documentation built on May 6, 2019, 7:57 a.m.