<commit_before><commit_msg>added XSL for splitting the BM RDF into manageable chunks<commit_after><?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
    xmlns:nm="http://nomisma.org/id/" xmlns:void="http://rdfs.org/ns/void#" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:foaf="http://xmlns.com/foaf/0.1/"
    xmlns:nmo="http://nomisma.org/ontology#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" exclude-result-prefixes="xs" version="2.0">

    <xsl:strip-space elements="*"/>
    <xsl:output encoding="UTF-8" indent="yes"/>

    <xsl:variable name="files" select="('ric.1(2).', 'ric.2_1(2).', 'ric.2.', 'ric.3.', 'ric.4.', 'ric.5.', 'ric.6.', 'ric.7.', 'ric.8.', 'ric.9.', 'ric.10.', 'pella', 'crro')"/>

    <xsl:variable name="rdf" as="element()*">
        <xsl:copy-of select="/*"/>
    </xsl:variable>

    <xsl:template match="/">
        <xsl:for-each select="$files">
            <xsl:variable name="id" select="if (substring(., string-length(.), 1) = '.') then substring(., 1, (string-length(.) - 1)) else ." as="xs:string"/>
            
            <xsl:result-document href="{$id}.rdf">
                <rdf:RDF xmlns:xsd="http://www.w3.org/2001/XMLSchema#" xmlns:nm="http://nomisma.org/id/" xmlns:void="http://rdfs.org/ns/void#"
                    xmlns:dcterms="http://purl.org/dc/terms/" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:nmo="http://nomisma.org/ontology#"
                    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
                    <xsl:copy-of select="$rdf/descendant::nmo:NumismaticObject[contains(nmo:hasTypeSeriesItem/@rdf:resource, $id)]"/>
                </rdf:RDF>
            </xsl:result-document>
        </xsl:for-each>
    </xsl:template>

</xsl:stylesheet>
{'fraction_non_alphanumeric': 0.24266666666666667, 'fraction_numerical': 0.0352, 'mean_word_length': 3.123076923076923, 'pattern_counts': {'":': 0, '<': 22, '<?xml version=': 1, '>': 22, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, 'xml': 19}, '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': '7114237', 'n_tokens_mistral': 775, 'n_tokens_neox': 698, 'n_words': 85}