Class Watset.Implementation<V,​E>

  • Type Parameters:
    V - the type of nodes in the graph
    E - the type of edges in the graph
    Enclosing class:
    Watset<V,​E>

    public static class Watset.Implementation<V,​E>
    extends Object
    Actual implementation of Simplified Watset.
    • Field Detail

      • graph

        protected final org.jgrapht.Graph<V,​E> graph
        The graph.
      • inducer

        protected final SenseInduction<V,​E> inducer
        The node sense induction approach.
      • inventory

        protected final Map<V,​Map<V,​Integer>> inventory
        The sense inventory.
      • senses

        protected final Map<V,​List<Sense<V>>> senses
        The sense mapping.
    • Constructor Detail

      • Implementation

        public Implementation​(org.jgrapht.Graph<V,​E> graph,
                              SenseInduction<V,​E> inducer,
                              ClusteringAlgorithmBuilder<Sense<V>,​org.jgrapht.graph.DefaultWeightedEdge,​?> global)
        Create an instance of the Watset clustering algorithm implementation.
        Parameters:
        graph - the graph
        inducer - the node sense induction approach
        global - the global clustering algorithm supplier
    • Method Detail

      • compute

        public WatsetClustering<V> compute()
        Perform clustering with Watset.
        Returns:
        the clustering
      • buildInventory

        protected void buildInventory()
        Build a node sense inventory; fill in variables senses and inventory.
      • buildSenseGraph

        protected org.jgrapht.Graph<Sense<V>,​org.jgrapht.graph.DefaultWeightedEdge> buildSenseGraph()
        Build an intermediate sense-aware representation of the input graph called the node sense graph.
        Returns:
        the sense graph