From: <dfl...@us...> - 2013-09-03 14:43:59
|
Revision: 4032 http://sourceforge.net/p/dl-learner/code/4032 Author: dfleischhacker Date: 2013-09-03 14:43:56 +0000 (Tue, 03 Sep 2013) Log Message: ----------- Refactor SemanticAnnotator with predefined constructor Modified Paths: -------------- trunk/components-core/src/main/java/org/dllearner/algorithms/isle/index/SemanticAnnotator.java Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/isle/index/SemanticAnnotator.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/isle/index/SemanticAnnotator.java 2013-09-03 14:32:34 UTC (rev 4031) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/isle/index/SemanticAnnotator.java 2013-09-03 14:43:56 UTC (rev 4032) @@ -1,14 +1,29 @@ package org.dllearner.algorithms.isle.index; +import org.semanticweb.owlapi.model.OWLOntology; + /** * Provides methods to annotate documents. + * + * @author Daniel Fleischhacker */ -public interface SemanticAnnotator { +public abstract class SemanticAnnotator { + OWLOntology ontology; + /** + * Initialize this semantic annotator to use the entities from the provided ontology. + * + * @param ontology the ontology to use entities from + */ + public SemanticAnnotator(OWLOntology ontology) { + this.ontology = ontology; + } + + /** * Processes the given document and returns the annotated version of this document. * * @param document the document to annotate * @return the given document extended with annotations */ - AnnotatedDocument processDocument(Document document); + public abstract AnnotatedDocument processDocument(Document document); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |