anl.aida.client.net
Class ConceptGraphBuilder
java.lang.Object
anl.aida.client.net.ConceptGraphBuilder
public class ConceptGraphBuilder
- extends java.lang.Object
Builder for a concept graph.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
docs
private java.util.List<anl.aida.core.DocumentID> docs
graph
private edu.uci.ics.jung.graph.Graph<TermNode,CGEdge> graph
nodes
private java.util.List<TermNode> nodes
ConceptGraphBuilder
public ConceptGraphBuilder(java.lang.Iterable<anl.aida.core.DocumentID> docIter)
buildNodes
public ConceptGraphBuilder buildNodes(anl.aida.score.TermScoreFilter filter,
java.util.List<? extends Keyword> keywords)
- Builds the nodes for the ConceptGraph using the specified filter.
Each concept becomes a node in the graph. Each document that passes the
filter for a concept will be added to that concept.
- Parameters:
filter
- the filter to use when adding documents to nodeskeywords
- the list of the concepts that should be become nodes.
- Returns:
- this ConceptGraphBuilder.
buildEdges
public ConceptGraphBuilder buildEdges(EdgeCreator edgeCreator)
- Builds the edges using the specified edge creator. Every pair of nodes
will be passed into the edge creator. The edges are assumed to be
undirected and so the pair X,Y is identical to Y,X as far as edge
creation is concerned.
- Parameters:
edgeCreator
- the created used to create the graphs edges
- Returns:
- this ConceptGraphBuilder
getResult
public edu.uci.ics.jung.graph.Graph<TermNode,CGEdge> getResult()
- Gets the graph that is the result of the building process.
- Returns:
- the graph that is the result of the building process.