Class InconsistencyDetector

java.lang.Object
edu.fiu.jtlex.data.InconsistencyDetector

public class InconsistencyDetector extends Object
Provides methods for identifying inconsistent subgraphs.

A TimeML graph might not be solvable when formulated as a TCSP because of inconsistencies in the graph. Among these inconsistencies we find self loops, 2 nodes inconsistencies etc. InconsistencyDetector provide static methods to verify the consistency of a graph and also, in the case of inconsistencies, generate the subgraphs of inconsistencies.

Author:
Luis Robaina, Emmanuel Garcia
  • Constructor Details

    • InconsistencyDetector

      public InconsistencyDetector()
  • Method Details

    • isConsistent

      public static boolean isConsistent​(IGraph TimeMLGraph)
      A static method to verify the consistency of a graph. This is done by trying to solve the TCSP presented by the graphs links and nodes. If there is a solution to the TCSP then the graph is consistent, otherwise is inconsistent.
      Parameters:
      TimeMLGraph - A timeML graph object with a non empty set of nodes.
      Returns:
      true if the graph is consistent, false if the graph is inconsistent.
    • generateInconsistentSubgraphs

      public static Set<IGraph> generateInconsistentSubgraphs​(IGraph TimeMLGraph)
      Given a TimeML graph with inconsistencies, generate a set of subgraphs that contain all the links and nodes involved in the inconsistencies that are present on the TimeML graph.
      Parameters:
      TimeMLGraph - A TimeML graph.
      Returns:
      A Set of IGraph objects representing the inconsistent subgraphs or null if no inconsistencies exists.