public interface ConceptSimilarityService
Modifier and Type | Interface and Description |
---|---|
static class |
ConceptSimilarityService.SimilarityMetricEnum |
Modifier and Type | Method and Description |
---|---|
Object[] |
getBestLCS(Set<String> lcses,
boolean intrinsicIC,
Map<String,Double> conceptFilter)
get the best lcs
|
ConceptGraph |
getConceptGraph() |
String |
getConceptGraphName() |
Map<String,BitSet> |
getCuiTuiMap()
cui - tui map.
|
int |
getDepth(String concept) |
double |
getIC(String concept,
boolean intrinsicICMap) |
int |
getLCS(String concept1,
String concept2,
Set<String> lcses,
List<LCSPath> lcsPaths)
get the lcs(s) for the specified concepts
|
List<String> |
getTuiList()
list of tuis that corresponds to bitset indices
|
int |
lcs(String concept1,
String concept2,
List<LCSPath> lcsPath) |
double |
loadConceptFilter(String label,
int rankCutoff,
Map<String,Double> conceptFilter)
For the given label and cutoff, get the corresponding concepts whose
propagated ig meets the threshold.
|
List<ConceptPairSimilarity> |
similarity(List<ConceptPair> conceptPairs,
List<ConceptSimilarityService.SimilarityMetricEnum> metrics,
Map<String,Double> conceptFilter,
boolean lcs)
compute similarity for a list of concept pairs
|
ConceptPairSimilarity |
similarity(List<ConceptSimilarityService.SimilarityMetricEnum> metrics,
String concept1,
String concept2,
Map<String,Double> conceptFilter,
boolean lcs)
compute similarity for a pair of concepts
|
String getConceptGraphName()
ConceptGraph getConceptGraph()
Map<String,BitSet> getCuiTuiMap()
getTuiList()
double loadConceptFilter(String label, int rankCutoff, Map<String,Double> conceptFilter)
label
- labelrankCutoff
- cutoffconceptFilter
- set to fill with conceptsint getLCS(String concept1, String concept2, Set<String> lcses, List<LCSPath> lcsPaths)
concept1
- requiredconcept2
- requiredlcses
- required - will be filled with the lcs(s).lcsPathMap
- optional - will be filled with lcs and paths through the
lcses.Object[] getBestLCS(Set<String> lcses, boolean intrinsicIC, Map<String,Double> conceptFilter)
lcses
- set of lcsesintrinsicIC
- should the intrinsic ic be used? false - use corpus-based ic.
For multiple lcses not using concept filter, use the lcs with
the lowest infocontentconceptFilter
- limit to lcses in the concept filter. The lcs with the highest
value will be used.double getIC(String concept, boolean intrinsicICMap)
ConceptPairSimilarity similarity(List<ConceptSimilarityService.SimilarityMetricEnum> metrics, String concept1, String concept2, Map<String,Double> conceptFilter, boolean lcs)
metrics
- required, similarity metrics to computeconcept1
- requiredconcept2
- requiredconceptFilter
- optional - only lcs's in this set will be used.simInfo
- optional - pass this to get information on lcs. Instantiate
the lcsPathMap to get paths through lcsList<ConceptPairSimilarity> similarity(List<ConceptPair> conceptPairs, List<ConceptSimilarityService.SimilarityMetricEnum> metrics, Map<String,Double> conceptFilter, boolean lcs)
conceptPairs
- required, concept pairs for which similarity should be
computedmetrics
- required, similarity metrics to computeconceptFilter
- optional - only lcs's in this set will be used.simInfos
- optional - if provided, this list will be filled with the
similarity info for each concept pair.int getDepth(String concept)
Copyright © 2012-2017 The Apache Software Foundation. All Rights Reserved.