Class BabelNetRdfLinker
java.lang.Object
de.uni_mannheim.informatik.dws.melt.matching_jena_matchers.external.babelnet.BabelNetRdfLinker
- All Implemented Interfaces:
LabelToConceptLinker
Links concepts to BabelNet (using the RDF dataset - NOT the indices).
It is required that the RDF dataset is stored in TDB1.
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final org.slf4j.Logger
private String
(package private) Set<StringModifier>
A set of string operations that are all performed.private org.apache.jena.query.Dataset
The TDB dataset into which the DBpedia data set was loaded.private org.apache.jena.rdf.model.Model
TDB model -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
(package private) static String
Get instance specific name of the linker.linkToPotentiallyMultipleConcepts
(String labelToBeLinked) This method tries to linklabelToBeLinked
to one concept if possible.linkToSingleConcept
(String labelToBeLinked) Queries for a concept and returns a link that represents an entity in the background knowledge source such as theSemanticWordRelationDictionary
.void
setNameOfLinker
(String nameOfLinker) Set instance specific name of the linker.
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
nameOfLinker
-
tdbDataset
private org.apache.jena.query.Dataset tdbDatasetThe TDB dataset into which the DBpedia data set was loaded. -
tdbModel
private org.apache.jena.rdf.model.Model tdbModelTDB model -
stringModificationSet
Set<StringModifier> stringModificationSetA set of string operations that are all performed.
-
-
Constructor Details
-
BabelNetRdfLinker
-
-
Method Details
-
linkToSingleConcept
Description copied from interface:LabelToConceptLinker
Queries for a concept and returns a link that represents an entity in the background knowledge source such as theSemanticWordRelationDictionary
. Note that the link may not always be something intuitive such as a URI but may also be an artificial identifier that is understood by the corresponding background knowledge source.- Specified by:
linkToSingleConcept
in interfaceLabelToConceptLinker
- Parameters:
labelToBeLinked
- The label which shall be linked to a single concept.- Returns:
- Concept or null if no link could be found.
-
encode
-
linkToPotentiallyMultipleConcepts
Description copied from interface:LabelToConceptLinker
This method tries to linklabelToBeLinked
to one concept if possible. If it fails, it will try to link it to multiple concepts.- Specified by:
linkToPotentiallyMultipleConcepts
in interfaceLabelToConceptLinker
- Parameters:
labelToBeLinked
- The label which shall be linked.- Returns:
- One or multiple linked concepts in a set. Null if it could not fully link the label.
-
getNameOfLinker
Description copied from interface:LabelToConceptLinker
Get instance specific name of the linker.- Specified by:
getNameOfLinker
in interfaceLabelToConceptLinker
- Returns:
- Name as String.
-
setNameOfLinker
Description copied from interface:LabelToConceptLinker
Set instance specific name of the linker.- Specified by:
setNameOfLinker
in interfaceLabelToConceptLinker
- Parameters:
nameOfLinker
- Name to be set.
-
close
public void close()
-