def flatten_synonyms(self):
        if not self.has_synonyms:
            # nothing to do
            return

        for entry in self.entries:
            for synonym in entry.get_synonyms():
                self.add_entry(headword=synonym, definition=entry.definition)

        self.sort(False, False, False, False)
Add a new entry for each synonym,
dataset/ETHPy150Open pettarin/penelope/penelope/dictionary.py/Dictionary.flatten_synonyms