From: <dfl...@us...> - 2013-09-03 15:26:21
|
Revision: 4035 http://sourceforge.net/p/dl-learner/code/4035 Author: dfleischhacker Date: 2013-09-03 15:26:18 +0000 (Tue, 03 Sep 2013) Log Message: ----------- Add WordSenseDisambiguation class Added Paths: ----------- trunk/components-core/src/main/java/org/dllearner/algorithms/isle/WordSenseDisambiguation.java Added: trunk/components-core/src/main/java/org/dllearner/algorithms/isle/WordSenseDisambiguation.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/isle/WordSenseDisambiguation.java (rev 0) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/isle/WordSenseDisambiguation.java 2013-09-03 15:26:18 UTC (rev 4035) @@ -0,0 +1,36 @@ +package org.dllearner.algorithms.isle; + +import org.dllearner.algorithms.isle.index.Annotation; +import org.dllearner.algorithms.isle.index.Document; +import org.dllearner.algorithms.isle.index.SemanticAnnotation; +import org.dllearner.core.owl.Entity; +import org.semanticweb.owlapi.model.OWLOntology; + +import java.util.Set; + +/** + * Abstract class for + * + * @author Daniel Fleischhacker + */ +public abstract class WordSenseDisambiguation { + OWLOntology ontology; + + /** + * Initialize the word sense disambiguation to use the given ontology. + * + * @param ontology the ontology to disambiguate on + */ + public WordSenseDisambiguation(OWLOntology ontology) { + this.ontology = ontology; + } + + /** + * Chooses the correct entity for the given annotation from a set of candidate enties. + * + * @param annotation the annotation to find entity for + * @param candidateEntities the set of candidate entities + * @return semantic annotation containing the given annotation and the chosen entity + */ + public abstract SemanticAnnotation disambiguate(Annotation annotation, Set<Entity> candidateEntities); +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |