<commit_before>import random

from geodata.addresses.config import address_config
from geodata.addresses.numbering import NumberedComponent
from geodata.encoding import safe_decode


class HouseNumber(NumberedComponent):
    @classmethod
    def phrase(cls, number, language, country=None):
        if number is not None:
            prob_key = 'house_numbers.alphanumeric_phrase_probability'
            key = 'house_numbers.alphanumeric'
            dictionaries = ['house_numbers']
            default = safe_decode(number)
        else:
            prob_key = 'house_numbers.no_number_probability'
            key = 'house_numbers.no_number'
            dictionaries = ['no_number']
            default = None<commit_msg>[addresses] using the number dictionary for abbreviations in house number phrases as well<commit_after>import random

from geodata.addresses.config import address_config
from geodata.addresses.numbering import NumberedComponent
from geodata.encoding import safe_decode


class HouseNumber(NumberedComponent):
    @classmethod
    def phrase(cls, number, language, country=None):
        if number is not None:
            prob_key = 'house_numbers.alphanumeric_phrase_probability'
            key = 'house_numbers.alphanumeric'
            dictionaries = ['house_numbers', 'number']
            default = safe_decode(number)
        else:
            prob_key = 'house_numbers.no_number_probability'
            key = 'house_numbers.no_number'
            dictionaries = ['no_number']
            default = None
{'fraction_non_alphanumeric': 0.06966145833333333, 'fraction_numerical': 0.0, 'mean_word_length': 3.044736842105263, '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': '4543593', 'n_tokens_mistral': 422, 'n_tokens_neox': 406, 'n_words': 100}