Skip to content

Commit

Permalink
Make update queries somewhat faster
Browse files Browse the repository at this point in the history
  • Loading branch information
matentzn committed Oct 25, 2023
1 parent e3d4f26 commit 38e1ca9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/sparql/relegate-updated-labels-to-candidate-status.ru
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ INSERT {

#SELECT ?term ?property ?translation_lang
WHERE {
VALUES ?property { rdfs:label definition: exact_synonym: }
VALUES ?property { rdfs:label definition: }
?term ?property ?value .

?ax a owl:Axiom ;
Expand Down
14 changes: 3 additions & 11 deletions src/sparql/rm-original-translation.ru
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,23 @@ PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX babelon: <https://w3id.org/babelon/>
PREFIX definition: <http://purl.obolibrary.org/obo/IAO_0000115>

DELETE {
?term ?property ?value .
}

#SELECT ?term ?property ?translation_lang
WHERE {
VALUES ?property { rdfs:label definition: }
?term ?property ?value .

?ax a owl:Axiom ;
owl:annotatedProperty ?property ;
owl:annotatedSource ?term ;
owl:annotatedTarget ?translation ;
babelon:source_language ?source_language ;
babelon:source_value ?source_value ;
babelon:translation_language ?language_tag .
babelon:source_value ?source_value .

OPTIONAL {
?ax babelon:translation_status ?translation_status .
}

OPTIONAL {
?term ?property ?translation .
}

FILTER(str(?value)=str(?source_value))
FILTER(str(?value)!=str(?translation))
}
Expand Down

0 comments on commit 38e1ca9

Please sign in to comment.