2bc9b7b91658baaf9717dba6565df203154d7cc9,textacy/keyterms.py,,sgrank,#Any#Any#Any#Any#Any#,25

Before Change


                        if start_ind <= term[1] <= end_ind)
        // get all token combinations within window
        for t1, t2 in itertools.combinations(window_terms, 2):
            if t1 == t2:
                continue
            n_coocs[t1[0]][t2[0]] += 1
            try:
                sum_logdists[t1[0]][t2[0]] += \
                    log_(window_width / abs(t1[1] - t2[1]))
            except ZeroDivisionError:  // HACK: pretend that they"re 1 token apart
                sum_logdists[t1[0]][t2[0]] += log_(window_width)
        if end_ind > n_toks:
            break

    // compute edge weights between co-occurring terms (nodes)

After Change


        // get all token combinations within window
        for t1, t2 in itertools.combinations(window_terms, 2):
            n_coocs[t1[0]][t2[0]] += 1
            sum_logdists[t1[0]][t2[0]] += log_(window_width / max(abs(t1[1] - t2[1]), 1))
        if end_ind > n_toks:
            break
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: chartbeat-labs/textacy
Commit Name: 2bc9b7b91658baaf9717dba6565df203154d7cc9
Time: 2016-12-06
Author: burton@chartbeat.com
File Name: textacy/keyterms.py
Class Name:
Method Name: sgrank


Project Name: NifTK/NiftyNet
Commit Name: 95d6cf194274246ee029416186f60806617d8fe6
Time: 2017-07-10
Author: r.gray@ucl.ac.uk
File Name: engine/training.py
Class Name:
Method Name: run


Project Name: NifTK/NiftyNet
Commit Name: aef60c84d7ad8b5fb852f2dec16b2a8de838a321
Time: 2017-07-10
Author: eli.gibson@gmail.com
File Name: engine/training.py
Class Name:
Method Name: run