Giter Site home page Giter Site logo

infer's Introduction

infer

This is a simple command-line wrapper around Jena reasoners (and others in a not so near future).

Typicall use is to compute entailment of a file. owl:imports objects are dereferenced and included in the inference. Output is sent to stdout and uses the same RDF syntax as the input:

./infer file.ttl

You may want to split background and main triples. Triples from file.ttl are in main, triples from objects of owl:imports are in background. You can explicitly state if a file (or URI) should be loaded in main or background using the appropiate option flag (-B loads a URI into background). --split separates the output of entailments.

./infer -B http://www.w3.org/2006/time -o main.ttl -O bg.ttl file.ttl 

Using the --no-echo option, only new triples are output. In combination with --split, triples inferred by background are not considered new triples in main.

Build (& install)

Build as any mvn project. mvn clean package should give you a fat jat in target/. For more convenience, you can build a really executable file (under any system with bash) and place it somewhere on your $PATH:

git clone https://github.com/alexishuf/infer.git
cd infer
./create_executable.sh && mv infer ~/bin/
cd ~
infer file.ttl

Options

Here goes the output of ./infer --help to save you the effort of building.

 [INPUT ...] [--exclude-uri (-x) URI] [--exclude-uri-rx (-X) RX] [--help (-h)] [--input (-i) FILE] [--input-bg (-b) FILE] [--input-bg-uri (-B) URI] [--input-language (-l) LANG] [--input-uri (-I) URI] [--list-input-languages (-L)] [--list-output-formats (-F)] [--list-profiles (-P)] [--list-reasoners (-R)] [--no-dereference-imports (-D)] [--no-echo (-E)] [--output (-o) FILE] [--output-bg (-O) FILE] [--output-format (-f) FMT] [--profile (-p) VAL] [--reasoner (-r) VAL] [--split (-s)]

 INPUT                         : One or more input files or URIs that are
                                 considered under the main inputs (-i, -I).
 --exclude-uri (-x) URI        : Do not dereference these URIs
 --exclude-uri-rx (-X) RX      : Same as --exclude-uri, but uses a regular
                                 expression (Java syntax)
 --help (-h)                   : Show usage (default: true)
 --input (-i) FILE             : Use the given file as background triples. Has
                                 effect on split reasoning.
 --input-bg (-b) FILE          : Use the given file as background triples. Has
                                 effect on split reasoning.
 --input-bg-uri (-B) URI       : Same as --input-bg, but takes a URI
 --input-language (-l) LANG    : Input RDF language can be media type, file
                                 extension (without '.') or a field name in
                                 org.apache.jena.riotRDFLanguages. Default is
                                 to guess from input.
 --input-uri (-I) URI          : Same as --input-bg, but takes a URI
 --list-input-languages (-L)   : List all supported input languages (default:
                                 false)
 --list-output-formats (-F)    : List all supported output formats (default:
                                 false)
 --list-profiles (-P)          : List all profiles of selected reasoner
                                 (default: false)
 --list-reasoners (-R)         : List all available reasoners and exit
                                 (default: false)
 --no-dereference-imports (-D) : Disable downloading of owl:imports documents
                                 (default: false)
 --no-echo (-E)                : Disables echo, outputting only inferred 
                                 triples (default: false)
 --output (-o) FILE            : Output file for the main triples or all
                                 triples if --split is not givne
 --output-bg (-O) FILE         : Output file for the background triples
 --output-format (-f) FMT      : Similar to --input-language, but also
                                 understands field names from org.apache.jena.ri
                                 ot.RDFFormat. Default is to use the default
                                 RDFFormat of the input language
 --profile (-p) VAL            : Set reasoner profile (default: owl-fb)
 --reasoner (-r) VAL           : Use the specified reasoner (default: jena)
 --split (-s)                  : Splits inferences from background inputs and
                                 inferences from the union of main and
                                 background files. The latter does not include
                                 triples in the former. (default: false)

infer's People

Contributors

alexishuf avatar

Watchers

James Cloos avatar  avatar  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.