Class ALDecider


  • public class ALDecider
    extends Object

    Class to get the most controversy matches out of n Mappings. The most controversy matches are those contained in close to n/2 Mappings and vice versa. This functionality is required by the Active Learning approach of the genetics package.

    NOTE: Functionality requires de.uni_leipzig.simba.data.Triple.class to implement the Comparable interface and overrides hashCode() function such that a Triple t1 is considered to equals another Triple t2 iff both source and target URIs are equal.

    Version:
    Jul 21, 2016
    Author:
    Klaus Lyko, Mohamed Sherif (sherif@informatik.uni-leipzig.de)
    • Constructor Detail

      • ALDecider

        public ALDecider()
    • Method Detail

      • main

        public static void main​(String[] args)
      • getControversyMatches

        public HashMap<ALDecider.Triple,​Integer> getControversyMatches​(List<AMapping> mapList)
        Method returns the controversy matches of the given Mapping. This is just a HashMap, whereas the keys are the Triples and the values the number of Mappings holding this Triple.
        Parameters:
        mapList - A List of all Mappings to process.
        Returns:
        HashMap a map of Triples (matches) and the number of Mappings holding them.
      • getControversyCandidates

        public List<ALDecider.Triple> getControversyCandidates​(List<AMapping> mapList,
                                                               int n)
        Function to get the n most controversy matching candidates of the given mappings. The most controversy once are those, who are only in half of the given mappings.
        Parameters:
        mapList - List of Mappings.
        n - Controls how many candidates should be retrieved.
        Returns:
      • getControversyCandidates

        public List<ALDecider.Triple> getControversyCandidates​(List<AMapping> mapList)
        Parameters:
        mapList -
        Returns:
        tripleList with informative value
      • setKnown

        public void setKnown​(AMapping m)
        To set already retrieved instances. For example those provided at start up.
        Parameters:
        m - Mapping of already asked URIs of source and target.