Hi Amir,
On 02/27/2013 05:56 PM, Amir Hossein Jadidinejad wrote:
Hi,
I have a simple IE task. Simply want to distinguish between "PERSON",
"LOCATION" and "ORGANIZATION" concepts. It means that I have a
DBpedia's URI, what is the type ("PER", "LOC" and "ORG") of this resource?
Using the following query I can get resource's type:
* SELECT * WHERE { <http://dbpedia.org/resource/Tehran> a ?o }
but the output contains different labels (such as "Settlement",
"IranianProvincialCapitals" and etc.). I don't know how to reason from
this output?
Currently, I have a lot of "if...then" conditions which test if the
output contains "place" (for example) or not:
* if (tobject.contains("place") || tobject.contains("locations")
|| tobject.contains("ProtectedArea")
|| tobject.contains("SkiArea")
|| tobject.contains("WineRegion")
|| tobject.contains("WorldHeritageSite")
|| ....)
It's really not a good way. These classes are structured in an
ontological manner. Would you please help me to construct a query to
"reason" the type of each resource ("PER", "LOC" and "ORG") in DBpedia?
Does the following query do what you want:
SELECT * WHERE { dbpedia:Berlin a ?o. FILTER(?o LIKE
<http://dbpedia.org/ontology/%>) }
--
Kind Regards
Mohamed Morsey
Department of Computer Science
University of Leipzig
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Dbpedia-discussion mailing list
Dbpedia-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion