def get_ep_lemma(ep):
    """ Get lemma from a pyDelphin elementary predicate """
    # if ep.pred == 'named':
    if ep.carg:
        return ep.carg
    elif ep.pred.pos == 'u' and ep.pred.sense == 'unknown' and "/" in ep.pred.lemma:
        cutpoint = ep.pred.lemma.rfind('/')
        return ep.pred.lemma[:cutpoint]
    else:
        return ep.pred.lemma