Skip to content

Instantly share code, notes, and snippets.

View emchateau's full-sized avatar

Emmanuel Château-Dutier emchateau

View GitHub Profile
export const intervenants = [
{
id: "yves-bergeron", // on essaie ici de garder une nomenclature identique pour tous les ids : prenom-nom
firstName: "Yves",
lastName: "Bergeron",
institution: "UQAM Chair for Museum Governance and Cultural Law",
presentation: "Perferentes per obiecta defensi reginae inde quaesitum exsertantis praestituto quid iam truci praedoctis praestituto adhibitis funestis iudex imaginarius interrogationibus die permissi interrogationibus adhibitis iudex imaginarius cursim inde nec quid diluere interrogationibus quidve interrogationibus hinc stimulis quid responsum defensi esset reginae truci per equitum Caesarem ad obiecta Caesarem funestis essent quid.",
intervention: "", // @todo ajouter
sessions: ["conference-ouverture-01"]
},
@emchateau
emchateau / euclid.xqy
Created May 20, 2020 23:58 — forked from CliffordAnderson/euclid.xqy
The Euclidean Algorithm in XQuery
xquery version "3.1";
(: The Euclidean algorithm calculates the lowest common denominator of two integers :)
declare function local:euclid($num1 as xs:integer, $num2 as xs:integer) as xs:integer*
{
if ($num1 > $num2) then local:euclid($num2, $num1 - $num2)
else if ($num2 > $num1) then local:euclid($num1, $num2 - $num1)
else $num1
};
@emchateau
emchateau / wikidata.md
Created May 20, 2020 23:55 — forked from CliffordAnderson/wikidata.md
Wikidata for Theological Librarians

Getting Started with Wikidata

This tutorial introduces the basics of Wikidata, an offshot of Wikipedia. Since its launch on October 30, 2012, Wikidata has developed rapidly and has become a repository of all kinds of facts across the Wikipedia language editions. In what follows, you will become familiar with the purpose and goals of Wikidata, including how to contribute to its development.

Learning Outcomes

  • Articulate the short and long term goals of Wikidata
  • Learn various ways to contribute Wikidata
  • Write simple SPARQL queries to retrieve data from Wikidata
  • Understand the potential of Wikidata for scholarly communications

XQuery Working Group

Text Mining at Scale

In this session, we will extract poems from the Victorian Women Writers Project. The electronic editions of these documents are maintained in TEI P5 format on Github. You can also download a zip file of the entire corpus.

The following exercises assume that you have loaded the documents from the Victorian Women Writers Project into a BaseX database. It is also assumed that you have named that database vwwp_tei.

@emchateau
emchateau / 00-introduction.md
Created May 20, 2020 23:54 — forked from CliffordAnderson/00-introduction.md
Code snippets for XQuery Working Group (Text Mining at Scale)

XQuery Working Group

XQuery and XPath Full Text 1.0

In this session, we will be exploring the XQuery and XPath Full Text 1.0 standard. Our goal is to take the records that we created during our prior class from the Victorian Women Writers Project and persist them to another database where we will analyze their contents for textual patterns.

The following exercises assume that you have loaded the documents from the Victorian Women Writers Project into a BaseX database. It is also assumed that you have named that database vwwp_tei.

@emchateau
emchateau / 00-introduction.md
Created May 20, 2020 23:54 — forked from CliffordAnderson/00-introduction.md
Text Mining at Scale (XQuery Working Group) Natural Language Processing

Natural Language Processing

Today, we’ll be exploring patterns in a corpus of genuine and fake news collected in 2016 by Buzz Feed and scored for veracity by professional journalists. As you might imagine, the corpus contains very partisan perspectives; individual articles may contain disturbing language and viewpoints. In the initial code example below, you will need to have downloaded the data set and have created a database called articles.

We’ll begin our investigation of natural language processing by using Aylien, which bill itself as a “News Intelligence Platform,” to classify these articles, analyze their topics, identify the people, places, things they discuss, and to discern the sentiment or tone of the articles. If you would like to follow along, please sign up for a free API key.

Artistic Influence

Introduction

This graph studies the relations of infuence between artists. The data comes from this query of Wikidata:

@emchateau
emchateau / palindrome.xqy
Created May 20, 2020 23:52 — forked from CliffordAnderson/palindrome.xqy
Recursive function to evaluate whether a phrase is a palindrome
xquery version "3.0";
(: Recursive function to evaluate whether a phrase is a palindrome :)
declare function local:test-palindrome($palindrome as xs:string?) as xs:boolean {
switch (fn:string-length($palindrome))
case 0 return fn:true()
case 1 return fn:true()
default return
let $first := fn:substring($palindrome, 1, 1)
@emchateau
emchateau / iso_3166-1.xml
Created October 12, 2019 22:57 — forked from LeoWoerteler/iso_3166-1.xml
ISO 3166-1 Country Codes
<?xml version="1.0" encoding="UTF-8"?>
<iso_3166-1>
<country numeric="004" alpha-3="AFG" alpha-2="AF">
<name language="en">Afghanistan</name>
<name language="fr">Afghanistan (l')</name>
</countr>
<country numeric="248" alpha-3="ALA" alpha-2="AX">
<name language="en">Åland Islands</name>
<name language="fr">Åland(les Îles)</name>
</country>
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="hasChild selector with JS">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<style id="jsbin-css">
.color {
color:red;