Coder Social home page Coder Social logo

Comments (2)

adrigrillo avatar adrigrillo commented on July 19, 2024 1

With regarding the connection of the existent artist to the new genres, this task is difficult to generalize because of the high probability of mixing information of two different artists that have the same name. An example of a query that show the problem using DBpedia is:

PREFIX mo: <http://purl.org/ontology/mo/>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX dbo: <http://dbpedia.org/ontology/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> 
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>

select ?db_artist_name ?artist ?db_genre_name ?db_artist
where {
    service <http://dbpedia.org/sparql> {
        ?db_artist foaf:name ?db_artist_name_en .
        bind(str(?db_artist_name_en) as ?db_artist_name)
        ?db_artist dbo:genre ?db_genre .
        ?db_genre rdfs:label ?db_genre_name_en .
        filter(langMatches(lang(?db_genre_name_en), "en")).
        bind(replace(lcase(str(?db_genre_name_en)),"[\\(.*\\)]","") AS ?db_genre_name)
    }
    filter exists {
        ?genre a mo:Genre .
   		?genre rdfs:label ?db_genre_name .
    }
    ?artist rdfs:label ?db_artist_name
}

And its result the following table, where it can be seen that more than a artist is matching because of the name.

?db_artist_name ?artist ?db_genre_name ?db_artist
Asia http://musicbrainz.org/artist/8f695099-c714-4ad0-8888-36eca37fee84 art rock http://dbpedia.org/resource/Asia_(band)
Asia http://musicbrainz.org/artist/56b087c0-d336-4e4d-a0fe-67a04708bb13 art rock http://dbpedia.org/resource/Asia_(band)
Asia http://musicbrainz.org/artist/2841cb74-4ad3-4577-828c-8348b4c814f9 art rock http://dbpedia.org/resource/Asia_(band)
Asia http://musicbrainz.org/artist/9e9621f7-88f1-4f78-9b9c-3548b6999df8 art rock http://dbpedia.org/resource/Asia_(band)

A possible solution is to use all the possible information of the existent group to afterwards query the external source.

from music_kg.

adrigrillo avatar adrigrillo commented on July 19, 2024

Wikidata

The search of new genres in Wikidata returns 1217 new genres that are not contained already contained in the graph. This includes genres that have the same name and the ones that already have been previously linked to Wikidata (#7).

The query that generates the triples that will be added to the graph can be seen in this file.

DBpedia

The search in DBpedia returns 389 new genres that are not in already in the graph, counting with the ones added from Wikidata. The linking done in the previous step (#7) is took into account also. Moreover, in DBpedia some strings of the genres contains text in parenthesis, generally specifying that is a music genre, as flamenco rock (genre). This text between the parenthesis have been removed.

The query that generates the triples that will be added to the graph can be seen in this file.

from music_kg.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.