Semi-Automa+cally Modeling Web APIs to Create Linked APIs - - PowerPoint PPT Presentation

semi automa cally modeling web apis to create linked apis
SMART_READER_LITE
LIVE PREVIEW

Semi-Automa+cally Modeling Web APIs to Create Linked APIs - - PowerPoint PPT Presentation

Semi-Automa+cally Modeling Web APIs to Create Linked APIs Mohsen Taheriyan, Craig A. Knoblock, Pedro Szekely, and Jose Luis Ambite USC Information


slide-1
SLIDE 1

Semi-­‑Automa+cally ¡Modeling ¡ Web ¡APIs ¡to ¡Create ¡Linked ¡APIs ¡ ¡

Mohsen ¡Taheriyan, ¡Craig ¡A. ¡Knoblock, ¡ Pedro ¡Szekely, ¡and ¡Jose ¡Luis ¡Ambite ¡ ¡ USC ¡Information ¡Sciences ¡Institute ¡ ¡ ¡

slide-2
SLIDE 2

Slide ¡by ¡Shubham ¡Gupta ¡

dbpedia.org

slide-3
SLIDE 3

Current ¡temperature ¡ ¡ ¡73°F ¡ ¡ Wind ¡ ¡ ¡ ¡ ¡10 ¡mph ¡SW ¡ Humidity ¡ ¡ ¡ ¡51% ¡ Dew ¡Point ¡ ¡ ¡ ¡54° ¡

Live ¡weather ¡

Slide ¡by ¡Shubham ¡Gupta ¡

not dbpedia.org

slide-4
SLIDE 4

Current ¡temperature ¡ ¡ ¡73°F ¡ ¡ Wind ¡ ¡ ¡ ¡ ¡10 ¡mph ¡SW ¡ Humidity ¡ ¡ ¡ ¡51% ¡ Dew ¡Point ¡ ¡ ¡ ¡54° ¡ Events ¡ ¡ ¡ ¡ ¡Transparent ¡Ci+es ¡5/1/2012 ¡REDCAT ¡Theater ¡ ¡ ¡ ¡ ¡ ¡Saving ¡Our ¡Sons ¡: ¡A ¡Community ¡Conversa+o… ¡ ¡ ¡ ¡ ¡ ¡… ¡

Events ¡

Slide ¡by ¡Shubham ¡Gupta ¡

not dbpedia.org

slide-5
SLIDE 5

Current ¡temperature ¡ ¡ ¡73°F ¡ ¡ Wind ¡ ¡ ¡ ¡ ¡10 ¡mph ¡SW ¡ Humidity ¡ ¡ ¡ ¡51% ¡ Dew ¡Point ¡ ¡ ¡ ¡54° ¡ Events ¡ ¡ ¡ ¡ ¡Transparent ¡Ci+es ¡5/1/2012 ¡REDCAT ¡Theater ¡ ¡ ¡ ¡ ¡ ¡Saving ¡Our ¡Sons ¡: ¡A ¡Community ¡Conversa+o… ¡ ¡ ¡ ¡ ¡ ¡… ¡ TwiUer ¡Feed ¡ ¡ ¡ ¡Los ¡Angeles ¡becomes ¡the ¡largest ¡U.S. ¡city ¡to ¡ban.. ¡ ¡ ¡ ¡ ¡ ¡Plas+c ¡grocery ¡bags ¡will ¡now ¡be ¡banned ¡in ¡… ¡ ¡ ¡ ¡ ¡ ¡… ¡

Live ¡Twitter ¡Feed ¡

Slide ¡by ¡Shubham ¡Gupta ¡

not dbpedia.org

slide-6
SLIDE 6

Current ¡temperature ¡ ¡ ¡73°F ¡ ¡ Wind ¡ ¡ ¡ ¡ ¡10 ¡mph ¡SW ¡ Humidity ¡ ¡ ¡ ¡51% ¡ Dew ¡Point ¡ ¡ ¡ ¡54° ¡ Events ¡ ¡ ¡ ¡ ¡Transparent ¡Ci+es ¡5/1/2012 ¡REDCAT ¡Theater ¡ ¡ ¡ ¡ ¡ ¡Saving ¡Our ¡Sons ¡: ¡A ¡Community ¡Conversa+o… ¡ ¡ ¡ ¡ ¡ ¡… ¡ TwiUer ¡Feed ¡ ¡ ¡ ¡Los ¡Angeles ¡becomes ¡the ¡largest ¡U.S. ¡city ¡to ¡ban.. ¡ ¡ ¡ ¡ ¡ ¡Plas+c ¡grocery ¡bags ¡will ¡now ¡be ¡banned ¡in ¡… ¡ ¡ ¡ ¡ ¡ ¡… ¡

Slide ¡by ¡Shubham ¡Gupta ¡

But, ¡the ¡Information ¡is ¡ Available ¡in ¡Web ¡APIs ¡…. ¡

slide-7
SLIDE 7

Current ¡temperature ¡ ¡ ¡73°F ¡ ¡ Wind ¡ ¡ ¡ ¡ ¡10 ¡mph ¡SW ¡ Humidity ¡ ¡ ¡ ¡51% ¡ Dew ¡Point ¡ ¡ ¡ ¡54° ¡ Events ¡ ¡ ¡ ¡ ¡Transparent ¡Ci+es ¡5/1/2012 ¡REDCAT ¡Theater ¡ ¡ ¡ ¡ ¡ ¡Saving ¡Our ¡Sons ¡: ¡A ¡Community ¡Conversa+o… ¡ ¡ ¡ ¡ ¡ ¡… ¡ TwiUer ¡Feed ¡ ¡ ¡ ¡Los ¡Angeles ¡becomes ¡the ¡largest ¡U.S. ¡city ¡to ¡ban.. ¡ ¡ ¡ ¡ ¡ ¡Plas+c ¡grocery ¡bags ¡will ¡now ¡be ¡banned ¡in ¡… ¡ ¡ ¡ ¡ ¡ ¡… ¡

Slide ¡by ¡Shubham ¡Gupta ¡

slide-8
SLIDE 8

The ¡Problem ¡

? ¡ ? ¡

JSON/XML ¡ RDF ¡ RDF/SPARQL ¡Query ¡ Web-­‑service ¡ Invocation ¡request ¡

http://free.worldweatheronline.com/feed/…. format=csv

Slide ¡by ¡Shubham ¡Gupta ¡

slide-9
SLIDE 9

Modeling ¡APIs ¡

  • Input ¡

– Examples ¡of ¡the ¡request ¡URLs ¡ – Ontology ¡

  • Output ¡

– A ¡semantic ¡model ¡of ¡the ¡API ¡built ¡interactively ¡

Slide ¡by ¡Mohsen ¡Taheriyan ¡

slide-10
SLIDE 10

Approach ¡

API Invocation Annotating Inputs and Outputs Extracting Relationships

Slide ¡by ¡Mohsen ¡Taheriyan ¡

slide-11
SLIDE 11

Service ¡Invoca+on ¡

KARMA ¡

Sample ¡Request ¡ ¡ URLs ¡

Invoking ¡ API ¡

Inputs ¡ Outputs ¡

Slide ¡by ¡Mohsen ¡Taheriyan ¡

slide-12
SLIDE 12

Annota+ng ¡Inputs ¡and ¡Outputs ¡

  • Using ¡Conditional ¡Random ¡Fields ¡(CRF) ¡to ¡assign ¡a ¡

semantic ¡type ¡to ¡each ¡column ¡

  • Semantic ¡Types ¡

– Class ¡ – Data ¡property ¡and ¡domain ¡

  • Example ¡

– OWL ¡Class: ¡State ¡

  • http://dbpedia.org/page/California ¡

– OWL ¡Data ¡Property, ¡Domain ¡class: ¡State.name ¡

  • Califonia ¡

Slide ¡by ¡Mohsen ¡Taheriyan ¡

slide-13
SLIDE 13

WeatherReport WindEvent TemperatureEvent WeatherObesrvation Station hasObservation hasStation hasWindEvent hasTemperatureEvent hasDate windSpeed windDirection SpatialThing State City hasLocation in temperature dewPoint humidity description name icao name

Weather ¡Ontology ¡

Slide ¡by ¡Mohsen ¡Taheriyan ¡

slide-14
SLIDE 14

WeatherReport WindEvent TemperatureEvent WeatherObesrvation Station hasObservation hasStation hasWindEvent hasTemperatureEvent hasDate windSpeed windDirection SpatialThing State City hasLocation in temperature dewPoint humidity description

name icao name

City.name ¡ State.name ¡ WeatherReport.hasDate ¡ TemperatureEvent.temperature ¡ TemperatureEvent.tempeature ¡ WindEvent.windSpeed ¡ WeatherObserva<on.humidity ¡ WeatherObserva<on.descrip<on ¡ Sta<on.ICAO ¡ Wrong ¡Label ¡

Slide ¡by ¡Mohsen ¡Taheriyan ¡

slide-15
SLIDE 15

Extrac+ng ¡the ¡Rela+onships ¡

  • Construct ¡a ¡graph ¡from ¡

– Assigned ¡Semantic ¡Types ¡ – Ontology ¡Graph ¡

  • Select ¡minimal ¡tree ¡that ¡connects ¡all ¡semantic ¡types ¡

– A ¡customized ¡Steiner ¡tree ¡algorithm ¡

  • Steiner ¡minimal ¡tree ¡(SMT) ¡ ¡

– G=(V,E) ¡ ¡, ¡S ¡⊂ ¡V, ¡ ¡c: ¡E ¡→ℜ ¡(S: ¡Steiner ¡Nodes) ¡ – Shortest ¡network ¡connecting ¡vertices ¡of ¡T ¡ – Approximation ¡Alg. ¡[Kou ¡& ¡Markowsky, ¡1981] ¡

  • O(|V|2|S|) ¡, ¡Approximation ¡Ratio: ¡less ¡than ¡2 ¡

Slide ¡by ¡Mohsen ¡Taheriyan ¡

slide-16
SLIDE 16

Construc+ng ¡Graph ¡

WeatherReport WindEvent TemperatureEvent WeatherObesrvation Station State City name name hasDate icao temperature temperature windSpeed humidity description

  • Graph ¡Initialization ¡

– Add ¡one ¡node ¡for ¡each ¡semantic ¡type ¡ – For ¡data ¡property ¡types, ¡also ¡add ¡the ¡domain ¡(if ¡not ¡added ¡before) ¡

Slide ¡by ¡Mohsen ¡Taheriyan ¡

slide-17
SLIDE 17

Construc+ng ¡Graph ¡

  • Compute ¡Nodes ¡Closure ¡

– Object ¡Property ¡or ¡hasSubClass ¡relations ¡

SpatialThing

Spa<alThing ¡– ¡hasSubClass ¡ ¡City ¡

WeatherReport WindEvent TemperatureEvent WeatherObesrvation Station State City name name hasDate icao temperature temperature windSpeed humidity description

Slide ¡by ¡Mohsen ¡Taheriyan ¡

slide-18
SLIDE 18

WeatherReport WindEvent TemperatureEvent WeatherObesrvation Station SpatialThing State City

Construc+ng ¡Graph ¡

name name hasDate icao temperature temperature windspeed hmidity description

  • Adding ¡the ¡Links ¡

– Put ¡a ¡link ¡with ¡w=1 ¡from ¡the ¡domains ¡to ¡data ¡property ¡nodes ¡ – For ¡every ¡pair ¡of ¡class ¡nodes ¡like ¡A ¡and ¡B: ¡

  • Put ¡a ¡link ¡with ¡w=1 ¡from ¡A ¡to ¡B ¡if ¡there ¡is ¡a ¡direct ¡or ¡inferred ¡object ¡property ¡in ¡the ¡
  • ntology ¡
  • If ¡B ¡is ¡a ¡direct ¡or ¡inferred ¡subclass ¡of ¡A, ¡put ¡a ¡link ¡with ¡w=1/ε ¡from ¡A ¡to ¡B ¡

hasLocation in

1/ε ¡ 1/ε ¡

Slide ¡by ¡Mohsen ¡Taheriyan ¡

slide-19
SLIDE 19

WeatherReport WindEvent TemperatureEvent WeatherObesrvation Station SpatialThing State City

Steiner ¡Tree ¡

name name hasDate icao temperature temperature windSpeed HUMIDITY description

Steiner ¡Nodes: ¡Semantic ¡Types ¡(Blue ¡Ovals) ¡

1/ε ¡ 1/ε ¡

hasLocation in

Wrong ¡ Link ¡

Slide ¡by ¡Mohsen ¡Taheriyan ¡

slide-20
SLIDE 20

Visualizing ¡Model ¡in ¡Karma ¡

Slide ¡by ¡Mohsen ¡Taheriyan ¡

slide-21
SLIDE 21

Refinement ¡– ¡Change ¡Seman+c ¡Types ¡

Slide ¡by ¡Mohsen ¡Taheriyan ¡

slide-22
SLIDE 22

Refinement ¡– ¡Adjust ¡the ¡links ¡

Click ¡on ¡State ¡

Slide ¡by ¡Mohsen ¡Taheriyan ¡

slide-23
SLIDE 23

Final ¡Model ¡in ¡Karma ¡

Slide ¡by ¡Mohsen ¡Taheriyan ¡

slide-24
SLIDE 24

Status ¡

JSON/XML ¡ RDF ¡ RDF/SPARQL ¡Query ¡ Web-­‑service ¡ Invocation ¡request ¡

http://free.worldweatheronline.com/feed/…. format=csv

Karma ¡

Slide ¡by ¡Pedro ¡Szekely ¡

slide-25
SLIDE 25

Generate ¡Other ¡Models? ¡

Karma ¡ Model ¡ MSM ¡ Model ¡ LOS ¡ Model ¡ LIDS ¡ Model ¡

Slide ¡by ¡Pedro ¡Szekely ¡

slide-26
SLIDE 26

Current ¡temperature ¡ ¡ ¡73°F ¡ ¡ Wind ¡ ¡ ¡ ¡ ¡10 ¡mph ¡SW ¡ Humidity ¡ ¡ ¡ ¡51% ¡ Dew ¡Point ¡ ¡ ¡ ¡54° ¡

Challenge ¡1: ¡Live ¡Weather ¡in ¡DBPedia ¡(For ¡Every ¡City) ¡

Slide ¡by ¡Pedro ¡Szekely ¡

slide-27
SLIDE 27

Current ¡temperature ¡ ¡ ¡73°F ¡ ¡ Wind ¡ ¡ ¡ ¡ ¡10 ¡mph ¡SW ¡ Humidity ¡ ¡ ¡ ¡51% ¡ Dew ¡Point ¡ ¡ ¡ ¡54° ¡

Challenge ¡2: ¡Scale-­‑Up ¡

Slide ¡by ¡Pedro ¡Szekely ¡

slide-28
SLIDE 28