Taxonomies
AI-on-Demand uses taxonomies to standardize terms across assets, for example, for licenses, business sectors, or news categories.
These taxonomies are defined by the conceptual model.
Each term in a taxonomy has a specific definition and may have subterms defined. e.g., the business sector construction
has subsectors for infrastructure
and buildings
, which each may also have subterms.
Importing the Taxonomy
The JSON file produced by the export script in the metadata repository can be used as input for the taxonomy
service of this project's docker compose
.
Put the JSON file at ${DATA_PATH}/taxonomies/taxonomies.json
, where DATA_PATH
is an environment variable (typically set from the .env
file).
Then invoke docker compose with the "taxonomy" profile. The script will then:
- invalidate all old known terms that are no longer part of the taxonomy: assets which already use them will keep them, but they may not be added to new items.
- update existing terms, e.g., with new definitions
- add new terms to the taxonomy
Development Taxonomy
When using the development configuration, you put a file in the ${DATA_PATH}/taxonomies
directory and point to it from the API configuration file (config.override.toml
), where ${DATA_PATH}/taxonomies
will be mounted as /data/taxonomies
. For example, with DATA_PATH=./data
and ./data/taxonomies/example_taxonomies.json
present:
[dev]
taxonomy="/data/taxonomies/example_taxonomies.json"
It is not intended to use this in production, since it might result in accidentally overwriting the taxonomies.
In production, use the taxonomy
service discussed above.