Package edu.fiu.jtlex.data
Class Partitioner
java.lang.Object
edu.fiu.jtlex.data.Partitioner
- All Implemented Interfaces:
IPartitioner
public class Partitioner extends java.lang.Object implements IPartitioner
Class used to partition an input TimeML temporal graph into main subgraph and
subordinating subgraphs. TimeML graphs are split by trimming all instances of
ILinks that are of type SLinkType and then reassembling the graphs using
edges.
- Author:
- Emmanuel Garcia
-
Constructor Summary
Constructors Constructor Description Partitioner() -
Method Summary
Modifier and Type Method Description java.util.ArrayList<IGraph>classifyGraphs(java.util.ArrayList<IGraph> graphs)Finds the graph with the most nodes and classifies it as a MainGraph and set the others to a subordination graph.java.util.ArrayList<IGraph>partitionGraph(IGraph timeMLGraph)Returns a list of partitioned subgraphs.java.util.Set<ILink>partitionLinks()This method returns the set of partition links (solo subordination timelinks).
-
Constructor Details
-
Partitioner
public Partitioner()
-
-
Method Details
-
partitionGraph
Returns a list of partitioned subgraphs.This method takes a TimeML graph, removes all the Subordination type links, then reassembles the graph, and finally returns an array of the partitioned subgraphs.
- Specified by:
partitionGraphin interfaceIPartitioner- Parameters:
timeMLGraph- the main TimeML graph to be partitioned.- Returns:
- an
ArrayList<IGraph>of partitioned subgraphs
-
classifyGraphs
Finds the graph with the most nodes and classifies it as a MainGraph and set the others to a subordination graph.- Specified by:
classifyGraphsin interfaceIPartitioner- Parameters:
graphs- the list of graphs to be classified.- Returns:
- the classified graphs.
-
partitionLinks
This method returns the set of partition links (solo subordination timelinks).These links are obtained from partitioning a TimeML graph. This method can only be used AFTER
partitionGraph(IGraph)has been used to partition a graph.- Specified by:
partitionLinksin interfaceIPartitioner- Returns:
- set of partition links (solo subordination timelinks).
-