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
FieldsModifier and TypeFieldDescriptionprivate static final org.slf4j.Logger(package private) StringName of the linker.(package private) List<StringModifier>A set of string operations that are all performed.private static final String -
Constructor Summary
ConstructorsConstructorDescriptionBabelNetEmbeddingLinker(File entityFile) ConstructorBabelNetEmbeddingLinker(String pathToEntityFile) Constructor -
Method Summary
Modifier and TypeMethodDescriptionGet instance specific name of the linker.doublegetStrongFormSynonymyConfidence(String linkedConcept1, String linkedConcept2) Given two links, determine the degree of synonymy.doublegetSynonymyConfidence(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 StringnormalizeStatic(String stringToBeNormalized) Normalize strings.voidsetNameOfLinker(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:LabelToConceptLinkerQueries 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:
linkToSingleConceptin interfaceLabelToConceptLinker- Overrides:
linkToSingleConceptin 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:LabelToConceptLinkerGet instance specific name of the linker.- Specified by:
getNameOfLinkerin interfaceLabelToConceptLinker- Returns:
- Name as String.
-
setNameOfLinker
Description copied from interface:LabelToConceptLinkerSet instance specific name of the linker.- Specified by:
setNameOfLinkerin 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:LabelToConceptLinkerEmbeddingsNormalization- Specified by:
normalizein classLabelToConceptLinkerEmbeddings- Parameters:
stringToBeNormalized- The String that shall be normalized.- Returns:
- Normalized version of the String.
-
getSynonymyConfidence
Description copied from interface:SynonymConfidenceCapabilityGiven two links, determine the degree of synonymy.- Specified by:
getSynonymyConfidencein interfaceSynonymConfidenceCapability- Parameters:
linkedConcept1- Linked concept 1.linkedConcept2- Linked concept 2.- Returns:
- True if synonymous, else false.
-
getStrongFormSynonymyConfidence
Description copied from interface:SynonymConfidenceCapabilityGiven two links, determine the degree of synonymy.- Specified by:
getStrongFormSynonymyConfidencein interfaceSynonymConfidenceCapability- Parameters:
linkedConcept1- Linked concept 1.linkedConcept2- Linked concept 2.- Returns:
- True if synonymous, else false.
-