Skip to content

Instantly share code, notes, and snippets.

View HughP's full-sized avatar

HughP HughP

View GitHub Profile
<!DOCTYPE html>
<html lang="en">
<head>
<title>The Word Stone</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="container">
<div class="canvas" id="canvas"></div>
<div id="wordlist" class="wordlist"></div>
@HughP
HughP / UAX_29.py
Created March 30, 2015 06:10
PyICU
# We start by loading up PyICU.
import PyICU as icu
# Let's create a test text. Notice it contains some punctuation.
test = u"This is (\"a\") test!"
# We create a wordbreak iterator. All break iterators in ICU are really RuleBasedBreakIterators, and we need to tell it which locale to take the word break rules from. Most locales have the same rules for UAX#29 so we will use English.
wb = icu.BreakIterator.createWordInstance(icu.Locale.getEnglish())
# An iterator is just that. It contains state and then we iterate over it. The state in this case is the text we want to break. So we set that.
.
├── academic.Rproj
├── assets
│   └── images
│   ├── icon-pack
│   └── icon.png
├── config
│   └── _default
│   ├── config.toml
│   ├── languages.toml
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:z="http://www.zotero.org/namespaces/export#"
xmlns:bib="http://purl.org/net/biblio#"
xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:dcterms="http://purl.org/dc/terms/">
<bib:Letter rdf:about="https://www.example.com">
<z:itemType>letter</z:itemType>
<bib:authors>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:z="http://www.zotero.org/namespaces/export#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:bib="http://purl.org/net/biblio#"
xmlns:dcterms="http://purl.org/dc/terms/">
<bib:MotionPicture rdf:about="https://www.example.com">
<z:itemType>film</z:itemType>
<dc:publisher>
@HughP
HughP / datacite.md
Last active June 13, 2020 21:29
JSON+LD from datacite DOI description and usage
<script type='application/ld+json'>
{
  "@context": "http://schema.org",
  "@type": "Dataset",
  "@id": "https://doi.org/10.7910/dvn/icfngt",
  "identifier": {
    "@type": "PropertyValue",
 "propertyID": "DOI",
@HughP
HughP / copyright.md
Last active June 13, 2020 15:32
Initial investigation into Copyright params for Hugo Academic
@HughP
HughP / BlogPosts.md
Last active May 17, 2020 09:38
An initial look at schema.org metadata for blog posts.

Research question

An important research question emerges: What is the difference between an Article and a Blogposting in schema.org parlance? A secondary question also emerges: What is the difference between an scholarly article and a nomral article? And thirdly How do I show that "this" web-page is about a published article but is not the article itself?

Background research sources

{"@type": "Thesis",
"schemaVersion": "https://schema.org/version/7.0/",
"sdDatePublished": "2020-04-13T01:36:36+02:00",
"sdPublisher":
{"@type": "Person",
"name": "Hugh Paterson III",
"familyName": "Paterson",
"givenName": "Hugh",
"sameAs": [
"https://hugh4.us",
@HughP
HughP / video.md
Created March 20, 2020 08:27
Initial schema look at video metadata