-
Notifications
You must be signed in to change notification settings - Fork 0
/
Interogari utile.txt
91 lines (71 loc) · 2.75 KB
/
Interogari utile.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
Interogari utile
- pentru aflarea Simpomelor+Afectiuni pe care le trateaza (direct) o planta data
DL_Query: { esteTratataDe value Menta }
SPARQL {
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX sedic: <http://www.semanticweb.org/sedic#>
SELECT DISTINCT ?value
WHERE {
{
sedic:Menta sedic:trateaza ?value .
}
UNION
{
?value sedic:esteTratataDe sedic:Menta
}
}
ORDER BY ?value
}
- pentru aflarea platelor ce trateaza o afectiune data
DL QUERY { trateaza some (esteSimptomaPentru value Raceala) }
SPARQL {
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX sedic: <http://www.semanticweb.org/sedic#>
SELECT DISTINCT ?value2
WHERE {
{ sedic:Raceala sedic:areSimptoma ?value. }
UNION { ?value sedic:esteSimptomaPentru sedic:Raceala . }
{ SELECT DISTINCT * WHERE {
{ ?value2 sedic:trateaza ?value . }
UNION { ?value sedic:esteTratataDe ?value2 . }
}
}
}
}
- pentru aflarea plantei ce are denumirea populara "sir_caractere" -- TODO research
denumirePopulara value "sir_caractere"^^string
afene, afin de munte, afine -negre, afinghi, asine, coacă, cucuzie, pomişoare
- afiseaza plantele ce trateaza afectiune si simptomele afeciunii
DL Query { trateaza value Contuzii or trateaza some (esteSimptomaPentru value Contuzii) }
SPARQL Query {
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX sedic: <http://www.semanticweb.org/sedic#>
SELECT DISTINCT ?value2
WHERE { { sedic:Contuzii sedic:areSimptoma ?value . }
UNION { ?value sedic:esteSimptomaPentru sedic:Contuzii . }
UNION { ?value2 sedic:trateaza sedic:Contuzii . }
UNION { sedic:Contuzii sedic:esteTratataDe ?value2 .}
{ SELECT DISTINCT *
WHERE { { ?value2 sedic:trateaza ?value . }
UNION { ?value sedic:esteTratataDe ?value2 . }
}
}
}
}
- afiseaza doar simptomele care sunt tratate de planta data
esteSimptomaPentru some (areSimptoma some (esteTratataDe value Aloe_vera))
- afiseaza doar bolile care sunt tratate de planta data
areSimptoma some (esteTratataDe value Aloe_vera)
- pentru aflarea Simpomelor+Afectiuni pe care le trateaza (direct si deduse din ontologie) o planta data
esteTratataDe value Menta or (esteSimptomaPentru some (esteTratataDe value Menta)) or (areSimptoma some (esteTratataDe value Menta))
-- ???
areSimptoma some (esteTratataDe value Aloe_vera) or esteTratataDe value Aloe_vera and not Simptoma