import re


def congr(morph1, morph2):

    """
    Check morphological analyses for agreement in NUM and CASE.
    """

    tags1 = re.findall('\[(CASE|NUM)=[A-Z]+]', morph1)
    tags2 = re.findall('\[(CASE|NUM)=[A-Z]+]', morph2)
    return tags1 == tags2