Spaces:
Runtime error
Runtime error
Update InitialMarkups.py
Browse files- InitialMarkups.py +12 -12
InitialMarkups.py
CHANGED
|
@@ -814,12 +814,12 @@ def extract_section_under_header(multiplePDF_Paths):
|
|
| 814 |
combined_line_norm = line_text_norm
|
| 815 |
|
| 816 |
# Check if we should continue processing
|
| 817 |
-
if combined_line_norm and combined_line_norm in paths[0]:
|
| 818 |
|
| 819 |
-
|
| 820 |
-
if combined_line_norm and combined_line_norm in paths[-2]:
|
| 821 |
|
| 822 |
-
|
| 823 |
if 'installation' in paths[-2].lower() or 'execution' in paths[-2].lower() or 'miscellaneous items' in paths[-2].lower() :
|
| 824 |
stringtowrite='Not to be billed'
|
| 825 |
else:
|
|
@@ -1681,12 +1681,12 @@ def extract_section_under_header_tobebilled2(pdf_path):
|
|
| 1681 |
combined_line_norm = line_text_norm
|
| 1682 |
|
| 1683 |
# Check if we should continue processing
|
| 1684 |
-
if combined_line_norm and combined_line_norm in paths[0]:
|
| 1685 |
|
| 1686 |
-
|
| 1687 |
-
if combined_line_norm and combined_line_norm in paths[-2]:
|
| 1688 |
|
| 1689 |
-
|
| 1690 |
# if 'installation' in paths[-2].lower() or 'execution' in paths[-2].lower() or 'miscellaneous items' in paths[-2].lower() :
|
| 1691 |
last_path = paths[-2].lower()
|
| 1692 |
# if any(word in paths[-2].lower() for word in keywordstoSkip):
|
|
@@ -2134,12 +2134,12 @@ def extract_section_under_header_tobebilledMultiplePDFS(multiplePDF_Paths):
|
|
| 2134 |
combined_line_norm = line_text_norm
|
| 2135 |
|
| 2136 |
# Check if we should continue processing
|
| 2137 |
-
if combined_line_norm and combined_line_norm in paths[0]:
|
| 2138 |
|
| 2139 |
-
|
| 2140 |
-
if combined_line_norm and combined_line_norm in paths[-2]:
|
| 2141 |
|
| 2142 |
-
|
| 2143 |
# if 'installation' in paths[-2].lower() or 'execution' in paths[-2].lower() or 'miscellaneous items' in paths[-2].lower() :
|
| 2144 |
last_path = paths[-2].lower()
|
| 2145 |
# if any(word in paths[-2].lower() for word in keywordstoSkip):
|
|
|
|
| 814 |
combined_line_norm = line_text_norm
|
| 815 |
|
| 816 |
# Check if we should continue processing
|
| 817 |
+
# if combined_line_norm and combined_line_norm in paths[0]:
|
| 818 |
|
| 819 |
+
# headertoContinue1 = combined_line_norm
|
| 820 |
+
# if combined_line_norm and combined_line_norm in paths[-2]:
|
| 821 |
|
| 822 |
+
# headertoContinue2 = combined_line_norm
|
| 823 |
if 'installation' in paths[-2].lower() or 'execution' in paths[-2].lower() or 'miscellaneous items' in paths[-2].lower() :
|
| 824 |
stringtowrite='Not to be billed'
|
| 825 |
else:
|
|
|
|
| 1681 |
combined_line_norm = line_text_norm
|
| 1682 |
|
| 1683 |
# Check if we should continue processing
|
| 1684 |
+
# if combined_line_norm and combined_line_norm in paths[0]:
|
| 1685 |
|
| 1686 |
+
# headertoContinue1 = combined_line_norm
|
| 1687 |
+
# if combined_line_norm and combined_line_norm in paths[-2]:
|
| 1688 |
|
| 1689 |
+
# headertoContinue2 = combined_line_norm
|
| 1690 |
# if 'installation' in paths[-2].lower() or 'execution' in paths[-2].lower() or 'miscellaneous items' in paths[-2].lower() :
|
| 1691 |
last_path = paths[-2].lower()
|
| 1692 |
# if any(word in paths[-2].lower() for word in keywordstoSkip):
|
|
|
|
| 2134 |
combined_line_norm = line_text_norm
|
| 2135 |
|
| 2136 |
# Check if we should continue processing
|
| 2137 |
+
# if combined_line_norm and combined_line_norm in paths[0]:
|
| 2138 |
|
| 2139 |
+
# headertoContinue1 = combined_line_norm
|
| 2140 |
+
# if combined_line_norm and combined_line_norm in paths[-2]:
|
| 2141 |
|
| 2142 |
+
# headertoContinue2 = combined_line_norm
|
| 2143 |
# if 'installation' in paths[-2].lower() or 'execution' in paths[-2].lower() or 'miscellaneous items' in paths[-2].lower() :
|
| 2144 |
last_path = paths[-2].lower()
|
| 2145 |
# if any(word in paths[-2].lower() for word in keywordstoSkip):
|