org.apache.stanbol.entityhub.servicesapi.query
Class SimilarityConstraint
java.lang.Object
org.apache.stanbol.entityhub.servicesapi.query.Constraint
org.apache.stanbol.entityhub.servicesapi.query.SimilarityConstraint
public class SimilarityConstraint
- extends Constraint
Ensure that results have fields that is contextually similar. The implementation is typically based on a
cosine similarity score a normalized vector space of term frequencies - inverse document frequencies as
done by the MoreLikeThis feature of Solr for instance.
This type of constraint might not be supported by all the yard implementations. If it is not supported it
is just ignored.
| Methods inherited from class org.apache.stanbol.entityhub.servicesapi.query.Constraint |
getType |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
context
protected final String context
additionalFields
protected final List<String> additionalFields
SimilarityConstraint
public SimilarityConstraint(String context)
SimilarityConstraint
public SimilarityConstraint(String context,
List<String> additionalFields)
getAdditionalFields
public List<String> getAdditionalFields()
- Additional fields used for similarity calculations
- Returns:
getContext
public String getContext()
- The context used for checking the similarity
- Returns:
Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.