Skip to content

Build a Database with Known Entities #22

@wolfv

Description

@wolfv

It could be cool to have scripts that can build a Database with known entities from Wikidata.

E.g. one could use a SPARQL query like this (can be executed over here: https://query.wikidata.org)

SELECT ?subj ?label (GROUP_CONCAT(DISTINCT(?altLabel); separator=", ") as ?altlabels)
WHERE
{
    ?subj wdt:P31 wd:Q215380 . # subject -> is instance of -> BAND
    SERVICE wikibase:label {
        bd:serviceParam wikibase:language "en" .
        ?subj rdfs:label ?label . # gather label
        ?subj skos:altLabel ?altLabel # and alt labels (seperated by comma)
    }
}
GROUP BY ?subj ?label
LIMIT 100

to select all bands in Wikidata.
Then those entities could be stored in a Trie (as done currently) and the trie nodes could hold the query entity (e.g. Q215380) as well as the subject identifier (for example, Dire Straits are wd:Q50040)

For the intent matching they could be used as additional information for the probabilities (e.g. optional(Adapt.MusicEntity))

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions