项目作者: Coleridge-Initiative

项目描述 :
Controlled vocabulary used for Rich Context and ADRF.
高级语言: Python
项目地址: git://github.com/Coleridge-Initiative/adrf-onto.git
创建时间: 2019-06-23T17:10:07Z
项目社区:https://github.com/Coleridge-Initiative/adrf-onto

开源协议:Creative Commons Zero v1.0 Universal

下载


ADRF Ontology

Welcome to adrf-onto which is used to construct, validate, and
leverage the Rich Context knowledge graph for the ADRF framework.

Some files of particular interest:

  • adrf.ttl — a mid-level ontology specification for ADRF
  • rcc.ttl — a subgraph of results from the Rich Context Competition, using this vocabulary for ADRF
  • onto.py — a brief Python script used to load and validate the graph data
  • vocab.json — a JSON-LD context for compaction of the output graph files

Note that this data is represented in TTL format
(pronounced “turtle”) for the parts that humans read and write.
We use JSON-LD format for the parts of the graph that machines consume or produce.
A couple lines of Python convert between those two formats rather quickly.

Dependencies

The following assumes that your Python binary is located at
/usr/bin/python3 — change that as needed.

To set up a virtual environment for Python 3.x using virtualenv:

  1. virtualenv -p /usr/bin/python3 ~/venv
  2. pip install --upgrade pip
  3. pip install -r requirements.txt

Then to activate the environment:

  1. source ~/venv/bin/activate

Validation

A variety of “unit tests” can be performed on this ontology spec, so
that as multiple people are collaborating to develop it, we can make
sure that the committed file is consistent.

To load, parse, and validate the files used to construct the graph:

  1. ./onto.py adrf.ttl rcc.ttl

Then review the generated tmp.ttl output file to make sure it
doesn’t show any errors.

The tmp.json shows that same graph in JSON-LD format (machine
readable), which is used as a test case for the JupyterLab metadata service.

For more details about the inference rules used, see
SKOS-Inference.

We’re using the following packages:

Roadmap

Later, we’ll automate the tests.

See the wiki for this repo for more detailed specifications.