ba5ce0dcacefae377a199b2b6115263528fa8bad,lexos/processors/analyze/topword.py,,analyze_all_to_para,#,96
Before Change
assert np.size(count_matrix) > 0, EMPTY_NP_ARRAY_MESSAGE
// initialize the value to return
all_results = []
count_matrix_sum = np.sum(count_matrix, axis=0)
// generate data
for _, row in enumerate(count_matrix):
// get analysis result
word_z_score_dict = _z_test_word_list_(count_list_i=row,
count_list_j=count_matrix_sum,
words=words)
// sort result and put into result list
sorted_list = sorted(list(word_z_score_dict.items()),
key=lambda item: abs(item[1]),
reverse=True)
all_results.append(sorted_list)
return all_results
def analyze_para_to_group(group_values: List[np.ndarray], words: np.ndarray) \
After Change
count_matrix_sum = np.sum(count_matrix, axis=0)
// generate data
all_results = [_z_test_word_list_(count_list_i=row,
count_list_j=count_matrix_sum,
words=words)
for _, row in enumerate(count_matrix)]
return all_results
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 11
Instances
Project Name: WheatonCS/Lexos
Commit Name: ba5ce0dcacefae377a199b2b6115263528fa8bad
Time: 2017-08-07
Author: weltch1997@gmail.com
File Name: lexos/processors/analyze/topword.py
Class Name:
Method Name: analyze_all_to_para
Project Name: WheatonCS/Lexos
Commit Name: d8cb4f0bb3d16ffe913457485eeb7aa276253a06
Time: 2017-08-03
Author: weltch1997@gmail.com
File Name: lexos/processors/analyze/topword.py
Class Name:
Method Name: analyze_group_to_group
Project Name: WheatonCS/Lexos
Commit Name: d8cb4f0bb3d16ffe913457485eeb7aa276253a06
Time: 2017-08-03
Author: weltch1997@gmail.com
File Name: lexos/processors/analyze/topword.py
Class Name:
Method Name: analyze_para_to_group