Skip to content

Commit

Permalink
feat: Sort GeoNames by relevance score
Browse files Browse the repository at this point in the history
  • Loading branch information
ddeboer committed Aug 8, 2023
1 parent 385938c commit 8acbc17
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX gn: <https://www.geonames.org/ontology#>
PREFIX text: <http://jena.apache.org/text#>
PREFIX vrank: <http://purl.org/voc/vrank#>

CONSTRUCT {
?uri a skos:Concept ;
skos:prefLabel ?prefLabel_ext ;
skos:altLabel ?altLabel ;
skos:scopeNote ?scopeNote ;
skos:broader ?broader .
skos:broader ?broader ;
vrank:simpleRank ?score .
?broader skos:prefLabel ?broader_prefLabel .
}
WHERE {
?uri text:query (gn:name gn:alternateName ?query) ;
a gn:Feature ;
(?uri ?score) text:query (gn:name gn:alternateName ?query) .
?uri a gn:Feature ;
gn:featureClass ?featureClass ;
gn:name ?prefLabel ;
gn:countryCode ?countryCode ;
Expand Down

0 comments on commit 8acbc17

Please sign in to comment.