Bug fixes
This commit is contained in:
committed by
Michael McGuinness
parent
23ef950f36
commit
9d051af3a2
@@ -13,6 +13,8 @@ import merge_funcs
|
||||
|
||||
def process_file(file_object):
|
||||
"""
|
||||
file_object = (filename , "file contents in one string"}
|
||||
|
||||
Processes a single file object containing text data from a contract.
|
||||
|
||||
This function orchestrates the full processing workflow for a single document, including:
|
||||
@@ -70,10 +72,10 @@ def process_file(file_object):
|
||||
|
||||
################## RUN POSTPROCESSING ##################
|
||||
# combined_df = combined_df.applymap(postprocessingfuncs.sanitize_value) # Deprecated
|
||||
combined_df = combined_df.apply(lambda x: x.map(postprocessingfuncs.sanitize_value))
|
||||
|
||||
|
||||
post_processed_combined_df = postprocess.postprocess_results(combined_df)
|
||||
post_processed_combined_df.to_csv(os.path.join(output_dir, config.PROCESSED_RESULTS_NAME), index=False)
|
||||
post_processed_combined_df.to_excel(os.path.join(output_dir, config.PROCESSED_RESULTS_NAME), index=False)
|
||||
print(f"Postprocessing Complete - {filename} ")
|
||||
|
||||
print(f"Output Complete - {filename} ")
|
||||
|
||||
+2
-2
@@ -10,7 +10,7 @@ import utils
|
||||
import postprocessingfuncs
|
||||
|
||||
def get_least_similar(dict_list, original_dict, field):
|
||||
print(f"Running similarity for {field}")
|
||||
# print(f"Running similarity for {field}")
|
||||
|
||||
min_similarity = float('inf')
|
||||
least_similar_dict = None
|
||||
@@ -31,7 +31,7 @@ def get_least_similar(dict_list, original_dict, field):
|
||||
return least_similar_dict
|
||||
|
||||
def get_lesser_of_dict(dict_list, original_dict):
|
||||
|
||||
|
||||
unique_rates = list({d['REIMBURSEMENT_RATE'] for d in dict_list})
|
||||
unique_fees = list({d['REIMBURSEMENT_FLAT_FEE'] for d in dict_list})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user