majles_codes_update

This commit is contained in:
hsafaei
2025-11-06 11:41:24 +03:30
parent 498c3c4bd1
commit aa47259860
10 changed files with 1569 additions and 476 deletions
+7 -3
View File
@@ -935,7 +935,13 @@ def getTitleType(caption: str) -> str:
caption = re.sub(r'\s+', ' ', caption.strip()) # حذف فاصله‌های اضافی
caption = caption.replace('\u200c', ' ') # جایگزینی نیم‌فاصله‌ها با فاصله کامل
if caption.startswith("الحاق ") or caption.startswith("قانون الحاق ") or caption.startswith("قانون الحاقیه "):
if "موافقتنامه" in caption or "موافقت نامه" in caption or "کنوانسیون" in caption or \
"قرارداد بین المللی" in caption or "مقررات بین المللی" in caption or "الحاق دولت" in caption or \
"الحاق ایران" in caption or "قرارداد بین المللی" in caption or \
caption.startswith("قانون عضویت دولت") or caption.startswith("قانون عضویت ایران") or caption.startswith("قانون اجازه عضویت"):
return "موافقتنامه"
elif caption.startswith("الحاق ") or caption.startswith("قانون الحاق ") or caption.startswith("قانون الحاقیه "):
return "الحاقی"
elif re.match(r"^قانون اضافه.*قانون", caption):
return "الحاقی"
@@ -986,8 +992,6 @@ def getTitleType(caption: str) -> str:
elif caption.startswith("قانون موقتی ") or caption.startswith("قانون موقت "):
return "موقتی"
elif "موافقتنامه" in caption or "موافقت نامه" in caption:
return "موافقتنامه"
else:
return "اصلی"