Changeset 35059 for main


Ignore:
Timestamp:
2021-04-12T13:49:58+12:00 (3 years ago)
Author:
davidb
Message:

Changes to work with data from 1956, which makes for a tricker case as each country had two entries

Location:
main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare/02-EXPLODE-SPARQLRESULTS-TO-IMPORT.sh

    r34867 r35059  
    2323echo "Copying to '$tmp_cache' then exploding:"
    2424
    25 for f in "local--countries-in-esc-by-year-after-1956--with-errata.json" ; do
    26    
     25#for f in \
     26#    "local--countries-in-esc-by-year-in-1956--with-errata.json" \
     27#    "local--countries-in-esc-by-year-after-1956--with-errata.json" \
     28#    ; do
     29
     30    f="local--countries-in-esc-by-year-in-1956--with-errata.json"
    2731    echo "  errata-lod/$f -> $tmp_cache/sparqlresults-$f"   
    2832    /bin/cp "errata-lod/$f" "$tmp_cache/sparqlresults-$f"
    2933
    30     # rm -rf tmp/sparqlresults-local--countries-in-esc-by-year-after-1956--with-errata.* &&  cp import/sparqlresults-local--countries-in-esc-by-year-after-1956--with-errata.json  tmp/.
    31 
    3234    explode_metadata_database.pl \
    3335      -collectdir $GSDL3SRCHOME/web/sites/eurovision-lod/collect \
    34       -collection eurovision \
    35       -plugin_options "-metadata_merge_on_concat_fields Country,Year -OIDtype assigned -OIDmetadata Identifier" \
     36      -collection eurovision-freshtest \
     37      -plugin_options "-metadata_merge_on_concat_fields Country,Year,TitleDisambiguation -OIDtype assigned -OIDmetadata Identifier" \
    3638      -plugin JSONSPARQLResultPlugin  \
    3739      $tmp_cache/sparqlresults-$f
    38 
    39 #      -use_collection_plugin_options \
    4040
    4141    if [ $? != 0 ] ; then
     
    4444    exit 1
    4545    fi
    46 done
     46
     47
     48    f="local--countries-in-esc-by-year-after-1956--with-errata.json"
     49    echo "  errata-lod/$f -> $tmp_cache/sparqlresults-$f"   
     50    /bin/cp "errata-lod/$f" "$tmp_cache/sparqlresults-$f"
     51
     52    explode_metadata_database.pl \
     53      -collectdir $GSDL3SRCHOME/web/sites/eurovision-lod/collect \
     54      -collection eurovision-freshtest \
     55      -plugin_options "-metadata_merge_on_concat_fields Country,Year -OIDtype assigned -OIDmetadata Identifier" \
     56      -plugin JSONSPARQLResultPlugin  \
     57      $tmp_cache/sparqlresults-$f
     58
     59    if [ $? != 0 ] ; then
     60    echo "Error encountered when exploding:" 1>&2
     61    echo "  $tmp_cache/sparqlresults-$f" 1>&2
     62    exit 1
     63    fi   
     64#done
    4765
    4866echo ""
  • main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare/errata-lod/eurovision-errata.ttl

    r34842 r35059  
    1010
    1111@prefix dct:    <http://purl.org/dc/terms/> .
     12
     13
     14####
     15# Outlier for 1956, where the song entry Les_amants_de_minuit only has a string for "MichÚle Arnaud" to a URI
     16####
     17
     18dbr:Les_amants_de_minuit                dbp:artist  dbr:MichÚle_Arnaud.
    1219
    1320
  • main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare/errata-lod/local--countries-in-esc-by-year-in-1956--with-errata.json

    r35057 r35059  
    11{
    22  "head": {
    3     "vars": [ "countries_in_esc_by_year" , "country_in_year" , "Year" , "Country" , "entrant_robust" , "Creator" , "song_robust" , "Title" , "Abstract_en" , "TitleAbstract_en" , "CreatorAbstract_en" , "WikipediaURL" ]
     3    "vars": [ "countries_in_esc_by_year" , "country_in_year" , "Year" , "Country" , "TitleDisambiguation" , "entrant_robust" , "Creator" , "song_robust" , "Title" , "Abstract_en" , "TitleAbstract_en" , "CreatorAbstract_en" , "WikipediaURL" ]
    44  } ,
    55  "results": {
     
    1010        "Year": { "type": "literal" , "value": "1956" } ,
    1111        "Country": { "type": "literal" , "xml:lang": "en" , "value": "Belgium" } ,
     12        "TitleDisambiguation": { "type": "literal" , "value": "Mes" } ,
    1213        "entrant_robust": { "type": "uri" , "value": "http://dbpedia.org/resource/Fud_Leclerc" } ,
    1314        "Creator": { "type": "literal" , "value": "Fud Leclerc" } ,
     
    2425        "Year": { "type": "literal" , "value": "1956" } ,
    2526        "Country": { "type": "literal" , "xml:lang": "en" , "value": "Belgium" } ,
     27        "TitleDisambiguation": { "type": "literal" , "value": "Lep" } ,
    2628        "entrant_robust": { "type": "uri" , "value": "http://dbpedia.org/resource/Mony_Marc" } ,
    2729        "Creator": { "type": "literal" , "value": "Mony Marc" } ,
     
    3840        "Year": { "type": "literal" , "value": "1956" } ,
    3941        "Country": { "type": "literal" , "xml:lang": "en" , "value": "France" } ,
     42        "TitleDisambiguation": { "type": "literal" , "value": "Ile" } ,
    4043        "entrant_robust": { "type": "uri" , "value": "http://dbpedia.org/resource/Dany_Dauberson" } ,
    4144        "Creator": { "type": "literal" , "value": "Dany Dauberson" } ,
     
    5255        "Year": { "type": "literal" , "value": "1956" } ,
    5356        "Country": { "type": "literal" , "xml:lang": "en" , "value": "France" } ,
     57        "TitleDisambiguation": { "type": "literal" , "value": "Let" } ,
    5458        "entrant_robust": { "type": "uri" , "value": "http://dbpedia.org/resource/Mathé_Altéry" } ,
    5559        "Creator": { "type": "literal" , "value": "Mathé Altéry" } ,
     
    6670        "Year": { "type": "literal" , "value": "1956" } ,
    6771        "Country": { "type": "literal" , "xml:lang": "en" , "value": "Germany" } ,
     72        "TitleDisambiguation": { "type": "literal" , "value": "Sog" } ,
    6873        "entrant_robust": { "type": "uri" , "value": "http://dbpedia.org/resource/Freddy_Quinn" } ,
    6974        "Creator": { "type": "literal" , "value": "Freddy Quinn" } ,
     
    8085        "Year": { "type": "literal" , "value": "1956" } ,
    8186        "Country": { "type": "literal" , "xml:lang": "en" , "value": "Germany" } ,
     87        "TitleDisambiguation": { "type": "literal" , "value": "ImW" } ,
    8288        "entrant_robust": { "type": "uri" , "value": "http://dbpedia.org/resource/Walter_Andreas_Schwarz" } ,
    8389        "Creator": { "type": "literal" , "value": "Walter Andreas Schwarz" } ,
     
    94100        "Year": { "type": "literal" , "value": "1956" } ,
    95101        "Country": { "type": "literal" , "xml:lang": "en" , "value": "Italy" } ,
     102        "TitleDisambiguation": { "type": "literal" , "value": "Apr" } ,
    96103        "entrant_robust": { "type": "uri" , "value": "http://dbpedia.org/resource/Franca_Raimondi" } ,
    97104        "Creator": { "type": "literal" , "value": "Franca Raimondi" } ,
     
    108115        "Year": { "type": "literal" , "value": "1956" } ,
    109116        "Country": { "type": "literal" , "xml:lang": "en" , "value": "Italy" } ,
     117        "TitleDisambiguation": { "type": "literal" , "value": "Ama" } ,
    110118        "entrant_robust": { "type": "uri" , "value": "http://dbpedia.org/resource/Tonina_Torrielli" } ,
    111119        "Creator": { "type": "literal" , "value": "Tonina Torrielli" } ,
     
    122130        "Year": { "type": "literal" , "value": "1956" } ,
    123131        "Country": { "type": "literal" , "xml:lang": "en" , "value": "Luxembourg" } ,
     132        "TitleDisambiguation": { "type": "literal" , "value": "Les" } ,
     133        "entrant_robust": { "type": "uri" , "value": "http://dbpedia.org/resource/MichÚle_Arnaud" } ,
     134        "Creator": { "type": "literal" , "value": "MichÚle Arnaud" } ,
     135        "song_robust": { "type": "uri" , "value": "http://dbpedia.org/resource/Les_amants_de_minuit" } ,
     136        "Title": { "type": "literal" , "value": "Les amants de minuit" } ,
     137        "Abstract_en": { "type": "literal" , "xml:lang": "en" , "value": "Luxembourg was present at the Eurovision Song Contest 1956 where MichÚle Arnaud sang two songs, \"Ne Crois Pas\" (Don't Believe) and \"Les Amants De Minuit\" (Midnight Lovers). Télé Luxembourg, the Luxembourgish broadcaster, internally selected Arnaud to sing for them at the inaugural Eurovision Song Contest, held in Lugano, Switzerland on 24 May 1956." } ,
     138        "TitleAbstract_en": { "type": "literal" , "xml:lang": "en" , "value": "\"Les amants de minuit\" (French pronunciation: \u200B[lez\u203Famɑ̃ də minÉ¥i], English: The Midnight Lovers) was the second Luxembourgish entry in the Eurovision Song Contest 1956 (the rules of this Contest and no other allowing two entries per country), performed in French by French singer MichÚle Arnaud. The song is in the chanson style popular in the early years of the Contest. Arnaud describes the meeting of two \"midnight lovers\", and sings that only the night knows what passes between them before they return to their normal lives in the morning. The song was performed thirteenth on the night (following France's Dany Dauberson with \"Il est là\" and preceding Italy's  with \"Amami se vuoi\"). As the scoreboard of this Contest has never been made public, no statements about score or placing can be made, however the song did not win. The song was accompanied at the 1956 contest by Arnaud with \"Ne crois pas\" and was succeeded as Luxembourgish representative at the 1957 contest by DaniÚle Dupré with \"Amours mortes (tant de peine)\"." } ,
     139        "CreatorAbstract_en": { "type": "literal" , "xml:lang": "en" , "value": "MichÚle Arnaud (born Micheline Caré; 18 March 1919 \u2013 30 March 1998), was a French singer, recording artist, and director. She was buried on 18 September 1998 at Montparnasse Cemetery. She is the mother of the singer Dominique Walter and the photographer Florence GruÚre. Arnaud was awarded a Chevalier de la Légion d'honneur and Ordre des Arts et des Lettres. She was the first entrant for Luxembourg in the first edition of the Eurovision Song Contest." } ,
     140        "WikipediaURL": { "type": "uri" , "value": "http://en.wikipedia.org/wiki/Les_amants_de_minuit?oldid=975042535&ns=0" }
     141      } ,
     142      {
     143        "countries_in_esc_by_year": { "type": "uri" , "value": "http://dbpedia.org/resource/Category:Countries_in_the_Eurovision_Song_Contest_1956" } ,
     144        "country_in_year": { "type": "uri" , "value": "http://dbpedia.org/resource/Luxembourg_in_the_Eurovision_Song_Contest_1956" } ,
     145        "Year": { "type": "literal" , "value": "1956" } ,
     146        "Country": { "type": "literal" , "xml:lang": "en" , "value": "Luxembourg" } ,
     147        "TitleDisambiguation": { "type": "literal" , "value": "Nec" } ,
    124148        "entrant_robust": { "type": "uri" , "value": "http://dbpedia.org/resource/MichÚle_Arnaud" } ,
    125149        "Creator": { "type": "literal" , "value": "MichÚle Arnaud" } ,
     
    136160        "Year": { "type": "literal" , "value": "1956" } ,
    137161        "Country": { "type": "literal" , "xml:lang": "en" , "value": "Netherlands" } ,
     162        "TitleDisambiguation": { "type": "literal" , "value": "Voo" } ,
    138163        "entrant_robust": { "type": "uri" , "value": "http://dbpedia.org/resource/Corry_Brokken" } ,
    139164        "Creator": { "type": "literal" , "value": "Corry Brokken" } ,
     
    150175        "Year": { "type": "literal" , "value": "1956" } ,
    151176        "Country": { "type": "literal" , "xml:lang": "en" , "value": "Netherlands" } ,
     177        "TitleDisambiguation": { "type": "literal" , "value": "Dev" } ,
    152178        "entrant_robust": { "type": "uri" , "value": "http://dbpedia.org/resource/Jetty_Paerl" } ,
    153179        "Creator": { "type": "literal" , "value": "Jetty Paerl" } ,
     
    164190        "Year": { "type": "literal" , "value": "1956" } ,
    165191        "Country": { "type": "literal" , "xml:lang": "en" , "value": "Switzerland" } ,
     192        "TitleDisambiguation": { "type": "literal" , "value": "Das" } ,
    166193        "entrant_robust": { "type": "uri" , "value": "http://dbpedia.org/resource/Lys_Assia" } ,
    167194        "Creator": { "type": "literal" , "value": "Lys Assia" } ,
     
    178205        "Year": { "type": "literal" , "value": "1956" } ,
    179206        "Country": { "type": "literal" , "xml:lang": "en" , "value": "Switzerland" } ,
     207        "TitleDisambiguation": { "type": "literal" , "value": "Ref" } ,
    180208        "entrant_robust": { "type": "uri" , "value": "http://dbpedia.org/resource/Lys_Assia" } ,
    181209        "Creator": { "type": "literal" , "value": "Lys Assia" } ,
  • main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare/errata-lod/local--countries-in-esc-by-year-in-1956--with-errata.sparql

    r35057 r35059  
    1515
    1616
    17 SELECT ?countries_in_esc_by_year ?country_in_year (?year AS ?Year) (?country AS ?Country)
     17SELECT ?countries_in_esc_by_year ?country_in_year (?year AS ?Year) (?country AS ?Country) (?song_label_3char as ?TitleDisambiguation)
    1818       ?entrant_robust (?entrant_label AS ?Creator) ?song_robust (?song_label AS ?Title)
    1919       (?country_in_year_abstract_en AS ?Abstract_en)
     
    5959  # Additional 1956 check to avoid cross-product
    6060  SERVICE <https://dbpedia.org/sparql> {
    61     ?song_robust dbp:artist ?entrant_robust.
     61    OPTIONAL {
     62      ?song_robust dbp:artist ?db_entrant_robust.
     63    }
    6264  }
     65  OPTIONAL {
     66    ?song_robust dbp:artist ?local_entrant_robust.
     67  }
     68  FILTER((bound(?db_entrant_robust) && isIRI(?db_entrant_robust) && (?db_entrant_robust = ?entrant_robust))
     69      || (bound(?local_entrant_robust) && isIRI(?local_entrant_robust) && (?local_entrant_robust = ?entrant_robust))).
    6370 
    6471  # Create more DL friendly entrant-title metadata from Wikipedia entrant-uri/label
     
    6774  # Create more DL friendly song-title metadata from Wikipedia song-uri/label
    6875  BIND(REPLACE(REPLACE(str(?song_robust), "^.*/(.*?)(_+\\(.*song\\))?$", "$1"),"_"," ") AS ?song_label).
     76
     77  BIND(SUBSTR(REPLACE(?song_label," ",""),1,3) AS ?song_label_3char).
     78
    6979
    7080# DBpedia incorrectly maps some songs/entrants to integer numbers
Note: See TracChangeset for help on using the changeset viewer.