SkillAgentSearch skills...

KBox

📦 The Knowledge Box - A data dependency management framework to help users to publish, find and install data models

Install / Use

/learn @AKSW/KBox
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

KBox

Join the chat at https://gitter.im/AKSW/KBox Build Status Coverage Status Codacy Badge codebeat badge Join the chat at https://gitter.im/AKSW/KBox Project Stats

@InProceedings{Marx/KBox/ICSC/2017,
  Title                    = {{KBox}: {T}ransparently {S}hifting {Q}uery {E}xecution on {K}nowledge {G}raphs to the {E}dge},
  Author                   = {Edgard Marx and Ciro Baron and Tommaso Soru and S\"oren Auer},
  Booktitle                = {11th IEEE International Conference on Semantic Computing, Jan 30-Feb 1, 2017, San Diego, California, USA},
  Year                     = {2017}
}

KBox is an abbreviation for Knowledge Box. it is a data management framework designed to facilitate data deployment whether on the cloud, personal computers or smart devices (edge). KBox is designed to cover different aspects of data management. It can be used to describe how the data is built as well as its dependencies. The concept of a data management might be familiar to you if you are aware of software management tools such as npm for JavaScript, gem for Ruby, and NutGet for .NET. KBox is the option for data dependency management. The rationale behind KBox is to allow users to manage data dependency models for data-driven applications. That is, KBox helps you to publish as well as locate and install data models. Moreover, to make it easier to manage Knowledge Graphs, KBox has embedded one of the most popular RDF frameworks, Jena. With KBox users can natively share, deploy and query RDF Knowledge Graphs at scale.

Why use KBox?

Systems usually deal with resources and knowledge that are often duplicated among several instances. For instance, when using the Stanford NLP library the resources and knowledge inside the library are duplicated among different applications. The idea is to have a common repository where users can share resources without duplication. In order to do that, we bring the RDF concept to bridge the gap among resource publishing, storing and locating.

What is possible to do with it?

With KBox you can share resources and knowledge among several applications, but not just that. In order to allow an easier knowledge dissemination, we have implemented Kibe library. The Kibe library allows applications to virtually install and query RDF knowledge bases. It takes around ~50 minutes to start querying DBpedia on your computer to avoid server overheads and faults.

How can I use KBox?

You can use KBox either as a command-line program or a library in your application. It is easy to plug and use it.

Installing KBox

  1. Installing via runnable jar file:
  • Download the library here.
  1. Installing via pip:
  • Install via pip:
pip install kbox

How can I execute KBox in command Line?

  • Type the following:
kbox <command> [option]
Where [command] is:
   * convert <directory|file> [<destFile>] [kb|zip]	 - convert the content of a directory (default kb).
             kb	 - into a kb file. ps: the directory might contain only RDF compatible file formats.
             zip	 - into a zip file.
   * convert <file> [<destFile>] gzip	 - encode a given file.
   * sparql <query> (kb <KB> | server <URL>) [install] [-json]	 - Query a given knowledge base (e.g. sparql "Select ..." kb "KB1,KB2")
                                               	 - ps: use -install in case you want to enable the auto-dereference.
   * server [port <port> (default 8080)] [subDomain <subDomain> (default kbox)] kb <kb-URL> [install] 	 - Start an SPARQL endpoint in the given subDomain containing the given bases.
   * server [port <port> (default 8080)] [subDomain <subDomain> (default kbox)] rdf <directories|files> [install [install]]	 - Start an SPARQL endpoint in the given subDomain containing the given RDF files.
   * server [port <port> (default 8080)] [subDomain <subDomain> (default kbox)] target <target>	 - Start an SPARQL endpoint in the given subDomain containing the target RDF files.
   * list [/p]	 - List all available KNS services and knowledge bases.
   * list kns	 - List all available KNS services.
   * install <URL>	 - Install a given resource.
   * install kns <kns-URL>	 - Install a given KNS service.
   * install kb <kb-URL> [version <version>]	 - Install a given knowledge base using the available KNS services to resolve it.
   * install kb <kb-URL> file <kbFile>	 - Install a given kb file in a given Kb-URL.
   * install kb <kb-URL> kns <kns-URL> [version <version>]	 - Install a knowledge base from a a given KNS service with the specific version.
   * install [install] kb <kb-URL> rdf <directories|files> [version <version>]	 - Install a knowledge base from a a given RDF files with the specific version.
   * install kn <kn-URL> [format [version <version>]]	 - Install a given knowledge base using the available KNS services to resolve it.
   * remove kns <kns-URL>	 - Remove a given KNS service.
   * info <URL> format <format> version <version>]]	 - Gives the information about a specific KB.
   * locate <URL>	 - returns the local address of the given resource.
   * locate kb <kb-URL> version <version>]	 - returns the local address of the given KB.
   * locate kn <kn-URL> format version <version>]]	 - returns the local address of the given KB.
   * search <kn-URL-pattern> [format <format> [version <version>]] [/p]	 - Search for all kb-URL containing a given pattern.
   * r-dir	 - Show the path to the resource folder.
   * r-dir <resourceDir>	 - Change the path of the resource folder.
   * version 	 - display KBox version.

** Note: If you want to get the results of above commands as a JSON output, you can append -o json parameter at the end of each command.

Let's look at the list command as an example,

kbox list

KBox KNS Resource table list
##############################
name,format,version
##############################
http://purl.org/pcp-on-web/dbpedia,kibe,c9a618a875c5d46add88de4f00b538962f9359ad
http://purl.org/pcp-on-web/ontology,kibe,c9a618a875c5d46add88de4f00b538962f9359ad

When you append -o json parameter at the end, the result will be look like this,

kbox list -o json

{
    "status_code": 200,
    "message": "visited all KNs.",
    "results": [
        {
            "name": "http://purl.org/pcp-on-web/dbpedia",
            "format": "kibe",
            "version": "c9a618a875c5d46add88de4f00b538962f9359ad"
        },
        {
            "name": "http://purl.org/pcp-on-web/ontology",
            "format": "kibe",
            "version": "c9a618a875c5d46add88de4f00b538962f9359ad"
        }
    ]
}

This -o jsonsub command is only applicable with list, install, remove, info, locate, search, r-dir & version commands.

How can I use KBox with python?

  1. Install KBox pip package
pip install KBox
  1. Import the kbox package (from kbox import kbox).

  2. Execute any KBox command with execute() function as follows.

    kbox.execute('<kbox_command>')
    

**Note: execute() method will return a string output which contains the result of the executed command.

You can see more details about KBox python package from here

How can I use KBox in my projec

View on GitHub
GitHub Stars48
CategoryDevelopment
Updated2mo ago
Forks11

Languages

Java

Security Score

95/100

Audited on Jan 22, 2026

No findings