'Replace each subword from the dictionary `words` by words[subword].
If words is a list, replace the words by the identity.'

def eliminate_words(self, words, _all=False, inverse=True):

    again = True
    new = self
    if isinstance(words, dict):
        while again:
            again = False
            for sub in words:
                prev = new
                new = new.eliminate_word(sub, words[sub], _all=_all, inverse=inverse)
                if (new != prev):
                    again = True
    else:
        while again:
            again = False
            for sub in words:
                prev = new
                new = new.eliminate_word(sub, _all=_all, inverse=inverse)
                if (new != prev):
                    again = True
    return new
