Class LabelUtils

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

public class LabelUtils extends Object
  • Constructor Details

    • LabelUtils

      public LabelUtils()
  • Method Details

    • createRelationLiteralPreference

      public static Fragment3 createRelationLiteralPreference(LiteralPreference literalPreference)
    • createRelationPrefLabels

      public static Fragment3 createRelationPrefLabels(BestLiteralConfig bestLiteralConfig)
    • createFragmentPrefLabelsLateral

      public static Fragment2 createFragmentPrefLabelsLateral(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)