Class DefaultCandidateFeatureGenerator
- java.lang.Object
-
- com.complexible.stardog.docs.nlp.impl.DefaultCandidateFeatureGenerator
-
- All Implemented Interfaces:
CandidateGenerator
,java.util.function.Function<Span,java.util.List<CandidateMention>>
public class DefaultCandidateFeatureGenerator extends java.lang.Object implements CandidateGenerator
Merges the logic behindWaldoCandidateGenerator
andIDLabelDistance
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 { [] bites:hasEntity ?subj } } ORDER BY DESC(?score)
- Since:
- 5.3
- Version:
- 5.3
- Author:
- Pedro Oliveira
-
-
Constructor Summary
Constructors Constructor Description DefaultCandidateFeatureGenerator(Connection theConnection)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<CandidateMention>
apply(Span theSpan)
Connection
getConnection()
IRI[]
getContexts()
IRI[]
getLabelProperties()
java.lang.Integer
getLimit()
org.apache.lucene.search.spell.StringDistance
getStringDistance()
java.lang.Double
getThreshold()
void
setContexts(IRI... theContexts)
void
setLabelProperties(IRI... theLabelProperties)
void
setLimit(java.lang.Integer theLimit)
void
setStringDistance(org.apache.lucene.search.spell.StringDistance theStringDistance)
void
setThreshold(java.lang.Double theThreshold)
-
-
-
Constructor Detail
-
DefaultCandidateFeatureGenerator
public DefaultCandidateFeatureGenerator(Connection theConnection)
-
-
Method Detail
-
getThreshold
public java.lang.Double getThreshold()
-
getLimit
public java.lang.Integer getLimit()
-
getConnection
public Connection getConnection()
-
getLabelProperties
public IRI[] getLabelProperties()
-
getContexts
public IRI[] getContexts()
-
getStringDistance
public org.apache.lucene.search.spell.StringDistance getStringDistance()
-
setThreshold
public void setThreshold(java.lang.Double theThreshold)
-
setLimit
public void setLimit(java.lang.Integer theLimit)
-
setLabelProperties
public void setLabelProperties(IRI... theLabelProperties)
-
setContexts
public void setContexts(IRI... theContexts)
-
setStringDistance
public void setStringDistance(org.apache.lucene.search.spell.StringDistance theStringDistance)
-
apply
public java.util.List<CandidateMention> apply(Span theSpan)
- Specified by:
apply
in interfacejava.util.function.Function<Span,java.util.List<CandidateMention>>
-
-