Skip to content

Mapping sources

der edited this page Oct 2, 2014 · 4 revisions

It is possible to map input values to normalized resources buy looking them up in a mapping source.

The map functions that do this are listed in Pattern language.

The definitions of the mapping sources are given in the template using one of the formats outlined below.

Sources

Lookup in a CSV table

{
    "sourceType" : "CSV",
    "source" : "filename",
    "key"  : "key column name",
    "value"  : "value column name",
    "makeURI" : true  
}

makeURI is an optional flag which, if true, will cause the result value to be treated as a URI. Without this then only values enclosed in "<...>" will be treated as URIs.

Lookup in an RDF graph

{
    "sourceType" : "RDF",
    "source" : "filename",
    "key"  : "property whose value will be matched",
    "value"  : "property whose value is the result, omit if the root resource is the result",
    "type" : "optional rdf:type which all matches are required to have",
    "enrich" : "*"
}

The enrich value is optional. It causes additional properties of the matched resource to be retrieved from the graph and added to the conversion output. If the spec is * then a description of the matched result will be added to the output RDF. If it is a property name or list of property names then just the value(s) of those properties will be added.

Lookup in an RDF graph via sparql

{
    "sourceType" : "RDFSparql",
    "source" : "filename",
    "query":  "SELECT ?key ?value ?other WHERE {...} "
}

Specifies a mapping table by extracting it from an RDF source file via a SPARQL query. The query should return a binding for the string use as a key (?key)

Lookup in graph or remote SPARQL endpoint:

{
    "sourceType" : "sparql",
    "source"  : "uri",
    "path"  : "sparql path"
}

The path is a SPARQL path expression, which can use prefixes from the prefix environment, which connects the resource to the key value being looked up.

Not implemented.

Use open-refine style reconciliation API

{
    "sourceType" : "reconcile",
    "sourceId"  : "url",
    "threshold"  : "confidence value threshold"
}

Not implemented.

Clone this wiki locally