naf2cat/variety/naf_to_cat_srl.py
def create_tokens(nafobj, root):
    '''
    Adds the tokens from NAF to CAT
    '''
    number = 0
    sent_nr = '0'
    for tok in nafobj.get_tokens():
        token = tok.get_text()
        sent = tok.get_sent()
        if sent != sent_nr:
            number = 0
            sent_nr = sent
        tokId = tok.get_id().lstrip('w')
        child = etree.SubElement(root, 'token', t_id=tokId, sentence=sent, number=str(number))
        child.text = token
        number += 1

    Adds the tokens from NAF to CAT
    
Adds the tokens from NAF to CAT
Adds the tokens from NAF to CAT
def create_tokens(nafobj, root):
    number = 0
    sent_nr = '0'
    for tok in nafobj.get_tokens():
        token = tok.get_text()
        sent = tok.get_sent()
        if sent != sent_nr:
            number = 0
            sent_nr = sent
        tokId = tok.get_id().lstrip('w')
        child = etree.SubElement(root, 'token', t_id=tokId, sentence=sent, number=str(number))
        child.text = token
        number += 1
def create_tokens ( nafobj , root ) : number = 0 sent_nr = '0' for tok in nafobj . get_tokens ( ) : token = tok . get_text ( ) sent = tok . get_sent ( ) if sent != sent_nr : number = 0 sent_nr = sent tokId = tok . get_id ( ) . lstrip ( 'w' ) child = etree . SubElement ( root , 'token' , t_id = tokId , sentence = sent , number = str ( number ) ) child . text = token number += 1
Adds the tokens from NAF to CAT
Adds the tokens from NAF to CAT
'''
    Adds the tokens from NAF to CAT
    '''
nafobj
root