On 22 Oct 2009, at 14:20, Kenny Guan wrote: > by the way, how the SPQRQL end point resolve "?s a < > http://dbpedia.org/ontology/Company>"? is it trying to find the > triples with > p as > <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> > and o as > <http://dbpedia.org/ontology/Company>
Exactly! The "a" keyword in SPARQL is just a syntactic shortcut for the rdf:type property. Best, Richard > ? > > thanks > Kenny > > On Thu, Oct 22, 2009 at 8:59 PM, Richard Cyganiak > <[email protected]>wrote: > >> >> On 22 Oct 2009, at 12:57, Kenny Guan wrote: >> >> Hi Pierre, >>> >>> thanks for your reply. Maybe I didn't describe my question >>> clearly. the >>> attributes of Company I want is like "founder", "year of >>> foundation" etc. >>> >>> A more specific example, an instance of Company like, Apple, has an >>> attribute "founder" with value of "Steve Jobs". >>> >> >> Try something like: >> >> SELECT DISTINCT ?p WHERE { >> ?s a <http://dbpedia.org/ontology/Company> . >> ?s ?p ?o . >> } >> >> This gets all resources of type Company, then finds all triples >> that have >> this resource as subject, and returns the predicate of these >> triples. The >> DISTINCT removes duplicates. >> >> Optionally you might want to also put this into the angle brackets, >> after >> the last dot: >> >> FILTER (REGEX(?p, 'ontology')) >> >> This removes all properties that do not have "ontology" in the URI, >> giving >> you only the properties defined by the ontology, and skipping general >> infobox properties. >> >> Hope that's what you're after. >> >> Best, >> Richard >> >> >> >>> does this make any sense? >>> >>> Many thanks >>> Kenny >>> >>> >>> On Thu, Oct 22, 2009 at 4:42 PM, Pierre De Wilde <[email protected] >>>> wrote: >>> >>> SELECT * WHERE { {?s ?p ?o. FILTER(?s IN (< >>>> http://dbpedia.org/ontology/Company>))} } >>>> >>>> 2009/10/22 Kenny Guan <[email protected]> >>>> >>>> Hey, >>>>> >>>>> I am doing some work on semantic search and I may want to use >>>>> dbpedia as >>>>> seed data. The thing I want to do now is, given a dbpedia ontology >>>>> class, >>>>> say COMPANY, i want to get all attributes of COMPANY. >>>>> >>>>> I see there are 170+ classes and 900+ attributes in dbpedia >>>>> ontology. >>>>> For >>>>> each object/instance, its type/class is specified in "Ontology >>>>> type" >>>>> dataset, its attributes are specified in "Ontology infoboxes" >>>>> dataset. >>>>> But >>>>> seems no dataset directly specifies the attributes of a particular >>>>> class, >>>>> right? >>>>> >>>>> if it is, how to write a SPARQL script to get attributes of >>>>> COMPANY? I >>>>> have never written a SPARQL, hope to start with this one. can >>>>> someone >>>>> give >>>>> some help? >>>>> >>>>> Thanks in advance >>>>> Kenny >>>>> >>>>> >>>>> >>>>> ------------------------------------------------------------------------------ >>>>> Come build with us! The BlackBerry(R) Developer Conference in >>>>> SF, CA >>>>> is the only developer event you need to attend this year. >>>>> Jumpstart your >>>>> developing skills, take BlackBerry mobile applications to market >>>>> and >>>>> stay >>>>> ahead of the curve. Join us from November 9 - 12, 2009. Register >>>>> now! >>>>> http://p.sf.net/sfu/devconference >>>>> _______________________________________________ >>>>> Dbpedia-discussion mailing list >>>>> [email protected] >>>>> https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion >>>>> >>>>> >>>>> >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> Come build with us! The BlackBerry(R) Developer Conference in SF, >>>> CA >>>> is the only developer event you need to attend this year. >>>> Jumpstart your >>>> developing skills, take BlackBerry mobile applications to market >>>> and stay >>>> ahead of the curve. Join us from November 9 - 12, 2009. Register >>>> now! >>>> http://p.sf.net/sfu/devconference >>>> _______________________________________________ >>>> Dbpedia-discussion mailing list >>>> [email protected] >>>> https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion >>>> >>>> >>>> ------------------------------------------------------------------------------ >>> Come build with us! The BlackBerry(R) Developer Conference in SF, CA >>> is the only developer event you need to attend this year. >>> Jumpstart your >>> developing skills, take BlackBerry mobile applications to market >>> and stay >>> ahead of the curve. Join us from November 9 - 12, 2009. Register >>> now! >>> >>> http://p.sf.net/sfu/devconference_______________________________________________ >>> Dbpedia-discussion mailing list >>> [email protected] >>> https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion >>> >> >> ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Dbpedia-discussion mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion
