public class SemanticSimKernel extends CacheKernel
Modifier and Type | Field and Description |
---|---|
private java.util.Map<java.lang.String,java.lang.Double> |
conceptFilter |
private ConceptSimilarityService |
conceptSimilarityService |
private double |
cutoff |
private java.lang.String |
label |
private static Log |
log |
private java.lang.String |
metricNames |
private java.util.List<ConceptSimilarityService.SimilarityMetricEnum> |
metrics |
private java.lang.Integer |
rankCutoff |
Constructor and Description |
---|
SemanticSimKernel() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
double |
evaluate(java.lang.Object o1,
java.lang.Object o2)
override CacheKernel - don't bother caching evaluation if the concepts
are not in the conceptFilter, or if they are identical.
|
ConceptSimilarityService |
getConceptSimilarityService() |
double |
getCutoff() |
java.lang.String |
getLabel() |
java.lang.String |
getMetricNames() |
java.lang.Integer |
getRankCutoff() |
protected void |
initializeConceptFilter() |
double |
innerEvaluate(java.lang.Object o1,
java.lang.Object o2)
return the product of all the similarity metrics
|
void |
setConceptSimilarityService(ConceptSimilarityService conceptSimilarityService) |
void |
setCutoff(double cutoff) |
void |
setLabel(java.lang.String label) |
void |
setMetricNames(java.lang.String metricNames) |
void |
setRankCutoff(java.lang.Integer rankCutoff) |
getCacheKeyGenerator, getCacheManager, getCacheName, setCacheKeyGenerator, setCacheManager, setCacheName
private static final Log log
private java.util.Map<java.lang.String,java.lang.Double> conceptFilter
private ConceptSimilarityService conceptSimilarityService
private double cutoff
private java.lang.String label
private java.lang.String metricNames
private java.util.List<ConceptSimilarityService.SimilarityMetricEnum> metrics
private java.lang.Integer rankCutoff
public void afterPropertiesSet() throws java.lang.Exception
afterPropertiesSet
in class CacheKernel
java.lang.Exception
public double evaluate(java.lang.Object o1, java.lang.Object o2)
evaluate
in interface Kernel
evaluate
in class CacheKernel
public ConceptSimilarityService getConceptSimilarityService()
public double getCutoff()
public java.lang.String getLabel()
public java.lang.String getMetricNames()
public java.lang.Integer getRankCutoff()
protected void initializeConceptFilter()
public double innerEvaluate(java.lang.Object o1, java.lang.Object o2)
innerEvaluate
in class CacheKernel
public void setConceptSimilarityService(ConceptSimilarityService conceptSimilarityService)
public void setCutoff(double cutoff)
public void setLabel(java.lang.String label)
public void setMetricNames(java.lang.String metricNames)
public void setRankCutoff(java.lang.Integer rankCutoff)