Semantic Web

Apparently sparql doesn't allow non aggregate variables in the select clause unless they are also in the group by, which affects the query's meaning. So I came up with another solution which includes an intersection(join):

select ?country ?area ?lake
where {
?lake rdfs:label ?label .
?lake rdf:type dbo:Lake .
?lake dbo:areaTotal ?area .
?lake dbo:country ?country .
?country rdf:type dbo:Country .
FILTER (lang(?label) = 'en') .
FILTER(?maxarea = ?area)
{
select ?country (MAX(?area) AS ?maxarea)
where {
?lake rdfs:label ?label .
?lake rdf:type dbo:Lake .
?lake dbo:areaTotal ?area .
?lake dbo:country ?country .
?country rdf:type dbo:Country .
FILTER (lang(?label) = 'en') .
}
group by ?country
}
}

Technology:

SPARQL group by only one variable

In semantic web, sparql is a powerful language which can among others query for specific knowledge from provided rdf databases. Recently I tried to find out the largest lake in each country in the world from dbpedia. I came up with a query which resulted in the country and the area of its largest lake but without the name of the lake. I wanted to list the name of the lake in the table. So when I added a new variable to the select clause without putting it in group by clause, it complained that "Variable ?label is used in the result set outside aggregate and not mentioned in GROUP BY clause".

Calais Tags:

Solution in OWL

Here is an example solution on how to define a data property restriction in OWL:

DataPropertyRange>
DataProperty IRI="#has_Age"/>
Datatype abbreviatedIRI="xsd:integer"/>
FacetRestriction facet="http://www.w3.org/2001/XMLSchema#minInclusive">
Literal datatypeIRI="http://www.w3.org/2001/XMLSchema#integer">0
/FacetRestriction>
/DataPropertyRange>

in this example the data property we are looking at is called "has_Age" and we give it the properties "integer" with the third line. With the FacetRestriction in line 4 we set a minimum restriction and in line 5 we define this minimum to be 0 as a person cannot be "negative old".

edit: I had to remove all of the opening braces "<" from my solution because there was issues with the parsers.

Retrieve and manipulate data in semantic web technology

As we know the semantic web is exponentially growing to give the meaning to the information and data which machines can understand it.and there is huge amount of information and data stored in internet. My problem is if we have a huge amount of data provided by semantic web standards how we can get the exactly information we want. for instance if we assume that we have a web site like "wikipedia" which is completely understandable by machines.how it's possible to know cities in Austria that start with word "ober". obviously it not possible to go though all of the cities.

Try Pellet for semantic web reasoning

Another good reasoner to be used in Protege is Pellet. You can download it from http://clarkparsia.com/pellet/

Use the Classes tab and the Individuals tab

Open Protégé and the respective ontology.
Change to the "Classes" tab and create the class.
Change to the "Individuals" tab and create the individual.
Protégé recognizes that the IRI already exists and accepts it.

How is it possible to perform Metamodelling in Protégé

Metamodelling happens if an IRI is used as a class and as an individual in two axioms. The topic is described at http://www.w3.org/TR/owl2-syntax/#Metamodeling.

Semantic Web does not provide reference to object properties

Semantic web knowledge representation is build on triples, which represent subject - predicate - object. Semantic web Standards are using those triples as atomic building blocks for their own specification and any ontology. With triples knowledge can be specified like in the sentence: "Paul is a Person". "Paul" is the subject, "is a" is the predicate, "Person" is the object. Subject and object are considered as entities while predicates are considered as object properties are connecting those entities. From this perspective representation of every knowledge is quiet similar to the usage of early days' entity-relationship-diagrams. Also some shortcomings seem to be adopted. Sentences like: "Paul takes Pauls Car to reach Pauls Office" cannot be described easily. It requires an intermediate, unnatural entity like "Pauls Vehicle Choice" and many sentences: "Pauls Vehicle Choice chosen by Paul", "Pauls Vehicle Choice is Pauls Car", "Pauls Vehicle Choice reaches Pauls Office". Instead of one sentences there are three sentences for describing the equivalent problem. Isn't there an alternative approach possible?

OWL EL, OWL FULL

Instead of OWL DL, we have other two version : OWL EL and OWL FULL.
OWL EL is less expressive than OWL DL and OWL FULL, but the complexity is quite nice.
For OWL FULL, we can use both syntax in RDF and in OWL

programming with OWL API

-What is OWLAPI -Why we need OWL API -How can we use OWP API -Example

Pages

Subscribe to Semantic Web