diff options
Diffstat (limited to '32.md')
| -rw-r--r-- | 32.md | 29 |
1 files changed, 22 insertions, 7 deletions
| @@ -6,10 +6,9 @@ Labeling | |||
| 6 | 6 | ||
| 7 | `draft` `optional` | 7 | `draft` `optional` |
| 8 | 8 | ||
| 9 | A label is a `kind 1985` event that is used to label other entities. This supports a number of use cases, | 9 | This NIP defines two new indexable tags to label events and a new event kind (`kind:1985`) to attach those labels to existing events. This supports several use cases, including distributed moderation, collection management, license assignment, and content classification. |
| 10 | including distributed moderation, collection management, license assignment, and content classification. | ||
| 11 | 10 | ||
| 12 | This NIP introduces two new tags: | 11 | New Tags: |
| 13 | 12 | ||
| 14 | - `L` denotes a label namespace | 13 | - `L` denotes a label namespace |
| 15 | - `l` denotes a label | 14 | - `l` denotes a label |
| @@ -20,7 +19,7 @@ Label Namespace Tag | |||
| 20 | An `L` tag can be any string, but publishers SHOULD ensure they are unambiguous by using a well-defined namespace | 19 | An `L` tag can be any string, but publishers SHOULD ensure they are unambiguous by using a well-defined namespace |
| 21 | (such as an ISO standard) or reverse domain name notation. | 20 | (such as an ISO standard) or reverse domain name notation. |
| 22 | 21 | ||
| 23 | `L` tags are REQUIRED in order to support searching by namespace rather than by a specific tag. The special `ugc` | 22 | `L` tags are RECOMMENDED in order to support searching by namespace rather than by a specific tag. The special `ugc` |
| 24 | ("user generated content") namespace MAY be used when the label content is provided by an end user. | 23 | ("user generated content") namespace MAY be used when the label content is provided by an end user. |
| 25 | 24 | ||
| 26 | `L` tags starting with `#` indicate that the label target should be associated with the label's value. | 25 | `L` tags starting with `#` indicate that the label target should be associated with the label's value. |
| @@ -29,7 +28,9 @@ This is a way of attaching standard nostr tags to events, pubkeys, relays, urls, | |||
| 29 | Label Tag | 28 | Label Tag |
| 30 | ---- | 29 | ---- |
| 31 | 30 | ||
| 32 | An `l` tag's value can be any string. `l` tags MUST include a `mark` matching an `L` tag value in the same event. | 31 | An `l` tag's value can be any string. If using an `L` tag, `l` tags MUST include a mark matching an `L` |
| 32 | tag value in the same event. If no `L` tag is included, a mark SHOULD still be included. If none is | ||
| 33 | included, `ugc` is implied. | ||
| 33 | 34 | ||
| 34 | Label Target | 35 | Label Target |
| 35 | ---- | 36 | ---- |
| @@ -42,7 +43,7 @@ or topics respectively. As with NIP-01, a relay hint SHOULD be included when usi | |||
| 42 | Content | 43 | Content |
| 43 | ------- | 44 | ------- |
| 44 | 45 | ||
| 45 | Labels should be short, meaningful strings. Longer discussions, such as for a review, or an | 46 | Labels should be short, meaningful strings. Longer discussions, such as for an |
| 46 | explanation of why something was labeled the way it was, should go in the event's `content` field. | 47 | explanation of why something was labeled the way it was, should go in the event's `content` field. |
| 47 | 48 | ||
| 48 | Self-Reporting | 49 | Self-Reporting |
| @@ -127,6 +128,20 @@ is labeling their note as being related to Milan, Italy using ISO 3166-2. | |||
| 127 | } | 128 | } |
| 128 | ``` | 129 | ``` |
| 129 | 130 | ||
| 131 | Author is labeling their note language as English using ISO-639-1. | ||
| 132 | |||
| 133 | ```json | ||
| 134 | { | ||
| 135 | "kind": 1, | ||
| 136 | "tags": [ | ||
| 137 | ["L", "ISO-639-1"], | ||
| 138 | ["l", "en", "ISO-639-1"] | ||
| 139 | ], | ||
| 140 | "content": "English text", | ||
| 141 | ... | ||
| 142 | } | ||
| 143 | ``` | ||
| 144 | |||
| 130 | Other Notes | 145 | Other Notes |
| 131 | ----------- | 146 | ----------- |
| 132 | 147 | ||
| @@ -158,4 +173,4 @@ Appendix: Known Ontologies | |||
| 158 | 173 | ||
| 159 | Below is a non-exhaustive list of ontologies currently in widespread use. | 174 | Below is a non-exhaustive list of ontologies currently in widespread use. |
| 160 | 175 | ||
| 161 | - (social.ontolo.categories)[https://ontolo.social/] | 176 | - [social.ontolo.categories](https://ontolo.social/) |