Class DictionaryLinker
- java.lang.Object
-
- com.complexible.stardog.docs.nlp.impl.DictionaryLinker
-
- All Implemented Interfaces:
EntityExtractor<Spans>
public class DictionaryLinker extends java.lang.Object implements EntityExtractor<Spans>
Link entities based on aString -> IRI
dictionary- Since:
- 5.2.2
- Version:
- 5.2.2
- Author:
- Pedro Oliveira
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DictionaryLinker.Linker
static class
DictionaryLinker.LinkerSerializer
Serializer forDictionaryLinker.Linker
objects:[total_size][[key, values_size, values...], ...]
-
Constructor Summary
Constructors Constructor Description DictionaryLinker(EntityExtractor<Spans> theExtractor, java.util.List<DictionaryLinker.Linker> theDictionaries)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Spans
extract(java.io.Reader theText)
Do entity extractionstatic DictionaryLinker
getDefault(Connection theConnection)
static java.util.List<DictionaryLinker.Linker>
loadFrom(java.io.File theDirectory)
LoadsDictionaryLinker.Linker
objects from the given directory, caching them when necessary
-
-
-
Constructor Detail
-
DictionaryLinker
public DictionaryLinker(EntityExtractor<Spans> theExtractor, java.util.List<DictionaryLinker.Linker> theDictionaries)
-
-
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 interfaceEntityExtractor<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
LoadsDictionaryLinker.Linker
objects from the given directory, caching them when necessary- Throws:
java.io.IOException
-
-