def get_fields(this_line):
    """
    Takes a line from semcor, parses it and returns it as a dictionary
    For <wf id=a lemma=b>hi</wf> would created m['id']=a m['lemma']=b m['text']=hi
    
    @type  this_line: string
    @param this_line: line from SemCor
    @rtype:  map
    @return: map with the attributes
    """
    ret = {}
    fields = this_line.strip().split('>')
    attribs = fields[0].split(' ')
    text = fields[1].split('<')[0]
    ret['text'] = text
    for at in attribs:
        pair = at.split('=')
        if len(pair) == 2:  #To avoid <wf
            ret[pair[0]] = pair[1]
    return ret