background preloader

CubicWeb Semantic Web Framework

CubicWeb Semantic Web Framework
Related:  Python

Getting started with rdflib — rdflib v3.0.0 documentation Create an Rdflib Graph You might parse some files into a new graph (Introduction to parsing RDF into rdflib graphs) or open an on-disk rdflib store. from rdflib.graph import Graphg = Graph()g.parse(" LiveJournal produces FOAF data for their users, but they seem to use foaf:member_name for a person’s full name. from rdflib.namespace import NamespaceFOAF = Namespace(" FOAF['name'], n)) for s,_,n in g.triples((None, FOAF['member_name'], None))] Run a Query The rdflib package concentrates on providing the core RDF types and interfaces for working with RDF. In order to perform SPARQL queries, you need to install the companion rdfextras package which includes a SPARQL plugin implementation: In order to use the SPARQL plugin in your code, the plugin must first be registered. Continuing the example... Namespaces

lxml - Processing XML and HTML with Python Online Access The DBpedia data set can be accessed online via a SPARQL query endpoint and as Linked Data. 1. Querying DBpedia The DBpedia data set enables quite astonishing query answering possibilities against Wikipedia data. 1.1. There is a public SPARQL endpoint over the DBpedia data set at OpenLink Virtuoso as the back-end database engine. There is a list of all DBpedia data sets that are currently loaded into the SPARQL endpoint. You can ask queries against DBpedia using: the Leipzig query builder at the OpenLink Interactive SPARQL Query Builder (iSPARQL) at the SNORQL query explorer at (does not work with Internet Explorer); or any other SPARQL-aware client(s). Fair Use Policy: Please read this post for information about restrictions on the public DBpedia endpoint. 1.2. There is a public Faceted Browser “search and find” user interface at 1.3. here. 1.4.

Web sémantique et modèle de données ( The project has to be placed in the context of our move towards open data. This approach has been defined by the W3C, regarding the “semantic web” or “linked data”.Find out more about how semantic web and linked data are used in the BnF. This is about structuring resources in order to make them reusable by machines in a better way. The project uses data which have been created in various formats such as Intermarc for the catalogue of printed books, XML-EAD for archives inventories and Dublin Core for the digital library. Such data is automatically gathered, modelled and enriched and are published in the RDF semantic web language. Part of the data is matched with external value vocabularies: for languages and nationalities, for subjects, DCMI type for document types. Understanding data model What the Bibliothèque nationale de France provides How to retrieve data o hôte : port : 21 The software used: CubicWeb

Getting data from the Semantic Web This tutorial is for programmers used to building software on top of non-Semantic-Web data sources: using screen scraping techniques, or using APIs that return XML, JSON, CSV etc. Getting data from Semantic Web sources is typically done in one of two ways: either directly getting data in an RDF serialization over HTTP or by using a SPARQL endpoint. In this tutorial, we shall get some data from DBPedia, the Semantic Web version of Wikipedia. [edit] Getting RDF data directly Some websites produce RDF data that is available in one of the many RDF serializations. The two most common RDF serializations that you need to worry about at the moment are RDF/XML and RDFa. When you first see RDF/XML, you may find it especially hard to understand compared to 'normal' XML: often it is machine-produced and contains some unfamiliar constructs. Fortunately, there are a variety of tools you can use to get at RDF data. sudo easy_install -U "rdflib>=3.0.0" from rdflib import Graph, URIRef g = Graph() len(g)

karrigell - A web framework for Python 3.2+ Karrigell is a Pythonic web framework, very simple to learn and to use Karrigell's design is about simplicity for the programmer and integration of all the web environment in the scripts namespace. All the HTML tags are available as classes in the scripts namespace : def index(): return HTML(BODY("Hello world")) To build an HTML document as a tree, the HTML tags objects support the operators + (add brother) and <= (add child) : def index(): form = FORM(action="insert",method="post") form <= INPUT(name="foo")+BR()+INPUT(name="bar") form <= INPUT(Type="submit",value="Ok") return HTML(BODY(form)) The scripts can be served by a built-in web server, or through the Apache server, either on CGI mode or using the WSGI interface This project is a rewriting of the Python 2.x version, adapted to Python version 3.2 and over, with some incompatibilies BuanBuan is a wiki application based on Karrigell 4 kforum is a forum application kftp is a FTP-like program to manage files and folders on line

Home Linked Data: Evolving the Web into a Global Data Space