Scikits.learn (http://scikit-learn.sourceforge.net/) is a scikit for machine learning which has gained lots of popularity in recent months. In particular, it can be used for text and large scale database mining.
On another side, CubicWeb (http://www.cubicweb.org/) is a python-based framework for semantic web applications that has been used in different application fields (library, museum, conference, intranet applications).
The aim of this talk is to present how these tools can be used together for semantic data mining of rss feeds (clustering, prediction), and for building a news aggregator similar to google news.
Full description : http://www.euroscipy.org/talk/4291
The Semantic Web and its Impact on International WebsitesMartin Hepp
In this presentation, given at the International Search Summit 2010 in Londin, I discuss how rich data embedded inside Web pages via RDFa can be used to make the individual value proposition remain intact across the web - thus preventing consumers and price comparison engines from flattening your individual offer to the price alone.
Esta charla tiene por objetivo discutir los patrones de diseño de la web 2.0 y las nuevas tendencias de la web semántica. Los 12 patrones que dirigen la presentación son: Information sharing, User-centered design, MVC architecture, Participation & collaboration, Social networking, Search & recommendation engines, Folksonomy, Community & collective intelligence, Inter-operability & data portability, Rich user experience, Separation of content and presentation, Web as a platform (ubiquity).
Junto con esto se presentan brevemente algunos frameworks y módulos de Python que permiten el desarrollo de este tipo de aplicaciones web. Asimismo, se muestran ejemplos de consumo de APIs de servicios web populares (JSON, XML, feeds y HTML scraping) y un ejemplo de procesamiento de contenido a través de herramientas semánticas.
More info at:
http://ar.pycon.org/2009/conference/schedule/event/30/
Download original slideshow in PDF format at:
http://ar.pycon.org/2009/conference/schedule/event/30/
Licensing and Acknowledgements at: http://ar.pycon.org/2009/conference/schedule/event/30/
Python en la Web Semántica by Santiago Andrés Coffey is licensed under a Creative Commons Reconocimiento-No comercial-Compartir bajo la misma licencia 2.5 Argentina License.
http://creativecommons.org/licenses/by-nc-sa/2.5/ar/
ISKO 2010: Linked Data in E-Commerce – The GoodRelations OntologyMartin Hepp
More than 50% of a developed nation's Gross Domestic Product is used for establishing and maintaining the exchange of goods and services, and a large share of that is consumed for the search for potential suppliers and consumers. A key variable that determines that effort is the specificity of the objects being exchanged, which is generally on the rise: We produce and consume much more specific objects than a decade ago.
In this talk, I will outline how Linked Data can be used to weave a giant graph of information about products, offers, stores, and related facts. This will reduce the effort for business matchmaking on a Web scale. Centerpiece of that graph is the GoodRelations ontology, a global schema for exposing such facts as Linked Data on the Web. GoodRelations is the second most popular conceptual schema on the Web of Data and one of the few examples of academic research in the field that has been adopted by several Fortune 500 companies, like BestBuy or Yahoo.
More information on GoodRelations is at http://purl.org/goodrelations/
Semantic Web-based E-Commerce: The GoodRelations OntologyMartin Hepp
Semantic Web-based E-Commerce: The GoodRelations Ontology
Presentation at the Semantic Technology Conference, June 15, 2009
http://purl.org/goodrelations/
The GoodRelations Ontology: Making Semantic Web-based E-Commerce a RealityMartin Hepp
A promising application domain for Semantic Web technology is the annotation of products and services offerings on the Web so that consumers and enterprises can search for suitable suppliers using products and services ontologies. While there has been substantial progress in developing ontologies for types of products and services, namely eClassOWL, this alone does not provide the representational means required for e-commerce on the Semantic Web. Particularly missing is an ontology that allows describing the relationships between (1) Web resources, (2) offerings made by means of those Web resources, (3) legal entities, (4) prices, (5) terms and conditions, and (6) the aforementioned ontologies for products and services. (1NDN)
In the talk, I will explain the need and potential of the GoodRelations ontology, introduce its key conceptual elements, highlight several lessons learned, and summarize design decisions with respect to to modeling approaches and the appropriate language fragment, which may be relevant for other ontology projects, too.
The Semantic Web and its Impact on International WebsitesMartin Hepp
In this presentation, given at the International Search Summit 2010 in Londin, I discuss how rich data embedded inside Web pages via RDFa can be used to make the individual value proposition remain intact across the web - thus preventing consumers and price comparison engines from flattening your individual offer to the price alone.
Esta charla tiene por objetivo discutir los patrones de diseño de la web 2.0 y las nuevas tendencias de la web semántica. Los 12 patrones que dirigen la presentación son: Information sharing, User-centered design, MVC architecture, Participation & collaboration, Social networking, Search & recommendation engines, Folksonomy, Community & collective intelligence, Inter-operability & data portability, Rich user experience, Separation of content and presentation, Web as a platform (ubiquity).
Junto con esto se presentan brevemente algunos frameworks y módulos de Python que permiten el desarrollo de este tipo de aplicaciones web. Asimismo, se muestran ejemplos de consumo de APIs de servicios web populares (JSON, XML, feeds y HTML scraping) y un ejemplo de procesamiento de contenido a través de herramientas semánticas.
More info at:
http://ar.pycon.org/2009/conference/schedule/event/30/
Download original slideshow in PDF format at:
http://ar.pycon.org/2009/conference/schedule/event/30/
Licensing and Acknowledgements at: http://ar.pycon.org/2009/conference/schedule/event/30/
Python en la Web Semántica by Santiago Andrés Coffey is licensed under a Creative Commons Reconocimiento-No comercial-Compartir bajo la misma licencia 2.5 Argentina License.
http://creativecommons.org/licenses/by-nc-sa/2.5/ar/
ISKO 2010: Linked Data in E-Commerce – The GoodRelations OntologyMartin Hepp
More than 50% of a developed nation's Gross Domestic Product is used for establishing and maintaining the exchange of goods and services, and a large share of that is consumed for the search for potential suppliers and consumers. A key variable that determines that effort is the specificity of the objects being exchanged, which is generally on the rise: We produce and consume much more specific objects than a decade ago.
In this talk, I will outline how Linked Data can be used to weave a giant graph of information about products, offers, stores, and related facts. This will reduce the effort for business matchmaking on a Web scale. Centerpiece of that graph is the GoodRelations ontology, a global schema for exposing such facts as Linked Data on the Web. GoodRelations is the second most popular conceptual schema on the Web of Data and one of the few examples of academic research in the field that has been adopted by several Fortune 500 companies, like BestBuy or Yahoo.
More information on GoodRelations is at http://purl.org/goodrelations/
Semantic Web-based E-Commerce: The GoodRelations OntologyMartin Hepp
Semantic Web-based E-Commerce: The GoodRelations Ontology
Presentation at the Semantic Technology Conference, June 15, 2009
http://purl.org/goodrelations/
The GoodRelations Ontology: Making Semantic Web-based E-Commerce a RealityMartin Hepp
A promising application domain for Semantic Web technology is the annotation of products and services offerings on the Web so that consumers and enterprises can search for suitable suppliers using products and services ontologies. While there has been substantial progress in developing ontologies for types of products and services, namely eClassOWL, this alone does not provide the representational means required for e-commerce on the Semantic Web. Particularly missing is an ontology that allows describing the relationships between (1) Web resources, (2) offerings made by means of those Web resources, (3) legal entities, (4) prices, (5) terms and conditions, and (6) the aforementioned ontologies for products and services. (1NDN)
In the talk, I will explain the need and potential of the GoodRelations ontology, introduce its key conceptual elements, highlight several lessons learned, and summarize design decisions with respect to to modeling approaches and the appropriate language fragment, which may be relevant for other ontology projects, too.
A mini project by 'Don't move the plants' at the 8th Summer School on Ontology Engineering and the Semantic Web 2011. This Project was completed by: Andrea Nuzzolese, Esther Lozano, Ferdinand Dhombres, Luca Greco and Tim Hodson.
Open Source & Open Data : les bienfaits des communsLogilab
Le monde du logiciel a été précurseur en réintroduisant un mode de production "coopératif" dès le début des années 80.
Avec le mouvement de l'Open Data, cette coopération s'est étendue à la production des données.
On parle ici de biens communs dans le sens d'un "bien partagé par les membres d'une même communauté".
Le 1er salon professionnel de l'open data qui vise à consolider la filière française des données ouvertes. Ce salon valorise les acteurs positionnés sur l'open data et assure l'information des participants à travers des retours d'expériences, conférences stratégiques, ateliers pratiques et mises en relations directe avec les prestataires et ceux qui font l'open data aujourd'hui en France.
Pydata Paris Python for manufacturing musical instrumentsLogilab
Pydata Paris Python for manufacturing musical instruments.
Context: making and repair of musical instruments.
Assets: traditional craftsmanship ; world-famous quality
Challenge: aggressive competition from foreign countries
Olivier Cayrol a présenté la société Logilab et ses services à l'occasion de la Semaine de l'Industrie.
Logilab : un industriel du logiciel
- développement
- conseil
- formation
- expertise
Les archives du département de la Gironde, de la Ville de Bordeaux et de la Métropole de Bordeaux ont mis en place un système d'archivage mutualisé leur permettant de gérer leurs documents tout au long de leur cycle de vie, depuis leur conception initiale jusqu'à leur archivage. Ce système repose sur diverses applications logiciel libre prenant chacune en charge une partie du cycle de vie des documents (Alfresco pour la GED courante, Asalae pour l'archivage, etc.)
Dans le cadre de ce système, lors du passage d'un outil à l'autre, un grand nombre de métadonnées sont perdues et doivent donc être ressaisies. D'où l'idée de mettre en place un référentiel commun qui va constituer un pivot sur lequel s'appuient les autres outils, et qui va conserver et enrichir les métadonnées d'un document tout au long de son cycle de vie, au fil de ses passages d'une application à l'autre. Ces métadonnées sont, par exemple, le rangement dans des
plans de classement, les agents étant intervenus sur le document, les étapes du processus de validation, etc.)
Dans le cadre d'un marché public, Logilab développe le référentiel commun du système d'archivage pour le compte du Conseil Départemental de la Gironde, de la Métropole de Bordeaux et de la Ville de Bordeaux.
La présentation présente l'outil logiciel libre qui a vocation à être partagé avec d'autres institutions rencontrant une problématique similaire, mais également de revenir sur le projet lui-meme qui implique de nombreux acteurs et a été géré avec une méthode agile et divers outils innovants (MVP, UX Design, etc.)
Voir http://saem.e-bordeaux.org/projet-module-r%C3%A9f%C3%A9rentiel pour plus de détails.
Utiliser salt pour tester son infrastructure sur open stack ou dockerLogilab
Vous pouvez accéder à cette présentation sur ce lien : http://slides.logilab.fr/2015/poss2015_salt-docker/#/
Configurer et orchestrer son infrastructure avec un outil de gestion de configuration centralisée tel que Salt comporte de nombreux avantages.
La conservation et l'historisation des fichers de configuration dans un entrepôt de source geré par un DVCS (mercurial ou git) en fait partie.
Salt permet ensuite de faire évoluer son infrastructure en la testant dans des environements isolés. Une fois la description complète, reproduire une partie de son infrastructure de production sur un environnement virtualisé tel qu'un cloud
privé (OpenStack) devient possible et automatisable avec
*salt-cloud*. L'étape suivante est de pouvoir reproduire des portions de son infrastructure dans des conteneurs légers tels que docker ou lxc directement sur son portable. Pour cela, le pilotage de docker par salt et les fonctionnalités d'orchestration de salt permettent une agilité sans précédent.
Il s'agit d'un bon complément pour le TDI : Test Driven Infrastructure. L'infrastructure est testée en mode "intégration continue" et on peut tester et débugger une partie de l'infrastructure en mode "bac à sable".
Ce modèle peut ensuite être décliné avec l'utilisation des branches dans git ou mercurial où certaines branches vont être appliquées à la partie production de l'infrastructure alors que d'autres sont appliqués a la préproduction ou aux environnements docker ou lxc en local.
Salt est un outil de gestion de configuration centralisé généralement utilisé pour configurer et orchestrer son infrastructure système en bénéficiant de la conservation et de l'historisation des fichiers de configuration dans un entrepôt source géré par mercurial ou git. Toutefois, les possibilités offertes par Salt vont beaucoup plus loin. Une fois la description Salt de l'infrastructure de production terminée, il est possible d'en reproduire automatiquement tout ou partie
avec salt-cloud dans un environnement virtualisé (cloud privé OpenStack) et ainsi de pouvoir mener des tests. En allant plus loin, il est possible de reproduire des portions d'infrastructure dans des conteneurs légers (docker, lxc) et de travailler directement sur son ordinateur portable.
Les fonctionnalités d'orchestration de Salt et son pilotage de docker amènent une agilité sans précédent dans ce processus de travail.
Dans le modèle décrit ci-dessus, excellent complément du TDI (Test-Driven Infrastructure), l'infrastructure est testée et déboguée en mode "bac à sable" puis déployée selon un mécanisme automatisé d'intégration continue. Le modèle peut être décliné en utilisant des branches dans l’entrepôt source de Salt et en choisissant quelles branches sont appliquées
à l'infrastructure en production, en pré-production ou en test dans les environnements locaux (docker, lxc). Des mécanismes de relecture et de validation peuvent alors être mis en œuvre.
Importer des données en Python avec CubicWeb 3.21Logilab
Slides en version HTML : http://slides.logilab.fr/2015/pyconfr2015_import_donnees_cubicweb/
Nous introduirons une nouvelle méthode pour importer des données externes (service REST, fichier, etc.) dans une application. Simple et flexible, elle favorise la réutilisation des composants afin de se concentrer sur ce qui est spécifique à chaque cas. Un exemple d'implémentation sera donné avec le framework CubicWeb 3.21 qui introduit une API d'import de données fondée sur cette méthode.
Abstract
Il est courant pour un développeur de devoir implémenter des fonctionnalités d'import de données. Les utilisateurs peuvent en effet avoir besoin de données disponibles par ailleurs, dans un tableur par exemple, dans une autre base, ou accessibles par des services web. Nous introduisons ici une méthode simple pour réaliser cela en favorisant la généricité et la ré-utilisabilité des composants développés.
Un flux personnalisable d'entités
L'idée est de transformer petit à petit les données externes afin de les rendre compatibles avec le schéma de l'application et donc insérables en base.
Le principe est de commencer par stocker les données de la source sur une «[HTML_REMOVED]entité externe[HTML_REMOVED]». Puis on utilise des générateurs Python pour créer un «[HTML_REMOVED]flux[HTML_REMOVED]» d'entités[HTML_REMOVED]: chaque entité passe de fonction en fonction, ce qui va la transformer peu à peu pour la rapprocher du modèle attendu et qu'elle soit finalement prête à être insérée, ou au contraire rejetée si ce n'est pas possible.
L'étape d'insertion est alors identique, quelle que soit la source d'où proviennent les données.
Exemple avec CubicWeb 3.21
Avec sa version 3.21 sortie en 2015, le framework CubicWeb dispose d'une toute nouvelle API fondée sur cette méthode. Elle permet au développeur de se concentrer sur le flux de données provenant des sources qui l'intéressent.
De plus, l'étape d'insertion offre plusieurs composants interchangeables. En fonction du compromis qu'il souhaite faire entre sécurité et rapidité, le développeur peut choisir entre une insertion sûre mais lente, où chaque entité à insérer est préalablement vérifiée quant au type de ses données et la validité de ses relations, et une insertion plus rapide mais pouvant échouer, où les entités sont insérées en masse.
Tout cela sera illustré par le moissonnage des données de portails Open Data. La diversité des formats (RDF (open-data.europa.eu), REST (data.gouv.fr, OpenDataSoft), CSW (geocatalogue.fr), etc.) ainsi que des modèles de données impose de créer des flux différents afin que toutes ces données puissent être importées dans un schéma unique de CubicWeb.
De la même façon, un autre exemple sera l'import de données SKOS où des thesaurus entiers sont importés dans CubicWeb grâce à cette API.
Simulagora, met la simulation numérique à la portée de tous !
Simulagora est un service Web de simulation numérique dans le cloud permettant la réalisation de calculs d'envergure sans investissement :
- pas de matériel dédié : une connexion à Internet suffit,
- pas de connaissances poussées en informatique : les principaux codes de calcul libres sont pré-installés,
- pas d'investissement financier : le paiement se fait à l'usage.
Simulagora donne accès à la puissance quasi-illimitée des nuages publics :
- lancez vos calculs exigeants sur des machines ayant jusqu'à 32 CPU et 120 Go RAM,
- obtenez le résultat de vos études paramétriques en un temps record en utilisant plusieurs centaines de machines simultanément.
Simulagora n'est pas un service d'exécution de calcul comme les autres :
- il s'insère dans vos processus actuels (script, terminal, interface Web),
- il enregistre l'historique de vos calculs pour assurer leur capitalisation et leur traçabilité,
- il garantit la reproductibilité de vos calculs, en conservant une copie de la machine virtuelle sur laquelle ils ont été exécutés,
- son interface Web permet une collaboration entre les différents experts pour mener à bien vos études numériques les plus pointues.
Simulagora est un produit de Logilab qui, depuis 15 ans, met les technologies du Web au service de l'informatique scientifique.
Simulagora, sets numerical simulation available to all!
Simulagora is a cloud-based numerical simulation service which allows computations without any up-front investment:
- No dedicated hardware: only an Internet connection is needed
- No advanced IT knowledge: major free software packages are pre-installed and ready-to-use
- No financial investment: pay only for used resources.
Simulagora provides access to the virtually unlimited power of public clouds:
- Start your complex computations on machines with up to 32 CPUs and 120GB of RAM
- Get the results of your parametric studies in record time using hundreds of machines simultaneously.
Simulagora is a one-of-a-kind computation execution service:
- Easy to fit into your existing processes (scripts, terminal applications, Web interface)
- Saves your computations history to ensure their traceability and maximize their capitalization
- Guarantees the reproducibility of your computations by keeping a copy of the virtual machines on which they ran
- Enables collaboration among experts using the Web interface to carry out your most precise digital studies.
Simulagora is a service built by Logilab, a 15-year veteran of Web technologies for scientific computing.
Innover par et pour la donnée - Logilab ADBU Bibcamp 2015Logilab
Innover par et pour la donnée, illustrée par l'exemple de data.bnf.fr et les principes du web sémantique.
Présentation de Logilab au #bibcamp15 organisé en juin 2015 par l'ADBU, association des directeurs de bibliothèques universitaires.
Study of the dynamic behavior of a pump with Code_ASTER on SimulagoraLogilab
Simulagora is a platform using Web technology to ease grid
computation by leveraging cloud resources.
Public cloud based
– Computation and storage resources
– Enormous power
– Super-fast computation resources ramp-up
Support de présentation lors de notre participation au "Battle" organisé par LibertTIC et DataLab à la ruche numérique du Mans.
Version PDF : http://www.logilab.fr/file/2221/raw/Battle%20Opendata.pdf
Debconf14 : Putting some salt in your Debian systems -- Julien CristauLogilab
Salt allows scalable infrastructure management, including provisioning new systems and managing them over their lifetime. In this talk I'll show how it makes managing Debian systems easier.
A mini project by 'Don't move the plants' at the 8th Summer School on Ontology Engineering and the Semantic Web 2011. This Project was completed by: Andrea Nuzzolese, Esther Lozano, Ferdinand Dhombres, Luca Greco and Tim Hodson.
Open Source & Open Data : les bienfaits des communsLogilab
Le monde du logiciel a été précurseur en réintroduisant un mode de production "coopératif" dès le début des années 80.
Avec le mouvement de l'Open Data, cette coopération s'est étendue à la production des données.
On parle ici de biens communs dans le sens d'un "bien partagé par les membres d'une même communauté".
Le 1er salon professionnel de l'open data qui vise à consolider la filière française des données ouvertes. Ce salon valorise les acteurs positionnés sur l'open data et assure l'information des participants à travers des retours d'expériences, conférences stratégiques, ateliers pratiques et mises en relations directe avec les prestataires et ceux qui font l'open data aujourd'hui en France.
Pydata Paris Python for manufacturing musical instrumentsLogilab
Pydata Paris Python for manufacturing musical instruments.
Context: making and repair of musical instruments.
Assets: traditional craftsmanship ; world-famous quality
Challenge: aggressive competition from foreign countries
Olivier Cayrol a présenté la société Logilab et ses services à l'occasion de la Semaine de l'Industrie.
Logilab : un industriel du logiciel
- développement
- conseil
- formation
- expertise
Les archives du département de la Gironde, de la Ville de Bordeaux et de la Métropole de Bordeaux ont mis en place un système d'archivage mutualisé leur permettant de gérer leurs documents tout au long de leur cycle de vie, depuis leur conception initiale jusqu'à leur archivage. Ce système repose sur diverses applications logiciel libre prenant chacune en charge une partie du cycle de vie des documents (Alfresco pour la GED courante, Asalae pour l'archivage, etc.)
Dans le cadre de ce système, lors du passage d'un outil à l'autre, un grand nombre de métadonnées sont perdues et doivent donc être ressaisies. D'où l'idée de mettre en place un référentiel commun qui va constituer un pivot sur lequel s'appuient les autres outils, et qui va conserver et enrichir les métadonnées d'un document tout au long de son cycle de vie, au fil de ses passages d'une application à l'autre. Ces métadonnées sont, par exemple, le rangement dans des
plans de classement, les agents étant intervenus sur le document, les étapes du processus de validation, etc.)
Dans le cadre d'un marché public, Logilab développe le référentiel commun du système d'archivage pour le compte du Conseil Départemental de la Gironde, de la Métropole de Bordeaux et de la Ville de Bordeaux.
La présentation présente l'outil logiciel libre qui a vocation à être partagé avec d'autres institutions rencontrant une problématique similaire, mais également de revenir sur le projet lui-meme qui implique de nombreux acteurs et a été géré avec une méthode agile et divers outils innovants (MVP, UX Design, etc.)
Voir http://saem.e-bordeaux.org/projet-module-r%C3%A9f%C3%A9rentiel pour plus de détails.
Utiliser salt pour tester son infrastructure sur open stack ou dockerLogilab
Vous pouvez accéder à cette présentation sur ce lien : http://slides.logilab.fr/2015/poss2015_salt-docker/#/
Configurer et orchestrer son infrastructure avec un outil de gestion de configuration centralisée tel que Salt comporte de nombreux avantages.
La conservation et l'historisation des fichers de configuration dans un entrepôt de source geré par un DVCS (mercurial ou git) en fait partie.
Salt permet ensuite de faire évoluer son infrastructure en la testant dans des environements isolés. Une fois la description complète, reproduire une partie de son infrastructure de production sur un environnement virtualisé tel qu'un cloud
privé (OpenStack) devient possible et automatisable avec
*salt-cloud*. L'étape suivante est de pouvoir reproduire des portions de son infrastructure dans des conteneurs légers tels que docker ou lxc directement sur son portable. Pour cela, le pilotage de docker par salt et les fonctionnalités d'orchestration de salt permettent une agilité sans précédent.
Il s'agit d'un bon complément pour le TDI : Test Driven Infrastructure. L'infrastructure est testée en mode "intégration continue" et on peut tester et débugger une partie de l'infrastructure en mode "bac à sable".
Ce modèle peut ensuite être décliné avec l'utilisation des branches dans git ou mercurial où certaines branches vont être appliquées à la partie production de l'infrastructure alors que d'autres sont appliqués a la préproduction ou aux environnements docker ou lxc en local.
Salt est un outil de gestion de configuration centralisé généralement utilisé pour configurer et orchestrer son infrastructure système en bénéficiant de la conservation et de l'historisation des fichiers de configuration dans un entrepôt source géré par mercurial ou git. Toutefois, les possibilités offertes par Salt vont beaucoup plus loin. Une fois la description Salt de l'infrastructure de production terminée, il est possible d'en reproduire automatiquement tout ou partie
avec salt-cloud dans un environnement virtualisé (cloud privé OpenStack) et ainsi de pouvoir mener des tests. En allant plus loin, il est possible de reproduire des portions d'infrastructure dans des conteneurs légers (docker, lxc) et de travailler directement sur son ordinateur portable.
Les fonctionnalités d'orchestration de Salt et son pilotage de docker amènent une agilité sans précédent dans ce processus de travail.
Dans le modèle décrit ci-dessus, excellent complément du TDI (Test-Driven Infrastructure), l'infrastructure est testée et déboguée en mode "bac à sable" puis déployée selon un mécanisme automatisé d'intégration continue. Le modèle peut être décliné en utilisant des branches dans l’entrepôt source de Salt et en choisissant quelles branches sont appliquées
à l'infrastructure en production, en pré-production ou en test dans les environnements locaux (docker, lxc). Des mécanismes de relecture et de validation peuvent alors être mis en œuvre.
Importer des données en Python avec CubicWeb 3.21Logilab
Slides en version HTML : http://slides.logilab.fr/2015/pyconfr2015_import_donnees_cubicweb/
Nous introduirons une nouvelle méthode pour importer des données externes (service REST, fichier, etc.) dans une application. Simple et flexible, elle favorise la réutilisation des composants afin de se concentrer sur ce qui est spécifique à chaque cas. Un exemple d'implémentation sera donné avec le framework CubicWeb 3.21 qui introduit une API d'import de données fondée sur cette méthode.
Abstract
Il est courant pour un développeur de devoir implémenter des fonctionnalités d'import de données. Les utilisateurs peuvent en effet avoir besoin de données disponibles par ailleurs, dans un tableur par exemple, dans une autre base, ou accessibles par des services web. Nous introduisons ici une méthode simple pour réaliser cela en favorisant la généricité et la ré-utilisabilité des composants développés.
Un flux personnalisable d'entités
L'idée est de transformer petit à petit les données externes afin de les rendre compatibles avec le schéma de l'application et donc insérables en base.
Le principe est de commencer par stocker les données de la source sur une «[HTML_REMOVED]entité externe[HTML_REMOVED]». Puis on utilise des générateurs Python pour créer un «[HTML_REMOVED]flux[HTML_REMOVED]» d'entités[HTML_REMOVED]: chaque entité passe de fonction en fonction, ce qui va la transformer peu à peu pour la rapprocher du modèle attendu et qu'elle soit finalement prête à être insérée, ou au contraire rejetée si ce n'est pas possible.
L'étape d'insertion est alors identique, quelle que soit la source d'où proviennent les données.
Exemple avec CubicWeb 3.21
Avec sa version 3.21 sortie en 2015, le framework CubicWeb dispose d'une toute nouvelle API fondée sur cette méthode. Elle permet au développeur de se concentrer sur le flux de données provenant des sources qui l'intéressent.
De plus, l'étape d'insertion offre plusieurs composants interchangeables. En fonction du compromis qu'il souhaite faire entre sécurité et rapidité, le développeur peut choisir entre une insertion sûre mais lente, où chaque entité à insérer est préalablement vérifiée quant au type de ses données et la validité de ses relations, et une insertion plus rapide mais pouvant échouer, où les entités sont insérées en masse.
Tout cela sera illustré par le moissonnage des données de portails Open Data. La diversité des formats (RDF (open-data.europa.eu), REST (data.gouv.fr, OpenDataSoft), CSW (geocatalogue.fr), etc.) ainsi que des modèles de données impose de créer des flux différents afin que toutes ces données puissent être importées dans un schéma unique de CubicWeb.
De la même façon, un autre exemple sera l'import de données SKOS où des thesaurus entiers sont importés dans CubicWeb grâce à cette API.
Simulagora, met la simulation numérique à la portée de tous !
Simulagora est un service Web de simulation numérique dans le cloud permettant la réalisation de calculs d'envergure sans investissement :
- pas de matériel dédié : une connexion à Internet suffit,
- pas de connaissances poussées en informatique : les principaux codes de calcul libres sont pré-installés,
- pas d'investissement financier : le paiement se fait à l'usage.
Simulagora donne accès à la puissance quasi-illimitée des nuages publics :
- lancez vos calculs exigeants sur des machines ayant jusqu'à 32 CPU et 120 Go RAM,
- obtenez le résultat de vos études paramétriques en un temps record en utilisant plusieurs centaines de machines simultanément.
Simulagora n'est pas un service d'exécution de calcul comme les autres :
- il s'insère dans vos processus actuels (script, terminal, interface Web),
- il enregistre l'historique de vos calculs pour assurer leur capitalisation et leur traçabilité,
- il garantit la reproductibilité de vos calculs, en conservant une copie de la machine virtuelle sur laquelle ils ont été exécutés,
- son interface Web permet une collaboration entre les différents experts pour mener à bien vos études numériques les plus pointues.
Simulagora est un produit de Logilab qui, depuis 15 ans, met les technologies du Web au service de l'informatique scientifique.
Simulagora, sets numerical simulation available to all!
Simulagora is a cloud-based numerical simulation service which allows computations without any up-front investment:
- No dedicated hardware: only an Internet connection is needed
- No advanced IT knowledge: major free software packages are pre-installed and ready-to-use
- No financial investment: pay only for used resources.
Simulagora provides access to the virtually unlimited power of public clouds:
- Start your complex computations on machines with up to 32 CPUs and 120GB of RAM
- Get the results of your parametric studies in record time using hundreds of machines simultaneously.
Simulagora is a one-of-a-kind computation execution service:
- Easy to fit into your existing processes (scripts, terminal applications, Web interface)
- Saves your computations history to ensure their traceability and maximize their capitalization
- Guarantees the reproducibility of your computations by keeping a copy of the virtual machines on which they ran
- Enables collaboration among experts using the Web interface to carry out your most precise digital studies.
Simulagora is a service built by Logilab, a 15-year veteran of Web technologies for scientific computing.
Innover par et pour la donnée - Logilab ADBU Bibcamp 2015Logilab
Innover par et pour la donnée, illustrée par l'exemple de data.bnf.fr et les principes du web sémantique.
Présentation de Logilab au #bibcamp15 organisé en juin 2015 par l'ADBU, association des directeurs de bibliothèques universitaires.
Study of the dynamic behavior of a pump with Code_ASTER on SimulagoraLogilab
Simulagora is a platform using Web technology to ease grid
computation by leveraging cloud resources.
Public cloud based
– Computation and storage resources
– Enormous power
– Super-fast computation resources ramp-up
Support de présentation lors de notre participation au "Battle" organisé par LibertTIC et DataLab à la ruche numérique du Mans.
Version PDF : http://www.logilab.fr/file/2221/raw/Battle%20Opendata.pdf
Debconf14 : Putting some salt in your Debian systems -- Julien CristauLogilab
Salt allows scalable infrastructure management, including provisioning new systems and managing them over their lifetime. In this talk I'll show how it makes managing Debian systems easier.
L'autre poster présenté par Logilab concerne Simulagora, un service en ligne de simulation numérique collaborative, qui permet de lancer des calculs dans les nuages (donc sans investissement dans du matériel ou d'administration système), qui met l'accent sur la traçabilité et la reproductibilité des calculs, ainsi que sur le travail collaboratif (partage de logiciel, de données et d'études numériques complètes).
Logilab was part of the research project PAFI (Plateforme d'Aide à la Facture Instrumentale) and developed an innovative web app, using CubicWeb, to facilitate the virtual prototyping of musical instruments and collaborative work between makers, users and museum curators.
Presentation by Nicolas Chauvat at "Fabrique de la Loi" 2014 (Open Legislative Data Conference)
Mirror of http://www.logilab.org/file/253393/raw/OLDC2014-chauvat.pdf
Blog entry : http://www.logilab.org/blogentry/253397
BRAINOMICS A management system for exploring and merging heterogeneous brain ...Logilab
"BRAINOMICS A management system for exploring and merging heterogeneous brain mapping data based on CubicWeb" by Vincent Michel - CrEDIBLE 2013 - 3/10/2013
Sudheer Mechineni, Head of Application Frameworks, Standard Chartered Bank
Discover how Standard Chartered Bank harnessed the power of Neo4j to transform complex data access challenges into a dynamic, scalable graph database solution. This keynote will cover their journey from initial adoption to deploying a fully automated, enterprise-grade causal cluster, highlighting key strategies for modelling organisational changes and ensuring robust disaster recovery. Learn how these innovations have not only enhanced Standard Chartered Bank’s data infrastructure but also positioned them as pioneers in the banking sector’s adoption of graph technology.
Communications Mining Series - Zero to Hero - Session 1DianaGray10
This session provides introduction to UiPath Communication Mining, importance and platform overview. You will acquire a good understand of the phases in Communication Mining as we go over the platform with you. Topics covered:
• Communication Mining Overview
• Why is it important?
• How can it help today’s business and the benefits
• Phases in Communication Mining
• Demo on Platform overview
• Q/A
Threats to mobile devices are more prevalent and increasing in scope and complexity. Users of mobile devices desire to take full advantage of the features
available on those devices, but many of the features provide convenience and capability but sacrifice security. This best practices guide outlines steps the users can take to better protect personal devices and information.
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionAggregage
Join Maher Hanafi, VP of Engineering at Betterworks, in this new session where he'll share a practical framework to transform Gen AI prototypes into impactful products! He'll delve into the complexities of data collection and management, model selection and optimization, and ensuring security, scalability, and responsible use.
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Albert Hoitingh
In this session I delve into the encryption technology used in Microsoft 365 and Microsoft Purview. Including the concepts of Customer Key and Double Key Encryption.
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfPaige Cruz
Monitoring and observability aren’t traditionally found in software curriculums and many of us cobble this knowledge together from whatever vendor or ecosystem we were first introduced to and whatever is a part of your current company’s observability stack.
While the dev and ops silo continues to crumble….many organizations still relegate monitoring & observability as the purview of ops, infra and SRE teams. This is a mistake - achieving a highly observable system requires collaboration up and down the stack.
I, a former op, would like to extend an invitation to all application developers to join the observability party will share these foundational concepts to build on:
Removing Uninteresting Bytes in Software FuzzingAftab Hussain
Imagine a world where software fuzzing, the process of mutating bytes in test seeds to uncover hidden and erroneous program behaviors, becomes faster and more effective. A lot depends on the initial seeds, which can significantly dictate the trajectory of a fuzzing campaign, particularly in terms of how long it takes to uncover interesting behaviour in your code. We introduce DIAR, a technique designed to speedup fuzzing campaigns by pinpointing and eliminating those uninteresting bytes in the seeds. Picture this: instead of wasting valuable resources on meaningless mutations in large, bloated seeds, DIAR removes the unnecessary bytes, streamlining the entire process.
In this work, we equipped AFL, a popular fuzzer, with DIAR and examined two critical Linux libraries -- Libxml's xmllint, a tool for parsing xml documents, and Binutil's readelf, an essential debugging and security analysis command-line tool used to display detailed information about ELF (Executable and Linkable Format). Our preliminary results show that AFL+DIAR does not only discover new paths more quickly but also achieves higher coverage overall. This work thus showcases how starting with lean and optimized seeds can lead to faster, more comprehensive fuzzing campaigns -- and DIAR helps you find such seeds.
- These are slides of the talk given at IEEE International Conference on Software Testing Verification and Validation Workshop, ICSTW 2022.
A tale of scale & speed: How the US Navy is enabling software delivery from l...sonjaschweigert1
Rapid and secure feature delivery is a goal across every application team and every branch of the DoD. The Navy’s DevSecOps platform, Party Barge, has achieved:
- Reduction in onboarding time from 5 weeks to 1 day
- Improved developer experience and productivity through actionable findings and reduction of false positives
- Maintenance of superior security standards and inherent policy enforcement with Authorization to Operate (ATO)
Development teams can ship efficiently and ensure applications are cyber ready for Navy Authorizing Officials (AOs). In this webinar, Sigma Defense and Anchore will give attendees a look behind the scenes and demo secure pipeline automation and security artifacts that speed up application ATO and time to production.
We will cover:
- How to remove silos in DevSecOps
- How to build efficient development pipeline roles and component templates
- How to deliver security artifacts that matter for ATO’s (SBOMs, vulnerability reports, and policy evidence)
- How to streamline operations with automated policy checks on container images
Elevating Tactical DDD Patterns Through Object CalisthenicsDorra BARTAGUIZ
After immersing yourself in the blue book and its red counterpart, attending DDD-focused conferences, and applying tactical patterns, you're left with a crucial question: How do I ensure my design is effective? Tactical patterns within Domain-Driven Design (DDD) serve as guiding principles for creating clear and manageable domain models. However, achieving success with these patterns requires additional guidance. Interestingly, we've observed that a set of constraints initially designed for training purposes remarkably aligns with effective pattern implementation, offering a more ‘mechanical’ approach. Let's explore together how Object Calisthenics can elevate the design of your tactical DDD patterns, offering concrete help for those venturing into DDD for the first time!
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
Essentials of Automations: The Art of Triggers and Actions in FMESafe Software
In this second installment of our Essentials of Automations webinar series, we’ll explore the landscape of triggers and actions, guiding you through the nuances of authoring and adapting workspaces for seamless automations. Gain an understanding of the full spectrum of triggers and actions available in FME, empowering you to enhance your workspaces for efficient automation.
We’ll kick things off by showcasing the most commonly used event-based triggers, introducing you to various automation workflows like manual triggers, schedules, directory watchers, and more. Plus, see how these elements play out in real scenarios.
Whether you’re tweaking your current setup or building from the ground up, this session will arm you with the tools and insights needed to transform your FME usage into a powerhouse of productivity. Join us to discover effective strategies that simplify complex processes, enhancing your productivity and transforming your data management practices with FME. Let’s turn complexity into clarity and make your workspaces work wonders!
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024Neo4j
Neha Bajwa, Vice President of Product Marketing, Neo4j
Join us as we explore breakthrough innovations enabled by interconnected data and AI. Discover firsthand how organizations use relationships in data to uncover contextual insights and solve our most pressing challenges – from optimizing supply chains, detecting fraud, and improving customer experiences to accelerating drug discoveries.
By Design, not by Accident - Agile Venture Bolzano 2024
Euroscipy SemNews 2011
1. A semantic news aggregator in Python using
Dbpedia, Cubicweb and Scikits-learn
Vincent Michel - Logilab
27 août 2011
2. Context
With a bunch of RSS news...
Google Borrows Apple Strategy : Google’s deal underscores the
allure of a business model pioneered...
Japan disaster plant cold shutdown could face delay : TOKYO
(Reuters) - Tokyo Electric Power Co said on Wednesday...
Libya shows signs of slipping from Muammar Gaddafi’s grasp :
Supply lines to capital in peril as coastal cities fall...
... how can we analyze them in Python ?
→ Clustering (grouping) RSS (e.g. Google News).
→ Extracting/synthetizing information.
→ Providing semantic useful/original visualisation and
analytics tools.
3. Overview
1 Introduction
2 Extracting information from RSS news
3 Analyzing RSS news
4. Semantic ?
Sussex St.
Reading Andrews NDL
Audio- Lists Resource subjects t4gm
MySpace scrobbler Lists
Moseley (DBTune) (DBTune) RAMEAU
Folk NTU SH lobid
GTAA Plymouth Resource
Lists
Organi-
Reading
Lists
sations
Music The Open ECS
Magna- Brainz Music
DB tune Library LCSH South-
(Data Brainz LIBRIS ampton
Tropes lobid Ulm
Incubator) (zitgist) Man- EPrints
Resources
chester
Surge Reading
biz. Music RISKS
Radio Lists The Open ECS
data. John Brainz
Discogs Library PSH Gem. UB South-
gov.uk Peel (DBTune)
FanHubz (Data In- (Talis) Norm- Mann- ampton
(DB cubator) Jamendo datei heim RESEX
Tune)
Popula- Poké- DEPLOY
Last.fm
tion (En- pédia
Artists Last.FM Linked RDF
AKTing) research EUTC (DBTune) (rdfize) LCCN VIAF Book Wiki
data.gov Produc- Pisa Eurécom
P20 Mashup semantic
NHS .uk tions classical web.org
(EnAKTing) Pokedex
(DB
Mortality Tune) PBAC ECS
(En-
AKTing)
BBC MARC (RKB Budapest
Program Codes Explorer)
Energy education OpenEI BBC List Semantic Lotico Revyu OAI
(En- CO2 data.gov mes Music Crunch SW
AKTing) (En- .uk Chronic- Linked Dog
NSZL Base
AKTing) ling Event- MDB RDF Food IRIT
America Media Catalog
ohloh
BBC DBLP ACM IBM
Good- BibBase
Ord- Wildlife (RKB
Openly Recht- win
nance Finder Explorer)
Local spraak. Family DBLP
legislation Survey Tele- New VIVO UF
.gov.uk nl graphis York flickr (L3S) New-
VIVO castle
Times URI wrappr Open Indiana RAE2001
UK Post- Burner Calais DBLP
codes statistics (FU
VIVO CiteSeer Roma
data.gov LOIUS Taxon iServe Berlin) IEEE
.uk Cornell
Concept Geo
World data
ESD Fact- OS dcs
Names book dotAC
stan- reference Project
Linked Data NASA (FUB) Freebase
dards data.gov Guten-
.uk
for Intervals (Data GESIS Course-
transport DBpedia berg STW ePrints CORDIS
Incu- ware
data.gov bator) (FUB)
Fishes ERA UN/
.uk
of Texas Geo LOCODE
Uberblic
Euro- Species
The stat dbpedia TCM SIDER Pub KISTI
(FUB) lite Gene STITCH Chem JISC
London Geo KEGG
DIT LAAS
Gazette TWC LOGD Linked Daily OBO Drug
Eurostat Data UMBEL lingvoj Med
(es) Disea-
YAGO Medi some
Care ChEBI KEGG NSF
Linked KEGG KEGG
Linked Drug Cpd
GovTrack rdfabout Glycan
Sensor Data CT Bank Pathway
US SEC Open Reactome
(Kno.e.sis) riese Uni
Cyc Lexvo Path-
way PDB Media
Semantic totl.net Pfam
HGNC
XBRL
WordNet KEGG KEGG Geographic
(VUA) Linked Taxo- CAS Reaction
rdfabout Twarql UniProt Enzyme
EUNIS Open nomy
US Census Publications
Numbers PRO- ProDom
SITE Chem2
UniRef Bio2RDF User-generated content
Climbing WordNet SGD Homolo
Linked (W3C) Affy- Gene
GeoData
Cornetto
metrix Government
PubMed Gene
UniParc
Ontology
GeneID Cross-domain
Airports
Product
DB UniSTS MGI
Gen Life sciences
Bank OMIM InterPro
As of September 2010
“Linking Open Data cloud diagram, by Richard Cyganiak and Anja Jentzsch.
http ://lod-cloud.net/”
5. Tools
Fetching, storing and querying the data → CubicWeb (*)
Semantic CMS, high-level database management with metadata.
Multiple sources : RSS, micro-blogging, SQL database, . . .
Based on PostgreSQL : deals with (very) large database.
Data-mining and machine learning → Scikits-learn (*)
Easy-to-use and general-purpose machine learning in Python.
Unsupervised learning, supervised learning, model selection . . .
Semantic information database → Dbpedia (*)
∼ 8.106 articles with abstracts, images, . . . from Wikipedia.
∼ 0, 6.106 categories, 273 types (e.g. person, place, . . . )
∼ 100.106 links between articles, categories and types.
(*) Open Source/Creative Commons ! ! !
6. Storing RSS information with Cubicweb
Each object (or entity) is defined in a schema and may be displayed
using different views.
Storing RSS
Define (in schema.py ) how RSS should be stored in the database.
class R S S A r t i c l e ( E n t i t y T y p e ) :
t i t l e = S t r i n g ( ) # T i t l e o f t h e feed
u r i = S t r i n g ( unique=True ) # U r i o f t h e r s s feed
c o n t e n t = S t r i n g ( ) # Content o f t h e feed
Fetching RSS (based on feedparser and BeautifulSoup)
Simply construct a source, by giving an URL and a parser :
u r l = u ’ h t t p : / / feeds . b b c i . co . uk / news / w o r l d / r s s . xml ’
−
s = s e s s i o n . c r e a t e _ e n t i t y ( ’ CWSource ’ , name=u ’BBCNews World ’ , u r l = u r l ,
t y p e =u ’ d a t af e e d ’ , p a r s e r =u ’ rss −p a r s e r ’ ,
c o n f i g =u ’ s y n c h r o n i z a t i o n − i n t e r v a l =240min ’ )
s . p u l l _ d a t a ( session )
7 english/american journals (The New York Times, . . . )
7. Storing Dbpedia information with Cubicweb
Storing Dbpedia page
Define (in schema.py ) how Dbpedia pages should be stored in the
database.
class DbpediaPage ( E n t i t y T y p e ) :
u r i = S t r i n g ( unique=True , indexed=True ) # U r i o f t h e r e s s o u r c e
l a b e l = S t r i n g ( indexed=True ) # h t t p : / / www. w3 . org / 2 0 0 0 / 0 1 / r d f −schema
pageid = S t r i n g ( ) # h t t p : / / dbpedia . org / o n t o l o g y / wikiPageID
a b s t r a c t = S t r i n g ( ) # h t t p : / / dbpedia . org / o n t o l o g y / a b s t r a c t
homepage = S t r i n g ( ) # h t t p : / / xmlns . com / f o a f / 0 . 1 / homepage
t h u m b n a i l = S t r i n g ( ) # h t t p : / / dbpedia . org / o n t o l o g y / t h u m b n a i l
d e p i c t i o n = S t r i n g ( ) # h t t p : / / xmlns . com / f o a f / 0 . 1 / d e p i c t i o n
w i k i p a g e = S t r i n g ( ) # h t t p : / / xmlns . com / f o a f / 0 . 1 / page
l a t i t u d e = S t r i n g ( ) # h t t p : / / www. w3 . org / 2 0 0 3 / 0 1 / geo / wgs84_pos
l o n g i t u d e = S t r i n g ( ) # h t t p : / / www. w3 . org / 2 0 0 3 / 0 1 / geo / wgs84_pos
Storing all dbpedia information (∼ 9.106 pages, ∼ 100.106 links,
20Go) in Cubicweb takes less than 24 hours.
→ See the full schema
8. Analyzing RSS news
What can we do with the RSS news stored in database ?
1 extract relevant features of the data.
2 construct a usable (i.e. matrix) representation of the data.
3 cluster (group) RSS together.
4 deeper semantic analyze and visualization of the information.
Example sentence :
“Google is to buy mobile phone manufacturer Motorola Mobility,
allowing it to mount a serious challenge to Apple Inc.”
9. Overview
1 Introduction
2 Extracting information from RSS news
3 Analyzing RSS news
10. Extracting information : Classical approaches (Scikits-learn)
Char-N-gram
Extracts features of N characters from a text.
from s c i k i t s . l e a r n . f e a t u r e _ e x t r a c t i o n . t e x t import CharNGramAnalyzer
a n a l y z e r = CharNGramAnalyzer ( min_n =3 , max_n=6)
f e a t u r e s = a n a l y z e r . analyze ( sentence )
450 features : ’goo’, ’oog’, ’ogl’, . . . , ’mob’, ’obi’, ’bil’, . . .
Word-N-gram
Extracts features of N words from a text.
from s c i k i t s . l e a r n . f e a t u r e _ e x t r a c t i o n . t e x t import WordNGramAnalyzer
a n a l y z e r = WordNGramAnalyzer ( min_n =3 , max_n=6)
f e a t u r e s = a n a l y z e r . analyze ( sentence )
58 features : ’google is to’, ’is to buy’, . . . , ’serious challenge to’, . . .
Many irrelevant features (tokens).
Features do not carry lots of contextual information (i.e.
understandable by humans).
11. Feature extraction : Dbpedia - Context
Main Hypothesis : Only things that exist in Dbpedia (i.e
Wikipedia) have some interest in news analysis → Named
Entities Recognition (NER)
Dbpedia feature extraction (Cubicweb/Dbpedia)
from cubes . semnews . views . n e r t o o l s import D b p e d i a E n t i t i e s A n a l y z e r
a n a l y z e r = D b p e d i a E n t i t i e s A n a l y z e r ( session , l a n g = ’ en ’ )
tokens = a n a l y z e r . analyze ( sentence )
→ 3 features : ’Apple Inc’, ’Google’, ’Motorola’
ENAMEX TYPE=ORGANIZATION Google/ENAMEX is to buy mobile phone
manufacturer ENAMEX TYPE=ORGANIZATION Motorola/ENAMEX Mobility, allowing it to
mount a serious challenge to ENAMEX TYPE=ORGANIZATION Apple Inc/ENAMEX
→ Try it !
“DBpedia Spotlight : Shedding Light on the Web of Documents”, Pablo N. Mendes et al., I-Semantics 2011
“Learning Named Entity Recognition from Wikipedia”, Joel Nothman 2008
“Large-Scale Named Entity Disambiguation Based on Wikipedia Data”, Silviu Cucerzan 2007
12. Feature extraction : Dbpedia - Properties
Efficient and robust feature extraction
Keep the meaning of a text → interpretable features.
’. . . said former soldier Larry, . . . ’
’. . . said student Larry, . . . ’
’. . . said Larry Page, . . . ’
Robust features based on redirections.
e.g. ’Obama’, ’Barak Obamba’, ’Pres. Obama’ redirect to ’Barack Obama’
Simple RQL (Relation Query Language) queries
Fast, based on indexed SQL tables and regular expressions :
rset = rql(’Any E WHERE E is DbpediaPage,
E label %(token)s’, {’token’: token})
e.g. 19 entities extracted in 4s in 765 words, among ∼ 8.106 dbpedia entries.
Different labels but same URI → cross-language feature
extraction : e.g. Grenada/Grenade → http ://dbpedia.org/resource/Grenada
13. Overview
1 Introduction
2 Extracting information from RSS news
3 Analyzing RSS news
14. Feature extraction : Matrix representation and storage
Obama’s approval . . . 0 0 ... 1 0
Protest as Spain . . .
0
0 ... 0 1
... → ...
Libya rebels fight . . . 0 1 ... 0 0
Obama in Spain . . . 0 0 ... 1 1
E.g. The Obama-Merkel-Sarkozy
space . . .
Results stored in a relation (appears in rss) in Cubicweb :
rql(’Any X WHERE X appears_in_rss Y’)
15. Exploiting information : Clustering news
Creating clusters (groups) of news, using the matrix
representation of the data.
Meanshift algorithm (Scikits-learn)
Based on locating the maxima of a density function.
Automatically tunes the number of clusters.
from s c i k i t s . l e a r n . c l u s t e r import MeanShift , est im ate _ba nd wid th
bandwidth = es ti mat e_b an dwi dth ( X , q u a n t i l e =0.005)
c l u s t e r i n g = MeanShift ( bandwidth=bandwidth )
c l u s t e r i n g . f i t (X)
labels = clustering . labels_
“Mean shift, mode seeking, and clustering.”, Yizong Cheng. IEEE Transactions on Pattern Analysis and Machine Intelligence
1995
→ Try it !
Other possible alternatives : Ward’s algorithm, K-means, . . .
16. Exploiting information : Queries and Views
Each query returns a result set (rset). A view is called on a result set
→ define the representation rules.
Defining a view (short version)
class M y E n t i t i e s V i e w ( View ) :
__regid__ = ’ example−view ’
def c a l l ( s e l f ) :
r s e t = s e l f . cw_rset
for e n t i t y in r s e t . e n t i t i e s ( ) :
do_whatever_you_want_ . . .
write_some_html_ . . .
. . . you just have to plug a rset from a query :
r s e t = r q l ( ’ Any X WHERE . . . ’ )
s e l f . wview ( ’ example−view ’ , r s e t )
or within an url :
http://myapplication/?rql=Any X WHERE ....vid=example-view
17. Pluging Scikits.learn in a view
Combine machine learning tools and database query system, in pure
Python.
Defining the view
class RSSClustering ( View ) :
__regid__ = ’ rss −c l u s t e r i n g ’
def c a l l ( s e l f ) :
# Get t h e r e s u l t s s e t and c r e a t e t h e data
r s e t = s e l f . cw_rset
o c c u r r e n c e _ m a t r i x = Oc c ur re n ce Ma t ri x ( )
occurrence_matrix . construct_matrix ( r s e t = r s e t )
# Scale t h e data
X = s c a l e ( o c c u r r e n c e _ m a t r i x , a x i s =0 , w i t h _ s t d =True , copy=True )
# Compute bandwith f o r c l u s t e r i n g
bandwidth = e sti mat e_ ban dwi dt h (X)
# Clustering
c l u s t e r = MeanShift ( bandwidth=bandwidth )
c l u s t e r . f i t (X)
labels = cluster . labels_
# Perform some HTML r e n d e r i n g
...
→ Try it !
18. A new approach for querying information from RSS
All musical artists in the news
rql(’DISTINCT Any E, R WHERE E appears_in_rss R,
E has_type T, T label musical artist’)
All living office holder persons in the news
rql(’DISTINCT Any E WHERE E appears_in_rss R,
E has_type T, T label office holder,
E has_subject C, C label Living people’)
All news that talk about Barack Obama and any scientist
rql(’DISTINCT Any R WHERE E1 label Barack Obama,
E1 appears_in_rss R, E2 appears_in_rss R,
E2 has_type T, T label scientist’)
All news that talk about a drug
rql(’Any X, R WHERE X appears_in_rss R,
X has_type T, T label drug’)
Try it ! . . . with an xml view . . . or a thumbnail view
19. Vizualisation : Mapping information
View
class EntityMapView ( View ) :
__regid__ = ’map ’
def c a l l ( s e l f ) :
r s e t = s e l f . cw_rset
s e l f . init_map ( )
for e n t i t y in r s e t . e n t i t i e s ( ) :
s e l f . add_marker ( e n t i t y . l a t i t u d e , e n t i t y . l o n g i t u d e ,
entity . dc_title )
s e l f . center_and_zoom ( 0 , 0 , 1 . 5 )
s e l f . finish_map ( )
Based on mapstraction (javascript) : http ://mapstraction.com/
Automatically locate information from RSS news.
Try it !
20. Conclusion
Cubicweb and Scikits-learn :
Efficient and easy-to-use tools for data storing, querying and
mining.
Easy to plug together, only Python tools, all Open Source.
Using Dbpedia allows to extract very few highly relevant features
Decrease the dimensionality of the data.
Link features to millions of pages of information.
A new semantic way for querying information
Simple information queries using RQL expressions.
Use Dbpedia types and categories to refine the selection.
21. Future Improvements
Named Entities Recognition
→ use disambiguations links / more refined Regular expressions.
→ add new databases (MusicBrainz, diseasome, . . . ).
→ closely follow Wikipedia with Dbpedia live update :
Motorola Mobility (11 :46, 15 August 2011) ’On the 15 August,
Google announced that it agreed to acquire the company.’
RSS news analyzing
→ explore new algorithms : bi-clustering, . . .
→ add new data sources : Twitters, Blogs, . . .
→ ’from scikits.learn predict __future__ . . . ’ → use Matrix
Completion to predict new edges in the correlation graph.