def check_aligned(self, text, tokens):
    token_texts = ''.join((t.text for t in tokens))
    return (re.sub(self._ws_pattern, '', text) == token_texts)
def check_aligned(self, text, tokens):
    token_texts = .join((t.text for t in tokens))
    return (re.sub(self._ws_pattern, , text) == token_texts)