<commit_before><?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:res="http://www.w3.org/2005/sparql-results#"
	xmlns:pelagios="http://pelagios.github.io/vocab/terms#" xmlns:relations="http://pelagios.github.io/vocab/relations#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
	xmlns:void="http://rdfs.org/ns/void#" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:oa="http://www.w3.org/ns/oa#" xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
	xmlns:foaf="http://xmlns.com/foaf/0.1/" exclude-result-prefixes="#all" version="2.0">

	<xsl:variable name="url" select="/content/config/url"/>
	<xsl:variable name="perPage" select="5000"/>

	<xsl:template match="/">
		<rdf:RDF xmlns:skos="http://www.w3.org/2004/02/skos/core#" xmlns:nm="http://nomisma.org/id/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dcterms="http://purl.org/dc/terms/"
			xmlns:void="http://rdfs.org/ns/void#" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:oac="http://www.openannotation.org/ns/" xmlns:owl="http://www.w3.org/2002/07/owl#">
			<void:Dataset rdf:about="{$url}#objects">
				<dcterms:title>Nomisma.org Partner Objects</dcterms:title>
				<dcterms:description>Pleiades annotations relating to coins of Nomisma.org partners, made available through semantic reasoning between typologies, Nomisma SKOS concepts, and Pleiades
					URIs. Organizations that directly contribute to Pelagios (e.g., American Numismatic Society) are supressed from this data dump.</dcterms:description>
				<dcterms:rights>Nomisma integrates coins from archaeological and museum databases that have varying degrees of open licensing. See the dcterms:license within void:subsets for specific
					conditions.</dcterms:rights>
				<dcterms:subject rdf:resource="http://dbpedia.org/resource/Annotation"/>
				
				<xsl:apply-templates select="/content/res:sparql[1]/descendant::res:result" mode="void:subset"/>
				
				<xsl:call-template name="dumps">
					<xsl:with-param name="count" select="/content/res:sparql[2]//res:binding[@name='count']/res:literal"/>
				</xsl:call-template>				
			</void:Dataset>

			<xsl:apply-templates select="/content/res:sparql[1]/descendant::res:result" mode="void:Dataset"/>


		</rdf:RDF>
	</xsl:template>

	<xsl:template match="res:result" mode="void:subset">
		<void:subset rdf:resource="{res:binding[@name='dataset']/res:uri}"/>
	</xsl:template>

	<xsl:template match="res:result" mode="void:Dataset">
		<void:Dataset rdf:about="{res:binding[@name='dataset']/res:uri}">
			<dcterms:title>
				<xsl:if test="@xml:lang">
					<xsl:attribute name="xml:lang" select="@xml:lang"/>
				</xsl:if>
				<xsl:value-of select="res:binding[@name='title']/res:literal"/>
			</dcterms:title>
			<dcterms:description>
				<xsl:if test="@xml:lang">
					<xsl:attribute name="xml:lang" select="@xml:lang"/>
				</xsl:if>
				<xsl:value-of select="res:binding[@name='description']/res:literal"/>
			</dcterms:description>
			<dcterms:publisher>
				<xsl:value-of select="res:binding[@name='publisher']/res:literal"/>
			</dcterms:publisher>
			<xsl:if test="res:binding[@name='license']">
				<dcterms:license>
					<xsl:choose>
						<xsl:when test="res:uri">
							<xsl:attribute name="rdf:resource" select="res:uri"/>
						</xsl:when>
						<xsl:otherwise>
							<xsl:value-of select="res:literal"/>
						</xsl:otherwise>
					</xsl:choose>
				</dcterms:license>
			</xsl:if>
			<xsl:if test="res:binding[@name='rights']">
				<dcterms:rights>
					<xsl:choose>
						<xsl:when test="res:uri">
							<xsl:attribute name="rdf:resource" select="res:uri"/>
						</xsl:when>
						<xsl:otherwise>
							<xsl:value-of select="res:literal"/>
						</xsl:otherwise>
					</xsl:choose>
				</dcterms:rights>
			</xsl:if>
			<dcterms:isPartOf rdf:source="{$url}#objects"/>
		</void:Dataset>
	</xsl:template>

	<xsl:template name="dumps">
		<xsl:param name="count"/>
		<commit_msg>slight tweak on rights/license<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:res="http://www.w3.org/2005/sparql-results#"
	xmlns:pelagios="http://pelagios.github.io/vocab/terms#" xmlns:relations="http://pelagios.github.io/vocab/relations#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
	xmlns:void="http://rdfs.org/ns/void#" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:oa="http://www.w3.org/ns/oa#" xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
	xmlns:foaf="http://xmlns.com/foaf/0.1/" exclude-result-prefixes="#all" version="2.0">

	<xsl:variable name="url" select="/content/config/url"/>
	<xsl:variable name="perPage" select="5000"/>

	<xsl:template match="/">
		<rdf:RDF xmlns:skos="http://www.w3.org/2004/02/skos/core#" xmlns:nm="http://nomisma.org/id/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dcterms="http://purl.org/dc/terms/"
			xmlns:void="http://rdfs.org/ns/void#" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:oac="http://www.openannotation.org/ns/" xmlns:owl="http://www.w3.org/2002/07/owl#">
			<void:Dataset rdf:about="{$url}#objects">
				<dcterms:title>Nomisma.org Partner Objects</dcterms:title>
				<dcterms:description>Pleiades annotations relating to coins of Nomisma.org partners, made available through semantic reasoning between typologies, Nomisma SKOS concepts, and Pleiades
					URIs. Organizations that directly contribute to Pelagios (e.g., American Numismatic Society) are supressed from this data dump.</dcterms:description>
				<dcterms:rights>Nomisma integrates coins from archaeological and museum databases that have varying degrees of open licensing. See the dcterms:license within void:subsets for specific
					conditions.</dcterms:rights>
				<dcterms:subject rdf:resource="http://dbpedia.org/resource/Annotation"/>
				
				<xsl:apply-templates select="/content/res:sparql[1]/descendant::res:result" mode="void:subset"/>
				
				<xsl:call-template name="dumps">
					<xsl:with-param name="count" select="/content/res:sparql[2]//res:binding[@name='count']/res:literal"/>
				</xsl:call-template>				
			</void:Dataset>

			<xsl:apply-templates select="/content/res:sparql[1]/descendant::res:result" mode="void:Dataset"/>


		</rdf:RDF>
	</xsl:template>

	<xsl:template match="res:result" mode="void:subset">
		<void:subset rdf:resource="{res:binding[@name='dataset']/res:uri}"/>
	</xsl:template>

	<xsl:template match="res:result" mode="void:Dataset">
		<void:Dataset rdf:about="{res:binding[@name='dataset']/res:uri}">
			<dcterms:title>
				<xsl:if test="@xml:lang">
					<xsl:attribute name="xml:lang" select="@xml:lang"/>
				</xsl:if>
				<xsl:value-of select="res:binding[@name='title']/res:literal"/>
			</dcterms:title>
			<dcterms:description>
				<xsl:if test="@xml:lang">
					<xsl:attribute name="xml:lang" select="@xml:lang"/>
				</xsl:if>
				<xsl:value-of select="res:binding[@name='description']/res:literal"/>
			</dcterms:description>
			<dcterms:publisher>
				<xsl:value-of select="res:binding[@name='publisher']/res:literal"/>
			</dcterms:publisher>
			<xsl:apply-templates select="res:binding[@name='license']|res:binding[@name='rights']"/>
			<dcterms:isPartOf rdf:source="{$url}#objects"/>
		</void:Dataset>
	</xsl:template>
	
	<xsl:template match="res:binding[@name='license']|res:binding[@name='rights']">
		<xsl:element name="dcterms:{@name}" namespace="http://purl.org/dc/terms/">
			<xsl:choose>
				<xsl:when test="res:uri">
					<xsl:attribute name="rdf:resource" select="res:uri"/>
				</xsl:when>
				<xsl:otherwise>
					<xsl:value-of select="res:literal"/>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:element>
	</xsl:template>

	<xsl:template name="dumps">
		<xsl:param name="count"/>
		
{'fraction_non_alphanumeric': 0.2038959374599513, 'fraction_numerical': 0.01768550557477893, 'mean_word_length': 4.989255564082885, 'pattern_counts': {'":': 0, '<': 134, '<?xml version=': 2, '>': 134, 'https://': 0, 'lorem ipsum': 0, 'www.': 20, 'xml': 56}, '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': '1458697', 'n_tokens_mistral': 3435, 'n_tokens_neox': 2828, 'n_words': 376}