Class WebIsAlodClassicKnowledgeSource
java.lang.Object
de.uni_mannheim.informatik.dws.melt.matching_jena_matchers.external.SemanticWordRelationDictionary
de.uni_mannheim.informatik.dws.melt.matching_jena_matchers.external.webIsAlod.classic.WebIsAlodClassicKnowledgeSource
- All Implemented Interfaces:
ExternalResource
,ExternalResourceWithHypernymCapability
,ExternalResourceWithSynonymCapability
,HypernymCapability
,SynonymCapability
WebIsAlod Knowledge source. All requests are made through the
WebIsAlodSPARQLservice
.-
Field Summary
Modifier and TypeFieldDescriptionstatic final double
(package private) WebIsAlodClassicLinker
The linker that links input strings to terms.double
minimum confidence for synonymy queries.(package private) WebIsAlodSPARQLservice
SPARQL service instance required for requests. -
Constructor Summary
ConstructorDescriptionConstructorWebIsAlodClassicKnowledgeSource
(double minimumConfidence) Web Default ConstructorWebIsAlodClassicKnowledgeSource
(String tdbDirectory) Convenience constructor.WebIsAlodClassicKnowledgeSource
(String tdbDirectory, double minimumConfidence) TDB Default Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Closing open resources.getHypernyms
(String linkedConcept) Retrieves a set of hypernyms independently of the word sense.Returns the linker instance for this particular resource.double
getName()
Obtain the name of the resource.getSynonymsLexical
(String linkedConcept) Not handled this way.boolean
isHypernymous
(String linkedConcept_1, String linkedConcept_2) Checks for hypernymous words in a loose-form fashion: One concept needs to be a hypernym of the other concept where the order of concepts is irrelevant, i.e., the method returns (hypernymous(w1, w2) || hypernymous(w2, w1).boolean
isInDictionary
(String word) boolean
isStrongFormSynonymous
(String link1, String link2) Checks for synonymy by determining whether link1 is contained in the set of synonymous words of link2 or vice versa.boolean
isSynonymous
(String link1, String link2) Checks for synonymous words in a loose-form fashion: There has to be an overlap in the two sets of synonyms or word_1 and word_2.void
setMinimumConfidence
(double minimumConfidence) Methods inherited from class de.uni_mannheim.informatik.dws.melt.matching_jena_matchers.external.SemanticWordRelationDictionary
isHypernym, isHypernym, isSynonymousOrHypernymous
-
Field Details
-
linker
WebIsAlodClassicLinker linkerThe linker that links input strings to terms. -
sparqlService
WebIsAlodSPARQLservice sparqlServiceSPARQL service instance required for requests. -
minimumConfidence
public double minimumConfidenceminimum confidence for synonymy queries. -
DEFAULT_MINIMUM_CONFIDENCE
public static final double DEFAULT_MINIMUM_CONFIDENCE- See Also:
-
-
Constructor Details
-
WebIsAlodClassicKnowledgeSource
public WebIsAlodClassicKnowledgeSource(double minimumConfidence) Web Default Constructor- Parameters:
minimumConfidence
- The minimum required confidence for synonymy.
-
WebIsAlodClassicKnowledgeSource
public WebIsAlodClassicKnowledgeSource()Constructor -
WebIsAlodClassicKnowledgeSource
TDB Default Constructor- Parameters:
tdbDirectory
- TDB 1 directory.minimumConfidence
- Minimum confidence
-
WebIsAlodClassicKnowledgeSource
Convenience constructor.- Parameters:
tdbDirectory
- TDB 1 directory.
-
-
Method Details
-
isInDictionary
-
getSynonymsLexical
Not handled this way.- Specified by:
getSynonymsLexical
in interfaceSynonymCapability
- Specified by:
getSynonymsLexical
in classSemanticWordRelationDictionary
- Parameters:
linkedConcept
- The concept (already linked).- Returns:
- A set of synonyms.
-
isSynonymous
Description copied from class:SemanticWordRelationDictionary
Checks for synonymous words in a loose-form fashion: There has to be an overlap in the two sets of synonyms or word_1 and word_2. The assumed language is English.- Specified by:
isSynonymous
in interfaceSynonymCapability
- Overrides:
isSynonymous
in classSemanticWordRelationDictionary
- Parameters:
link1
- linked word 1link2
- linked word 2- Returns:
- True if the given words are synonymous, else false.
-
isStrongFormSynonymous
Description copied from class:SemanticWordRelationDictionary
Checks for synonymy by determining whether link1 is contained in the set of synonymous words of link2 or vice versa.- Specified by:
isStrongFormSynonymous
in interfaceSynonymCapability
- Overrides:
isStrongFormSynonymous
in classSemanticWordRelationDictionary
- Parameters:
link1
- Word 1link2
- Word 2- Returns:
- True if the given words are synonymous, else false.
-
getHypernyms
Description copied from class:SemanticWordRelationDictionary
Retrieves a set of hypernyms independently of the word sense. The assumed language is English.- Specified by:
getHypernyms
in classSemanticWordRelationDictionary
- Parameters:
linkedConcept
- The linked concept for which hypernyms shall be retrieved.- Returns:
- A set of linked concepts.
-
isHypernymous
Description copied from class:SemanticWordRelationDictionary
Checks for hypernymous words in a loose-form fashion: One concept needs to be a hypernym of the other concept where the order of concepts is irrelevant, i.e., the method returns (hypernymous(w1, w2) || hypernymous(w2, w1). The assumed language is English. CHECKS ONLY FOR LEVEL 1 HYPERNYMY - NO REASONING IS PERFORMED.- Specified by:
isHypernymous
in interfaceHypernymCapability
- Overrides:
isHypernymous
in classSemanticWordRelationDictionary
- Parameters:
linkedConcept_1
- linked word 1linkedConcept_2
- linked word 2- Returns:
- True if the given words are hypernymous, else false.
-
close
public void close()Description copied from class:SemanticWordRelationDictionary
Closing open resources.- Specified by:
close
in classSemanticWordRelationDictionary
-
getLinker
Description copied from interface:ExternalResource
Returns the linker instance for this particular resource.- Specified by:
getLinker
in interfaceExternalResource
- Specified by:
getLinker
in classSemanticWordRelationDictionary
- Returns:
- The specific linker used to link words to concepts.
-
getName
Description copied from interface:ExternalResource
Obtain the name of the resource.- Specified by:
getName
in interfaceExternalResource
- Specified by:
getName
in classSemanticWordRelationDictionary
- Returns:
- Name of the resource.
-
setMinimumConfidence
public void setMinimumConfidence(double minimumConfidence) -
getMinimumConfidence
public double getMinimumConfidence()
-