Sriramsr3 commited on
Commit
413200d
·
verified ·
1 Parent(s): ca63b6d

Update rag_chain.py

Browse files
Files changed (1) hide show
  1. rag_chain.py +5 -0
rag_chain.py CHANGED
@@ -78,6 +78,11 @@ def clean_and_normalize_text(text: str) -> str:
78
  text = text.replace("Section C.1.", "\n[WAITING_PERIOD]\nSection C.1.")
79
  text = text.replace("Section C.2.", "\n[STANDARD_EXCLUSIONS]\nSection C.2.")
80
  text = text.replace("Section C.3.", "\n[SPECIFIC_EXCLUSIONS]\nSection C.3.")
 
 
 
 
 
81
 
82
  text = re.sub(r'\nPage \d+\s*\|.*?\n', '\n', text)
83
  text = re.sub(r'HDFC ERGO.*?license\.', '', text, flags=re.DOTALL)
 
78
  text = text.replace("Section C.1.", "\n[WAITING_PERIOD]\nSection C.1.")
79
  text = text.replace("Section C.2.", "\n[STANDARD_EXCLUSIONS]\nSection C.2.")
80
  text = text.replace("Section C.3.", "\n[SPECIFIC_EXCLUSIONS]\nSection C.3.")
81
+ text = text.replace("Specified disease/procedure waiting period (Excl02)", "\n[EXCL02_SPECIFIC_DISEASE]\nSpecified disease/procedure waiting period (Excl02)")
82
+ text = text.replace("Pre-existing Diseases (Excl01)", "\n[EXCL01_PRE_EXISTING]\nPre-existing Diseases (Excl01)")
83
+ text = text.replace("Room Rent Limit", "\n[ROOM_RENT_LIMIT]\nRoom Rent Limit")
84
+ text = text.replace("Ayush Benefit", "\n[AYUSH_BENEFIT]\nAyush Benefit")
85
+ text = text.replace("Ectopic pregnancy", "\n[EXCEPTION_ECTOPIC]\nEctopic pregnancy")
86
 
87
  text = re.sub(r'\nPage \d+\s*\|.*?\n', '\n', text)
88
  text = re.sub(r'HDFC ERGO.*?license\.', '', text, flags=re.DOTALL)