<commit_before>#!/usr/bin/python3

from selkup_alphabet.Conv.srds import *
from selkup_alphabet.Conv.srsi import *


def short(string):
    string = string.replace("̄", "")
    string = string.replace("̈", "")
    return string


def unify(string, strict, soft, strict_only=False):
    strict_result = string
    for group in strict:
        for query in group[0]:
            strict_result = strict_result.replace(query, group[1])
    #
    soft_result = strict_result
    for group in soft:
        for query in group[0]:
            soft_result = soft_result.replace(query, ''.join(["?" for _ in range(len(query))]))
    if strict_only:
        return strict_result
    else:
        return strict_result, soft_result<commit_msg>run conv for titles<commit_after>#!/usr/bin/python3

from selkup_alphabet.Conv.srds import *
from selkup_alphabet.Conv.srsi import *


def short(string):
    string = string.replace("̄", "")
    string = string.replace("̈", "")
    return string


def unify(string, strict, soft, strict_only=False):
    strict_result = string
    for group in strict:
        for query in group[0]:
            strict_result = strict_result.replace(query, group[1])
            strict_result = strict_result.replace(query[0].upper() + query[1:], group[0].upper() + group[0][1:])
    #
    soft_result = strict_result
    for group in soft:
        for query in group[0]:
            soft_result = soft_result.replace(query, ''.join(["?" for _ in range(len(query))]))
    if strict_only:
        return strict_result
    else:
        return strict_result, soft_result
{'fraction_non_alphanumeric': 0.12192040429564119, 'fraction_numerical': 0.0082122552116235, 'mean_word_length': 3.0719794344473006, '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': '950497', 'n_tokens_mistral': 496, 'n_tokens_neox': 493, 'n_words': 121}