File size: 668 Bytes
9688084
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
def classify_loan(text):
    t = text.lower()

    if "ืžืชื•ื•ื” ื‘ื ืง ื™ืฉืจืืœ" in t or "ืจื™ื‘ื™ืช 0" in t:
        return "SPECIAL_FIXED_0", "fixed", False, 0.99

    if "ืคืจื™ื™ื" in t:
        return "PRIME", "variable", False, 0.95

    if "ืงื‘ื•ืขื”" in t and "ืœื ืฆืžื•ื“" in t:
        return "FLAC", "fixed", False, 0.93

    if "ืžืฉืชื ื”" in t and "ืœื ืฆืžื•ื“" in t:
        return "VNL", "variable", False, 0.92

    if "ืงื‘ื•ืขื”" in t and "ืžื“ื“" in t:
        return "CI_FIXED", "fixed", True, 0.93

    if "ืžืฉืชื ื”" in t and "ืžื“ื“" in t:
        return "CI_VARIABLE", "variable", True, 0.92

    return "UNKNOWN", None, None, 0.50