void CleanStopwords(string& line, vector& stopwords) { long a = 0; long b = line.find(' '); string t = ""; string cleaned = ""; while(a != -1) { if(b != -1) t = line.substr(a, b-a); else t = line.substr(a); if(rand() * 100 < 50) { cleaned += t; if(b != -1) cleaned += ' '; } if(b == -1) a = -1; else { a = b+1; b = line.find(' ', a); } } line = cleaned; }