Changeset 37302 for gs3-installations


Ignore:
Timestamp:
2023-02-08T10:44:50+13:00 (15 months ago)
Author:
davidb
Message:

Some extra checking added in. README notes updated. SPARQL query for combining dbpedia and errata content refined

Location:
gs3-installations/eurovision-lod/trunk/sites/eurovision/collect/eurovision/prepare
Files:
1 added
6 edited

Legend:

Unmodified
Added
Removed
  • gs3-installations/eurovision-lod/trunk/sites/eurovision/collect/eurovision/prepare/01-DOWNLOAD-ESC-LOD-DATA--SMALL.sh

    r35904 r37302  
    77
    88    YEAR=$1
     9
     10    if [ $YEAR = "2020" ] ; then
     11    echo "" >&2
     12    echo "Eurovision in 2020 was canceled due Covid 19 pandemic" >&2
     13    echo "No query to run.  Exiting." >&2
     14    echo "" >&2
     15
     16    exit 1
     17    fi
     18   
    919    sparql_file="local--countries-in-esc-by-year-just-$YEAR--with-errata.sparql"
    1020   
  • gs3-installations/eurovision-lod/trunk/sites/eurovision/collect/eurovision/prepare/01-DOWNLOAD-ESC-LOD-DATA.sh

    r35982 r37302  
    7373    cd errata-lod \
    7474        && date >> "../$logfile" \
    75         && ./LOCAL-LOD-QUERY.sh "$f"  \
     75        && ../LOCAL-LOD-QUERY.sh "$f"  \
    7676        && date >> "../$logfile" \
    7777        && cd ..
  • gs3-installations/eurovision-lod/trunk/sites/eurovision/collect/eurovision/prepare/LOCAL-LOD-RESET--ERRATA-ALL.sh

    r34753 r37302  
    11#!/bin/bash
    22
    3 gs-triplestore-reset eurovision-errata
     3gs-triplestore-reset3 eurovision-errata
  • gs3-installations/eurovision-lod/trunk/sites/eurovision/collect/eurovision/prepare/README-ADD-A-YEAR.txt

    r37283 r37302  
    11
     2
     3    rm -f errata-lod/local--countries-in-esc-by-year-just-2015--with-errata.json
     4    ./01-DOWNLOAD-ESC-LOD-DATA--SMALL.sh 2015
     5 
    26
    37
  • gs3-installations/eurovision-lod/trunk/sites/eurovision/collect/eurovision/prepare/README.txt

    r37282 r37302  
    2020your specific credentials.
    2121
    22 You also need to get an AcousticID, which you store in:
    23     essentia-audio-features/acousticid_clientid.txt
    24 
    2522Otherwise you can use 'Track b' which -- proxied through the
    2623eurovisionworld.com fan web site -- page scrapes YouTube content of
     
    2825to generate audio features.  No key setup is needed if Track b.
    2926
     27#
     28# Setup a Virtual Python3 Environment
     29#
    3030
    31 # Setup a Virtual Python3 Environment
     31Make sure you are using Greenstone3's selfcontained-python3 extension
     32(installed through running the relevant script in $GSDL3SRCHOME/ext-cli)
    3233
    33 Next create a virtual Python environment:
    34 
    35     ./CREATE-VENV-PYTHON3.sh my-python3-dev
    36 
    37 And then install required Python packages:
     34And then install required Python packages, if not previously done:
    3835
    3936  * For processing Excel Voting data spreadsheet
     
    5249     pip3 install -r essentia-audio-features/requirements.txt
    5350
     51#
    5452# One-time Errata Triplestore Setup
     53#
    5554
    5655The (personal) convention of using ALL-CAPS is to signify that these
     
    6665more accurate results.
    6766
    68 Check your Greenstone3 Triplestore server is running:
     67This README assumes you have followed the eurovision/sites/README.txt
     68and added the apache-jena extension to Greenstone 3 ... in which case
     69check your Greenstone3 server is up and running:
    6970
    70   sudo systemctl status greenstone3-triplestore
     71    ant status
    7172
    72 Then run:
     73And the SPARQL endpoint is operational:
     74
     75    http://localhost:8383/fuseki3/index.html
     76
     77Now run:
    7378
    7479   ./UPLOAD-TTL-EUROVISION-ERRATA-GRAPH.sh
    7580
    76 This currently talks to the Apache Jena v1 Triplestore version that the
    77 Greenstone3 extension operates on port 3030
     81
     82    To check that the errata content has been stored in the triplestore,
     83    in the SPARQL tab to the eurovision collection interface, you can
     84    run the query:
     85
     86    PREFIX gsdlextracted: <http://greenstone.org/gsdlextracted#>
     87
     88    SELECT ?subject ?predicate ?object WHERE {
     89      GRAPH <http://localhost:8383/greenstone3/library/collection/eurovision-errata>  {
     90        ?subject ?predicate ?object.
     91      }
     92    }
     93    OFFSET 0 LIMIT 500
    7894
    7995
     96#
    8097# Running the 'prepare' ALL-CAPS scripts
    81 
     98#
    8299
    83100The prefix to the scripts to run are sequentially numbers 01-...,
  • gs3-installations/eurovision-lod/trunk/sites/eurovision/collect/eurovision/prepare/errata-lod/local--countries-in-esc-by-year-just-YYYY--with-errata.sparql.in

    r35849 r37302  
    2121       (?was_derived_from AS ?WikipediaURL)
    2222WHERE {
    23   SERVICE <https://dbpedia.demo.openlinksw.com/sparql> {
     23  SERVICE <https://dbpedia.org/sparql> {
    2424    ?countries_in_esc_by_year skos:broader dbc:Countries_in_the_Eurovision_Song_Contest_by_year.
    2525
     
    4545  BIND (IF(isIRI(?entrant),?entrant,?entrant_errata_uri) AS ?entrant_robust).
    4646
    47   SERVICE <https://dbpedia.demo.openlinksw.com/sparql> {
    48 
     47  SERVICE <https://dbpedia.org/sparql> {
    4948    ?country_in_year dbp:song ?song
    5049      FILTER (?song != ""@en).
     
    112111
    113112
    114   SERVICE <https://dbpedia.demo.openlinksw.com/sparql> {
     113  OPTIONAL {
     114    SERVICE <https://dbpedia.org/sparql> {
    115115
    116     OPTIONAL {
    117116      ?song_robust prov:wasDerivedFrom ?was_derived_from.
    118117
     
    125124      ?song_robust dbo:abstract ?song_abstract_en
    126125        FILTER (lang(?song_abstract_en) = 'en').
    127 
    128126    }
    129127  }
Note: See TracChangeset for help on using the changeset viewer.