Package org.aksw.jenax.analytics.core
Class LabelUtils
java.lang.Object
org.aksw.jenax.analytics.core.LabelUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.aksw.jenax.sparql.fragment.api.Fragment2createFragmentPrefLabelsLateral(org.aksw.jenax.arq.aggregation.LiteralPreference config) Create a Fragment2 of the form (?entity, ?bestLabel) Links each entity to its best label according to simpleBestLiteralConfigmodel: The model simply captures lists of properties and languages in descending priority.static org.aksw.jenax.sparql.fragment.api.Fragment3createRelationLiteralPreference(org.aksw.jenax.arq.aggregation.LiteralPreference literalPreference) static org.aksw.jenax.sparql.fragment.api.Fragment3createRelationPrefLabels(org.aksw.jenax.arq.aggregation.BestLiteralConfig bestLiteralConfig) static void
-
Constructor Details
-
LabelUtils
public LabelUtils()
-
-
Method Details
-
createRelationLiteralPreference
public static org.aksw.jenax.sparql.fragment.api.Fragment3 createRelationLiteralPreference(org.aksw.jenax.arq.aggregation.LiteralPreference literalPreference) -
createRelationPrefLabels
public static org.aksw.jenax.sparql.fragment.api.Fragment3 createRelationPrefLabels(org.aksw.jenax.arq.aggregation.BestLiteralConfig bestLiteralConfig) -
createFragmentPrefLabelsLateral
public static org.aksw.jenax.sparql.fragment.api.Fragment2 createFragmentPrefLabelsLateral(org.aksw.jenax.arq.aggregation.LiteralPreference config) Create a Fragment2 of the form (?entity, ?bestLabel) Links each entity to its best label according to simpleBestLiteralConfigmodel: The model simply captures lists of properties and languages in descending priority. Always only returns a single lable: If there are multiple labels under the same property with a suitable language then only one of them will be returned.?x ?z | { SELECT WHERE { VALUES ( ?y ?propertyScore ) { ( <http://www.w3.org/2000/01/rdf-schema#label> 0 ) ( <http://www.w3.org/2000/01/rdf-schema#comment> 1 ) ( <http://www.w3.org/2000/01/rdf-schema#seeAlso> 2 ) } ?x ?y ?z LATERAL { VALUES ( ?lang ?langScore ) { ( "en" 0 ) ( "de" 1 ) ( "" 2 ) } FILTER langMatches(lang(?z), ?lang) } } ORDER BY ASC(?langScore) ASC(?propertyScore) LIMIT 1 } -
main
-