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 behindWaldoCandidateGeneratorandIDLabelDistancein 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)ConnectiongetConnection()IRI[]getContexts()IRI[]getLabelProperties()java.lang.IntegergetLimit()org.apache.lucene.search.spell.StringDistancegetStringDistance()java.lang.DoublegetThreshold()voidsetContexts(IRI... theContexts)voidsetLabelProperties(IRI... theLabelProperties)voidsetLimit(java.lang.Integer theLimit)voidsetStringDistance(org.apache.lucene.search.spell.StringDistance theStringDistance)voidsetThreshold(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:
 applyin interfacejava.util.function.Function<Span,java.util.List<CandidateMention>>
 
 - 
 
 -