Class DictionaryLinker

  • All Implemented Interfaces:
    EntityExtractor<Spans>

    public class DictionaryLinker
    extends java.lang.Object
    implements EntityExtractor<Spans>
    Link entities based on a String -> IRI dictionary
    Since:
    5.2.2
    Version:
    5.2.2
    Author:
    Pedro Oliveira
    • Method Detail

      • getDefault

        public static DictionaryLinker getDefault​(Connection theConnection)
                                           throws java.io.IOException
        Throws:
        java.io.IOException
      • extract

        public Spans extract​(java.io.Reader theText)
                      throws java.lang.Exception
        Description copied from interface: EntityExtractor
        Do entity extraction
        Specified by:
        extract in interface EntityExtractor<Spans>
        Parameters:
        theText - the text to extract entities
        Returns:
        The extracted entities
        Throws:
        java.lang.Exception
      • loadFrom

        public static java.util.List<DictionaryLinker.Linker> loadFrom​(java.io.File theDirectory)
                                                                throws java.io.IOException
        Loads DictionaryLinker.Linker objects from the given directory, caching them when necessary
        Throws:
        java.io.IOException