<commit_before><?xml version="1.0" encoding="UTF-8"?>

<metamorph xmlns="http://www.culturegraph.org/metamorph" version="1">

    <vars>
        <var name="swissbib_domain" value="http://data.swissbib.ch/resource/"/>
    </vars>

    <include xmlns="http://www.w3.org/2001/XInclude" href="morphModules/authorHash100.xml" parse="xml"/>
    <include xmlns="http://www.w3.org/2001/XInclude" href="morphModules/authorHash700.xml" parse="xml"/>

    <rules>

        <!--BUILD THE BASIS RECORD -->

        <!--100 first indicator 0-->
        <entity name="--" flushWith="245??">
            <data name="_id" source="@key1000"/>
            <data name="@id" source="@key1000">
                <compose prefix="http://data.swissbib.ch/person/"/>
            </data>

            <!--RDF TYPE (CLASS)-->

            <data source="1000 " name="@type">
                <constant value="http://xmlns.com/foaf/0.1/Person"/>
            </data>

            <!--REFERENCED JSON-LD CONTEXT-->
            <data source="1000 " name="@context">
                <constant value="http://data.swissbib.ch/person/context.jsonld"/>
            </data>

            <combine name="rdfs:label" value="${name}${number}${developed}${dates}${note}" flushWith="1000 "
                     sameEntity="true">
                <data source="1000 .a" name="name"/>
                <data source="1000 .b" name="number">
                    <compose prefix=" "/>
                </data>
                <data source="1000 .q" name="developed">
                    <compose prefix=" (" postfix=")"/>
                </data>
                <data source="1000 .d" name="dates">
                    <compose prefix=", "/>
                </data>
                <data source="1000 .c" name="note">
                    <compose prefix=", "/>
                </data>
            </combine>
            <data source="1000 .d" name="dbp:birthYear">
                <regexp match="(\d\d\d\d).?[-]" format="${1}"/>
            </data>
            <data source="1000 .d" name="dbp:deathYear">
                <regexp match="(\d\d\d\d)$" format="${1}"/>
            </data>
            <data source="1000 .a" name="foaf:name"/>
            <data source="1000 .c" name="skos:note"/>
        </entity>

        <!--100 first indicator 1-->
        <entity name="--" flushWith="245??">
            <data name="_id" source="@key1001"/>
            <data name="@id" source="@key1001">
                <compose prefix="http://data.swissbib.ch/person/"/>
            </data>

            <!--RDF TYPE (CLASS)-->

            <data source="1001 " name="@type">
                <constant value="http://xmlns.com/foaf/0.1/Person"/>
            </data>

            <!--REFERENCED JSON-LD CONTEXT-->
            <data source="1001 " name="@context">
                <constant value="http://data.swissbib.ch/person/context.jsonld"/>
            </data>

            <combine name="rdfs:label" value="${lastname}${firstname}${number}${developed}${dates}${note}"
                     flushWith="1001 " sameEntity="true">
                <data source="1001 .a" name="lastname"/>
                <data source="1001 .D" name="firstname">
                    <compose prefix=", "/>
                </data>
                <data source="1001 .b" name="number">
                    <compose prefix=" "/>
                </data>
                <data source="1001 .q" name="developed">
                    <compose prefix=" (" postfix=")"/>
                </data>
                <data source="1001 .d" name="dates">
                    <compose prefix=", "/>
                </data>
                <data source="1001 .c" name="note">
                    <compose prefix=", "/>
                </data>
            </combine>
            <data source="1001 .d" name="dbp:birthYear">
                <regexp match="(\d\d\d\d).?[-]" format="${1}"/>
            </data>
            <data source="1001 .d" name="dbp:deathYear">
                <regexp match="(\d\d\d\d)$" format="${1}"/>
            </data>
            <data source="1001 .a" name="foaf:lastName"/>
            <data source="1001 .D" name="foaf:firstName"/>
            <data source="1001 .c" name="skos:note"/>
        </entity>

        <!--700 first indicator 0-->
        <entity name="--" flushWith="7000 ">
            <data name="_id" source="@key7000"/>
            <data name="@id" source="@key7000">
                <compose prefix="http://data.swissbib.ch/person/"/>
            </data>

            <!--RDF TYPE (CLASS)-->

            <data source="_id" name="@type">
                <constant value="http://xmlns.com/foaf/0.1/Person"/>
            </data>

            <!--REFERENCED JSON-LD CONTEXT-->
            <data source="_id" name="@context">
                <constant value="http://data.swissbib.ch/person/context.jsonld"/>
            </data>

            <combine name="rdfs:label" value="${name}${number}${developed}${dates}${note}" flushWith="7000 "
                     sameEntity="true">
                <data source="7000 .a" name="name"/>
                <data source="7000 .b" name="number">
                    <compose prefix=" "/>
                </data>
                <data source="7000 .q" name="developed">
                    <compose prefix=" (" postfix=")"/>
                </data>
                <data source="7000 .d" name="dates">
                    <compose prefix=", "/>
                </data>
                <data source="7000 .c" name="note">
                    <compose prefix=", "/>
                </data>
            </combine>
            <data source="7000 .d" name="dbp:birthYear">
                <regexp match="(\d\d\d\d).?[-]" format="${1}"/>
            </data>
            <data source="7000 .d" name="dbp:deathYear">
                <regexp match="(\d\d\d\d)$" format="${1}"/>
            </data>
            <data source="7000 .a" name="foaf:name"/>
            <data source="7000 .c" name="skos:note"/>
        </entity>

        <!--700 first indicator 1-->
        <entity name="--" flushWith="7001 ">
            <data name="_id" source="@key7001"/>
            <data name="@id" source="@key7001">
                <compose prefix="http://data.swissbib.ch/person/"/>
            </data>

            <!--RDF TYPE (CLASS)-->

            <data source="_id" name="@type">
                <constant value="http://xmlns.com/foaf/0.1/Person"/>
            </data>

            <!--REFERENCED JSON-LD CONTEXT-->
            <data source="_id" name="@context">
                <constant value="http://data.swissbib.ch/person/context.jsonld"/>
            </data>
<commit_msg>We can't rely on _id source field as trigger for generating constant values, since the _id field exists only once in a record, but we possibly have to generate several constant values.<commit_after><?xml version="1.0" encoding="UTF-8"?>

<metamorph xmlns="http://www.culturegraph.org/metamorph" version="1">

    <vars>
        <var name="swissbib_domain" value="http://data.swissbib.ch/resource/"/>
    </vars>

    <include xmlns="http://www.w3.org/2001/XInclude" href="morphModules/authorHash100.xml" parse="xml"/>
    <include xmlns="http://www.w3.org/2001/XInclude" href="morphModules/authorHash700.xml" parse="xml"/>

    <rules>

        <!--BUILD THE BASIS RECORD -->

        <!--100 first indicator 0-->
        <entity name="--" flushWith="245??">
            <data name="_id" source="@key1000"/>
            <data name="@id" source="@key1000">
                <compose prefix="http://data.swissbib.ch/person/"/>
            </data>

            <!--RDF TYPE (CLASS)-->

            <data source="1000 " name="@type">
                <constant value="http://xmlns.com/foaf/0.1/Person"/>
            </data>

            <!--REFERENCED JSON-LD CONTEXT-->
            <data source="1000 " name="@context">
                <constant value="http://data.swissbib.ch/person/context.jsonld"/>
            </data>

            <combine name="rdfs:label" value="${name}${number}${developed}${dates}${note}" flushWith="1000 "
                     sameEntity="true">
                <data source="1000 .a" name="name"/>
                <data source="1000 .b" name="number">
                    <compose prefix=" "/>
                </data>
                <data source="1000 .q" name="developed">
                    <compose prefix=" (" postfix=")"/>
                </data>
                <data source="1000 .d" name="dates">
                    <compose prefix=", "/>
                </data>
                <data source="1000 .c" name="note">
                    <compose prefix=", "/>
                </data>
            </combine>
            <data source="1000 .d" name="dbp:birthYear">
                <regexp match="(\d\d\d\d).?[-]" format="${1}"/>
            </data>
            <data source="1000 .d" name="dbp:deathYear">
                <regexp match="(\d\d\d\d)$" format="${1}"/>
            </data>
            <data source="1000 .a" name="foaf:name"/>
            <data source="1000 .c" name="skos:note"/>
        </entity>

        <!--100 first indicator 1-->
        <entity name="--" flushWith="245??">
            <data name="_id" source="@key1001"/>
            <data name="@id" source="@key1001">
                <compose prefix="http://data.swissbib.ch/person/"/>
            </data>

            <!--RDF TYPE (CLASS)-->

            <data source="1001 " name="@type">
                <constant value="http://xmlns.com/foaf/0.1/Person"/>
            </data>

            <!--REFERENCED JSON-LD CONTEXT-->
            <data source="1001 " name="@context">
                <constant value="http://data.swissbib.ch/person/context.jsonld"/>
            </data>

            <combine name="rdfs:label" value="${lastname}${firstname}${number}${developed}${dates}${note}"
                     flushWith="1001 " sameEntity="true">
                <data source="1001 .a" name="lastname"/>
                <data source="1001 .D" name="firstname">
                    <compose prefix=", "/>
                </data>
                <data source="1001 .b" name="number">
                    <compose prefix=" "/>
                </data>
                <data source="1001 .q" name="developed">
                    <compose prefix=" (" postfix=")"/>
                </data>
                <data source="1001 .d" name="dates">
                    <compose prefix=", "/>
                </data>
                <data source="1001 .c" name="note">
                    <compose prefix=", "/>
                </data>
            </combine>
            <data source="1001 .d" name="dbp:birthYear">
                <regexp match="(\d\d\d\d).?[-]" format="${1}"/>
            </data>
            <data source="1001 .d" name="dbp:deathYear">
                <regexp match="(\d\d\d\d)$" format="${1}"/>
            </data>
            <data source="1001 .a" name="foaf:lastName"/>
            <data source="1001 .D" name="foaf:firstName"/>
            <data source="1001 .c" name="skos:note"/>
        </entity>

        <!--700 first indicator 0-->
        <entity name="--" flushWith="7000 ">
            <data name="_id" source="@key7000"/>
            <data name="@id" source="@key7000">
                <compose prefix="http://data.swissbib.ch/person/"/>
            </data>

            <!--RDF TYPE (CLASS)-->

            <data source="7000 " name="@type">
                <constant value="http://xmlns.com/foaf/0.1/Person"/>
            </data>

            <!--REFERENCED JSON-LD CONTEXT-->
            <data source="7000 " name="@context">
                <constant value="http://data.swissbib.ch/person/context.jsonld"/>
            </data>

            <combine name="rdfs:label" value="${name}${number}${developed}${dates}${note}" flushWith="7000 "
                     sameEntity="true">
                <data source="7000 .a" name="name"/>
                <data source="7000 .b" name="number">
                    <compose prefix=" "/>
                </data>
                <data source="7000 .q" name="developed">
                    <compose prefix=" (" postfix=")"/>
                </data>
                <data source="7000 .d" name="dates">
                    <compose prefix=", "/>
                </data>
                <data source="7000 .c" name="note">
                    <compose prefix=", "/>
                </data>
            </combine>
            <data source="7000 .d" name="dbp:birthYear">
                <regexp match="(\d\d\d\d).?[-]" format="${1}"/>
            </data>
            <data source="7000 .d" name="dbp:deathYear">
                <regexp match="(\d\d\d\d)$" format="${1}"/>
            </data>
            <data source="7000 .a" name="foaf:name"/>
            <data source="7000 .c" name="skos:note"/>
        </entity>

        <!--700 first indicator 1-->
        <entity name="--" flushWith="7001 ">
            <data name="_id" source="@key7001"/>
            <data name="@id" source="@key7001">
                <compose prefix="http://data.swissbib.ch/person/"/>
            </data>

            <!--RDF TYPE (CLASS)-->

            <data source="7001 " name="@type">
                <constant value="http://xmlns.com/foaf/0.1/Person"/>
            </data>

            <!--REFERENCED JSON-LD CONTEXT-->
            <data source="7001 " name="@context">
                <constant value="http://data.swissbib.ch/person/context.jsonld"/>
            </data>

{'fraction_non_alphanumeric': 0.18908280727812848, 'fraction_numerical': 0.03683624210917193, 'mean_word_length': 1.5146591970121381, 'pattern_counts': {'":': 0, '<': 285, '<?xml version=': 2, '>': 285, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, 'xml': 24}, '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': '4669608', 'n_tokens_mistral': 4360, 'n_tokens_neox': 3774, 'n_words': 757}