bank service update [config]
This commit is contained in:
@@ -173,9 +173,9 @@ def account_records_search():
|
||||
fs, ac = similarity_result.get("similarity"), account_record.similarity or 0
|
||||
if float(fs) >= 0.8 and float(fs) > float(ac):
|
||||
found_list.append(similarity_result)
|
||||
# account_save_search_result(
|
||||
# account_record=account_record, similarity_result=similarity_result
|
||||
# )
|
||||
account_save_search_result(
|
||||
account_record=account_record, similarity_result=similarity_result
|
||||
)
|
||||
else:
|
||||
similarity_result = parse_comment_with_name_iban_description(
|
||||
account_record=account_record
|
||||
@@ -183,9 +183,9 @@ def account_records_search():
|
||||
fs, ac = similarity_result.get("similarity"), account_record.similarity or 0
|
||||
if float(fs) >= 0.8 and float(fs) > float(ac):
|
||||
found_list.append(similarity_result)
|
||||
# account_save_search_result(
|
||||
# account_record=account_record, similarity_result=similarity_result
|
||||
# )
|
||||
account_save_search_result(
|
||||
account_record=account_record, similarity_result=similarity_result
|
||||
)
|
||||
print("Account Records Search : ", len(found_list), "/", len(account_records_list))
|
||||
return
|
||||
|
||||
@@ -323,9 +323,9 @@ def send_accounts_to_decision_payment():
|
||||
|
||||
|
||||
def account_records_service() -> None:
|
||||
# account_records_find_decision_book()
|
||||
account_records_find_decision_book()
|
||||
account_records_search()
|
||||
# send_accounts_to_decision_payment()
|
||||
send_accounts_to_decision_payment()
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -1,2 +1,8 @@
|
||||
class AccountConfig:
|
||||
BEFORE_DAY = 30
|
||||
CATEGORIES = {
|
||||
"DAIRE": ["daire", "dagire", "daare", "nolu daire", "no", "nolu dairenin"],
|
||||
"APARTMAN": ["apartman", "aparman", "aprmn"],
|
||||
"VILLA": ["villa", "vlla"],
|
||||
"BINA": ["bina", "binna"]
|
||||
}
|
||||
|
||||
@@ -1,13 +1,7 @@
|
||||
import re
|
||||
|
||||
from difflib import get_close_matches
|
||||
|
||||
|
||||
categories = {
|
||||
"DAIRE": ["daire", "dagire", "daare", "nolu daire", "no", "nolu dairenin"],
|
||||
"APARTMAN": ["apartman", "aparman", "aprmn"],
|
||||
"VILLA": ["villa", "vlla"],
|
||||
"BINA": ["bina", "binna"]
|
||||
}
|
||||
from service_account_records.configs import AccountConfig
|
||||
|
||||
|
||||
def word_straighten(word, ref_list, threshold=0.8):
|
||||
@@ -16,6 +10,7 @@ def word_straighten(word, ref_list, threshold=0.8):
|
||||
|
||||
|
||||
def category_finder(text, output_template="{kategori} {numara}"):
|
||||
categories = AccountConfig.CATEGORIES
|
||||
result = {category: [] for category in categories} # Sonuçları depolamak için bir sözlük
|
||||
for category, patterns in categories.items():
|
||||
words = re.split(r'\W+', text)
|
||||
|
||||
Reference in New Issue
Block a user