<commit_before>from data_collection.management.commands import BaseXpressDemocracyClubCsvImporter


class Command(BaseXpressDemocracyClubCsvImporter):
    council_id = "E07000119"
    addresses_name = "parl.2017-06-08/Version 1/Fylde Democracy_Club__08June2017.CSV"
    stations_name = "parl.2017-06-08/Version 1/Fylde Democracy_Club__08June2017.CSV"
    elections = ["parl.2017-06-08"]<commit_msg>import script for Fylde (closes #1479)<commit_after>from data_collection.management.commands import BaseXpressDemocracyClubCsvImporter


class Command(BaseXpressDemocracyClubCsvImporter):
    council_id = "E07000119"
    addresses_name = "local.2019-05-02/Version 1/Fylde-Democracy_Club__02May2019.csv"
    stations_name = "local.2019-05-02/Version 1/Fylde-Democracy_Club__02May2019.csv"
    elections = ["local.2019-05-02"]

    def address_record_to_dict(self, record):
        uprn = record.property_urn.strip().lstrip("0")

        if uprn in ("200001037742", "200001037759"):
            rec = super().address_record_to_dict(record)
            rec["postcode"] = "PR4 0RL"
            return rec

        if uprn == "100012391142":
            rec = super().address_record_to_dict(record)
            rec["postcode"] = "PR4 0RN"
            return rec

        if uprn == "200001128516":
            rec = super().address_record_to_dict(record)
            rec["postcode"] = "FY6 9BU"
            return rec

        return super().address_record_to_dict(record)
{'fraction_non_alphanumeric': 0.10580204778156997, 'fraction_numerical': 0.10307167235494881, 'mean_word_length': 3.4424242424242424, 'pattern_counts': {'":': 2, '<': 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': '1117983', 'n_tokens_mistral': 603, 'n_tokens_neox': 490, 'n_words': 77}