io7m | single-page | multi-page | Laurel User Manual 0.99.1-SNAPSHOT
5.6. File Model
Previous
5. Theory Of Operation
Up
6. License
Next

# 5.7. Validation

- 5.7.1. Overview
- 5.7.2. Required Categories

## 5.7.1. Overview

1
The validation process checks a number of properties of the underlying file model.

## 5.7.2. Required Categories

1
The validation process checks to see if the category requirements are satisfied for all images in the dataset. In pseudocode, the process is:

### 5.7.2.2. Required Categories (Pseudocode)

    let Images             = { All images in the dataset }
    let CategoriesRequired = { All categories in the dataset that are marked as "required" }

    for Image in Images do
      let CaptionsPresent = CaptionsAssigned(Image);
      for Category in CategoriesRequired do
        let CaptionsRequired = CaptionsInCategory(Category);
        if IsEmpty (CaptionsRequired ∩ CaptionsPresent) then
          Fail("At least one caption is required from the category")
        end if;
      done;
    done;

3
Informally, for each image i, for each required category c, validation succeeds if at least one caption in c is assigned to i.
5.6. File Model
Previous
5. Theory Of Operation
Up
6. License
Next
io7m | single-page | multi-page | Laurel User Manual 0.99.1-SNAPSHOT