413567b74a552a66d93bca09fe82dd52e4d4e90f,nlp_architect/utils/metrics.py,,get_conll_scores,#Any#Any#Any#,66

Before Change


    temp_fname = tempfile.gettempdir() + \
        os.sep + \
        "".join([random.choice(string.ascii_letters) for _ in range(10)]) + "__conll_eval"
    with open(temp_fname, "w") as fp:
        for sample in prediction_data:
            for t, l, p in zip(*sample):
                fp.write("{} - {} {}\n".format(t, l, p))
            fp.write("\n")

    // run CoNLL benchmark
    scores = run_conlleval(temp_fname)
    os.remove(temp_fname)
    return scores

After Change


        prediction_data.append((test_yval, test_yval, prediction_y))

    data = []
    for s in prediction_data:
        for t, l, p in zip(*s):
            data.append("{} {} {}\n".format(t, l, p))
        data.append("\n")
    return run_conlleval(data)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: NervanaSystems/nlp-architect
Commit Name: 413567b74a552a66d93bca09fe82dd52e4d4e90f
Time: 2018-05-09
Author: peter.izsak@intel.com
File Name: nlp_architect/utils/metrics.py
Class Name:
Method Name: get_conll_scores


Project Name: streamlit/streamlit
Commit Name: c3ef7a43acd931ea2b354b2e6c04d340d2de3a29
Time: 2018-10-12
Author: thiagot@gmail.com
File Name: examples/run_on_save.py
Class Name:
Method Name:


Project Name: AKSHAYUBHAT/DeepVideoAnalytics
Commit Name: f90e1766f49888f5f905430eb432aa611d2a2873
Time: 2017-03-05
Author: akshayubhat@gmail.com
File Name: dvalib/facerecognition.py
Class Name:
Method Name: align