SlideShare a Scribd company logo
Freebase Workshop
Jamie Taylor
New York City, December 2009

Code available at: http://dev.mqlx.com/~jamie/nyc2009
Building a MQL Query
"type":"/type/object" is assumed
  "name" = /type/object/name


       [{
            "name" : null,
            "type" : "/tv/tv_program"
       }]




                MQL
http://www.freebase.com/app/queryeditor
{
    "id":"/en/ncis",
    "name" : null,
    "type" : "/tv/tv_program"
}




         MQL
"/program_creator" = /tv/tv_program/program_creator



                 {
                     "id":"/en/ncis",
                     "name" : null,
                     "type" : "/tv/tv_program",
                     "program_creator":[ ]
                 }




                          MQL
{
    "id":"/en/ncis",
     "name" : null,
     "type" : "/tv/tv_program",
    "program_creator":[{ "id":null, "name":null }]
}




                 MQL
Mark Harmon
             TV
        Performance


                                           Jethro Gibbs
{
    "id":"/en/ncis",
     "name" : null,
     "type" : "/tv/tv_program",
    "program_creator":[{ "id":null, "name:null }],
    "regular_cast":[{
          "actor":null,
          "character":null
       }]
}
{
    "id":"/en/ncis",
     "name" : null,
     "type" : "/tv/tv_program",
    "program_creator":[{ "id":null, "name:null }],
    "regular_cast":[{
          "actor":null,
          "character":null
       }]
}
Mark Harmon
             TV
        Performance


                                           Jethro Gibbs
{
    "id":"/en/ncis",
     "name" : null,
     "type" : "/tv/tv_program",
    "program_creator":[{ "id":null, "name:null }],
    "regular_cast":[{
          "actor": {"id":null, "name":null},
          "character":null
       }]
}
{
    "id":"/en/ncis",
     "name" : null,
     "type" : "/tv/tv_program",
    "program_creator":[{ "id":null, "name:null }],
    "regular_cast":[{
           "actor": {"id":null, "name":null},
           "character":null
       }],
    "spin_offs":[ ]
}
{
    "id":"/en/ncis",
     "name" : null,
     "type" : "/tv/tv_program",
    "program_creator":[{ "id":null, "name:null }],
    "regular_cast":[{
           "actor": {"id":null, "name":null},
           "character":null
       }],
    "spin_offs":[{"id":null, "name":null,
                       "air_date_of_first_episode":null}]
}
Accessing Freebase Services
          via PHP
Service Requests in PHP
•   Using cURL to make external service requests
    $topicid = "/en/ncis";
    $widgeturl = "http://www.freebase.com/widget/topic?id=
                  $topicid&mode=i&panes=image,article_props";

    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $widgeturl);
    curl_setopt($ch, CURLOPT_HEADER, 0);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    $resultstr = curl_exec($ch);
    curl_close($ch);

    print $resultstr;
Accessing External Services
   via MQL Extensions
A Graph of Entities
A Graph of Services
http://www.bestbuy.com/site/She+Wolf…

              http://www.daylife.com/topic/Shakira

                         http://twitter.com/shakira

                  http://www.facebook.com/shakira

                  http://www.myspace.com/shakira

                  http://www.last.fm/music/Shakira

http://www.netflix.com/RoleDisplay/Shakira/20046629

          http://www.guardian.co.uk/music/shakira
eMQL: MQL Extensions
•   Request data from other service providers
    •   Services accessed transparently within MQL query
    •   Use Freebase Keys/Properties in external service request

•   Uses:
    •   real-time data services
        •   Stock quotes, sensor data

    •   premium services
        •   requests can specify private "api keys" for the service

    •   fine grained & authoritative data sources
eMQL Query

{
  "id":   "/en/ibm",
                                         ticker
  "type": "/business/company",
  "ticker_symbol": [{
                                 "ibm"
    "stock_exchange": null,
    "ticker_symbol":null
  }]
}
eMQL Query
{
  "id":   "/en/ibm",
  "type": "/business/company",           ticker
  "ticker_symbol": [{
    "stock_exchange": null,      "ibm"
    "ticker_symbol":null,
    "quote":null
  }]
}
eMQL Query
{
  "id":   "/en/ibm",
  "type": "/business/company",              ticker
  "ticker_symbol": [{
    "stock_exchange": null,           "ibm"
    "ticker_symbol":null,
    "quote":null             "pre"
  }]
}
                               "fetch"
eMQL Service Request
•   Pre
    •   Modify MQL query to provide additional information
        necessary to complete request
    •   e.g., retrieve specific namespace keys

•   Fetch
    •   Produce (retrieve, calculate, format) value for the
        eMQL property

•   Reduce (optional)
    •   Create a result that looks across all results returned
        in the query

•   Help
    •   Document how the property is used
MQL Read Service
http://api.freebase.com/api/service/mqlread?query=
                         {"query":{"id":"/en/ncis", "name":null}}

http://api.freebase.com/api/service/mqlread?queries=
          {"q0":{"query":{"id":"/en/ncis", "name":null}}}
          {"q1":{"query":{"id":"/en/blade_runner", "name":null}}}
MQL Requests in PHP
               {"id":"/en/ncis", "name":null}
$topicid = "/en/ncis";
$simplequery = array('id'=>$topicid, 'name'=>null);
$queryarray = array('q1'=>array('query'=>$simplequery)); #query envelope

$jsonquerystr = json_encode($queryarray);
$mqlurl =
    "http://www.freebase.com/api/service/mqlread?queries=". $jsonquerystr;

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $mqlurl);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$resultstr = curl_exec($ch);
curl_close($ch);
	
$resultarray = json_decode($resultstr, true); #true:give us an array

$topicname = $resultarray["q1"]["result"]["name"]
Demo eMQL Extensions


      stock quote



     @tag references
TV Episode Adapter
Query:
          {
            "id":"/en/ncis",
            "/user/jamie/extension/tv_episode": null
          }

Desired
Data:                   "name":"Faith"
                   "airdate": "Dec/15/2009"
           "id":"/authority/tvrage/episode/1064868143"
TV Rage Episode Adapter
http://services.tvrage.com/tools/quickinfo.php?show=NCIS

         Show ID@4628
         Show Name@NCIS
         Show URL@http://www.tvrage.com/NCIS
         Premiered@2003
         Started@Sep/23/2003
         Ended@
         Latest Episode@07x09^Child's Play^Nov/24/2009
         Next Episode@07x10^Faith^Dec/15/2009
         RFC3339@2009-12-15T20:00:00-5:00
         GMT+0 NODST@1260921600
         Country@USA
         Status@Returning Series
         Classification@Scripted
         Genres@Action | Crime | Drama | Military/War
         Network@CBS
         Airtime@Tuesday at 08:00 pm
         Runtime@60
TV Episode Adapter
                           eMQL Driver
                                                                                                                 TV Rage




                                                                                                       Time
query dispatched



                                            pre
                                                                                                                   eMQL
     MQL Query




                                                         Extend MQL query to retrieve
                                                        TV Rage Key (program identifier)
                                         updated MQL
                                            query
                                                                                                                  Adapter


                                                                                               TV Rage Service
                 run MQL
                   query
                  MQL
                 results                                                                                         Life Cycle
                                           fetch
                                                                                 get series
                                                                                   data
                                                                                next episode
                                                                                  number,
                                                                                 name,date

                                                                                get episode
                                                                                    data

                                                                                   next
                                                                                  episode
                                                                                   URL
                                                      format results

                                            results

                  return
                  query
                 results
Using Foreign Identifiers
        to locate Freebase Topics

•   /authority Namespace
    •   Organizations managing stable entity identifiers
    •   /source - identifiers only appearing in URLs

•   Keys can be for URLs to other sites
    •   And vice-versa!
URLs and Freebase Keys
•   http://www.imdb.com/title/tt0083658
    • /authority/imdb/title/tt0083658
    • http://www.rottentomatoes.com/alias?type=imdbid&s=0083658

•   http://dbpedia.org/resource/Blade_Runner
    • /wikipedia/en/Blade_Runner
    • http://en.wikipedia.org/wiki/Blade_Runner


•   http://musicbrainz.org/artist/2c4dae8c-
    e591-49e0-9c5a-62b310a15788.html
    • /authority/musicbrainz/2c4dae8c-
      e591-49e0-9c5a-62b310a15788
    • http://www.bbc.co.uk/music/artists/2c4dae8c-
      e591-49e0-9c5a-62b310a15788
http://ids.freebaseapps.com
Using Freebase RDF URIs


http://rdf.freebase.com/ns/<freebase-key>
• Performs content negotiation (HTTP ACCEPT Header)
• Produces HTML for standard browsers
• Produces RDF if you ask for it
• Easily translated to MQL style Freebase identifiers
    http://rdf.freebase.com/ns/en.ncis = /en/ncis
Entity Extractors
•   Zemanta
    • Freebase RDF URIs
    • Wikipedia Links
    • IMDB identifiers

•   Orchestr8
    • Freebase RDF URIs
    • DBPedia RDF URIs
    • MusicBrainz identifiers
    • Crunchbase identifiers

•   OpenCalais
    • Freebase RDF URIs
    • DBPedia RDF URIs
Getting Started++
•   Freebase Documentation Hub
    •   http://www.freebase.com/docs
•   Developer Mailing List
    •   http://freebase.markmail.org/search/?q=list:com.freebase.developers
    •   Schema/Modeling assistance
        •   Data Modeling Mailing List
        •   http://freebase.markmail.org/search/?q=list:com.freebase.data-modeling

•   Real Time help on IRC
    •   Freenode #freebase
•   Freebase Happenings
    •   http://blog.freebase.com

More Related Content

What's hot

Scalding: Twitter's Scala DSL for Hadoop/Cascading
Scalding: Twitter's Scala DSL for Hadoop/CascadingScalding: Twitter's Scala DSL for Hadoop/Cascading
Scalding: Twitter's Scala DSL for Hadoop/Cascading
johnynek
 
Computer vision
Computer vision Computer vision
Computer vision
Dmitry Ryabokon
 
Python高级编程(二)
Python高级编程(二)Python高级编程(二)
Python高级编程(二)
Qiangning Hong
 
Algebird : Abstract Algebra for big data analytics. Devoxx 2014
Algebird : Abstract Algebra for big data analytics. Devoxx 2014Algebird : Abstract Algebra for big data analytics. Devoxx 2014
Algebird : Abstract Algebra for big data analytics. Devoxx 2014
Samir Bessalah
 
Jinspired june2012
Jinspired june2012Jinspired june2012
Jinspired june2012
nlwebperf
 
Go ahead, make my day
Go ahead, make my dayGo ahead, make my day
Go ahead, make my day
Tor Ivry
 
Requery overview
Requery overviewRequery overview
Requery overview
Sunghyouk Bae
 
HBase RowKey design for Akka Persistence
HBase RowKey design for Akka PersistenceHBase RowKey design for Akka Persistence
HBase RowKey design for Akka Persistence
Konrad Malawski
 
NoSQL Smackdown!
NoSQL Smackdown!NoSQL Smackdown!
NoSQL Smackdown!
Tim Berglund
 

What's hot (9)

Scalding: Twitter's Scala DSL for Hadoop/Cascading
Scalding: Twitter's Scala DSL for Hadoop/CascadingScalding: Twitter's Scala DSL for Hadoop/Cascading
Scalding: Twitter's Scala DSL for Hadoop/Cascading
 
Computer vision
Computer vision Computer vision
Computer vision
 
Python高级编程(二)
Python高级编程(二)Python高级编程(二)
Python高级编程(二)
 
Algebird : Abstract Algebra for big data analytics. Devoxx 2014
Algebird : Abstract Algebra for big data analytics. Devoxx 2014Algebird : Abstract Algebra for big data analytics. Devoxx 2014
Algebird : Abstract Algebra for big data analytics. Devoxx 2014
 
Jinspired june2012
Jinspired june2012Jinspired june2012
Jinspired june2012
 
Go ahead, make my day
Go ahead, make my dayGo ahead, make my day
Go ahead, make my day
 
Requery overview
Requery overviewRequery overview
Requery overview
 
HBase RowKey design for Akka Persistence
HBase RowKey design for Akka PersistenceHBase RowKey design for Akka Persistence
HBase RowKey design for Akka Persistence
 
NoSQL Smackdown!
NoSQL Smackdown!NoSQL Smackdown!
NoSQL Smackdown!
 

Viewers also liked

Using Semantics to Enhance Content
Using Semantics to Enhance ContentUsing Semantics to Enhance Content
Using Semantics to Enhance Content
Jamie Taylor
 
Drupal and the Semantic Web
Drupal and the Semantic WebDrupal and the Semantic Web
Drupal and the Semantic Web
Jamie Taylor
 
Using Semantics to Enhance Content Publishing
Using Semantics to Enhance Content PublishingUsing Semantics to Enhance Content Publishing
Using Semantics to Enhance Content Publishing
Jamie Taylor
 
ISWC 2009 Consuming LOD
ISWC 2009 Consuming LODISWC 2009 Consuming LOD
ISWC 2009 Consuming LOD
Jamie Taylor
 
Social Fabric of Semantics - SemTech 2010
Social Fabric of Semantics - SemTech 2010Social Fabric of Semantics - SemTech 2010
Social Fabric of Semantics - SemTech 2010
Jamie Taylor
 
Public private-cloud
Public private-cloudPublic private-cloud
Public private-cloudJamie Taylor
 
NYC Semantic Web Meetup - Aug 2009
NYC Semantic Web Meetup -  Aug 2009NYC Semantic Web Meetup -  Aug 2009
NYC Semantic Web Meetup - Aug 2009
Jamie Taylor
 
The next phase of Web2.0: Data
The next phase of Web2.0: DataThe next phase of Web2.0: Data
The next phase of Web2.0: Data
Jamie Taylor
 

Viewers also liked (8)

Using Semantics to Enhance Content
Using Semantics to Enhance ContentUsing Semantics to Enhance Content
Using Semantics to Enhance Content
 
Drupal and the Semantic Web
Drupal and the Semantic WebDrupal and the Semantic Web
Drupal and the Semantic Web
 
Using Semantics to Enhance Content Publishing
Using Semantics to Enhance Content PublishingUsing Semantics to Enhance Content Publishing
Using Semantics to Enhance Content Publishing
 
ISWC 2009 Consuming LOD
ISWC 2009 Consuming LODISWC 2009 Consuming LOD
ISWC 2009 Consuming LOD
 
Social Fabric of Semantics - SemTech 2010
Social Fabric of Semantics - SemTech 2010Social Fabric of Semantics - SemTech 2010
Social Fabric of Semantics - SemTech 2010
 
Public private-cloud
Public private-cloudPublic private-cloud
Public private-cloud
 
NYC Semantic Web Meetup - Aug 2009
NYC Semantic Web Meetup -  Aug 2009NYC Semantic Web Meetup -  Aug 2009
NYC Semantic Web Meetup - Aug 2009
 
The next phase of Web2.0: Data
The next phase of Web2.0: DataThe next phase of Web2.0: Data
The next phase of Web2.0: Data
 

Similar to Freebase Workshop, December 2009

The Wonderful World of Apache Kafka
The Wonderful World of Apache KafkaThe Wonderful World of Apache Kafka
The Wonderful World of Apache Kafka
HostedbyConfluent
 
Streaming Operational Data with MariaDB MaxScale
Streaming Operational Data with MariaDB MaxScaleStreaming Operational Data with MariaDB MaxScale
Streaming Operational Data with MariaDB MaxScale
MariaDB plc
 
ql.io: Consuming HTTP at Scale
ql.io: Consuming HTTP at Scale ql.io: Consuming HTTP at Scale
ql.io: Consuming HTTP at Scale Subbu Allamaraju
 
Microservice Automated Testing on Kubernetes
Microservice Automated Testing on KubernetesMicroservice Automated Testing on Kubernetes
Microservice Automated Testing on Kubernetes
Shane Galvin
 
Building a Scalable Real-Time Fleet Management IoT Data Tracker with Kafka St...
Building a Scalable Real-Time Fleet Management IoT Data Tracker with Kafka St...Building a Scalable Real-Time Fleet Management IoT Data Tracker with Kafka St...
Building a Scalable Real-Time Fleet Management IoT Data Tracker with Kafka St...
HostedbyConfluent
 
GraphQL & Prisma from Scratch
GraphQL & Prisma from ScratchGraphQL & Prisma from Scratch
GraphQL & Prisma from Scratch
Nikolas Burk
 
Annotation processor and compiler plugin
Annotation processor and compiler pluginAnnotation processor and compiler plugin
Annotation processor and compiler plugin
Oleksandr Radchykov
 
NYC* 2013 - "Advanced Data Processing: Beyond Queries and Slices"
NYC* 2013 - "Advanced Data Processing: Beyond Queries and Slices"NYC* 2013 - "Advanced Data Processing: Beyond Queries and Slices"
NYC* 2013 - "Advanced Data Processing: Beyond Queries and Slices"
DataStax Academy
 
Intravert Server side processing for Cassandra
Intravert Server side processing for CassandraIntravert Server side processing for Cassandra
Intravert Server side processing for Cassandra
Edward Capriolo
 
Why SQL? | Kenny Gorman, Cloudera
Why SQL? | Kenny Gorman, ClouderaWhy SQL? | Kenny Gorman, Cloudera
Why SQL? | Kenny Gorman, Cloudera
HostedbyConfluent
 
Kotlin - The Swiss army knife of programming languages - Visma Mobile Meet-up...
Kotlin - The Swiss army knife of programming languages - Visma Mobile Meet-up...Kotlin - The Swiss army knife of programming languages - Visma Mobile Meet-up...
Kotlin - The Swiss army knife of programming languages - Visma Mobile Meet-up...
Tudor Dragan
 
NOSQL and Cassandra
NOSQL and CassandraNOSQL and Cassandra
NOSQL and Cassandrarantav
 
Norikra: SQL Stream Processing In Ruby
Norikra: SQL Stream Processing In RubyNorikra: SQL Stream Processing In Ruby
Norikra: SQL Stream Processing In Ruby
SATOSHI TAGOMORI
 
Java day 2016.pptx
Java day 2016.pptxJava day 2016.pptx
Java day 2016.pptx
Oleksandr Radchykov
 
Delightful steps to becoming a functioning user of Step Functions
Delightful steps to becoming a functioning user of Step FunctionsDelightful steps to becoming a functioning user of Step Functions
Delightful steps to becoming a functioning user of Step Functions
Yan Cui
 
CI/CD on AWS
CI/CD on AWSCI/CD on AWS
CI/CD on AWS
Amazon Web Services
 
Deploying Next Gen Systems with Zero Downtime
Deploying Next Gen Systems with Zero DowntimeDeploying Next Gen Systems with Zero Downtime
Deploying Next Gen Systems with Zero Downtime
Twilio Inc
 
OpenStack Ironic - Bare Metal-as-a-Service
OpenStack Ironic - Bare Metal-as-a-ServiceOpenStack Ironic - Bare Metal-as-a-Service
OpenStack Ironic - Bare Metal-as-a-Service
Ramon Acedo Rodriguez
 
beyond tellerrand: Mobile Apps with JavaScript – There's More Than Web
beyond tellerrand: Mobile Apps with JavaScript – There's More Than Webbeyond tellerrand: Mobile Apps with JavaScript – There's More Than Web
beyond tellerrand: Mobile Apps with JavaScript – There's More Than Web
Heiko Behrens
 

Similar to Freebase Workshop, December 2009 (20)

The Wonderful World of Apache Kafka
The Wonderful World of Apache KafkaThe Wonderful World of Apache Kafka
The Wonderful World of Apache Kafka
 
Streaming Operational Data with MariaDB MaxScale
Streaming Operational Data with MariaDB MaxScaleStreaming Operational Data with MariaDB MaxScale
Streaming Operational Data with MariaDB MaxScale
 
ql.io: Consuming HTTP at Scale
ql.io: Consuming HTTP at Scale ql.io: Consuming HTTP at Scale
ql.io: Consuming HTTP at Scale
 
Microservice Automated Testing on Kubernetes
Microservice Automated Testing on KubernetesMicroservice Automated Testing on Kubernetes
Microservice Automated Testing on Kubernetes
 
Building a Scalable Real-Time Fleet Management IoT Data Tracker with Kafka St...
Building a Scalable Real-Time Fleet Management IoT Data Tracker with Kafka St...Building a Scalable Real-Time Fleet Management IoT Data Tracker with Kafka St...
Building a Scalable Real-Time Fleet Management IoT Data Tracker with Kafka St...
 
GraphQL & Prisma from Scratch
GraphQL & Prisma from ScratchGraphQL & Prisma from Scratch
GraphQL & Prisma from Scratch
 
Annotation processor and compiler plugin
Annotation processor and compiler pluginAnnotation processor and compiler plugin
Annotation processor and compiler plugin
 
NYC* 2013 - "Advanced Data Processing: Beyond Queries and Slices"
NYC* 2013 - "Advanced Data Processing: Beyond Queries and Slices"NYC* 2013 - "Advanced Data Processing: Beyond Queries and Slices"
NYC* 2013 - "Advanced Data Processing: Beyond Queries and Slices"
 
Intravert Server side processing for Cassandra
Intravert Server side processing for CassandraIntravert Server side processing for Cassandra
Intravert Server side processing for Cassandra
 
ql.io at NodePDX
ql.io at NodePDXql.io at NodePDX
ql.io at NodePDX
 
Why SQL? | Kenny Gorman, Cloudera
Why SQL? | Kenny Gorman, ClouderaWhy SQL? | Kenny Gorman, Cloudera
Why SQL? | Kenny Gorman, Cloudera
 
Kotlin - The Swiss army knife of programming languages - Visma Mobile Meet-up...
Kotlin - The Swiss army knife of programming languages - Visma Mobile Meet-up...Kotlin - The Swiss army knife of programming languages - Visma Mobile Meet-up...
Kotlin - The Swiss army knife of programming languages - Visma Mobile Meet-up...
 
NOSQL and Cassandra
NOSQL and CassandraNOSQL and Cassandra
NOSQL and Cassandra
 
Norikra: SQL Stream Processing In Ruby
Norikra: SQL Stream Processing In RubyNorikra: SQL Stream Processing In Ruby
Norikra: SQL Stream Processing In Ruby
 
Java day 2016.pptx
Java day 2016.pptxJava day 2016.pptx
Java day 2016.pptx
 
Delightful steps to becoming a functioning user of Step Functions
Delightful steps to becoming a functioning user of Step FunctionsDelightful steps to becoming a functioning user of Step Functions
Delightful steps to becoming a functioning user of Step Functions
 
CI/CD on AWS
CI/CD on AWSCI/CD on AWS
CI/CD on AWS
 
Deploying Next Gen Systems with Zero Downtime
Deploying Next Gen Systems with Zero DowntimeDeploying Next Gen Systems with Zero Downtime
Deploying Next Gen Systems with Zero Downtime
 
OpenStack Ironic - Bare Metal-as-a-Service
OpenStack Ironic - Bare Metal-as-a-ServiceOpenStack Ironic - Bare Metal-as-a-Service
OpenStack Ironic - Bare Metal-as-a-Service
 
beyond tellerrand: Mobile Apps with JavaScript – There's More Than Web
beyond tellerrand: Mobile Apps with JavaScript – There's More Than Webbeyond tellerrand: Mobile Apps with JavaScript – There's More Than Web
beyond tellerrand: Mobile Apps with JavaScript – There's More Than Web
 

Recently uploaded

UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
Rohit Gautam
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
Alex Pruden
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 

Recently uploaded (20)

UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 

Freebase Workshop, December 2009

  • 1. Freebase Workshop Jamie Taylor New York City, December 2009 Code available at: http://dev.mqlx.com/~jamie/nyc2009
  • 3. "type":"/type/object" is assumed "name" = /type/object/name [{ "name" : null, "type" : "/tv/tv_program" }] MQL
  • 5. { "id":"/en/ncis", "name" : null, "type" : "/tv/tv_program" } MQL
  • 6.
  • 7. "/program_creator" = /tv/tv_program/program_creator { "id":"/en/ncis", "name" : null, "type" : "/tv/tv_program", "program_creator":[ ] } MQL
  • 8. { "id":"/en/ncis", "name" : null, "type" : "/tv/tv_program", "program_creator":[{ "id":null, "name":null }] } MQL
  • 9. Mark Harmon TV Performance Jethro Gibbs { "id":"/en/ncis", "name" : null, "type" : "/tv/tv_program", "program_creator":[{ "id":null, "name:null }], "regular_cast":[{ "actor":null, "character":null }] }
  • 10. { "id":"/en/ncis", "name" : null, "type" : "/tv/tv_program", "program_creator":[{ "id":null, "name:null }], "regular_cast":[{ "actor":null, "character":null }] }
  • 11. Mark Harmon TV Performance Jethro Gibbs { "id":"/en/ncis", "name" : null, "type" : "/tv/tv_program", "program_creator":[{ "id":null, "name:null }], "regular_cast":[{ "actor": {"id":null, "name":null}, "character":null }] }
  • 12. { "id":"/en/ncis", "name" : null, "type" : "/tv/tv_program", "program_creator":[{ "id":null, "name:null }], "regular_cast":[{ "actor": {"id":null, "name":null}, "character":null }], "spin_offs":[ ] }
  • 13. { "id":"/en/ncis", "name" : null, "type" : "/tv/tv_program", "program_creator":[{ "id":null, "name:null }], "regular_cast":[{ "actor": {"id":null, "name":null}, "character":null }], "spin_offs":[{"id":null, "name":null, "air_date_of_first_episode":null}] }
  • 15. Service Requests in PHP • Using cURL to make external service requests $topicid = "/en/ncis"; $widgeturl = "http://www.freebase.com/widget/topic?id= $topicid&mode=i&panes=image,article_props"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $widgeturl); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $resultstr = curl_exec($ch); curl_close($ch); print $resultstr;
  • 16. Accessing External Services via MQL Extensions
  • 17. A Graph of Entities
  • 18. A Graph of Services
  • 19. http://www.bestbuy.com/site/She+Wolf… http://www.daylife.com/topic/Shakira http://twitter.com/shakira http://www.facebook.com/shakira http://www.myspace.com/shakira http://www.last.fm/music/Shakira http://www.netflix.com/RoleDisplay/Shakira/20046629 http://www.guardian.co.uk/music/shakira
  • 20. eMQL: MQL Extensions • Request data from other service providers • Services accessed transparently within MQL query • Use Freebase Keys/Properties in external service request • Uses: • real-time data services • Stock quotes, sensor data • premium services • requests can specify private "api keys" for the service • fine grained & authoritative data sources
  • 21. eMQL Query {   "id":   "/en/ibm", ticker   "type": "/business/company",   "ticker_symbol": [{ "ibm"     "stock_exchange": null,     "ticker_symbol":null   }] }
  • 22. eMQL Query {   "id":   "/en/ibm",   "type": "/business/company", ticker   "ticker_symbol": [{     "stock_exchange": null, "ibm"     "ticker_symbol":null, "quote":null   }] }
  • 23. eMQL Query {   "id":   "/en/ibm",   "type": "/business/company", ticker   "ticker_symbol": [{     "stock_exchange": null, "ibm"     "ticker_symbol":null, "quote":null "pre"   }] } "fetch"
  • 24. eMQL Service Request • Pre • Modify MQL query to provide additional information necessary to complete request • e.g., retrieve specific namespace keys • Fetch • Produce (retrieve, calculate, format) value for the eMQL property • Reduce (optional) • Create a result that looks across all results returned in the query • Help • Document how the property is used
  • 25. MQL Read Service http://api.freebase.com/api/service/mqlread?query= {"query":{"id":"/en/ncis", "name":null}} http://api.freebase.com/api/service/mqlread?queries= {"q0":{"query":{"id":"/en/ncis", "name":null}}} {"q1":{"query":{"id":"/en/blade_runner", "name":null}}}
  • 26. MQL Requests in PHP {"id":"/en/ncis", "name":null} $topicid = "/en/ncis"; $simplequery = array('id'=>$topicid, 'name'=>null); $queryarray = array('q1'=>array('query'=>$simplequery)); #query envelope $jsonquerystr = json_encode($queryarray); $mqlurl = "http://www.freebase.com/api/service/mqlread?queries=". $jsonquerystr; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $mqlurl); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $resultstr = curl_exec($ch); curl_close($ch); $resultarray = json_decode($resultstr, true); #true:give us an array $topicname = $resultarray["q1"]["result"]["name"]
  • 27. Demo eMQL Extensions stock quote @tag references
  • 28. TV Episode Adapter Query: {   "id":"/en/ncis",   "/user/jamie/extension/tv_episode": null } Desired Data: "name":"Faith" "airdate": "Dec/15/2009" "id":"/authority/tvrage/episode/1064868143"
  • 29. TV Rage Episode Adapter
  • 30. http://services.tvrage.com/tools/quickinfo.php?show=NCIS Show ID@4628 Show Name@NCIS Show URL@http://www.tvrage.com/NCIS Premiered@2003 Started@Sep/23/2003 Ended@ Latest Episode@07x09^Child's Play^Nov/24/2009 Next Episode@07x10^Faith^Dec/15/2009 RFC3339@2009-12-15T20:00:00-5:00 GMT+0 NODST@1260921600 Country@USA Status@Returning Series Classification@Scripted Genres@Action | Crime | Drama | Military/War Network@CBS Airtime@Tuesday at 08:00 pm Runtime@60
  • 31. TV Episode Adapter eMQL Driver TV Rage Time query dispatched pre eMQL MQL Query Extend MQL query to retrieve TV Rage Key (program identifier) updated MQL query Adapter TV Rage Service run MQL query MQL results Life Cycle fetch get series data next episode number, name,date get episode data next episode URL format results results return query results
  • 32. Using Foreign Identifiers to locate Freebase Topics • /authority Namespace • Organizations managing stable entity identifiers • /source - identifiers only appearing in URLs • Keys can be for URLs to other sites • And vice-versa!
  • 33. URLs and Freebase Keys • http://www.imdb.com/title/tt0083658 • /authority/imdb/title/tt0083658 • http://www.rottentomatoes.com/alias?type=imdbid&s=0083658 • http://dbpedia.org/resource/Blade_Runner • /wikipedia/en/Blade_Runner • http://en.wikipedia.org/wiki/Blade_Runner • http://musicbrainz.org/artist/2c4dae8c- e591-49e0-9c5a-62b310a15788.html • /authority/musicbrainz/2c4dae8c- e591-49e0-9c5a-62b310a15788 • http://www.bbc.co.uk/music/artists/2c4dae8c- e591-49e0-9c5a-62b310a15788
  • 35. Using Freebase RDF URIs http://rdf.freebase.com/ns/<freebase-key> • Performs content negotiation (HTTP ACCEPT Header) • Produces HTML for standard browsers • Produces RDF if you ask for it • Easily translated to MQL style Freebase identifiers http://rdf.freebase.com/ns/en.ncis = /en/ncis
  • 36. Entity Extractors • Zemanta • Freebase RDF URIs • Wikipedia Links • IMDB identifiers • Orchestr8 • Freebase RDF URIs • DBPedia RDF URIs • MusicBrainz identifiers • Crunchbase identifiers • OpenCalais • Freebase RDF URIs • DBPedia RDF URIs
  • 37. Getting Started++ • Freebase Documentation Hub • http://www.freebase.com/docs • Developer Mailing List • http://freebase.markmail.org/search/?q=list:com.freebase.developers • Schema/Modeling assistance • Data Modeling Mailing List • http://freebase.markmail.org/search/?q=list:com.freebase.data-modeling • Real Time help on IRC • Freenode #freebase • Freebase Happenings • http://blog.freebase.com