<jupyter_start><jupyter_text>Debate Headings<jupyter_code>headings = {"debate-list": {
            "head": { "chamber": {"name": house_name[0],
                                 "uri": house_uri},
                     "date-range": {"start": date, "end": date },
                     "search-terms": []
                    },
            "results": [{"debateRecord": {"uri": dbr_uri, "date": date, "headings": []}}]
        }}
for dbs in root.xpath(".//akn:debateSection[./akn:heading]", namespaces=AKN):
    dbs_uri = dbr_uri + "/" + dbs.attrib['eId']
    heading = dbs.find("./{*}heading").text
    data = {"uri": dbs_uri, "value": heading, "context": None}
    headings['debate-list']['results'][0]['debateRecord']['headings'].append({"heading":data})
with open("../debates/debate-list.json", "w") as f:
    json.dump(headings2, f, sort_keys=True, indent=2)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.21147356580427445, 'fraction_numerical': 0.0044994375703037125, 'mean_word_length': 2.8034188034188032, 'pattern_counts': {'":': 18, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '530899', 'license': 'CC-BY-4.0', 'n_tokens_mistral': 315, 'n_tokens_neox': 302, 'n_words': 49, 'path': 'notebooks/.ipynb_checkpoints/Debates_meta_XML-checkpoint.ipynb', 'repo_name': 'Houses-of-the-Oireachtas/ontology', 'size': '889'}