import re


def join_morphs(ret_str):
    """
    Find tokens that have letters or numbers on two sides separated by a
    period or morph and join them.

    E.g. MASC . 1SG becomes "MASC.1SG"
    """
    m = re.sub('([\w\d])\s*([\.\-])\s*(?=[\w\d])', r'\1\2', ret_str)
    return m