Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README #6

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 54 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
A library for skolemising (or canonicalising) blank node labels in RDF graphs.

## Compilation
You need [Maven](https://maven.apache.org/) installed

You need [Maven](https://maven.apache.org/) and JDK 8+ installed.

### To build a .jar
```bash
$ mvn clean package
Expand All @@ -13,17 +15,64 @@ $ mvn clean install
````

## Usage

### CLI
````bash

To get a list of utilities:

```bash
$ java -jar blabel-0.2.0-SNAPSHOT-jar-with-dependencies.jar
````
usage: cl.uchile.dcc.blabel.cli.Main
missing <utility> arg where <utility> one of
LabelRDFGraph: Run labelling over an RDF graph encoded as N-Triples
RunNQuadsTest: [Testing] Compute the canonical graphs in a quads file
Control: [Testing] Run a control experiment to time parsing a quads file
RunSyntheticEvaluation: [Testing] Run synthetic benchmark
AnalyseNQuadsResults: [Testing]
UndirectedGraphToRDF: [Testing]
```

To get help for the main (skolemization) utility:

```bash
$ java -jar blabel-0.2.0-SNAPSHOT-jar-with-dependencies.jar LabelRDFGraph -h
***ERROR: class org.apache.commons.cli.MissingOptionException: Missing required options: io
usage: parameters:
-b output labels as blank nodes
-ddp don't distinguish partitions [isomorphic blank node partitions
will be removed; by default they are distinguished and kept]
-h print help
-i <arg> input file [enter 'std' for stdin]
-igz input is GZipped
-l lean beforehand
-lo lean only, do not label
-o <arg> output file [enter 'std' for stdout]
-ogz output should be GZipped
-p <arg> string prefix to append to label [make sure it's valid for URI
or blank node!] [default empty string])
-s <arg> hashing scheme: 0:md5 1:murmur3_128 2:sha1 3:sha256 4:sha512
(default Hashing.md5())
-upp keep blank nodes unique per partition, not graph [blank nodes
are labelled only using information from the partition; by default the
entire graph is encoded in the blank node label including ground triples]
time elapsed 17 ms
```

To skolemize a file `input.nt` into a file `output.nt`, using a prefix `https://example.com/.well-known/genid/` and the SHA256 hashing algorithm:

```sh
java -jar target/blabel-0.2.0-SNAPSHOT-jar-with-dependencies.jar LabelRDFGraph \
-i input.nt -s 3 -p 'https://example.com/.well-known/genid/' -o output.nt
```

### As Maven dependency
````xml

```xml
<dependency>
<groupId>cl.uchile.dcc</groupId>
<artifactId>blabel</artifactId>
<version>0.2.0-SNAPSHOT</version>
</dependency>
````
```

See the following page for more details: http://blabel.github.io/