Package org.nlpub.watset.graph
Class Watset.Builder<V,E>
- java.lang.Object
-
- org.nlpub.watset.graph.Watset.Builder<V,E>
-
- Type Parameters:
V- the type of nodes in the graphE- the type of edges in the graph
- All Implemented Interfaces:
ClusteringBuilder<V,E,Watset<V,E>>
public static class Watset.Builder<V,E> extends Object implements ClusteringBuilder<V,E,Watset<V,E>>
Builder forWatset.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Watset<V,E>build(org.jgrapht.Graph<V,E> graph)Construct an instance of the clustering algorithm with the parameters specified in the builder.Function<org.jgrapht.Graph<V,E>,Clustering<V>>provider()Construct a factory function that sets up the algorithm for the given graph.Watset.Builder<V,E>setGlobal(Function<org.jgrapht.Graph<Sense<V>,org.jgrapht.graph.DefaultWeightedEdge>,Clustering<Sense<V>>> global)Set the global clustering algorithm supplier.Watset.Builder<V,E>setGlobalBuilder(ClusteringBuilder<Sense<V>,org.jgrapht.graph.DefaultWeightedEdge,?> globalBuilder)Set the global clustering algorithm builder.Watset.Builder<V,E>setLocal(Function<org.jgrapht.Graph<V,E>,Clustering<V>> local)Set the local clustering algorithm supplier.Watset.Builder<V,E>setLocalBuilder(ClusteringBuilder<V,E,?> localBuilder)Set the local clustering algorithm builder.Watset.Builder<V,E>setSimilarity(ContextSimilarity<V> similarity)Set the context similarity measure.
-
-
-
Method Detail
-
build
public Watset<V,E> build(org.jgrapht.Graph<V,E> graph)
Description copied from interface:ClusteringBuilderConstruct an instance of the clustering algorithm with the parameters specified in the builder.
-
provider
public Function<org.jgrapht.Graph<V,E>,Clustering<V>> provider()
Description copied from interface:ClusteringBuilderConstruct a factory function that sets up the algorithm for the given graph.
-
setLocal
public Watset.Builder<V,E> setLocal(Function<org.jgrapht.Graph<V,E>,Clustering<V>> local)
Set the local clustering algorithm supplier.- Parameters:
local- the local clustering algorithm supplier- Returns:
- the builder
-
setLocalBuilder
public Watset.Builder<V,E> setLocalBuilder(ClusteringBuilder<V,E,?> localBuilder)
Set the local clustering algorithm builder.- Parameters:
localBuilder- the local clustering algorithm builder- Returns:
- the builder
-
setGlobal
public Watset.Builder<V,E> setGlobal(Function<org.jgrapht.Graph<Sense<V>,org.jgrapht.graph.DefaultWeightedEdge>,Clustering<Sense<V>>> global)
Set the global clustering algorithm supplier.- Parameters:
global- the global clustering algorithm supplier- Returns:
- the builder
-
setGlobalBuilder
public Watset.Builder<V,E> setGlobalBuilder(ClusteringBuilder<Sense<V>,org.jgrapht.graph.DefaultWeightedEdge,?> globalBuilder)
Set the global clustering algorithm builder.- Parameters:
globalBuilder- the global clustering algorithm builder- Returns:
- the builder
-
setSimilarity
public Watset.Builder<V,E> setSimilarity(ContextSimilarity<V> similarity)
Set the context similarity measure.- Parameters:
similarity- the context similarity measure- Returns:
- the builder
-
-