def disambiguating_filter_from_query_params(query_params: dict[str, str]):
    """
    Sometimes wordforms may have the same text (a.k.a., be homographs/homophones),
    thus need to be disambiguate further before displaying a paradigm.

    This computes the intersection between the provided query parameters and the valid
    disambiguating filters used for homograph disambiguation.
    """
    keys_present = query_params.keys() & {
        # e.g., VTA-1, VTI-3
        # Since inflectional category, by definition, indicates the paradigm of the
        # associated head word, this is the preferred disambiguator. It **should** work
        # most of the time.
        "inflectional_category",
        # e.g., N or V.
        # This is the "general word class"  a.k.a., not enough information to know
        # what paradigm to use. This disambiguator is discouraged.
        "pos",
        # e.g., câhkinêw+V+TA+Ind+5Sg/Pl+4Sg/PlO
        # I'm honestly not sure why this was chosen as a disambiguator ¯\_(ツ)_/¯
        "analysis",
        # Last resort: ephemeral database ID. This is NOT STABLE across database imports!
        "id",
    }
    return {key: query_params[key] for key in keys_present}