dbpedia

how to query Dbpedia in Javascript

风流意气都作罢 提交于 2019-12-05 18:38:15
I want to get the Abtract of english article of civil engineering from Dbdepdia in Javascript. this is what I tried but it fail. <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> <style type="text/css"> </style> </head> <script type="text/javascript"> var url = "http://dbpedia.org/sparql"; var query = "\ PREFIX dbpedia2: <http://dbpedia.org/resource/>\ PREFIX Abs: <http://dbpedia.org/ontology/>\ SELECT ?abstract\ WHERE {\ ?s dbpedia2:Civil_engineeringe\"@en;\ Abs:abstract ?abstract\ }"; this how I encode the url to pass it to ajaxx var

DBpedia SPARQL Query US Universities

喜欢而已 提交于 2019-12-05 18:17:59
I created a SPARQL query that I'm running on the DBpedia SNORQL SPARQL endpoint . The purpose of the query is to get a list of universities or colleges in the United States, including their longitude, latitude, and endowment. The query seems to be working but seems to be missing some records and/or attributes. So, for example, Harvard University doesn't show up in the result, even though its DBpedia record exists and the attributes should match my query. I'm not sure why that record doesn't show up. Another example is University of Massachusetts Boston , which comes up as a query result, but

How to change upper execution time limit for a DBpedia SPARQL query? (Virtuoso 42000 error)

社会主义新天地 提交于 2019-12-05 15:15:00
I am querying DBpedia using SPARQL through Python. I am facing issues with the upper execution time limit. This is the error : Code : sparql = SPARQLWrapper("http://dbpedia.org/sparql") newquery = "DEFINE input:inference "skos-trans" PREFIX dcterms: <http://purl.org/dc/terms/> select distinct ?cat1 ?cat2 ?cat3 ?cat4 where { <http://dbpedia.org/resource/Pulp_Fiction> dcterms:subject ?cat1 . ?cat1 skos:broaderTransitive ?cat2. ?cat2 skos:broaderTransitive ?cat3. ?cat3 skos:broaderTransitive ?cat4. } " sparql.setQuery( newquery) sparql.setReturnFormat(JSON) results = sparql.query().convert()

Getting a list of American physicists from DBpedia using SPARQL

十年热恋 提交于 2019-12-05 08:05:11
I want to query the American Physicsts and get the list of physicists. How can I do this? The SPARQL you need would look like this .... PREFIX category: <http://dbpedia.org/resource/Category:> PREFIX dcterms: <http://purl.org/dc/terms/> SELECT * WHERE { ?s dcterms:subject category:American_physicists . } see results here If you want the list with some extra predicates you need to join more triple patterns using the variable ?s . For instance, to retrieve the birthdate for each physicist ... PREFIX category: <http://dbpedia.org/resource/Category:> PREFIX dcterms: <http://purl.org/dc/terms/>

dbpedia extract JSON

烂漫一生 提交于 2019-12-05 01:47:30
问题 http://dbpedia.org/resource/Los_Angeles You can request this data programmatically in many formats by using the appropriate header in your HTTP request. For example "Accept: application/json" will get you the results in JSON. 1. How do I go about retrieving the JSON 2. Since I have to filter only a class="uri" href="http://www.w3.org/2000/01/rdf-schema#label" for around 100 links on my page. What is the best way around it 回答1: You can retrieve the JSON without having to create special headers

Given a list of company names, how to fetch company names, website url, year established, number of employees etc

核能气质少年 提交于 2019-12-04 13:22:54
I have a list of company names such as Microsoft Corp, Kimberly Clark Corporation etc, and for each company, I would like to retrieve fields such as: Its company logo Georgraphic identifier for google maps Website url Year established Stock exchange and stock exchange ticker symbol A way to get the stock prices over the last few days About / abstract from wikipedia A list of subsidiaries and parent companies. For instance, for Boeing it would be Jeppessen and Availl, Inc etc. I have looked into Sparql and Dbpedia. Any suggestion on how to come up with the sparql query to retrieve some of those

How to find cities with more than X population in a certain country

Deadly 提交于 2019-12-04 10:55:34
I'm trying to find cities in Denmark with more than 100 000 in population. I can find all the cities in Denmark with this code: SELECT ?s ?o WHERE { ?s a <http://dbpedia.org/class/yago/CitiesAndTownsInDenmark> } And with this code I can find cities with more than 100 000 in population: SELECT ?resource ?value WHERE { ?resource <http://dbpedia.org/property/populationTotal> ?value FILTER (?value > 100000) } ORDER BY ?resource ?value I would appreciate help about how to combine these queries. Simple: SELECT ?resource ?value WHERE { ?resource a <http://dbpedia.org/class/yago

Query for best match to a string with SPARQL?

徘徊边缘 提交于 2019-12-04 07:40:15
I have a list with movie titles and want to look these up in DBpedia for meta information like "director". But I have trouble to identify the correct movie with SPARQL, because the titles sometimes don't exactly match. How can I get the best match for a movie title from DBpedia using SPARQL? Some problematic examples: My List: "Die Hard: with a Vengeance" vs. DBpedia: "Die Hard with a Vengeance" My List: "Hachi" vs. DBpedia: "Hachi: A Dog's Tale" My current approach is to query the DBpedia endpoint for all movies and then filter by checking for single tokens (without punctuations), order by

HttpException error when I call SPARQL query (on DBPedia) in Java Code

喜欢而已 提交于 2019-12-04 06:58:04
问题 I have a problem with SPARQL endpoint using Java Code. In particular, I have this Java Class: public class example { public static void main(String[] args) { String value = "http://dbpedia.org/resource/Fred_Guy"; example exam = example(); QueryExecution qe = exam.query(value); ResultSet results = ResultSetFactory.copyResults( qe.execSelect() ); } public QueryExecution query(String stringa){ ParameterizedSparqlString qs = new ParameterizedSparqlString( "" + "prefix dbpediaont: <http://dbpedia

using dbpedia spotlight in java or scala

你。 提交于 2019-12-04 06:19:19
Does anyone know where to find a little how to on using dbpedia spotlight in java or scala? Or could anyone explain how it's done? I can't find any information on this... hunterhector The DBpedia Spotlight wiki pages would be a good place to start. And I believe the installation page has listed the most popular ways (using a jar, or set up a web service) to use the application. It includes instructions on using the Java/Scala API with your own installation, or calling the Web Service. There are some additional data needed to be downloaded to run your own server for full service, good time to