public class DefaultCandidateFeatureGenerator extends Object implements CandidateGenerator
WaldoCandidateGenerator and IDLabelDistance in a single query, e.g.:
SELECT *
FROM <tag:stardog:api:context:all>
WHERE {
{ ?subj rdfs:label ?obj } UNION { ?subj foaf:name ?obj }
( ?obj ?score ) stardog:textMatch ( ?query ?threshold ) .
MINUS { [] stardocs:hasEntity ?subj }
}
ORDER BY DESC(?score)
| Constructor and Description |
|---|
DefaultCandidateFeatureGenerator(Connection theConnection) |
| Modifier and Type | Method and Description |
|---|---|
List<CandidateMention> |
apply(Span theSpan) |
Connection |
getConnection() |
org.openrdf.model.IRI[] |
getContexts() |
org.openrdf.model.IRI[] |
getLabelProperties() |
Integer |
getLimit() |
org.apache.lucene.search.spell.StringDistance |
getStringDistance() |
Double |
getThreshold() |
void |
setContexts(org.openrdf.model.IRI... theContexts) |
void |
setLabelProperties(org.openrdf.model.IRI... theLabelProperties) |
void |
setLimit(Integer theLimit) |
void |
setStringDistance(org.apache.lucene.search.spell.StringDistance theStringDistance) |
void |
setThreshold(Double theThreshold) |
public DefaultCandidateFeatureGenerator(Connection theConnection)
public Double getThreshold()
public Integer getLimit()
public Connection getConnection()
public org.openrdf.model.IRI[] getLabelProperties()
public org.openrdf.model.IRI[] getContexts()
public org.apache.lucene.search.spell.StringDistance getStringDistance()
public void setThreshold(Double theThreshold)
public void setLimit(Integer theLimit)
public void setLabelProperties(org.openrdf.model.IRI... theLabelProperties)
public void setContexts(org.openrdf.model.IRI... theContexts)
public void setStringDistance(org.apache.lucene.search.spell.StringDistance theStringDistance)
public List<CandidateMention> apply(Span theSpan)
apply in interface Function<Span,List<CandidateMention>>Copyright © 2010-2016 Stardog Union. All Rights Reserved.