public static void cleanseTranslations(List<Homonym> homonyms) {
        List<Integer> linesToRemove = new ArrayList<>();

        //combine split lines
        for (Homonym tr: homonyms) {
            for (int i =  tr.getWords().get(0).getMeanings().size() - 1; i >= 0; i--) {
                Meaning se = tr.getWords().get(0).getMeanings().get(i);
                if (se.getSynonyms().startsWith("##")) {
                    Meaning prev = tr.getWords().get(0).getMeanings().get(i - 1);

                    //combine, but remove starting "##"
                    prev.setSynonyms(prev.getSynonyms().trim() + " " + se.getSynonyms().substring(2).trim());

                    //mark "line" to be removed
                    linesToRemove.add(i);
                }
                removeMarkedLines(tr, linesToRemove);
            }
        }

        //remove brackets and other stuff
        for (Homonym tr: homonyms) {
            for (int i =  tr.getWords().get(0).getMeanings().size() - 1; i >= 0; i--) {
                Meaning se = tr.getWords().get(0).getMeanings().get(i);
                String cleaned = replaceCharactedCodes(se.getSynonyms());
                cleaned = cleaned.replaceAll("\\s*[(].*?[)]\\s*", "").trim(); //remove brackets
                cleaned = cleaned.replaceAll("[?#]", "").trim(); //remove question marks and hash chars
                cleaned = cleaned.replaceAll(".*[+].*", "").trim(); //remove lines with plus sign
                se.setSynonyms(cleaned);

                //if any "empty" lines appear, mark sensus for removal
                if (se.getSynonyms().trim().isEmpty()) linesToRemove.add(i);
            }
            removeMarkedLines(tr, linesToRemove);
        }

        //remove homonyms with empty meanings
        for (int i = homonyms.size() - 1; i >= 0 ; i--) {
            Homonym tr = homonyms.get(i);
            if (tr.getWords().get(0).getMeanings().isEmpty() || !tr.getWords().get(0).hasNonEmptyMeanings()) {
                linesToRemove.add(i);
            }
        }
        removeMarkedLines(homonyms, linesToRemove);
    }