<commit_before># coding=utf-8
from __future__ import unicode_literals
from collections import OrderedDict
from .. import Provider as PersonProvider


# Data source
#
# Data for this provider comes from the following source:
# Ministry of Interior, Deputy Secretary of State for Records
#
# 100 most frequent family names on record, 2016:
# http://www.kekkh.gov.hu/letoltes/statisztikak/kozerdeku_csaladnev_2016.xls
#
# 100 most frequent first names on record, 2016:
# http://www.kekkh.gov.hu/letoltes/statisztikak/kozerdeku_utonevek_2016.xls
#
# This information is in the public domain by virtue of being an official
# report issued by a part of the Government of Hungary.

# TODO:
# There is no accurate information about the frequency of differzent name
# schemata, so for that reason, equal frequency will be assumed in most cases,
# except for combinations that are widely known as headed for obsolescence.
# If such information could be obtained, the relative frequencies could be
# adjusted to yield a more realistic distribution of name patterns/schemata.


class Provider(PersonProvider):
    formats_male = OrderedDict((
        ('{{last_name}} {{first_name_male}}', 0.1), ('{{last_name}} {{last_name}} {{first_name_male}}', 0.1),
        ('{{last_name}} {{first_name_male}} {{first_name_male}}', 0.1),
        ('{{first_name_male_abbreviated}} {{last_name}} {{first_name_male}}', 0.1),
        ('{{last_name}} {{first_name_male_abbreviated}} {{first_name_male}}', 0.1),
        ('{{prefix}} {{last_name}} {{first_name_male}}', 0.05),
        ('{{prefix}} {{last_name}} {{last_name}} {{first_name_male}}', 0.05),
        ('{{prefix}} {{last_name}} {{first_name_male}} {{first_name_male}}', 0.05),
        ('{{prefix}} {{first_name_male_abbreviated}} {{last_name}} {{first_name_male}}', 0.05),
        ('{{prefix}} {{last_name}} {{first_name_male_abbreviated}} {{first_name_male}}', 0.05),))

    formats_female = OrderedDict((
        ('{{last_name}} {{first_name_female}}', 0.1),
        ('{{last_name}} {{last_name}} {{first_name_female}}', 0.1),
        ('{{last_name})} {{first_name_female}} {{first_name_female}}', 0.1),
        ('{{first_name_female_abbreviated}} {{last_name}} {{first_name_female}}', 0.1),
        ('{{last_name}} {{first_name_female_abbreviated}} {{first_name_female}}', 0.1),
        ('{{prefix}} {{last_name}} {{first_name_female}}', 0.05),
        ('{{prefix}} {{last_name}} {{last_name}} {{first_name_female}}', 0.05),<commit_msg>fixed female name format typo<commit_after># coding=utf-8
from __future__ import unicode_literals
from collections import OrderedDict
from .. import Provider as PersonProvider


# Data source
#
# Data for this provider comes from the following source:
# Ministry of Interior, Deputy Secretary of State for Records
#
# 100 most frequent family names on record, 2016:
# http://www.kekkh.gov.hu/letoltes/statisztikak/kozerdeku_csaladnev_2016.xls
#
# 100 most frequent first names on record, 2016:
# http://www.kekkh.gov.hu/letoltes/statisztikak/kozerdeku_utonevek_2016.xls
#
# This information is in the public domain by virtue of being an official
# report issued by a part of the Government of Hungary.

# TODO:
# There is no accurate information about the frequency of differzent name
# schemata, so for that reason, equal frequency will be assumed in most cases,
# except for combinations that are widely known as headed for obsolescence.
# If such information could be obtained, the relative frequencies could be
# adjusted to yield a more realistic distribution of name patterns/schemata.


class Provider(PersonProvider):
    formats_male = OrderedDict((
        ('{{last_name}} {{first_name_male}}', 0.1), ('{{last_name}} {{last_name}} {{first_name_male}}', 0.1),
        ('{{last_name}} {{first_name_male}} {{first_name_male}}', 0.1),
        ('{{first_name_male_abbreviated}} {{last_name}} {{first_name_male}}', 0.1),
        ('{{last_name}} {{first_name_male_abbreviated}} {{first_name_male}}', 0.1),
        ('{{prefix}} {{last_name}} {{first_name_male}}', 0.05),
        ('{{prefix}} {{last_name}} {{last_name}} {{first_name_male}}', 0.05),
        ('{{prefix}} {{last_name}} {{first_name_male}} {{first_name_male}}', 0.05),
        ('{{prefix}} {{first_name_male_abbreviated}} {{last_name}} {{first_name_male}}', 0.05),
        ('{{prefix}} {{last_name}} {{first_name_male_abbreviated}} {{first_name_male}}', 0.05),))

    formats_female = OrderedDict((
        ('{{last_name}} {{first_name_female}}', 0.1),
        ('{{last_name}} {{last_name}} {{first_name_female}}', 0.1),
        ('{{last_name}} {{first_name_female}} {{first_name_female}}', 0.1),
        ('{{first_name_female_abbreviated}} {{last_name}} {{first_name_female}}', 0.1),
        ('{{last_name}} {{first_name_female_abbreviated}} {{first_name_female}}', 0.1),
        ('{{prefix}} {{last_name}} {{first_name_female}}', 0.05),
        ('{{prefix}} {{last_name}} {{last_name}} {{first_name_female}}', 0.05),
{'fraction_non_alphanumeric': 0.16495053502927517, 'fraction_numerical': 0.025842923480718757, 'mean_word_length': 4.932934131736527, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, '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': '4215716', 'n_tokens_mistral': 1750, 'n_tokens_neox': 1581, 'n_words': 423}