(file_ls,queue,query_result,max_k)
| 142 | return result |
| 143 | |
| 144 | def online_query(file_ls,queue,query_result,max_k): |
| 145 | for filename in file_ls: |
| 146 | if filename.endswith('.csv'): |
| 147 | # 构建完整的文件路径 |
| 148 | file_path = os.path.join(query_folder_path, filename) |
| 149 | file_label_path = os.path.join(query_label_path, filename) |
| 150 | |
| 151 | query_label_df = pd.read_csv(file_label_path) |
| 152 | |
| 153 | query_second_column = read_sencond_column(file_label_path ) |
| 154 | |
| 155 | # query_path = r'tar1.csv' |
| 156 | query_path_df = pd.read_csv(file_path,low_memory=False,lineterminator='\n',) |
| 157 | |
| 158 | result = all_entity_score(query_label_df, query_second_column, fnames, cand_value_labels, second_column, 2, 2 |
| 159 | , all_candidate_attribute, query_path_df) |
| 160 | file_result = find_largest_(result, max_k) |
| 161 | tmp = {} |
| 162 | tmp[filename] = file_result |
| 163 | query_result.put(tmp) |
| 164 | queue.put(1) |
| 165 | queue.put((-1, "test-pid")) |
| 166 | |
| 167 | s = time.time() |
| 168 | query_result = multiprocessing.Manager().Queue() |
nothing calls this directly
no test coverage detected