Code Monkey home page Code Monkey logo

dalicc's Introduction

DALICC: The Data Licenses Clearance Center

License Library

  • DALICC license library consists of 344 licenses listed here.
  • The whole license library (including license representations as documented here) is stored in the RDF file licensedata/licenselibrary/licenselibrary.ttl.
  • The licenses are also in separate .ttl files under licensedata/licenses.

API

DALICC API supports the automated clearance of rights thus supporting the legally secure and time-efficient reutilization of third party data sources. The services are running here.

Installation Requirements

  • docker
  • docker-compose

Setup

  • Execute the following commands in the folder:
    1. docker-compose build --pull
    2. docker-compose up -d
    3. mkdir reasoner/app/programs/temp

Change ports or container name

The URLs of the database and the reasoner are set via env in the docker-compose file. One exception is the config file of the reasoner: 'reasoner/reasoner.config'

In there is the URL of the database used by the hexlite plugin. This has to be changed additionally.

Virtuoso Configuration

  • Virtuoso is hosted using this Docker image.
  • The Virtuoso DB is available at port 8890; see docker-compose.yml for configurations.
  • The database files are stored in a local volume in virtuoso_data.
Load DALICC License Library
  • Execute the following command for copying the RDF files into ttl_dump directory under virtuoso_data and specifying the graphs:
    1. cd licensedata
    2. sudo sh copy_ttls.sh
  • To load RDF files into Virtuoso follow the instructions from the documentation:
    1. docker exec -it virtuoso-db bash
    2. isql-v -U dba -P dba
    3. SQL> ld_dir('ttl_dump', '*.ttl', NULL);
    4. SQL> rdf_loader_run();
Full Text Index
  • Build a full text index over the graph:
    1. docker exec -it virtuoso-db bash
    2. isql-v -U dba -P dba
    3. -- We specify that all string objects in the graph 'license-library' should be text indexed:
      • SQL> DB.DBA.RDF_OBJ_FT_RULE_ADD('https://dalicc.net/licenselibrary/', null, 'licenses');
    4. -- We update the text index.
      • SQL> DB.DBA.VT_INC_INDEX_DB_DBA_RDF_OBJ ();
  • To set the text index to follow the triples in real time, use:
    • DB.DBA.VT_BATCH_UPDATE ('DB.DBA.RDF_OBJ', 'OFF', null);
  • To set the text index to be updated every 10 minutes, use:
    • DB.DBA.VT_BATCH_UPDATE ('DB.DBA.RDF_OBJ', 'ON', 10);
  • Example query using the full text index:
    • SELECT * FROM <https://dalicc.net/licenselibrary/> WHERE { ?s ?p ?o . ?o bif:contains '"Mozilla*"' . }
Removing All Triples from Virtuoso DB

API Configuration

  • The API is implemented using FastAPI.
  • The source files of the API are in app; FastAPI reloads the application on any local changes.
Endpoint

dalicc's People

Contributors

tboonx avatar havurgiray avatar sebneu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.