Package com.jalios.jcms.categorycleaner
Class CategoryClusterManager
java.lang.Object
com.jalios.jcms.categorycleaner.CategoryClusterManager
-
Method Summary
Modifier and TypeMethodDescriptionReturns the cluster containing the given category.getClusterMap(Category root, float similarity, org.apache.lucene.search.spell.StringDistance sd) Returns a set of cluster of similar categories.static CategoryClusterManager
-
Method Details
-
getInstance
-
getClusterMap
public Map<String,Set<Category>> getClusterMap(Category root, float similarity, org.apache.lucene.search.spell.StringDistance sd) Returns a set of cluster of similar categories.- Parameters:
root- the root of categories to clusterize.similarity- a float between 0 and 1 based on how similar the specified category are to one another (1 = exact match after String cleaning (lower-case, no accent, ...)sd- the StringDistance algorithm used to compute similarity (when similarity is < 1).- Returns:
- a set of cluster of similar categories.
- Since:
- jcms-10.0.4
-
findCluster
Returns the cluster containing the given category.- Parameters:
cat- the categoryclusterMap- the map of cluster.- Returns:
- the cluster containing the given category.
- Since:
- jcms-10.0.4
-