You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Conventions on data formatting and precision, file names and data field names.
3
+
This document provides guidelines for data managers and contributors who create and maintain annotation projects in this repository.
4
4
5
+
## Project Directory Structure
5
6
6
-
## Synopsis
7
+
All annotation projects are located in the `projects/` directory. Each project lives in its own subdirectory under `projects/` (e.g., `projects/scene-recognition/`). The subdirectory name is the project name. A project directory must include:
8
+
9
+
- Raw annotation data (in dated batch directories)
10
+
- Gold-formatted output files (in `golds/` directory)
11
+
- Conversion scripts (typically `process.py`)
12
+
- Project documentation (`README.md`)
13
+
14
+
### Raw Annotation Data
15
+
16
+
> [!IMPORTANT]
17
+
> `YYMMDD-batchName` directory
18
+
19
+
This directory contains output files from the manual annotation process created by an annotation tool or by hand.
20
+
21
+
The raw annotation files are organized by batch name and starting date of the annotation. A single "period" of the annotation is the whole process of a single batch of source data (AAPB assets) being annotated. The `YYMMDD-` prefix _must_ indicate an associated time to a batch of annotation (usually that is when the batch is first prepared and used for annotation, or completed and delivered). The `batchName` part of the directory name _must_ match the basename of one of the `.txt` files in the [annotation batches directory](batches/README.md). The date and batch name prefixes are used for sorting annotation processes and machine ingestion of the raw data.
22
+
23
+
Different annotation tools create different file formats, hence we need conversion of the raw annotation files to files with a common format for the gold data.
24
+
25
+
26
+
### Gold Dataset Files
27
+
28
+
> [!IMPORTANT]
29
+
> `golds` directory
30
+
31
+
There are rules on the content and structure of the gold directory:
32
+
33
+
1. There _must_ be one file per GUID, and the GUID should be part of the filename.
34
+
2. The number of gold files in this directory _must_ match the sum of GUIDs in all batches annotated. This means that there cannot be any overlap between assets in batches.
35
+
3. The `golds` directory _may_ have subdirectories, but these subdirectories should not reflect batch structure, but rather different division of annotation type (e.g. pure named entity span annotation vs. named entity span + some grounding annotation) or format (same information but formatted as timepoints vs. time intervals).
36
+
37
+
38
+
### Scripts for Format Conversion
39
+
40
+
> [!IMPORTANT]
41
+
> _(usually)_`process.{sh,py}`
42
+
43
+
This is typically a single script to process the raw annotation files and generate the gold data.
44
+
The input file format (i.e., direct output from the annotation process) can vary (e.g. `.csv`, `.json`, `.txt`). The output file format must be a common machine-readable data format (CSV, TSV, JSON, but definitely not MMIF), and is **subject to change** for any future requirements in the consumption software.
45
+
46
+
In addition to the main script, if the code requires additional dependencies/scripts, they should be in the same level at that subdirectory. Dependencies on third-party modules can be documented in the `README.md` file or in a machine-friendly file with the list of dependencies (e.g. `requirements.txt` for `pip`).
47
+
48
+
Check the [Repository-level Conventions](#repository-level-conventions) section for naming conventions for common field/column names for gold data.
Project-specific information, including but not limited to:
57
+
58
+
* Annotation project name
59
+
60
+
* One-line summary of the project
61
+
62
+
* Annotator summary. Some basic demographic information about the annotators: age group, language proficiency, occupational characteristics, etc. No [personally identifiable information](https://en.wikipedia.org/wiki/Personal_data), unless the annotator wants to be credited.
63
+
64
+
* Annotation environment/tool information (name, version, link, user manual, etcetera). In most cases, there is a separate codebase (ideally on [https://github.com/clamsproject/](https://github.com/clamsproject/)) for the annotation tool which includes the manual.
65
+
66
+
* Project changes: version changes, selection of asset batches, change in annotator personnel, etc.
67
+
68
+
* Raw-to-gold conversion code explanation
69
+
* dependencies, short description of `process.py`
70
+
* formats of raw and gold files
71
+
* field description, with data types
72
+
* differences, added information, discarded information during `process.py`
73
+
74
+
* Annotation guidelines - sometimes as a separate file named `guidelines.{md,ppt}`. This section should give sufficient documentation for how the annotation was done and what the conditions/assumptions are under which the dataset exists:
75
+
* What tool is used, and how it is used.
76
+
* What to annotate
77
+
* Options of label choices
78
+
* Label formatting.
79
+
* Differentiation between labels, edge cases, other decisions made during annotation.
80
+
* Concerns, limitations, precision details. (e.g. time imprecision)
81
+
82
+
> [!NOTE]
83
+
> `README.md` & `guidelines.{md,ppt}` files are supposed to be actively maintained by the project manager. All guideline files are recommended to be version-controlled.
84
+
85
+
86
+
## Batch File Format
87
+
88
+
Each batch is defined by a `BATCH_NAME.txt` file in the `batches/` directory.
89
+
90
+
* Batches are often named after their relevant GitHub issue from the [AAPB-CLAMS collaboration repository](https://github.com/clamsproject/aapb-collaboration).
91
+
92
+
* Each line in the file must be either a single AAPB GUID or a comment starting with a `#`. The first lines are typically batch-level comments, while later comment lines may specify sources for subsequent AAPB GUIDs.
93
+
94
+
Typically, batch-level comments start and end with a comment line with just hyphens, for example:
Also, often referred as "column names" (mainly because we tend to use tabular data formats like CSV, TSV, etc.).
119
+
> Also often referred to as "column names" (mainly because we tend to use tabular data formats like CSV, TSV, etc.).
23
120
24
121
The field name in the "gold" data should indicate the type of data in the field.
25
-
That is, fields that contains the same (or similar enough) data should have the same name across different annotation task subdirectories.
122
+
That is, fields that contain the same (or similar enough) data should have the same name across different annotation task subdirectories.
26
123
The following table provides a ledger for commonly used names and their data types (see [#117](https://github.com/clamsproject/aapb-annotations/issues/107) for discussion). Some names are **standardized** and must be used when applicable, while others are **common** conventions that are recommended for consistency.
27
124
28
125
| Field(s) Name | Description |
@@ -53,25 +150,15 @@ The time format for all (gold) datasets in this repository is [ISO 8601 Time For
53
150
54
151
> _TODO: Some gold datasets and tools have not yet been converted._
55
152
56
-
During raw annotation however, third-party annotation tools may use different time formats. The expectation for any in-house tools and apps is to use this standard. If configurable, annotations tool should be configured to use this format. If possible, the annotator should also be instructed to use this format.
153
+
During raw annotation however, third-party annotation tools may use different time formats. The expectation for any in-house tools and apps is to use this standard. If configurable, annotation tools should be configured to use this format. If possible, the annotator should also be instructed to use this format.
57
154
58
155
> _TODO: the following prose is unclear_
59
156
60
157
Due to algorithmic differences in compression/decompression and their implementations in video players for human watchers, we may lose temporal precision. However, this is most likely to be in the order of a few milliseconds and hence not a significant problem.
61
158
62
-
<!--
63
-
For MPEG-based video files, frame numbers are converted to milliseconds with loss of precision past 3-digits.
64
-
However, due to exact time -> still-image-fetching being dependent on the video compression/codec/player, there is no expected need for precision past 3-digits.
65
-
It is assumed that different video players will regenerate images on screen slightly differently based on the decompression algorithms.
66
-
To that end, it is unlikely that even given a specific time moment that a person in one place would be able to extract exactly the same pixels
67
-
in a frame as another person doing it somewhere else.
68
-
The other reason frames was not chosen to divide seconds is that the collection also contains radio assets with audio only. Audio does not have frames.
69
-
-->
70
-
71
-
72
159
### Imprecision in Annotation in General
73
160
74
-
Currently, data Quality processes are currently still being designed and datasets do not have a data quality checklist applied to them. This means that general data messiness including typos are always possible.
161
+
Currently, data quality processes are still being designed and datasets do not have a data quality checklist applied to them. This means that general data messiness including typos are always possible.
75
162
76
163
Two semi-preventative measures are:
77
164
@@ -80,7 +167,6 @@ Two semi-preventative measures are:
80
167
81
168
The current convention is that annotators are asked to be as careful as possible, and some datasets are "quality-assumed" upon faith in annotators/environment until such time a quantitative analysis of errors is done.
82
169
83
-
84
170
### Imprecision in Time-based Annotation
85
171
86
172
Time-based annotations are almost inherently imprecise. This is due usually to either perception or manipulation of the tool within the limits of meaningful task-speed constraints. Furthermore, the features of audiovisual materials do not always have clear-cut beginning and end points.
@@ -114,8 +200,7 @@ i.e. Any time given by the annotated time interval of the chyron should return a
114
200
115
201
Finally, a reminder that at 30 frames per second, each frame is 0.033_ seconds long - meaning a tenth of a second has 3 frames within it. Practically speaking, there is only a small percentage of cases where the variation between one frame to its neighbor is relevant, especially in cases of human perception. The conventions for precision hold until new needs of the project are required.
116
202
117
-
118
-
## File Naming Conventions
203
+
### Batch File Naming Conventions
119
204
120
205
Batch names should be in lower case. If a batch is named after a GitHub issue it should be in this format:
0 commit comments