naf2cat/variety/naf_to_cat_srl.py
def create_markables(nafobj, markables):
    '''
        Create markables and stores information needed for relations
        Dictionary has target mid as key (they are unique in this case, sources are not)
    '''
    mid = 1
    relations = {}
    for pred in nafobj.get_predicates():
        add_mention(pred, markables, mid, 'EVENT_MENTION')
        pid = str(mid)
        mid +=1
        for role in pred.get_roles():
            add_mention(role, markables, mid, 'ENTITY_MENTION')
            rid = mid
            relations[rid] = [pid, role.get_sem_role()]
            mid += 1
    return relations, mid

        Create markables and stores information needed for relations
        Dictionary has target mid as key (they are unique in this case, sources are not)
    
Create markables and stores information needed for relations
Dictionary has target mid as key (they are unique in this case, sources are not)
Create markables and stores information needed for relations Dictionary has target mid as key ( they are unique in this case sources are not )
def create_markables(nafobj, markables):
    mid = 1
    relations = {}
    for pred in nafobj.get_predicates():
        add_mention(pred, markables, mid, 'EVENT_MENTION')
        pid = str(mid)
        mid +=1
        for role in pred.get_roles():
            add_mention(role, markables, mid, 'ENTITY_MENTION')
            rid = mid
            relations[rid] = [pid, role.get_sem_role()]
            mid += 1
    return relations, mid
def create_markables ( nafobj , markables ) : mid = 1 relations = { } for pred in nafobj . get_predicates ( ) : add_mention ( pred , markables , mid , 'EVENT_MENTION' ) pid = str ( mid ) mid += 1 for role in pred . get_roles ( ) : add_mention ( role , markables , mid , 'ENTITY_MENTION' ) rid = mid relations [ rid ] = [ pid , role . get_sem_role ( ) ] mid += 1 return relations , mid
Create markables and stores information needed for relations
Dictionary has target mid as key (they are unique in this case, sources are not)
Create markables and stores information needed for relations Dictionary has target mid as key ( they are unique in this case sources are not )
'''
        Create markables and stores information needed for relations
        Dictionary has target mid as key (they are unique in this case, sources are not)
    '''
nafobj
markables