@@ -23,11 +23,7 @@ There are three possible ways to pseudonymize RDF triples:
23232 . Pseudonymize values for specific subject-predicate combinations.
24243 . Pseudonymize any value for a given predicate.
2525
26- By using all three ways together, we're able to get an RDF file with sensitive
27- information:
28-
29- <details >
30- <summary><b>Click to show input</b></summary>
26+ By combining these, can process an RDF file with sensitive information:
3127
3228``` ntriples
3329<http://example.org/Alice> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
@@ -40,15 +36,12 @@ information:
4036<http://example.org/Bank> <http://schema.org/name> "Bank" .
4137```
4238
43- </details >
4439
45- And pseudonymize the sensitive information such as people's names, personal and
46- secret information while keeping the rest as is :
40+ into a pseudonymized file where the sensitive information such as people's names, personal and
41+ secret information is hashed to protect privacy :
4742
48- <details >
49- <summary><b>Click to show output</b></summary>
5043
51- ```
44+ ``` ntriples
5245<http://example.org/af321bbc> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
5346<http://example.org/af321bbc> <http://xmlns.com/foaf/0.1/holdsAccount> <http://example.org/bs2313bc> .
5447<http://example.org/bs2313bc> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/OnlineAccount> .
@@ -59,55 +52,49 @@ secret information while keeping the rest as is:
5952<http://example.org/Bank> <http://schema.org/name> "Bank" .
6053```
6154
62- </details >
63-
6455The next subsections break down each of the three pseudonymization approaches to
6556better understand how they operate.
6657
6758### 1. Pseudonymize the URI of nodes with ` rdf:type `
6859
69- <details >
70- <summary><b>Click to show</b></summary>
7160
7261Given the following config:
7362
7463``` yaml
75- replace_uri_of_nodes_with_type :
64+ subjects :
65+ of_type :
7666 - " http://xmlns.com/foaf/0.1/Person"
7767` ` `
7868
7969The goal is to pseudonymize all instaces of ` rdf:type` Person. The following
8070input file :
8171
82- ` ` `
72+ ` ` ` ntriples
8373<http://example.org/Alice> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
8474` ` `
8575
8676Would become :
8777
88- ` ` `
78+ ` ` ` ntriples
8979<http://example.org/af321bbc> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
9080` ` `
9181
92- </details>
9382
9483# ## 2. Pseudonymize values for specific subject-predicate combinations
9584
96- <details>
97- <summary><b>Click to show</b></summary>
98-
9985Given the following config :
10086
10187` ` ` yaml
102- replace_values_of_subject_predicate:
103- "http://xmlns.com/foaf/0.1/Person":
88+ objects:
89+ on_type_predicate:
90+ "http://xmlns.com/foaf/0.1/Person":
10491 - "http://schema.org/name"
10592` ` `
10693
10794The goal is to pseudonymize only the instances of names when they're associated
10895to Person. The following input file :
10996
110- ` ` `
97+ ` ` ` ntriples
11198<http://example.org/Alice> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
11299<http://example.org/Alice> <http://schema.org/name> "Alice" .
113100<http://example.org/Bank> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Organization> .
@@ -116,19 +103,15 @@ to Person. The following input file:
116103
117104Would become :
118105
119- ` ` `
106+ ` ` ` ntriples
120107<http://example.org/Alice> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
121108<http://example.org/Alice> <http://schema.org/name> "af321bbc" .
122109<http://example.org/Bank> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Organization> .
123110<http://example.org/Bank> <http://schema.org/name> "Bank" .
124111` ` `
125112
126- </details>
127-
128113# ## 3. Pseudonymize any value for a given predicate
129114
130- <details>
131- <summary><b>Click to show</b></summary>
132115
133116Given the following config :
134117
@@ -140,7 +123,7 @@ replace_value_of_predicate:
140123The goal is to pseudonymize any values associated to name. The following input
141124file :
142125
143- ` ` `
126+ ` ` ` ntriples
144127<http://example.org/Alice> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
145128<http://example.org/Alice> <http://schema.org/name> "Alice" .
146129<http://example.org/Bank> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Organization> .
@@ -149,11 +132,9 @@ file:
149132
150133Would become :
151134
152- ` ` `
135+ ` ` ` ntriples
153136<http://example.org/Alice> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
154137<http://example.org/Alice> <http://schema.org/name> "af321bbc" .
155138<http://example.org/Bank> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Organization> .
156139<http://example.org/Bank> <http://schema.org/name> "38a3dd71" .
157140` ` `
158-
159- </details>
0 commit comments