Class WaldoCandidateGenerator
- java.lang.Object
 - 
- com.complexible.stardog.docs.nlp.impl.WaldoCandidateGenerator
 
 
- 
- All Implemented Interfaces:
 CandidateGenerator,java.util.function.Function<Span,java.util.List<CandidateMention>>
public class WaldoCandidateGenerator extends java.lang.Object implements CandidateGenerator
Uses Waldo to search for entities that match with the mention.SELECT DISTINCT ?subj FROM <tag:stardog:api:context:all> WHERE { ?subj ?prop ?object . (?object ?score) stardog:textMatch (?query ?threshold) MINUS { [] bites:hasEntity ?subj } } ORDER BY DESC(?score)- Since:
 - 5.2
 - Version:
 - 5.2
 - Author:
 - Pedro Oliveira
 
 
- 
- 
Constructor Summary
Constructors Constructor Description WaldoCandidateGenerator(Connection theConnection) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<CandidateMention>apply(Span theMention)protected SelectQueryquery(java.lang.String theText)Create waldo query, based on given parametersvoidsetContexts(IRI... theContexts)voidsetLimit(int theLimit)Set the maximum amount of candidates generated for a mentionvoidsetThreshold(double theThreshold)Set the minimum score of an entity in order for it be considered a candidate 
 - 
 
- 
- 
Constructor Detail
- 
WaldoCandidateGenerator
public WaldoCandidateGenerator(Connection theConnection)
 
 - 
 
- 
Method Detail
- 
setLimit
public void setLimit(int theLimit)
Set the maximum amount of candidates generated for a mention 
- 
setThreshold
public void setThreshold(double theThreshold)
Set the minimum score of an entity in order for it be considered a candidate 
- 
setContexts
public void setContexts(IRI... theContexts)
 
- 
query
protected SelectQuery query(java.lang.String theText)
Create waldo query, based on given parameters 
- 
apply
public java.util.List<CandidateMention> apply(Span theMention)
- Specified by:
 applyin interfacejava.util.function.Function<Span,java.util.List<CandidateMention>>
 
 - 
 
 -