def rebase(self, text, char='<STR_LIT:X>'):
regexp = re.compile(r'<STR_LIT>' % '<STR_LIT:|>'.join(self.collection),<EOL>re.IGNORECASE | re.UNICODE)<EOL>def replace(m):<EOL><INDENT>word = m.group(<NUM_LIT:1>)<EOL>return char * len(word)<EOL><DEDENT>return regexp.sub(replace, text)<EOL>
Rebases text with stop words removed.