You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Daf Semantics repository collects some different components, designed for integrating ontologies, RDF data and to provide some different "semantic" functionalities to the [DAF](https://github.com/italia/daf) platform.
6
+
7
+
The [semantic_manager]() component exposes the central access point for a subset of the microservices' functionalities:
Copy file name to clipboardexpand all lines: semantic_standardization/README.md
+152-6
Original file line number
Diff line number
Diff line change
@@ -12,10 +12,111 @@ Two endpoints are provided:
12
12
13
13
The idea is that each endpoint (and its configured queries) acts for a very specific domain, so the next versions could introduce new vocabularies and ontologies, but needs to create ad-hoc SPARQL queries for retrieving the informations needed.
14
14
15
+
## semantic annotation in DAF ingestion
15
16
16
-
## example: retrieving a vocabulary dataset
17
+
The [DAF](https://github.com/italia/daf)`semantic_annotation` has currently the following structure: `{ontology}.{concept}.{property}`.
18
+
During the ingestion phase of datasets in DAF platform a `semantic_annotation` is used, in order to relate some column of a dataset to the most appropriate property of a given existing concept, from the controlled vocabularies.
19
+
20
+
**Note** that while the annotation is used to relate cells with vocabularies, it does not save explicitly a reference to the vocabularies used. A reference to concept from an ontology is used instead.
21
+
22
+
23
+
## examples
24
+
25
+
26
+
### example: sequence of calls
27
+
28
+
1. retrieves (vocabulary,ontology) reference from semantic_annotation tag
29
+
```
30
+
curl -X GET http://localhost:9000/kb/v1/daf/annotation/lookup?semantic_annotation=POI-AP_IT.PointOfInterestCategory.POIcategoryIdentifier -H "accept: application/json" -H "content-type: application/json"
31
+
```
32
+
33
+
2. retrieves the hierarchies for a given property
34
+
```
35
+
curl -X GET http://localhost:9000/kb/v1/hierarchies/properties?vocabulary_name=POICategoryClassification&ontology_name=poiapit&lang=it -H "accept: application/json" -H "content-type: application/json"
36
+
```
37
+
38
+
3. retrieves the dataset values for a certain vocaulary
39
+
```
40
+
curl -X GET http://localhost:9000/kb/v1/vocabularies/POICategoryClassification?lang=it -H "accept: application/json" -H "content-type: application/json"
41
+
```
42
+
43
+
----
44
+
45
+
### example: retrieves informations from the semantic_annotation tag
46
+
With this endpoint we can retrieve informations about the vocabulary/ontology pair related to a given `semantic_annotation` tag:
47
+
48
+
```
49
+
curl -X GET http://localhost:9000/kb/v1/daf/annotation/lookup?semantic_annotation={semantic_annotation} \
@@ -39,12 +140,52 @@ this will return a result structure similar to the following one:
39
140
]
40
141
```
41
142
42
-
## example: retrieve th hierarchies for the properties used
143
+
For technical reason, currently a value of `CLV-AP_IT_Region_name` is used in place of `CLV-AP_IT.Region.name`.
144
+
145
+
### example: retrieve the hierarchies for the properties used
43
146
44
147
If we have the example vocabulary `Istat-Classificazione-08-Territorio`, which uses terms from the ontology `clvapit`, we can retrieve the local hierarchy associated to each property with the curl command:
"value": "Rientrano in questa categoria tutti i punti di interesse connessi all'intrattenimento come zoo, discoteche, pub, teatri, acquari, stadi, casino, parchi divertimenti, ecc."
0 commit comments