Skip to content

Commit ca8ae1a

Browse files
committed
add sample page
1 parent a10a0d1 commit ca8ae1a

File tree

1 file changed

+260
-0
lines changed

1 file changed

+260
-0
lines changed

docs/sample.md

Lines changed: 260 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,260 @@
1+
---
2+
id: sample
3+
title: Sample
4+
---
5+
6+
# Sample Input and Output
7+
8+
This section provides example files showing **how to structure input tables** and the corresponding **generated outputs** in different formats.
9+
The documentation includes examples for two CSV tables: **mountains** and **movies**.
10+
Examples in **Turtle** and **XML** are shown in the documentation, while the full example files are available in the **/samples** folder in the root of the repository.
11+
12+
---
13+
14+
## Mountain Sample
15+
16+
The following example shows a table of mountains with their coordinates, elevation, and mountain range.
17+
This CSV file is transformed into semantic outputs such as RDF/Turtle to illustrate how the system maps structured data to linked data.
18+
19+
### CSV Table
20+
21+
```csv
22+
Name,Coordinates,Elevation_m,Range
23+
Mont Blanc,"45.832119, 6.865575",4805.59,Alps
24+
Hohtälli,"45°59'20.3\"N 7°48'09.8\"E",3275,Pennine Alps
25+
Matterhorn,"32T 395215 5093227",4478,Pennine Alps
26+
Mount Everest,"27.9881, 86.9250",8848.86,Mahalangur Himal
27+
```
28+
29+
### Turtle output
30+
31+
```ttl
32+
@prefix ns1: <https://www.wikidata.org/wiki/Property:/> .
33+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
34+
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
35+
36+
<https://www.wikidata.org/wiki/Property:P2044> rdfs:label "elevation above sea level"^^xsd:string .
37+
38+
<https://www.wikidata.org/wiki/Property:P4552> rdfs:label "mountain range"^^xsd:string .
39+
40+
<https://www.wikidata.org/wiki/Property:P610> rdfs:label "highest point"^^xsd:string .
41+
42+
<https://www.wikidata.org/wiki/Q1374> a <https://www.wikidata.org/wiki/Q54050> ;
43+
rdfs:label "matterhorn"^^xsd:string ;
44+
ns1:P2044 "8848.86"^^xsd:float ;
45+
ns1:P4552 <https://www.wikidata.org/wiki/Q1270> .
46+
47+
<https://www.wikidata.org/wiki/Q513> rdfs:label "mount everest"^^xsd:string .
48+
49+
<https://www.wikidata.org/wiki/Q583> a <https://www.wikidata.org/wiki/Q54050> ;
50+
rdfs:label "mont blanc"^^xsd:string ;
51+
ns1:P2044 3275 ;
52+
ns1:P4552 <https://www.wikidata.org/wiki/Q765847> .
53+
54+
<https://www.wikidata.org/wiki/Q690177> a <https://www.wikidata.org/wiki/Q54050> ;
55+
rdfs:label "hohtälli"^^xsd:string ;
56+
ns1:P2044 4478 ;
57+
ns1:P4552 <https://www.wikidata.org/wiki/Q1270> .
58+
59+
<https://www.wikidata.org/wiki/Q924257> rdfs:label "mahalangur himal"^^xsd:string .
60+
61+
<https://www.wikidata.org/wiki/Q765847> a <https://www.wikidata.org/wiki/Q1061151> ;
62+
rdfs:label "alps"^^xsd:string .
63+
64+
<https://www.wikidata.org/wiki/Q1061151> rdfs:label "massif"^^xsd:string .
65+
66+
<https://www.wikidata.org/wiki/Q1270> a <https://www.wikidata.org/wiki/Q1061151> ;
67+
rdfs:label "pennine alps"^^xsd:string .
68+
69+
<https://www.wikidata.org/wiki/Q54050> rdfs:label "hill"^^xsd:string .
70+
```
71+
72+
### XML output
73+
74+
```xml
75+
<?xml version="1.0" encoding="utf-8"?>
76+
<rdf:RDF
77+
xmlns:ns1="https://www.wikidata.org/wiki/Property:/"
78+
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
79+
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
80+
>
81+
<rdf:Description rdf:about="https://www.wikidata.org/wiki/Q1374">
82+
<rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">matterhorn</rdfs:label>
83+
<rdf:type rdf:resource="https://www.wikidata.org/wiki/Q54050"/>
84+
<ns1:P2044 rdf:datatype="http://www.w3.org/2001/XMLSchema#float">8848.86</ns1:P2044>
85+
<ns1:P4552 rdf:resource="https://www.wikidata.org/wiki/Q1270"/>
86+
</rdf:Description>
87+
<rdf:Description rdf:about="https://www.wikidata.org/wiki/Property:P4552">
88+
<rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">mountain range</rdfs:label>
89+
</rdf:Description>
90+
<rdf:Description rdf:about="https://www.wikidata.org/wiki/Q1061151">
91+
<rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">massif</rdfs:label>
92+
</rdf:Description>
93+
<rdf:Description rdf:about="https://www.wikidata.org/wiki/Q765847">
94+
<rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">alps</rdfs:label>
95+
<rdf:type rdf:resource="https://www.wikidata.org/wiki/Q1061151"/>
96+
</rdf:Description>
97+
<rdf:Description rdf:about="https://www.wikidata.org/wiki/Q583">
98+
<rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">mont blanc</rdfs:label>
99+
<rdf:type rdf:resource="https://www.wikidata.org/wiki/Q54050"/>
100+
<ns1:P2044 rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">3275</ns1:P2044>
101+
<ns1:P4552 rdf:resource="https://www.wikidata.org/wiki/Q765847"/>
102+
</rdf:Description>
103+
<rdf:Description rdf:about="https://www.wikidata.org/wiki/Property:P610">
104+
<rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">highest point</rdfs:label>
105+
</rdf:Description>
106+
<rdf:Description rdf:about="https://www.wikidata.org/wiki/Q690177">
107+
<rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">hohtälli</rdfs:label>
108+
<rdf:type rdf:resource="https://www.wikidata.org/wiki/Q54050"/>
109+
<ns1:P2044 rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">4478</ns1:P2044>
110+
<ns1:P4552 rdf:resource="https://www.wikidata.org/wiki/Q1270"/>
111+
</rdf:Description>
112+
<rdf:Description rdf:about="https://www.wikidata.org/wiki/Property:P2044">
113+
<rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">elevation above sea level</rdfs:label>
114+
</rdf:Description>
115+
<rdf:Description rdf:about="https://www.wikidata.org/wiki/Q1270">
116+
<rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">pennine alps</rdfs:label>
117+
<rdf:type rdf:resource="https://www.wikidata.org/wiki/Q1061151"/>
118+
</rdf:Description>
119+
<rdf:Description rdf:about="https://www.wikidata.org/wiki/Q513">
120+
<rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">mount everest</rdfs:label>
121+
</rdf:Description>
122+
<rdf:Description rdf:about="https://www.wikidata.org/wiki/Q924257">
123+
<rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">mahalangur himal</rdfs:label>
124+
</rdf:Description>
125+
<rdf:Description rdf:about="https://www.wikidata.org/wiki/Q54050">
126+
<rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">hill</rdfs:label>
127+
</rdf:Description>
128+
</rdf:RDF>
129+
```
130+
131+
---
132+
133+
## Movies Sample
134+
135+
This example shows a table of movies with their title, genre, language, and main actor.
136+
It illustrates how the system can transform structured movie data into semantic outputs such as Turtle or XML.
137+
138+
### CSV Table
139+
140+
```csv
141+
col0,col1,col2,col3
142+
the matrix,action thriller,english,keanu reeves
143+
shutter island,mystery film,english,leonardo dicaprio
144+
```
145+
146+
### Turtle output
147+
148+
```ttl
149+
@prefix ns1: <https://www.wikidata.org/wiki/Property:/> .
150+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
151+
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
152+
153+
<https://www.wikidata.org/wiki/Property:P136> rdfs:label "genre"^^xsd:string .
154+
155+
<https://www.wikidata.org/wiki/Property:P1412> rdfs:label "languages spoken, written or signed"^^xsd:string .
156+
157+
<https://www.wikidata.org/wiki/Property:P161> rdfs:label "cast member"^^xsd:string .
158+
159+
<https://www.wikidata.org/wiki/Property:P17> rdfs:label "country"^^xsd:string .
160+
161+
<https://www.wikidata.org/wiki/Property:P364> rdfs:label "original language of film or TV show"^^xsd:string .
162+
163+
<https://www.wikidata.org/wiki/Property:P800> rdfs:label "notable work"^^xsd:string .
164+
165+
<https://www.wikidata.org/wiki/Q1200678> rdfs:label "mystery film"^^xsd:string .
166+
167+
<https://www.wikidata.org/wiki/Q210364> rdfs:label "shutter island"^^xsd:string .
168+
169+
<https://www.wikidata.org/wiki/Q38111> rdfs:label "leonardo dicaprio"^^xsd:string .
170+
171+
<https://www.wikidata.org/wiki/Q83495> a <https://www.wikidata.org/wiki/Q3331189> ;
172+
rdfs:label "the matrix"^^xsd:string ;
173+
ns1:P136 <https://www.wikidata.org/wiki/Q3990883> ;
174+
ns1:P161 <https://www.wikidata.org/wiki/Q43416> ;
175+
ns1:P364 <https://www.wikidata.org/wiki/Q1860> .
176+
177+
<https://www.wikidata.org/wiki/Q10894548> rdfs:label "particular linguistics"^^xsd:string .
178+
179+
<https://www.wikidata.org/wiki/Q134556> rdfs:label "single"^^xsd:string .
180+
181+
<https://www.wikidata.org/wiki/Q3990883> a <https://www.wikidata.org/wiki/Q3331189> ;
182+
rdfs:label "action thriller"^^xsd:string ;
183+
ns1:P364 <https://www.wikidata.org/wiki/Q1860> .
184+
185+
<https://www.wikidata.org/wiki/Q43416> a <https://www.wikidata.org/wiki/Q134556> ;
186+
rdfs:label "keanu reeves"^^xsd:string .
187+
188+
<https://www.wikidata.org/wiki/Q1860> a <https://www.wikidata.org/wiki/Q10894548> ;
189+
rdfs:label "english"^^xsd:string .
190+
191+
<https://www.wikidata.org/wiki/Q3331189> rdfs:label "version, edition or translation"^^xsd:string .
192+
```
193+
194+
### XML output
195+
196+
```xml
197+
<?xml version="1.0" encoding="utf-8"?>
198+
<rdf:RDF
199+
xmlns:ns1="https://www.wikidata.org/wiki/Property:/"
200+
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
201+
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
202+
>
203+
<rdf:Description rdf:about="https://www.wikidata.org/wiki/Q1200678">
204+
<rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">mystery film</rdfs:label>
205+
</rdf:Description>
206+
<rdf:Description rdf:about="https://www.wikidata.org/wiki/Property:P17">
207+
<rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">country</rdfs:label>
208+
</rdf:Description>
209+
<rdf:Description rdf:about="https://www.wikidata.org/wiki/Q83495">
210+
<rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">the matrix</rdfs:label>
211+
<ns1:P136 rdf:resource="https://www.wikidata.org/wiki/Q3990883"/>
212+
<rdf:type rdf:resource="https://www.wikidata.org/wiki/Q3331189"/>
213+
<ns1:P364 rdf:resource="https://www.wikidata.org/wiki/Q1860"/>
214+
<ns1:P161 rdf:resource="https://www.wikidata.org/wiki/Q43416"/>
215+
</rdf:Description>
216+
<rdf:Description rdf:about="https://www.wikidata.org/wiki/Q1860">
217+
<rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">english</rdfs:label>
218+
<rdf:type rdf:resource="https://www.wikidata.org/wiki/Q10894548"/>
219+
</rdf:Description>
220+
<rdf:Description rdf:about="https://www.wikidata.org/wiki/Q3331189">
221+
<rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">version, edition or translation</rdfs:label>
222+
</rdf:Description>
223+
<rdf:Description rdf:about="https://www.wikidata.org/wiki/Property:P364">
224+
<rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">original language of film or TV show</rdfs:label>
225+
</rdf:Description>
226+
<rdf:Description rdf:about="https://www.wikidata.org/wiki/Q3990883">
227+
<rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">action thriller</rdfs:label>
228+
<rdf:type rdf:resource="https://www.wikidata.org/wiki/Q3331189"/>
229+
<ns1:P364 rdf:resource="https://www.wikidata.org/wiki/Q1860"/>
230+
</rdf:Description>
231+
<rdf:Description rdf:about="https://www.wikidata.org/wiki/Q10894548">
232+
<rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">particular linguistics</rdfs:label>
233+
</rdf:Description>
234+
<rdf:Description rdf:about="https://www.wikidata.org/wiki/Property:P161">
235+
<rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">cast member</rdfs:label>
236+
</rdf:Description>
237+
<rdf:Description rdf:about="https://www.wikidata.org/wiki/Q43416">
238+
<rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">keanu reeves</rdfs:label>
239+
<rdf:type rdf:resource="https://www.wikidata.org/wiki/Q134556"/>
240+
</rdf:Description>
241+
<rdf:Description rdf:about="https://www.wikidata.org/wiki/Q210364">
242+
<rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">shutter island</rdfs:label>
243+
</rdf:Description>
244+
<rdf:Description rdf:about="https://www.wikidata.org/wiki/Property:P800">
245+
<rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">notable work</rdfs:label>
246+
</rdf:Description>
247+
<rdf:Description rdf:about="https://www.wikidata.org/wiki/Q38111">
248+
<rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">leonardo dicaprio</rdfs:label>
249+
</rdf:Description>
250+
<rdf:Description rdf:about="https://www.wikidata.org/wiki/Q134556">
251+
<rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">single</rdfs:label>
252+
</rdf:Description>
253+
<rdf:Description rdf:about="https://www.wikidata.org/wiki/Property:P136">
254+
<rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">genre</rdfs:label>
255+
</rdf:Description>
256+
<rdf:Description rdf:about="https://www.wikidata.org/wiki/Property:P1412">
257+
<rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">languages spoken, written or signed</rdfs:label>
258+
</rdf:Description>
259+
</rdf:RDF>
260+
```

0 commit comments

Comments
 (0)