GoodRelations is a standardized vocabulary for product, price, and company data that can (1) be embedded into existing static and dynamic Web pages and that (2) can be processed by other computers. This increases the visibility of your products and services in the latest generation of search engines, recommender systems, and other novel applications.
Kingsley Idehen
kidehen at openlinksw.com
Sat Sep 12 18:38:03 CEST 2009
goodrelations-request at ebusiness-unibw.org wrote: > Send goodrelations mailing list submissions to > goodrelations at ebusiness-unibw.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://ebusiness-unibw.org/cgi-bin/mailman/listinfo/goodrelations > or, via email, send a message with subject or body 'help' to > goodrelations-request at ebusiness-unibw.org > > You can reach the person managing the list at > goodrelations-owner at ebusiness-unibw.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of goodrelations digest..." > > > Today's Topics: > > 1. LOC Dataspace, Quering for GoodRelations Data > (Martin Hepp (UniBW)) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Fri, 11 Sep 2009 14:31:04 +0200 > From: "Martin Hepp (UniBW)" <martin.hepp at ebusiness-unibw.org> > Subject: [goodrelations] LOC Dataspace, Quering for GoodRelations Data > To: goodrelations at ebusiness-unibw.org > Message-ID: <4AAA4308.8030506 at ebusiness-unibw.org> > Content-Type: text/plain; charset="iso-8859-1" > > Dear all: > > As the amount of GoodRelations data is growing, I wanted to stress that > you can use the Virtuoso dataspace at > > http://loc.openlinksw.com/sparql > > for queries. We are currently trying to get all available GoodRelations > data into that space and keep it up-to-data. > > That means that application developers > > - don't have to crawl the whole Web for relevant RDF > - can use the powerful parallelization techniques and SPARQL extensions > from Virtuoso. > > > If you want to give it a try: Simply paste the following query: It lists > the first 50 items in the space that cost between 5 and 10 EUR or 7 and > 14 USD. > > PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> > PREFIX gr:<http://purl.org/goodrelations/v1#> > > SELECT ?s ?p ?c > WHERE { > ?s a gr:Offering. > ?s gr:hasPriceSpecification ?ps. > ?ps gr:hasCurrencyValue ?p. > ?ps gr:hasCurrency ?c. > FILTER ((regex(?c, "EUR") && ?p >"5"^^xsd:float && ?p <"10"^^xsd:float) > || (regex(?c, "USD") && ?p >"7"^^xsd:float && ?p <"14"^^xsd:float)) > > } LIMIT 50 > > > Also, you can use the next query to watch the growth in instance data. > It lists all GoodRelations classes and determines the amount of instances. > > # List of Class Frequency > > SELECT ?class, count(?instance) as ?freq WHERE > { > ?instance a ?class. > {SELECT ?class FROM <http://purl.org/goodrelations/v1#> WHERE > {?class a owl:Class. } > } > } > > Since Virtuoso is a quad store, you can constrain the expressions to > individual graphs or graph groups. This is how the previous query > constraints the list of classes to those defined in GoodRelations. > > Also, note that Virtuoso supports nesting and subqueries. > > Best wishes > > Martin > > > > Martin, Also remember queries like: PREFIX gr: <http://purl.org/goodrelations/v1#> PREFIX ceo: <http://www.ebusiness-unibw.org/ontologies/consumerelectronics/v1#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> SELECT ?m ?label ?weight ?ean ?zoomfactor (( ?weight / ?zoomfactor )) as ?weight_zoom_factor_ratio WHERE {?m a ceo:Camcorder. ?m rdfs:label ?label. ?m ceo:hasWeight ?v. ?m ceo:hasDigitalZoomFactor ?z. ?z gr:hasValueInteger ?zoomfactor . filter ( ?zoomfactor > 0 ) . ?v gr:hasValueFloat ?weight. ?v gr:hasUnitOfMeasurement "GRM"^^xsd:string. OPTIONAL {?m gr:hasEAN_UCC-13 ?ean} } ORDER BY DESC ( ?weight / ?zoomfactor ) -- Regards, Kingsley Idehen Weblog: http://www.openlinksw.com/blog/~kidehen President & CEO OpenLink Software Web: http://www.openlinksw.com