<commit_before>DOMAIN_LIST = ["naver", "daum", "dcinside", "nate", ]

def is_masquerading(url):
    for domain_keyword in DOMAIN_LIST:
        if domain_keyword in url:
            domain = get_domain(url)
            if domain_keyword in domain:
                return "S"
            else:
                return "P"
        else:
            return "U"

def get_domain(url):
    temp = url.index("/")
    try:
        temp = url[temp + 2:].index("/") + temp + 2
    except:
        temp = len(url) + temp + 2

    url_parsed = url[:temp]
    domain_end = temp

    temp = url_parsed.rfind('.')
    domain_start = url_parsed[:temp].rfind('.')
    if domain_start == -1:
        domain_start = url_parsed[:temp].rfind('/')
    domain = url[domain_start + 1:domain_end]

    return domain<commit_msg>Improve is_masquerading() by converting url to lowercase<commit_after>DOMAIN_LIST = ["naver", "daum", "nate",]

def is_masquerading(url):
    for domain_keyword in DOMAIN_LIST:
        if domain_keyword in url.lower():
            domain = get_domain(url)
            if domain_keyword in domain:
                return "S"
            else:
                return "P"
        else:
            return "U"

def get_domain(url):
    temp = url.index("/")
    try:
        temp = url[temp + 2:].index("/") + temp + 2
    except:
        temp = len(url) + temp + 2

    url_parsed = url[:temp]
    domain_end = temp

    temp = url_parsed.rfind('.')
    domain_start = url_parsed[:temp].rfind('.')
    if domain_start == -1:
        domain_start = url_parsed[:temp].rfind('/')
    domain = url[domain_start + 1:domain_end]

    return domain
{'fraction_non_alphanumeric': 0.13064713064713065, 'fraction_numerical': 0.006105006105006105, 'mean_word_length': 2.1159695817490496, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1340105', 'n_tokens_mistral': 539, 'n_tokens_neox': 531, 'n_words': 128}