java.lang.Object
de.uni_mannheim.informatik.dws.melt.matching_jena_matchers.multisource.clustering.ClusterUtil

public class ClusterUtil extends Object
Helper class for adding and filtering correspondences based on cluster assignments.
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
  • Constructor Details

    • ClusterUtil

      public ClusterUtil()
  • Method Details

    • addCorrespondencesMultiCluster

      public static <T> Alignment addCorrespondencesMultiCluster(Alignment alignment, Map<String,Set<T>> uriToClusterId)
      This function adds correspondences from the alignment where the source and target are in the same cluster. It needs the mapping URI to set of cluster ids. The provided alignment is not modified.
      Type Parameters:
      T - the type of the cluster ID
      Parameters:
      alignment - the alignment
      uriToClusterId - the mapping from uri to set of cluster ids
      Returns:
      the alignment with added correspondences
    • removeCorrespondences

      public static <T> Alignment removeCorrespondences(Alignment alignment, Map<String,T> uriToClusterId)
      This function removes correspondences from the alignment where the two matched entities are not in the same cluster. It needs the mapping URI to cluster id. The provided alignment is not modified.
      Type Parameters:
      T - the type of the cluster ID
      Parameters:
      alignment - the alignemnt to filter
      uriToClusterId - the mapping from uri to cluster id
      Returns:
      the filtered alignment
    • removeCorrespondencesMultiCluster

      public static <T> Alignment removeCorrespondencesMultiCluster(Alignment alignment, Map<String,Set<T>> uriToClusterId)
      This function removes correspondences from the alignment where the two matched entities are not in the same cluster. It needs the mapping URI to set of cluster ids. The provided alignment is not modified.
      Type Parameters:
      T - the type of the cluster ID
      Parameters:
      alignment - the alignemnt to filter
      uriToClusterId - the mapping from uri to set of cluster ids
      Returns:
      the filtered alignment