This project defines a set of tags that can be used by UNL to identify and group like content. The tags are controlled and can form a sort of taxonomy.
Current status: prototype
- Define a core set of common tags
- Avoid adding tags that have a limited use. If required, these tags can be added on a per-site/system basis in a 'free tags' field.
- The addition/removal of tags needs to be reviewed
Tags are identified as a flat list to support the widest range of systems, but we also define a taxonomy with parent child relationships (hopefully for future use).
php scrips/generate.php
will compile the tags and create the appropriate files.
Tags are located in two files
data/flat.json
- defines a flat list of tags that can be used by other systemsdata/unl_tree.json
- defines a taxonomy (or hierarchy) of tags, from which relationships can be inferred.
The machine names for tags must conform to this regex /^[a-z0-9\_]+$/
(only lowercase letters, numbers and underscores). This constraint is meant to maximize compatibility with other systems and make the machine names URL safe for transfer between systems.
Tags are often broken into this syntax: {namespace}__{tag name}
. The double underscore is unique and represents a namespace divider. Tags are namespaced like this to prevent collisions between different namespaces. For example, cob
is an acronym for both a building and a college. Without the namespaces, it would be impossible to differentiate between the two.
Each system will be different, but the general idea is to consume the flat.json
file to populate a pre-defined list of tags that users can select. The system should also expose an API to get content by a given tag, which other systems can use to aggregate similar content.
Scope can be reduced by combining tags.
To tag something as 'graduate research' you could give the content two tags: graduate
and research
. The combination of these tags implies that the content applies to both a graduate audience and is research oriented. This avoids adding a potentially redundant graduate_research
tag.
- Add API endpoints to interact with the unl_tree.json file. The API could allow for
- searching for a tag
- finding related tags (to show related content)
- defining aliases for each tag
- defining attributes such as a webpage for the tag to point to more information (cob could point to the business site)
- ???