public class SemanticSearchServiceImpl extends Object implements SemanticSearchService
| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_NUM_TAGS |
| Constructor and Description |
|---|
SemanticSearchServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
Hit<String> |
bestMatchingSynonym(OntologyTerm ontologyTerm,
Set<String> searchTerms)
Computes the best matching synonym which is closest to a set of search terms.
Will stem the OntologyTerm 's synonyms and the search terms, and then compute the maximum
StringDistance between them. |
Set<ExplainedQueryString> |
convertAttributeEntityToExplainedAttribute(Entity attributeEntity,
EntityMetaData sourceEntityMetaData,
Map<String,String> collectExpanedQueryMap,
List<QueryRule> finalQueryRules)
A helper function to explain each of the matched attributes returned by the explain-API
|
Map<AttributeMetaData,Iterable<ExplainedQueryString>> |
explainAttributes(EntityMetaData sourceEntityMetaData,
EntityMetaData targetEntityMetaData,
AttributeMetaData targetAttribute)
Find all relevant source attributes with an explanation
|
Iterable<AttributeMetaData> |
findAttributes(EntityMetaData sourceEntityMetaData,
EntityMetaData targetEntityMetaData,
AttributeMetaData targetAttribute)
Find all relevant source attributes for the specified target attribute
|
Hit<OntologyTerm> |
findTags(AttributeMetaData attribute,
List<String> ontologyIds)
Finds
OntologyTerms for an attribute. |
Map<AttributeMetaData,Hit<OntologyTerm>> |
findTags(String entity,
List<String> ontologyIds)
Finds
OntologyTerms that can be used to tag an attribute. |
public static final int MAX_NUM_TAGS
public Iterable<AttributeMetaData> findAttributes(EntityMetaData sourceEntityMetaData, EntityMetaData targetEntityMetaData, AttributeMetaData targetAttribute)
SemanticSearchServicefindAttributes in interface SemanticSearchServicepublic Map<AttributeMetaData,Iterable<ExplainedQueryString>> explainAttributes(EntityMetaData sourceEntityMetaData, EntityMetaData targetEntityMetaData, AttributeMetaData targetAttribute)
SemanticSearchServiceexplainAttributes in interface SemanticSearchServicepublic Set<ExplainedQueryString> convertAttributeEntityToExplainedAttribute(Entity attributeEntity, EntityMetaData sourceEntityMetaData, Map<String,String> collectExpanedQueryMap, List<QueryRule> finalQueryRules)
attributeEntity - sourceEntityMetaData - collectExpanedQueryMap - finalQueryRules - public Map<AttributeMetaData,Hit<OntologyTerm>> findTags(String entity, List<String> ontologyIds)
SemanticSearchServiceOntologyTerms that can be used to tag an attribute. >>>>>>> 3b45cb9... added a method in
MappingServiceController that allows us to get the explanations per suggested attributes in json formatfindTags in interface SemanticSearchServiceentity - name of the entityMap of Hits for OntologyTerm resultspublic Hit<OntologyTerm> findTags(AttributeMetaData attribute, List<String> ontologyIds)
SemanticSearchServiceOntologyTerms for an attribute.findTags in interface SemanticSearchServiceattribute - AttributeMetaData to tagontologyIds - IDs of ontologies to take the OntologyTerms from.List of Hits for OntologyTerms found, most relevant firstpublic Hit<String> bestMatchingSynonym(OntologyTerm ontologyTerm, Set<String> searchTerms)
OntologyTerm 's synonyms and the search terms, and then compute the maximum
StringDistance between them. 0 means disjunct, 1 means identicalontologyTerm - the OntologyTermsearchTerms - the search termsStringDistance between the ontologyterm and the search termsCopyright © 2015. All Rights Reserved.