<commit_before><jpeg2000profile>
    <fromXml>
        <namespaces>
            <namespace prefix="j">http://openpreservation.org/ns/jpylyzer/</namespace>
        </namespaces>

        <validation name="File name">
            <xmlDataExtraction resultType="STRING">
                <firstNonempty>
                    <xpath>//j:fileInfo/j:fileName</xpath>
                </firstNonempty>
            </xmlDataExtraction>
            <rules>
                <mustExist/>
            </rules>
        </validation>

        <validation name="Last modified">
            <xmlDataExtraction resultType="STRING">
                <firstNonempty>
                    <xpath>//j:fileInfo/j:fileLastModified</xpath>
                </firstNonempty>
            </xmlDataExtraction>
            <rules>
                <mustExist/>
            </rules>
        </validation>

        <validation name="Size">
            <xmlDataExtraction resultType="STRING">
                <firstNonempty>
                    <xpath>//j:fileInfo/j:fileSizeInBytes</xpath>
                </firstNonempty>
            </xmlDataExtraction>
            <rules>
                <mustExist/>
            </rules>
        </validation>

        <validation name="Tool name">
            <xmlDataExtraction resultType="STRING">
                <firstNonempty>
                    <xpath>//j:toolInfo/j:toolName</xpath>
                </firstNonempty>
            </xmlDataExtraction>
            <rules>
                <mustExist/>
                <mustMatchAny>
                    <constant>jpylyzer</constant>
                    <constant>jpylyzer.exe</constant>
                    <constant>jpylyzer.py</constant>
                </mustMatchAny>
            </rules>
        </validation>

        <validation name="Tool version">
            <xmlDataExtraction resultType="STRING">
                <firstNonempty>
                    <xpath>//j:toolInfo/j:toolVersion</xpath>
                </firstNonempty>
            </xmlDataExtraction>
            <rules>
                <mustExist/>
            </rules>
        </validation>

        <validation name="Valid">
            <xmlDataExtraction resultType="STRING">
                <firstNonempty>
                    <xpath>//j:isValidJP2</xpath>
                </firstNonempty>
            </xmlDataExtraction>
            <rules>
                <mustExist/>
                <mustMatchAny>
                    <constant>True</constant>
                </mustMatchAny>
            </rules>
        </validation>

        <validation name="Height">
            <xmlDataExtraction resultType="STRING">
                <firstNonempty>
                    <xpath>//j:properties/j:jp2HeaderBox/j:imageHeaderBox/j:height</xpath>
                </firstNonempty>
            </xmlDataExtraction>
            <rules>
                <mustExist/>
            </rules>
        </validation>

        <validation name="Width">
            <xmlDataExtraction resultType="STRING">
                <firstNonempty>
                    <xpath>//j:properties/j:jp2HeaderBox/j:imageHeaderBox/j:width</xpath>
                </firstNonempty>
            </xmlDataExtraction>
            <rules>
                <mustExist/>
            </rules>
        </validation>

        <validation name="Počet barevných komponent">
            <xmlDataExtraction resultType="STRING">
                <firstNonempty>
                    <xpath>//j:properties/j:jp2HeaderBox/j:imageHeaderBox/j:nC</xpath>
                </firstNonempty>
            </xmlDataExtraction>
            <rules>
                <mustExist/>
                <!--povolene hodnoty "1" nebo "3"-->
                <mustMatchAny>
                    <constant>1</constant>
                    <constant>3</constant>
                    
                </mustMatchAny>
            </rules>
        </validation>

        <validation name="Barevná hloubka">
            <xmlDataExtraction resultType="STRING">
                <firstNonempty>
                    <xpath>//j:properties/j:contiguousCodestreamBox/j:siz/j:ssizDepth</xpath>
                </firstNonempty>
            </xmlDataExtraction>
            <rules>
                <mustExist/>
                <mustMatchAny>
                    <constant>8</constant>
                </mustMatchAny>
            </rules>
        </validation>

        <validation name="Color space (1)">
            <xmlDataExtraction resultType="STRING">
                <firstNonempty>
                    <xpath>//j:properties/j:jp2HeaderBox/j:colourSpecificationBox/j:enumCS</xpath>
                </firstNonempty>
            </xmlDataExtraction>
            <rules>
                <mustExist/>
                <!--povolene hodnoty "sRGB" nebo "greyscale"-->
                <mustMatchAny>
                    <constant>sRGB</constant>
                    <constant>greyscale</constant>
                </mustMatchAny>
            </rules>
        </validation>

        <validation name="Color space (2)">
            <xmlDataExtraction resultType="STRING">
                <firstNonempty>
                    <xpath>//j:properties/j:jp2HeaderBox/j:colourSpecificationBox/j:meth</xpath>
                </firstNonempty>
            </xmlDataExtraction>
            <rules>
                <mustExist/>
                <!--TODO: docasne vyple, v datech se realne nachazi "Enumerated"-->
                <!--<mustMatchAny>
                    <constant>Restricted ICC</constant>
                </mustMatchAny>-->
            </rules>
        </validation>

        <validation name="Rozlišení vertik.">
            <xmlDataExtraction resultType="FLOAT"><commit_msg>zakomentována kontrola color space, viz #64<commit_after><jpeg2000profile>
    <fromXml>
        <namespaces>
            <namespace prefix="j">http://openpreservation.org/ns/jpylyzer/</namespace>
        </namespaces>

        <validation name="File name">
            <xmlDataExtraction resultType="STRING">
                <firstNonempty>
                    <xpath>//j:fileInfo/j:fileName</xpath>
                </firstNonempty>
            </xmlDataExtraction>
            <rules>
                <mustExist/>
            </rules>
        </validation>

        <validation name="Last modified">
            <xmlDataExtraction resultType="STRING">
                <firstNonempty>
                    <xpath>//j:fileInfo/j:fileLastModified</xpath>
                </firstNonempty>
            </xmlDataExtraction>
            <rules>
                <mustExist/>
            </rules>
        </validation>

        <validation name="Size">
            <xmlDataExtraction resultType="STRING">
                <firstNonempty>
                    <xpath>//j:fileInfo/j:fileSizeInBytes</xpath>
                </firstNonempty>
            </xmlDataExtraction>
            <rules>
                <mustExist/>
            </rules>
        </validation>

        <validation name="Tool name">
            <xmlDataExtraction resultType="STRING">
                <firstNonempty>
                    <xpath>//j:toolInfo/j:toolName</xpath>
                </firstNonempty>
            </xmlDataExtraction>
            <rules>
                <mustExist/>
                <mustMatchAny>
                    <constant>jpylyzer</constant>
                    <constant>jpylyzer.exe</constant>
                    <constant>jpylyzer.py</constant>
                </mustMatchAny>
            </rules>
        </validation>

        <validation name="Tool version">
            <xmlDataExtraction resultType="STRING">
                <firstNonempty>
                    <xpath>//j:toolInfo/j:toolVersion</xpath>
                </firstNonempty>
            </xmlDataExtraction>
            <rules>
                <mustExist/>
            </rules>
        </validation>

        <validation name="Valid">
            <xmlDataExtraction resultType="STRING">
                <firstNonempty>
                    <xpath>//j:isValidJP2</xpath>
                </firstNonempty>
            </xmlDataExtraction>
            <rules>
                <mustExist/>
                <mustMatchAny>
                    <constant>True</constant>
                </mustMatchAny>
            </rules>
        </validation>

        <validation name="Height">
            <xmlDataExtraction resultType="STRING">
                <firstNonempty>
                    <xpath>//j:properties/j:jp2HeaderBox/j:imageHeaderBox/j:height</xpath>
                </firstNonempty>
            </xmlDataExtraction>
            <rules>
                <mustExist/>
            </rules>
        </validation>

        <validation name="Width">
            <xmlDataExtraction resultType="STRING">
                <firstNonempty>
                    <xpath>//j:properties/j:jp2HeaderBox/j:imageHeaderBox/j:width</xpath>
                </firstNonempty>
            </xmlDataExtraction>
            <rules>
                <mustExist/>
            </rules>
        </validation>

        <validation name="Počet barevných komponent">
            <xmlDataExtraction resultType="STRING">
                <firstNonempty>
                    <xpath>//j:properties/j:jp2HeaderBox/j:imageHeaderBox/j:nC</xpath>
                </firstNonempty>
            </xmlDataExtraction>
            <rules>
                <mustExist/>
                <!--povolene hodnoty "1" nebo "3"-->
                <mustMatchAny>
                    <constant>1</constant>
                    <constant>3</constant>
                    
                </mustMatchAny>
            </rules>
        </validation>

        <validation name="Barevná hloubka">
            <xmlDataExtraction resultType="STRING">
                <firstNonempty>
                    <xpath>//j:properties/j:contiguousCodestreamBox/j:siz/j:ssizDepth</xpath>
                </firstNonempty>
            </xmlDataExtraction>
            <rules>
                <mustExist/>
                <mustMatchAny>
                    <constant>8</constant>
                </mustMatchAny>
            </rules>
        </validation>
        <!--TODO: docasne vyple, protože neprochází obrazy s hodnotou Restricted ICC, aktuálně stačí, že obraz projde kontrolou na validitu-->
        <!--<validation name="Color space (1)">
            <xmlDataExtraction resultType="STRING">
                <firstNonempty>
                    <xpath>//j:properties/j:jp2HeaderBox/j:colourSpecificationBox/j:enumCS</xpath>
                </firstNonempty>
            </xmlDataExtraction>
            <rules>
                <mustExist/>
                (povolene hodnoty "sRGB" nebo "greyscale")
                <mustMatchAny>
                    <constant>sRGB</constant>
                    <constant>greyscale</constant>
                </mustMatchAny>
            </rules>
        </validation>

        <validation name="Color space (2)">
            <xmlDataExtraction resultType="STRING">
                <firstNonempty>
                    <xpath>//j:properties/j:jp2HeaderBox/j:colourSpecificationBox/j:meth</xpath>
                </firstNonempty>
            </xmlDataExtraction>
            <rules>
                <mustExist/>
                (TODO: docasne vyple, v datech se realne nachazi "Enumerated")
                (<mustMatchAny>
                    <constant>Restricted ICC</constant>
                </mustMatchAny>)
            </rules>
        </validation>-->

        <validation name="Rozlišení vertik.">
            <xmlDataExtraction resultType="FLOAT">
{'fraction_non_alphanumeric': 0.11362062997577016, 'fraction_numerical': 0.003115264797507788, 'mean_word_length': 1.3183550651955867, 'pattern_counts': {'":': 0, '<': 354, '<?xml version=': 0, '>': 354, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 50}, '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': '837082', 'n_tokens_mistral': 3230, 'n_tokens_neox': 2980, 'n_words': 438}