Class BabelNetEmbeddingLinker
java.lang.Object
de.uni_mannheim.informatik.dws.melt.matching_jena_matchers.external.embeddings.LabelToConceptLinkerEmbeddings
de.uni_mannheim.informatik.dws.melt.matching_jena_matchers.external.babelnet.BabelNetEmbeddingLinker
- All Implemented Interfaces:
LabelToConceptLinker
,SynonymConfidenceCapability
public class BabelNetEmbeddingLinker
extends LabelToConceptLinkerEmbeddings
implements SynonymConfidenceCapability
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final org.slf4j.Logger
(package private) String
Name of the linker.(package private) List<StringModifier>
A set of string operations that are all performed.private static final String
-
Constructor Summary
ConstructorDescriptionBabelNetEmbeddingLinker
(File entityFile) ConstructorBabelNetEmbeddingLinker
(String pathToEntityFile) Constructor -
Method Summary
Modifier and TypeMethodDescriptionGet instance specific name of the linker.double
getStrongFormSynonymyConfidence
(String linkedConcept1, String linkedConcept2) Given two links, determine the degree of synonymy.double
getSynonymyConfidence
(String linkedConcept1, String linkedConcept2) Given two links, determine the degree of synonymy.linkToSingleConcept
(String labelToBeLinked) Queries for a concept and returns a link that represents an entity in the background knowledge source such as theSemanticWordRelationDictionary
.Normalizationstatic String
normalizeStatic
(String stringToBeNormalized) Normalize strings.void
setNameOfLinker
(String nameOfLinker) Set instance specific name of the linker.Methods inherited from class de.uni_mannheim.informatik.dws.melt.matching_jena_matchers.external.embeddings.LabelToConceptLinkerEmbeddings
getLookupMap, getStringModificationSequence, linkToPotentiallyMultipleConcepts, setStringModificationSequence
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
nameOfLinker
String nameOfLinkerName of the linker. -
stringModificationSequence
List<StringModifier> stringModificationSequenceA set of string operations that are all performed. -
URI_START_TOKEN
- See Also:
-
-
Constructor Details
-
BabelNetEmbeddingLinker
Constructor- Parameters:
entityFile
- The entity file.
-
BabelNetEmbeddingLinker
Constructor- Parameters:
pathToEntityFile
- The path to the entity file
-
-
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
- Overrides:
linkToSingleConcept
in classLabelToConceptLinkerEmbeddings
- Parameters:
labelToBeLinked
- The label which shall be linked to a single concept.- Returns:
- Concept or null if no link could be found.
-
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.
-
normalizeStatic
Normalize strings. Static so that behavior can be easily controlled by unit tests.- Parameters:
stringToBeNormalized
- The string that shall be normalized.- Returns:
- Normalized String.
-
normalize
Description copied from class:LabelToConceptLinkerEmbeddings
Normalization- Specified by:
normalize
in classLabelToConceptLinkerEmbeddings
- Parameters:
stringToBeNormalized
- The String that shall be normalized.- Returns:
- Normalized version of the String.
-
getSynonymyConfidence
Description copied from interface:SynonymConfidenceCapability
Given two links, determine the degree of synonymy.- Specified by:
getSynonymyConfidence
in interfaceSynonymConfidenceCapability
- Parameters:
linkedConcept1
- Linked concept 1.linkedConcept2
- Linked concept 2.- Returns:
- True if synonymous, else false.
-
getStrongFormSynonymyConfidence
Description copied from interface:SynonymConfidenceCapability
Given two links, determine the degree of synonymy.- Specified by:
getStrongFormSynonymyConfidence
in interfaceSynonymConfidenceCapability
- Parameters:
linkedConcept1
- Linked concept 1.linkedConcept2
- Linked concept 2.- Returns:
- True if synonymous, else false.
-