def sentence_precision(network_tags, gold_tags, gold_tag_dict, network_tag_dict):
    inside_argument = False
    mistake = False
    cur_tag = ''
    correct_args = []
    predicted_args = []
    
    for net_tag, gold_tag in izip(network_tags, gold_tags):
        net_tag = network_tag_dict[net_tag]
        gold_tag = gold_tag_dict[gold_tag]
        
        # argument boundary identification uses IOBES. Convert it to IOB
        # to make evaluation easier
        if net_tag == 'E':
            net_tag = 'I'
        elif net_tag == 'S':
            net_tag = 'B'
        
        if inside_argument and net_tag[0] != 'I':
            # last argument ended
            predicted_args.append(cur_tag)
            if not mistake and gold_tag[0] != 'I':
                correct_args.append(cur_tag)
            inside_argument = False
        
        if net_tag[0] == 'B' and net_tag != 'B-V':
            inside_argument = True
            mistake = False
            cur_tag = ''
            
            # let's see if it's actually an argument and not the verb
            if gold_tag == 'B-V':
                inside_argument = False
            elif gold_tag[0] != 'B':
                mistake = True
            
        elif net_tag[0] == 'I' and inside_argument:
            if not mistake and gold_tag[0] != 'I':
                mistake = True
    
    # if there was still an argument
    if inside_argument:
        predicted_args.append(cur_tag)
        if not mistake:
            correct_args.append(cur_tag)
        
    return (correct_args, predicted_args)
Returns
dataset/ETHPy150Open erickrf/nlpnet/bin/nlpnet-test.py/sentence_precision--crossover with--dataset/ETHPy150Open rizar/attention-lvcsr/libs/Theano/theano/sparse/basic.py/_is_dense_variable