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")
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():
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
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: tensorflow/models
Commit Name: cce6c09b1c11350f135f07322855f5b9ab7f5b03
Time: 2019-03-06
Author: rodryeluno@hotmail.com
File Name: research/im2txt/im2txt/inference_utils/caption_generator.py
Class Name: CaptionGenerator
Method Name: beam_search
Project Name: scipy/scipy
Commit Name: fc8c9693b2505b48b1e3dc7c2e477e757d42e549
Time: 2015-04-11
Author: pav@iki.fi
File Name: scipy/sparse/linalg/_onenormest.py
Class Name:
Method Name: _algorithm_2_2