Class LabelUtils

java.lang.Object
org.aksw.jenax.analytics.core.LabelUtils

public class LabelUtils extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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 simple BestLiteralConfig model: The model simply captures lists of properties and languages in descending priority.
    static org.aksw.jenax.sparql.fragment.api.Fragment3
    createRelationLiteralPreference(org.aksw.jenax.arq.aggregation.LiteralPreference literalPreference)
     
    static org.aksw.jenax.sparql.fragment.api.Fragment3
    createRelationPrefLabels(org.aksw.jenax.arq.aggregation.BestLiteralConfig bestLiteralConfig)
     
    static void
    main(String[] args)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 simple BestLiteralConfig model: 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

      public static void main(String[] args)