Twarql

From Knoesis wiki
Revision as of 22:46, 19 May 2010 by Pablo (Talk | contribs) (People)

Jump to: navigation, search

Twarql: Twitter Feeds through SPARQL

NOTICE: Twarql is in pre-alpha stage. We are currently refactoring some parts of the code and stabilizing our REST API. We plan to release a first version of the source code and API by June 7th, 2010. If you would like more information about the project, please visit our project page Linked Open Social Signals.

Introduction

Our approach encompasses the following steps:

  • extract content (entity mentions, hashtags and URLs) from microposts;
  • encode content in a structured format (RDF) using shared vocabularies (FOAF, SIOC, MOAT, etc.);
  • enable structured querying of microposts (SPARQL);
  • enable subscription to a stream of microposts that match a given query (Concept Feeds);
  • enable scalable real-time delivery of streaming data (SparqlPuSH).

Architecture

TwarqlArchitecture.png
  • See the workflow between the components of the architecture

Tweet Annotation

  • extract content (entity mentions, hashtags and URLs) from microposts;
  • encode content in a structured format (RDF) using shared vocabularies (FOAF, SIOC, MOAT, etc.);

Concept Feeds

  • enable structured querying of microposts (SPARQL);
  • enable subscription to a stream of microposts that match a given query;

TwarqlConceptFeeds.png

SPARQLPuSH

Twarql API

REST Endpoints

Summary:

  • URL scheme: http://<base-url>/<operation>/?<parameter>=<value>&...&output=<output format>
  • Base URL: http://knoesis1.wright.edu/twarql
  • Operations: search, register, stream, query
  • Output formats: twitter-json, sparql-json, entities

Parameters:

  • http://knoesis1.wright.edu/twarql/search?keyword=k1,...,kn&output=<output type>
    • input: keywords, output type (twitter-json, entities, sparql-json)
    • output: tweets, entities, triples

Output Formats

We also provide output according to the format presented on the twitter-api-announce message.

{
"text" : "hey @raffi tell @noradio to check out http://dev.twitter.com #hot",
...
"entities" : {
 "user_mentions" : [
 {
   "id" : 8285392,
   "screen_name" : "raffi",
   "indices" : [4, 9]
 },
 {
   "id" : 3191321,
   "screen_name" : "noradio",
   "indices" : [16, 23]
 }
],
"urls" : [
 {      "url" : "http://dev.twitter.com",
   "indices" : [38, 64]
 },
],
"hashtags" : [
 {      "text" : "#hot",
   "indices" : [66, 69]
   "url" : "http://search.twitter.com/search?q=%23hot"
 }
]
}
...
}

Supported Clients

  • SPARQL Protocol-compliant Clients
    • Cuebee is a SPARQL query formulation and results exploration engine. We provide a TweetExplorer that can be directly plugged into Cuebee.


  • RSS/Atom clients
    • View SparqlPuSH

People

You may contact us if you have any questions about the implementation or API. We try list our major contributions below our names so that you know to whom you should direct your question.

  • Pablo Mendes
    • Architecture, SPARQL client (Cuebee), Social Sensor (Extraction, Annotation), API, Documentation
  • Pavan Kapanipathi
    • Application Server, Semantic Publisher, Streaming SPARQL, API Content Negotiation
  • Alex Passant
    • SparqlPuSH, Annotation Vocabularies