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
Copy file name to clipboardExpand all lines: extensions/stam-textvalidation/README.md
+4-5
Original file line number
Diff line number
Diff line change
@@ -17,20 +17,19 @@ RFC 2119.
17
17
## Vocabulary
18
18
19
19
This extension defines an annotation dataset with ID `https://w3id.org/stam/extensions/stam-textvalidation/`.
20
-
In this set we define the following keys, using either one of them is *RECOMMENDED* by this extension:
20
+
In this set we define the following keys, the use of `checksum` over `text` is *RECOMMENDED* by this extension:
21
21
22
+
*``checksum``: The SHA-1 checksum of the text of the annotation. We use SHA-1 because it is *fast* and *small enough* (40 bytes). It does not offer strong cryptographic security though.
22
23
*``text``: The exact text of the current annotation
23
24
*``delimiter``: The delimiter to use to concatenate text selections in case the current annotation has a complex selector. If this key is not supplied, concatenation *MUST* proceed without delimiter.
24
-
*``checksum``: The SHA-1 checksum of the text of the annotation. We use SHA-1 because it is *fast* and *small enough* (40 bytes). It does not offer strong cryptographic security though.
25
25
26
26
The advantage of `text` over `checksum` is that it is directly interpretable
27
-
and facilitates readability of a serialisation. However, for large texts
28
-
the overhead may become a nuisance and a `checksum`may be more appropriate.
27
+
and facilitates readability of a serialisation. For any other purposes,
28
+
the overhead quickly becomes a nuisance and a `checksum`is appropriate, the latter is therefore *RECOMMENDED*.
29
29
30
30
## Functionality
31
31
32
32
Parser implementations, whenever encountering a `text` or `checksum` key in an annotation's data,
33
33
*MUST* verify if the text of the annotation matches the `text`
34
34
property or the SHA-1 checksum in the `checksum` property. If not,
35
35
implementations *SHOULD* raise a hard validation failure.
0 commit comments