87f1ec81862468bd6381fd5a5d1579861a2a27d4,test/basic_test.py,,pmi_test,#Any#,194

Before Change


        alpha=0.0001,
        verbose=True)

    for pair, pmi in sorted(pmi_dok.items(), key=lambda x:-x[1])[100:110]:
        pair_ = (idx2vocab[pair[0]], idx2vocab[pair[1]])
        print("pmi {} = {:.3f}".format(pair_, pmi))
    print("computed PMI")


def main():

After Change


    print("col  shape = {}".format(cols.shape))
    print("data shape = {}".format(data.shape))

    for indpt in data.argsort()[-150:-100]:
        i = rows[indpt]
        j = cols[indpt]
        pair = (idx2vocab[i], idx2vocab[j])
        value = data[indpt]
        print("pmi {} = {:.3f}".format(pair, value))
    print("computed pmi")


def main():
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 9

Instances


Project Name: lovit/soynlp
Commit Name: 87f1ec81862468bd6381fd5a5d1579861a2a27d4
Time: 2019-02-17
Author: soy.lovit@gmail.com
File Name: test/basic_test.py
Class Name:
Method Name: pmi_test


Project Name: dmlc/dgl
Commit Name: ffe5898317c4f971483f649a1ffb53d81a29705a
Time: 2020-02-09
Author: classicxsong@gmail.com
File Name: apps/kg/eval.py
Class Name:
Method Name: main


Project Name: dpressel/mead-baseline
Commit Name: 71bd73748b835de5ae20bdc90ce4321e47f4c2b2
Time: 2019-09-25
Author: dpressel@gmail.com
File Name: python/eight_mile/tf/layers.py
Class Name: EmbeddingsStack
Method Name: call