This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| clean_corpus = function(x){ | |
| # Replace redundant white spaces and line jumps such as \n | |
| x = replace_white(x) | |
| # Replace or remove non ASCII characters | |
| x = replace_non_ascii(x) | |
| # Replace contractions such as "you're" by expanded such as "you are" | |
| x = replace_contraction(x) | |
| # Replace elongations. Ex: "heyyyyy" is replaced by "Hey" | |
| x = replace_word_elongation(x) | |
| # Replace emoji by plain text |
OlderNewer