Class WordNetEmbeddingLinker
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.wordNet.WordNetEmbeddingLinker
- All Implemented Interfaces:
LabelToConceptLinker
For this linker, you need (1) a WordNet embedding, (2) a text file of the vocabulary.
You can obtain both as follows:
- Download dataset: http://wordnet-rdf.princeton.edu/static/wordnet.nt.gz
- Train embedding with jRDF2Vec
- Generate vocabulary text file (option -generateVocabularyFile in jRDF2Vec).
-
Field Summary
-
Constructor Summary
ConstructorDescriptionWordNetEmbeddingLinker
(File entityFile) ConstructorWordNetEmbeddingLinker
(String entityFilePath) Constructor -
Method Summary
Modifier and TypeMethodDescriptionGet instance specific name of the linker.linkToSingleConcept
(String labelToBeLinked) Returned are noun vectors (if they exist), then verb, then s, then r.Normalizationvoid
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
-
nameOfLinker
-
-
Constructor Details
-
WordNetEmbeddingLinker
Constructor- Parameters:
entityFilePath
- The file path to the file containing the entities that are available in the vector space. The file must be UTF-8 encoded and must contain one entity per line.
-
WordNetEmbeddingLinker
Constructor- Parameters:
entityFile
- The file containing the entities that are available in the vector space. The file must be UTF-8 encoded and must contain one entity per line.
-
-
Method Details
-
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.
-
linkToSingleConcept
Returned are noun vectors (if they exist), then verb, then s, then r.- Specified by:
linkToSingleConcept
in interfaceLabelToConceptLinker
- Overrides:
linkToSingleConcept
in classLabelToConceptLinkerEmbeddings
- Parameters:
labelToBeLinked
- The label that is to be linked.- Returns:
- Link.
-
getNameOfLinker
Description copied from interface:LabelToConceptLinker
Get instance specific name of the linker.- Returns:
- Name as String.
-
setNameOfLinker
Description copied from interface:LabelToConceptLinker
Set instance specific name of the linker.- Parameters:
nameOfLinker
- Name to be set.
-