<commit_before>{
    "$schema": "http://json-schema.org/draft-04/schema#",

    "description": "An Apple HealthKit correlation sample that represents data using multiple quantity and category samples.",
    "type": "object",

    "references": [
        {
            "description": "The class reference for HKCorrelationSample.",
            "url": "https://developer.apple.com/library/ios/documentation/HealthKit/Reference/HKCorrelation_Class/index.html"
        },
        {
            "description": "The reference for the HKMetadataKeyFoodType metadata key that should be used with correlation samples of type HKCorrelationTypeIdentifierFood.",
            "url": "https://developer.apple.com/library/ios/documentation/HealthKit/Reference/HealthKit_Constants/index.html#//apple_ref/c/data/HKMetadataKeyFoodType"
        }
    ],

    "definitions": {
        "time_frame": {
            "$ref": "time-frame-1.x.json"
        },
        "hk_correlation_type": {
            "$ref": "hk-correlation-type-1.0.json"
        },
        "hk_metadata": {
            "$ref": "hk-metadata-1.0.json"
        },
        "hk_category_sample": {
            "$ref": "hk-category-sample-1.0.json"
        },
        "hk_quantity_sample": {
            "$ref": "hk-quantity-sample-1.0.json"
        }
    },

    "properties": {
        "correlation_type": {
            "description": "The correlation type for this sample.",
            "$ref": "#/definitions/hk_correlation_type"
        },
        "samples": {
            "type": "array",
            "minItems": 1,
            "description": "An array of category and quantity samples that represent all the components of the correlation sample.",
            "items": {
                "oneOf": [
                    {
                        "properties": {
                            "category_sample": {
                                "$ref": "#/definitions/hk_category_sample"
                            }
                        },
                        "properties": {
                            "quantity_sample": {
                                "$ref": "#/definitions/hk_quantity_sample"
                            }
                        }
                    }
                ]
            }
        },
        "effective_time_frame": {
            "description": "The time frame when this sample occurred. When the HKSample `startDate` and `endDate` values are different, we recommend using the `time_interval` time frame property, and when they are the same, we recommend using the `date_time` time frame property.",
            "$ref": "#/definitions/time_frame"
        },
        "metadata": {
            "description": "For HKCorrelationTypeIdentifierFood the data point should contain a metadata item with the key HKMetadataKeyFoodType that is the name of the food item",
            "$ref": "#/definitions/hk_metadata"
        }
    },
    "required": [
        "correlation_type",
        "samples",
        "effective_time_frame"<commit_msg>Improve documentation in HK correlation<commit_after>{
    "$schema": "http://json-schema.org/draft-04/schema#",

    "description": "An Apple HealthKit correlation sample that represents data using multiple quantity and category samples.",
    "type": "object",

    "references": [
        {
            "description": "The class reference for HKCorrelationSample.",
            "url": "https://developer.apple.com/library/ios/documentation/HealthKit/Reference/HKCorrelation_Class/index.html"
        },
        {
            "description": "The reference for the HKMetadataKeyFoodType metadata key that should be used with correlation samples of type HKCorrelationTypeIdentifierFood.",
            "url": "https://developer.apple.com/library/ios/documentation/HealthKit/Reference/HealthKit_Constants/index.html#//apple_ref/c/data/HKMetadataKeyFoodType"
        }
    ],

    "definitions": {
        "time_frame": {
            "$ref": "time-frame-1.x.json"
        },
        "hk_correlation_type": {
            "$ref": "hk-correlation-type-1.0.json"
        },
        "hk_metadata": {
            "$ref": "hk-metadata-1.0.json"
        },
        "hk_category_sample": {
            "$ref": "hk-category-sample-1.0.json"
        },
        "hk_quantity_sample": {
            "$ref": "hk-quantity-sample-1.0.json"
        }
    },

    "properties": {
        "correlation_type": {
            "description": "The correlation type for this sample.",
            "$ref": "#/definitions/hk_correlation_type"
        },
        "samples": {
            "type": "array",
            "minItems": 1,
            "description": "An array of category and quantity samples that represent all the components of the correlation sample.",
            "items": {
                "oneOf": [
                    {
                        "properties": {
                            "category_sample": {
                                "$ref": "#/definitions/hk_category_sample"
                            }
                        },
                        "properties": {
                            "quantity_sample": {
                                "$ref": "#/definitions/hk_quantity_sample"
                            }
                        }
                    }
                ]
            }
        },
        "effective_time_frame": {
            "description": "The time frame when this sample occurred. When the HKSample `startDate` and `endDate` values are different, we recommend using the `time_interval` time frame property, and when they are the same, we recommend using the `date_time` time frame property.",
            "$ref": "#/definitions/time_frame"
        },
        "metadata": {
            "description": "When the correlation type is HKCorrelationTypeIdentifierFood, include a metadata item with key HKMetadataKeyFoodType and the name of the food item as its value.",
            "$ref": "#/definitions/hk_metadata"
        }
    },
    "required": [
        "correlation_type",
        "samples",
        "effective_time_frame"
{'fraction_non_alphanumeric': 0.11739559355475172, 'fraction_numerical': 0.003946070371588293, 'mean_word_length': 1.6927844178840195, 'pattern_counts': {'":': 84, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '4992318', 'n_tokens_mistral': 1616, 'n_tokens_neox': 1529, 'n_words': 364}