public class WordSenseDisambiguatorImpl extends Object implements WordSenseDisambiguator
Constructor and Description |
---|
WordSenseDisambiguatorImpl() |
Modifier and Type | Method and Description |
---|---|
String |
disambiguate(List<Set<String>> sentenceConcepts,
int index,
Set<String> contextConcepts,
int windowSize,
ConceptSimilarityService.SimilarityMetricEnum metric,
Map<String,Double> scoreMap) |
String |
disambiguate(List<Set<String>> sentenceConcepts,
int index,
Set<String> contextConcepts,
int windowSize,
ConceptSimilarityService.SimilarityMetricEnum metric,
Map<String,Double> scoreMap,
boolean weighted)
Disambiguate a named entity.
|
ConceptSimilarityService |
getConceptSimilarityService() |
void |
setConceptSimilarityService(ConceptSimilarityService conceptSimilarityService) |
public ConceptSimilarityService getConceptSimilarityService()
public void setConceptSimilarityService(ConceptSimilarityService conceptSimilarityService)
public String disambiguate(List<Set<String>> sentenceConcepts, int index, Set<String> contextConcepts, int windowSize, ConceptSimilarityService.SimilarityMetricEnum metric, Map<String,Double> scoreMap)
disambiguate
in interface WordSenseDisambiguator
public String disambiguate(List<Set<String>> sentenceConcepts, int index, Set<String> contextConcepts, int windowSize, ConceptSimilarityService.SimilarityMetricEnum metric, Map<String,Double> scoreMap, boolean weighted)
WordSenseDisambiguator
disambiguate
in interface WordSenseDisambiguator
sentenceConcepts
- named entities from the document, represented as list of
sets of concept idsindex
- index of target named entity to disambiguatecontextConcepts
- context concepts, e.g. from titlewindowSize
- number of named entities on either side of target to use for
disambiguationmetric
- metric to usescoreMap
- optional to get the scores assigned to each conceptweighted
- to weight context concepts by frequencyCopyright © 2012-2017 The Apache Software Foundation. All Rights Reserved.