from typing import List
from typing import Tuple


def remove_redundant_keyphrases(ranked_keyphrases: List[Tuple[str, float]]):
    """
    Remove redundant keyphrases (in normalized/lexical forms) from a ranked list of keyphrases

    A keyphrase is redundant if it is a substring of higher ranked keyphrases.
    """
    non_redundant = []
    for keyphrase, score in ranked_keyphrases:
        if any([keyphrase in other for other, _ in non_redundant]):
            continue
        non_redundant.append((keyphrase, score))
    return non_redundant