<commit_before><xmi:XMI xmi:version="2.4.1" xmlns:uml="http://www.omg.org/spec/UML/20110701" xmlns:xmi="http://www.omg.org/spec/XMI/20110701">
    <!-- 
        NOTE: exporter have to be "Enterprise Architect", EA wont read it if set do eg. Drupal 
        We will play along to get "Enterprise Architect" happy
    -->
    <xmi:Documentation exporter="Enterprise Architect" exporterVersion="6.5"/>
    <uml:Model xmi:type="uml:Model" xmi:id="42" name="ddi4">
        <!-- DDI4 packages -->
        <packagedElement xmi:type="uml:Package" xmi:id="ddi4_model" name="Class Model (Exported from Drupal)">
            <?php foreach ($objects as $package => $ddiobjects): ?>
                <packagedElement xmi:type="uml:Package" xmi:id="<?php print $package; ?>" name="<?php print $package; ?>">
					<ownedComment xmi:type="uml:Comment">
						<body><?php if(array_key_exists('definition',$package)){print htmlspecialchars($package['definition']);} ?></body>
					</ownedComment>
                    <?php if(array_key_exists($package, $datatypes)): ?>
                    <!-- Datatypes -->
                    <?php foreach($datatypes[$package] as $datatype): ?>
                        <?php if(is_array($datatype)):?>
                            <?php if(array_key_exists('enumeration', $datatype)): ?>
                                <packagedElement xmi:type="uml:Enumeration" xmi:id="<?php print $datatype['name']; ?>" name="<?php print $datatype['name']; ?>">
									<ownedComment xmi:type="uml:Comment">
										<body><?php if(array_key_exists('definition',$datatype)){print htmlspecialchars($datatype['definition']);} ?></body>
									</ownedComment>
                                    <?php foreach($datatype['enumeration'] as $enumeration): ?>
                                    <ownedLiteral xmi:type="uml:EnumerationLiteral" name="<?php print $enumeration['value']; ?>"/>
                                    <?php endforeach; ?>
                                </packagedElement>
                            <?php else: ?>
                                <packagedElement xmi:type="uml:DataType" xmi:id="<?php print $datatype['name']; ?>" name="<?php print $datatype['name']; ?>"/>
                            <?php endif;?>
                        <?php endif;?>
                    <?php endforeach; ?>
                    <!-- End Datatypes -->
                    <?php endif; ?>
                    <?php foreach ($ddiobjects as $object): ?>
                        <?php if(is_array($object)):?>
                            <packagedElement xmi:type="uml:Class" name="<?php print $object['name']; ?>" xmi:id="<?php print $object['name']; ?>" visibility="package" <?php if($object['is_abstract']): ?>isAbstract="true"<?php endif;?>>
								<ownedComment xmi:type="uml:Comment">
									<body>
Definition
==========
<?php if(array_key_exists('definition',$object)){print htmlspecialchars($object['definition']);} ?>
|||
Examples
========
<?php if(array_key_exists('example',$object)){print htmlspecialchars($object['example']);} ?>
|||
Explanatory notes
=================
<?php if(array_key_exists('explanatory_notes',$object)){print htmlspecialchars($object['explanatory_notes']);} ?>
|||
Synonyms
========
<?php if(array_key_exists('synonyms',$object)){print htmlspecialchars($object['synonyms']);} ?>
|||
DDI 3.2 mapping
===============
<?php if(array_key_exists('ddi_3_2',$object)){print htmlspecialchars($object['ddi_3_2']);} ?>
|||
RDF mapping
===========
<?php foreach ($object['rdf'] as $item): ?>
<?php if(array_key_exists('label',$item)){print htmlspecialchars($item['label']);} ?>; <?php if(array_key_exists('type',$item)){print htmlspecialchars($item['type']);} ?>; <?php if(array_key_exists('uri',$item)){print htmlspecialchars($item['uri']);} ?>
<?php endforeach; ?>
|||
GSIM mapping
============
<?php if(array_key_exists('gsim',$object)){print htmlspecialchars($object['gsim']);} ?>
|||
									</body>
								</ownedComment>
                                <?php if ($object['extends']): ?>
                                    <!-- extends -->
                                    <generalization xmi:type="uml:Generalization" xmi:id="<?php print $object['name']; ?>_extends_<?php print $object['extends']; ?>" general="<?php print $object['extends']; ?>"/>
                                <?php endif; ?>
                                <?php if(array_key_exists('properties', $object)): ?>
                                <!-- properties -->
                                <?php foreach ($object['properties'] as $item): ?>
                                    <ownedAttribute xmi:type="uml:Property" name="<?php print $item['name']; ?>" xmi:id="<?php print $object['name']; ?>_<?php print $item['name']; ?>">
                                        <?php if (array_key_exists('datatype', $item)): ?>
                                            <?php print _render_datatype($item['datatype']); ?>
                                        <?php endif; ?>
                                        <?php if (array_key_exists('cardinality', $item)): ?>
                                            <?php print theme('xmi_cardinality', array('object' => $object['name'], 'property' => $item['name'], 'cardinality' => $item['cardinality'])); ?>
                                        <?php endif; ?><commit_msg>some layout on class description<commit_after><xmi:XMI xmi:version="2.4.1" xmlns:uml="http://www.omg.org/spec/UML/20110701" xmlns:xmi="http://www.omg.org/spec/XMI/20110701">
    <!-- 
        NOTE: exporter have to be "Enterprise Architect", EA wont read it if set do eg. Drupal 
        We will play along to get "Enterprise Architect" happy
    -->
    <xmi:Documentation exporter="Enterprise Architect" exporterVersion="6.5"/>
    <uml:Model xmi:type="uml:Model" xmi:id="42" name="ddi4">
        <!-- DDI4 packages -->
        <packagedElement xmi:type="uml:Package" xmi:id="ddi4_model" name="Class Model (Exported from Drupal)">
            <?php foreach ($objects as $package => $ddiobjects): ?>
                <packagedElement xmi:type="uml:Package" xmi:id="<?php print $package; ?>" name="<?php print $package; ?>">
					<ownedComment xmi:type="uml:Comment">
						<body><?php if(array_key_exists('definition',$package)){print htmlspecialchars($package['definition']);} ?></body>
					</ownedComment>
                    <?php if(array_key_exists($package, $datatypes)): ?>
                    <!-- Datatypes -->
                    <?php foreach($datatypes[$package] as $datatype): ?>
                        <?php if(is_array($datatype)):?>
                            <?php if(array_key_exists('enumeration', $datatype)): ?>
                                <packagedElement xmi:type="uml:Enumeration" xmi:id="<?php print $datatype['name']; ?>" name="<?php print $datatype['name']; ?>">
									<ownedComment xmi:type="uml:Comment">
										<body><?php if(array_key_exists('definition',$datatype)){print htmlspecialchars($datatype['definition']);} ?></body>
									</ownedComment>
                                    <?php foreach($datatype['enumeration'] as $enumeration): ?>
                                    <ownedLiteral xmi:type="uml:EnumerationLiteral" name="<?php print $enumeration['value']; ?>"/>
                                    <?php endforeach; ?>
                                </packagedElement>
                            <?php else: ?>
                                <packagedElement xmi:type="uml:DataType" xmi:id="<?php print $datatype['name']; ?>" name="<?php print $datatype['name']; ?>"/>
                            <?php endif;?>
                        <?php endif;?>
                    <?php endforeach; ?>
                    <!-- End Datatypes -->
                    <?php endif; ?>
                    <?php foreach ($ddiobjects as $object): ?>
                        <?php if(is_array($object)):?>
                            <packagedElement xmi:type="uml:Class" name="<?php print $object['name']; ?>" xmi:id="<?php print $object['name']; ?>" visibility="package" <?php if($object['is_abstract']): ?>isAbstract="true"<?php endif;?>>
								<ownedComment xmi:type="uml:Comment">
									<body>
||Definition
============
<?php if(array_key_exists('definition',$object)){print htmlspecialchars($object['definition']);} ?>
|||

||Examples
==========
<?php if(array_key_exists('example',$object)){print htmlspecialchars($object['example']);} ?>
|||

||Explanatory notes
===================
<?php if(array_key_exists('explanatory_notes',$object)){print htmlspecialchars($object['explanatory_notes']);} ?>
|||

||Synonyms
==========
<?php if(array_key_exists('synonyms',$object)){print htmlspecialchars($object['synonyms']);} ?>
|||

||DDI 3.2 mapping
=================
<?php if(array_key_exists('ddi_3_2',$object)){print htmlspecialchars($object['ddi_3_2']);} ?>
|||

||RDF mapping
=============
<?php foreach ($object['rdf'] as $item): ?>
<?php if(array_key_exists('label',$item)){print htmlspecialchars($item['label']);} ?>; <?php if(array_key_exists('type',$item)){print htmlspecialchars($item['type']);} ?>; <?php if(array_key_exists('uri',$item)){print htmlspecialchars($item['uri']);} ?>
<?php endforeach; ?>
|||

||GSIM mapping
==============
<?php if(array_key_exists('gsim',$object)){print htmlspecialchars($object['gsim']);} ?>
|||
									</body>
								</ownedComment>
                                <?php if ($object['extends']): ?>
                                    <!-- extends -->
                                    <generalization xmi:type="uml:Generalization" xmi:id="<?php print $object['name']; ?>_extends_<?php print $object['extends']; ?>" general="<?php print $object['extends']; ?>"/>
                                <?php endif; ?>
                                <?php if(array_key_exists('properties', $object)): ?>
                                <!-- properties -->
                                <?php foreach ($object['properties'] as $item): ?>
                                    <ownedAttribute xmi:type="uml:Property" name="<?php print $item['name']; ?>" xmi:id="<?php print $object['name']; ?>_<?php print $item['name']; ?>">
                                        <?php if (array_key_exists('datatype', $item)): ?>
                                            <?php print _render_datatype($item['datatype']); ?>
                                        <?php endif; ?>
                                        <?php if (array_key_exists('cardinality', $item)): ?>
                                            <?php print theme('xmi_cardinality', array('object' => $object['name'], 'property' => $item['name'], 'cardinality' => $item['cardinality'])); ?>
                                        <?php endif; ?>
{'fraction_non_alphanumeric': 0.19886522183982885, 'fraction_numerical': 0.005952934610733885, 'mean_word_length': 2.375824175824176, 'pattern_counts': {'":': 0, '<': 171, '<?xml version=': 0, '>': 179, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 30, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '521330', 'n_tokens_mistral': 3126, 'n_tokens_neox': 2911, 'n_words': 524}