Regular expression replacements to be done in the order presented, for cleaning up words that might interfere in the resulting cloud.
Step | Replace... | For... |
---|---|---|
Remove punctuation | [;\.\(\)!/"] |
space |
Add space to lines start and end | [^|$] |
space |
Remove stopwords | [^a-z](share|and|at|by|the|is|that|it|or|to|it's|of|a|an|btw|be|in|if|be|amd|the|just|get|'ll's)[^a-z] |
space |
Break in lines | [ \r\n\t]+ |
\n |