def sentence_recall(network_tags, gold_tags, gold_tag_dict, network_tag_dict):
    inside_argument = False
    mistake = False
    cur_tag = ''
    correct_args = []
    existing_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 gold_tag[0] != 'I':
            # last argument ended
            existing_args.append(cur_tag)
            inside_argument = False
            if not mistake and net_tag[0] != 'I':
                correct_args.append(cur_tag)
            mistake = False
        
        if gold_tag[0] == 'B' and gold_tag != 'B-V':
            # a new argument starts here
            inside_argument = True
            cur_tag = gold_tag[2:]
            if net_tag != 'B':
                mistake = True
        
        elif gold_tag[0] == 'I' and gold_tag != 'I-V':
            # inside an argument
            if not mistake and net_tag[0] != 'I':
                mistake = True
        
        # the network answer doesn't matter to recall on other cases ("O")
        
    # verifies if last argument ended with the sentence
    if inside_argument:
        # last argument ended
        existing_args.append(cur_tag)
        if not mistake:
            correct_args.append(cur_tag)
    
    return (correct_args, existing_args)
Evaluates the network recall on a single sentence.
dataset/ETHPy150Open erickrf/nlpnet/bin/nlpnet-test.py/sentence_recall