11
Seedhack 4.0 Powered by BBC Connected Studio

BBC JUICER API Presentation - for SeedHack 4.0 - BBC News Labs

Embed Size (px)

DESCRIPTION

Paul Wilton from Ontoba demonstrates the BBC JUICER R&D APIs.

Citation preview

Page 1: BBC JUICER API Presentation - for SeedHack 4.0 - BBC News Labs

Seedhack 4.0Powered by BBC Connected Studio

Page 2: BBC JUICER API Presentation - for SeedHack 4.0 - BBC News Labs

Paul Wilton (@pwilton)

Technical ArchitectOntoba (@Ontoba1)

www.ontoba.com

Page 3: BBC JUICER API Presentation - for SeedHack 4.0 - BBC News Labs

Juicer Data + APIs• Approx 500k news articles – various news providers

• Each article semantically annotated with DBpedia Concepts, Events and Storylines

• Concept APIs - find and lookup concepts

• News APIs - query news via the semantic annotations – use SPARQL !

Page 4: BBC JUICER API Presentation - for SeedHack 4.0 - BBC News Labs

API EndpointsROOT : /bbc.api.mashery.com/juicer-ld-api/Accept : application/json

Common API Query Parameters : limit = {integer} - limits number of things returned before = {yyyy-mm-dd} - restricts by article date after = {yyyy-mm-dd} - restricts by article date api_key = {your mashery key}

Page 5: BBC JUICER API Presentation - for SeedHack 4.0 - BBC News Labs

Signup for Mashery Keyhttp://bbc.mashery.com/

Live Exampleshttp://newshack.co.uk/tech-talks/juicer-apis/

Docshttp://bbc.mashery.com/docs/read/Home

Page 6: BBC JUICER API Presentation - for SeedHack 4.0 - BBC News Labs

Concept APIsFind Concepts - OpenSearch Suggestions JSONGET /concepts/tagged?q={ text search term }

Find Concepts - filtered by classGET /concepts/tagged?q={ text }&class={ ontology class }

Example :

GET /concepts/tagged?q=goo&class=http://dbpedia.org/ontology/Organisation

GET a ConceptGET /concepts?uri=http://dbpedia.org/resource/Larry_Page

Page 7: BBC JUICER API Presentation - for SeedHack 4.0 - BBC News Labs

Get Concept Occurrencesordered my most frequent firstGET /concepts/occurrences?type={ type URI }

Example

GET /concepts/occurrences?type=http://dbpedia.org/ontology/Person

&after=2013-10-01

Page 8: BBC JUICER API Presentation - for SeedHack 4.0 - BBC News Labs

Get Concept Co-OccurrencesFinds concepts co-occurring with the supplied concept

ordered by most frequently occurring

GET /concepts/co-occurrences?concept={ source concept URI }&type={ type URI }

Example

GET /concepts/co-occurrences?concept=http://dbpedia.org/resource/Barack_Obama& type=http://dbpedia.org/ontology/Person&after=2013-10-01

Page 9: BBC JUICER API Presentation - for SeedHack 4.0 - BBC News Labs

Full Text Search for Articles:GET /search?q={ text phrase }

ExampleGET /search?q=chemical weapons&limit=20&after=2013-09-01

Search News Articles

Page 10: BBC JUICER API Presentation - for SeedHack 4.0 - BBC News Labs

Semantic Query for News ArticlesUse SPARQL grammar to find articles

Exploit the DBpedia ontology

GET /articles?binding=articles&where={ sparql grammar, URL encoded }

Example clause, that finds articles tagged with companies in the aerospace industry:

?articles cwork:tag ?thing .

?thing a <http://dbpedia.org/ontology/Company> .

?thing <http://dbpedia.org/ontology/industry> <http://dbpedia.org/resource/Aerospace> .

Page 11: BBC JUICER API Presentation - for SeedHack 4.0 - BBC News Labs

Live Exampleshttp://newshack.co.uk/tech-talks/juicer-apis/

Signup for Mashery Keyhttp://bbc.mashery.com/

Find me tomorrow and ask me questions !Paul Wilton @pwilton