c9e73e23d952569574d23aafad6479caa5828b49,examples/np_semantic_segmentation/feature_extraction.py,PalmettoClass,get_pmi_score,#PalmettoClass#Any#,38
Before Change
// in order to normalize it
candidates.extend(candidates[0])
response_list = []
try:
response_list.append(
self.palmetto.get_coherence(candidates, coherence_type="npmi"))
response_list.append(
self.palmetto.get_coherence(candidates, coherence_type="uci"))
except CoherenceTypeNotAvailable:
response_list.extend([0, 0])
except EndpointDown:
response_list.extend([0, 0])
return response_list
def stem(w):
After Change
response_list.append(pmi_score[0])
else:
response_list.append(0)
chi_sq_score = self.chi_sq_dict[tuple(candidates)]
if chi_sq_score:
response_list.append(chi_sq_score[0])
else:
response_list.append(0)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: NervanaSystems/nlp-architect
Commit Name: c9e73e23d952569574d23aafad6479caa5828b49
Time: 2018-05-14
Author: amit.yaccobi@intel.com
File Name: examples/np_semantic_segmentation/feature_extraction.py
Class Name: PalmettoClass
Method Name: get_pmi_score
Project Name: microsoft/nni
Commit Name: 63697ec5f69a9e8f422841c03ca5f44c5c5ebc3a
Time: 2019-03-22
Author: 38930155+chicm-ms@users.noreply.github.com
File Name: src/sdk/pynni/tests/test_assessor.py
Class Name: AssessorTestCase
Method Name: test_assessor
Project Name: microsoft/nni
Commit Name: 63697ec5f69a9e8f422841c03ca5f44c5c5ebc3a
Time: 2019-03-22
Author: 38930155+chicm-ms@users.noreply.github.com
File Name: src/sdk/pynni/tests/test_tuner.py
Class Name: TunerTestCase
Method Name: test_tuner