Merged in feature/topSheetConditional (pull request #281)

Initial top sheet conditional commit

* Initial top sheet conditional commit

* Merged main into feature/topSheetConditional

* preprocessing_funcs.py edited online with Bitbucket
* Updated quick review docstring


Approved-by: Alex Galarce
This commit is contained in:
Katon Minhas
2024-11-22 15:30:01 +00:00
parent 27d81ff1d3
commit cb18f90a85
3 changed files with 30 additions and 5 deletions
+4 -3
View File
@@ -32,7 +32,9 @@ def run_ac_prompts(file_object):
print(f"Processing AC for {filename}...")
################## PREPROCESS - SMART CHUNK ##################
text_dict, exhibit_pages, num_pages, ac_chunks = preprocess.preprocess(
# Top Sheet Addition
text_dict, top_sheet_dict, exhibit_pages, num_pages, ac_chunks = preprocess.preprocess(
contract_text, filename, fields="ac"
)
print(f"AC Preprocessing Complete - {filename}")
@@ -54,7 +56,6 @@ def run_ac_prompts(file_object):
no_keyword_matches = []
for field_group in field_groups:
keyword_dict = keywords.GROUPED_KEYWORD_MAPPINGS[field_group]["keywords"]
fields = keywords.GROUPED_KEYWORD_MAPPINGS[field_group]["fields"]
fields.sort()
@@ -287,7 +288,7 @@ def run_b_prompts(file_object):
print(f"Processing B for {filename}...")
################## PREPROCESS ##################
text_dict, exhibit_pages, num_pages, ac_chunks = preprocess.preprocess(
text_dict, top_sheet_dict, exhibit_pages, num_pages, ac_chunks = preprocess.preprocess(
contract_text, filename, fields="b"
)
print(f"B Preprocessing Complete - {filename}")