Skip to content

Commit f91b8c8

Browse files
committed
update
1 parent 0eb2eb7 commit f91b8c8

33 files changed

+93
-680
lines changed

README.md

Lines changed: 32 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,50 +7,63 @@ We implemented **SCOOP-All**, **SCOOP-Prior**, and **SCOOP-Prior-R**.
77
We incorporate [RML2SHACL](https://github.com/RMLio/RML2SHACL), [Astrea](https://github.com/oeg-upm/astrea), and [XSD2SHACL](https://github.com/dtai-kg/XSD2SHACL).
88

99
## Installation
10+
Using git clone:
11+
12+
```
13+
$ git clone https://github.com/dtai-kg/SCOOP.git
14+
```
15+
16+
Installing reqruiements:
17+
18+
```
19+
$ pip install -r requirements
20+
```
1021

1122
## Command Line Use
1223
For command line use:
1324

1425
```
15-
$ python main.py --mode [priority/priorityR/all] --parallel [True/False] --mappings [PATH_TO_RML/PATH_TO_RML_FOLDER] --ontology [PATH_TO_ONTOLOGY/PATH_TO_ONTOLOGY_FOLDER] --xsd [PATH_TO_XSD/PATH_TO_XSD_FOLDER] -xsd [PATH_TO_ADJUSTMENT_XSD/PATH_TO_ADJUSTMENT_RML_FOLDER] --priority PRIORITY1 PRIORITY2 PRIORITY3 -o OUT_PUT_PATH
26+
$ python main.py --mode priority/priorityR/all --priority source1 source2 source3 --parallel true/false -m PATH_TO_RML/PATH_TO_RML_FOLDER -o PATH_TO_ONTOLOGY/PATH_TO_ONTOLOGY_FOLDER
27+
-x PATH_TO_XSD/PATH_TO_XSD_FOLDER -xsd PATH_TO_ADJUSTMENT_XSD/PATH_TO_ADJUSTMENT_RML_FOLDER
28+
-ot OUT_PUT_PATH
1629
```
1730

1831
For example:
1932

2033
```
21-
$ python main.py --mode all --parallel True --mappings usecases/RINF/mappings/ --xsd usecases/RINF/schema/ -xr usecases/RINF/mappings/ --ontology usecases/RINF/ontology/ontology.ttl -o integrated_shapes_all_rml_owl_xsd.ttl
34+
$ python main.py --mode all --parallel True -m usecases/RINF/mappings/ -o usecases/RINF/ontology/ontology.ttl- x usecases/RINF/schema/ -xr usecases/RINF/mappings/
35+
-ot integrated_shapes_all_rml_owl_xsd.ttl
2236
```
2337

2438
Where:
2539
- `--mode` is used to specify the integration mode, with three available options: "priority", "priorityR", and "all". Use this option to control the behavior of integration.
40+
- `--priority` is used to specify the priority order of sources, default is mapping rules higher than ontologies higher than XSD.
2641
- `--parallel` is used to specify whether parallel mode is enabled. If set to `True`, parallel processing may be used during integration for improved efficiency; if set to `False`, parallel processing is not utilized.
27-
- `--mappings` is used to specify the path to the folder or mapping files to be translated. Multiple file paths can be provided.
28-
- `--xsd` is used to specify the path to the folder or XSD files to be translated. Multiple file paths can be provided.
29-
- `--ontology` is used to specify the path to the folder or ontology files to be translated. Multiple file paths can be provided.
30-
- `-xr` is used to specify the RML file or folder path for post-adjustment of XSD-driven shapes. Multiple file paths can be provided.
31-
- `-o` is used to specify the output file path and name. The default value is "shape_integration.ttl". If not provided, the result will be saved to the default file.
42+
- `-m`, `--mappings` is used to specify the path to the folder or mapping files to be translated. Multiple file paths can be provided.
43+
- `-x`, `--xsd` is used to specify the path to the folder or XSD files to be translated. Multiple file paths can be provided.
44+
- `-o`, `--ontology` is used to specify the path to the folder or ontology files to be translated. Multiple file paths can be provided.
45+
- `-xr`, `--xsd_rml` is used to specify the RML file or folder path for post-adjustment of XSD-driven shapes. Multiple file paths can be provided.
46+
- `-ot`, `--output` is used to specify the output file path and name. The default value is "shape_integration.ttl". If not provided, the result will be saved to the default file.
3247

3348

3449
Full CLI Usage options:
3550
```
3651
$ python main.py -h
37-
usage: main.py [-h] [--mode MODE] [--parallel PARALLEL] [--priority PRIORITY [PRIORITY ...]]
38-
[--mappings MAPPINGS [MAPPINGS ...]] [--ontology ONTOLOGY [ONTOLOGY ...]]
39-
[--xsd XSD [XSD ...]] [--xsd_rml XSD_RML [XSD_RML ...]] [--output OUTPUT]
52+
usage: main.py [-h] [--mode] [--parallel] [--priority] [-m --mappings] [-o --ontology]
53+
[-x --xsd] [-xr --xsd_rml] [-ot --output]
4054
4155
optional arguments:
4256
-h, --help show this help message and exit
43-
--mode MODE integration mode: priority, priorityR, or all (default: priority)
44-
--parallel PARALLEL parallel mode: True or False (default: False)
45-
--priority PRIORITY [PRIORITY ...]
57+
--mode integration mode: priority, priorityR, or all (default: priority)
58+
--parallel parallel mode: True or False (default: False)
59+
--priority [PRIORITY ...]
4660
List of priority for integrating shapes from diverse sources (default: ['rml', 'ontology', 'xsd'])
47-
--mappings MAPPINGS [MAPPINGS ...]
61+
-m --mappings [MAPPINGS ...]
4862
Path to folder or mapping files to be translated
49-
--ontology ONTOLOGY [ONTOLOGY ...]
63+
-o --ontology [ONTOLOGY ...]
5064
Path to folder or ontology files to be translated
51-
--xsd XSD [XSD ...] Path to folder or xsd file to be translated
52-
--xsd_rml XSD_RML [XSD_RML ...]
65+
-x --xsd [XSD ...] Path to folder or xsd file to be translated
66+
-xr --xsd_rml [XSD_RML ...]
5367
Path to folder or rml file for post-adjustment of XSD-driven shape
54-
--output OUTPUT, -o OUTPUT
55-
Output file (default: shape_integration.ttl)
68+
-ot --output Output file (default: shape_integration.ttl)
5669
```

STATS/README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# SCOOP Evaluation
2+
3+
This folder constains extracted shapes from different systems and the evaluation results.
4+
The shapes produced by SCOOP starts with "SCOOP", and those produced by RML2SHACL, Astrea, and XSD2SHACL are saved in "temp" folder starting with the source name.
5+
6+
The Qualitative Analysis results can be found in log_target.txt, and the RDF validation results can be found in validation/validation.txt.
7+
8+
## Experiments
9+
10+
We conducted the experiments as showed in the paper.
11+
12+
## Qualitative Analysis
13+
14+
run stats_target.py to get the results, which are saved in log_target.txt:
15+
16+
```
17+
$ python STATS/stats_target.py
18+
```
19+
20+
## RDF Validation Analysis
21+
22+
run validation.py to get the validation reports
23+
24+
```
25+
$ python STATS/validation.py
26+
```
27+
28+
and then run validation_analysis.py to get the validation analysis results, which are saved in validation/validation.txt:
29+
```
30+
$ python STATS/validation_analysis.py
31+
```
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)