Class 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 behind 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 { [] bites:hasEntity ?subj }
      }
      ORDER BY DESC(?score)
    
     
     
    Since:
    5.3
    Version:
    5.3
    Author:
    Pedro Oliveira
    • 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)