majles_codes_update
This commit is contained in:
@@ -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 "اصلی"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user