Merged in hotfix/file-errors (pull request #448)
Hotfix/file errors * Set up test file * Fix regex pattern in json.loads * bug fix No valid JSON object found in the input string * bug fixes * moved try statement to parse fn * invalid literal for int() with base 10 error fixed * remove test * remove excess print statements * Raise error * Remove todo * Remove print statement Approved-by: Katon Minhas
This commit is contained in:
committed by
Katon Minhas
parent
31b2936ae6
commit
138ac82fa2
@@ -22,7 +22,10 @@ def remove_page_indicators(contract_text: str) -> str:
|
||||
str: cleaned text with newlines and page number indicators removed
|
||||
"""
|
||||
|
||||
cleaned_text = re.sub(r"Page [0-9]+ of [0-9]+\n\n", " ", contract_text) # TODO: fix in main branch
|
||||
if contract_text:
|
||||
cleaned_text = re.sub(r"Page [0-9]+ of [0-9]+\n\n", " ", contract_text)
|
||||
else:
|
||||
cleaned_text = contract_text
|
||||
return cleaned_text
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user