Skip to content

Commit be4411b

Browse files
authored
Update README.md
1 parent d728167 commit be4411b

File tree

1 file changed

+38
-6
lines changed

1 file changed

+38
-6
lines changed

README.md

Lines changed: 38 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# RDF-to-Gephi
22

33
Converts RDF knowledge graphs to a [Gephi](https://gephi.org/) GEXF file that can be opened in Gephi. GEXF stands for [Graph Exchange XML Format](https://gexf.net/).
4-
Supports single RDF file, multiple files in a folder, or remote SPARQL endpoint URL. Can work either in a _"direct and simple conversion"_ mode, turning triples into edges, or using a set of SPARQL queries to define exactly the structure of the nodes and edges that should appear in the Gexf file.
4+
Supports single RDF file, multiple files in a folder, or remote SPARQL endpoint URL. Can work either in a _"direct and simple conversion"_ mode, turning triples into edges, or using a set of SPARQL queries to define exactly the scope and structure of the nodes and edges that should appear in the Gexf file.
55

66
## How to run
77

@@ -12,7 +12,7 @@ Supports single RDF file, multiple files in a folder, or remote SPARQL endpoint
1212
5. Run a conversion command, typically the following:
1313

1414
```sh
15-
java -jar target/rdf2gexf-1.0-onejar.jar sparql \
15+
java -jar rdf2gephi-1.0-onejar.jar sparql \
1616
--input http://my.sparql.endpoint \
1717
--edges queries/edges.rq \
1818
--attributes queries/attributes.rq \
@@ -28,12 +28,36 @@ java -jar target/rdf2gexf-1.0-onejar.jar sparql \
2828

2929
### direct convertion (discouraged)
3030

31+
Converts RDF data to GEXF format directly. All literals are considered as attributes, and all triples as edges, except `rdf:type`. `rdfs:label` is used as label.
32+
33+
The full options of the command are:
34+
35+
```
36+
direct Converts RDF data to GEXF format directly. All literals are
37+
considered as attributes, and all triples as edges, except
38+
rdf:type. rdfsl:label is used as label.
39+
Usage: direct [options]
40+
Options:
41+
-e, --endDateProperty
42+
URI of the property in the knowledge grapg holding the end date of
43+
entities
44+
* -i, --input
45+
Path to RDF input file, or directory containing RDF files, or URL
46+
of a SPARQL endpoint.
47+
* -o, --output
48+
Path to GEXF output file
49+
-s, --startDateProperty
50+
URI of the property holding the start date of entities
51+
-w, --weight
52+
Path to a properties file associating properties to weights
53+
```
54+
3155
### SPARQL-based conversion (preferred)
3256

3357
The `sparql` commands takes a set of SPARQL queries to build the structure of the Gephi graph. The command synopsis is the following:
3458

3559
```
36-
java -jar target/rdf2gexf-1.0-onejar.jar sparql \
60+
java -jar rdf2gephi-1.0-onejar.jar sparql \
3761
--input <file or directory or url of SPARQL endpoint> \
3862
--edges <SPARQL query file to create edges> \
3963
--attributes <SPARQL query file to create attributes> \
@@ -49,19 +73,23 @@ The full options of the command are:
4973
Options:
5074
-a, --attributes
5175
Path to the file containing the SPARQL query to retrieve
52-
attributes, e.g. 'sparql/attribute.rq'
76+
attributes, e.g. 'sparql/attribute.rq'. The query MUST return 3
77+
columns: the first one is the subject, the second one is the
78+
attribute URI, the third one is the attribute value.
5379
-d, --dates
5480
Path to the file containing the SPARQL query to retrieve date
5581
ranges, e.g. 'sparql/dates.rq'
5682
* -e, --edges
5783
Path to the file containing the SPARQL query to retrieve edges,
58-
e.g. 'sparql/edges.rq'
84+
e.g. 'sparql/edges.rq'. The query MUST return the following
85+
variables: ?subject, ?edge, ?object
5986
* -i, --input
6087
Path to RDF input file, or directory containing RDF files, or URL
6188
of a SPARQL endpoint.
6289
-l, --labels
6390
Path to the file containing the SPARQL query to retrieve labels,
64-
e.g. 'sparql/labels.rq'
91+
e.g. 'sparql/labels.rq'. The query MUST return the following
92+
variables: ?subject, ?label
6593
* -o, --output
6694
Path to GEXF output file
6795
```
@@ -171,6 +199,10 @@ WHERE {
171199

172200
TODO
173201

202+
## Support for dynamic graphs
203+
204+
rdf2gephi supports the creation of dynamic graphs where we can see the evolution of the graph over time.
205+
TODO
174206

175207
## Typical actions in Gephi to view your RDF graph
176208

0 commit comments

Comments
 (0)