diff --git a/inception/inception-active-learning/pom.xml b/inception/inception-active-learning/pom.xml
index f480ba3d900..3f9aeb1b55c 100644
--- a/inception/inception-active-learning/pom.xml
+++ b/inception/inception-active-learning/pom.xml
@@ -20,7 +20,7 @@
de.tudarmstadt.ukp.inception.appinception-app
- 31.0-SNAPSHOT
+ 32.0-SNAPSHOT..inception-active-learning
diff --git a/inception/inception-active-learning/src/main/java/de/tudarmstadt/ukp/inception/active/learning/ActiveLearningServiceImpl.java b/inception/inception-active-learning/src/main/java/de/tudarmstadt/ukp/inception/active/learning/ActiveLearningServiceImpl.java
index cf08e6f2fa8..9b3070d121a 100644
--- a/inception/inception-active-learning/src/main/java/de/tudarmstadt/ukp/inception/active/learning/ActiveLearningServiceImpl.java
+++ b/inception/inception-active-learning/src/main/java/de/tudarmstadt/ukp/inception/active/learning/ActiveLearningServiceImpl.java
@@ -28,15 +28,19 @@
import java.io.IOException;
import java.io.Serializable;
import java.lang.invoke.MethodHandles;
+import java.util.Collection;
import java.util.List;
import java.util.Optional;
+import org.apache.commons.lang3.ClassUtils;
+import org.apache.uima.cas.CAS;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.transaction.annotation.Transactional;
+import de.tudarmstadt.ukp.clarin.webanno.model.AnnotationFeature;
import de.tudarmstadt.ukp.clarin.webanno.model.AnnotationLayer;
import de.tudarmstadt.ukp.clarin.webanno.model.SourceDocument;
import de.tudarmstadt.ukp.clarin.webanno.security.UserDao;
@@ -44,7 +48,6 @@
import de.tudarmstadt.ukp.inception.active.learning.config.ActiveLearningAutoConfiguration;
import de.tudarmstadt.ukp.inception.active.learning.event.ActiveLearningRecommendationEvent;
import de.tudarmstadt.ukp.inception.active.learning.strategy.ActiveLearningStrategy;
-import de.tudarmstadt.ukp.inception.annotation.layer.span.SpanAdapter;
import de.tudarmstadt.ukp.inception.documents.api.DocumentService;
import de.tudarmstadt.ukp.inception.recommendation.api.LearningRecordService;
import de.tudarmstadt.ukp.inception.recommendation.api.RecommendationService;
@@ -54,6 +57,7 @@
import de.tudarmstadt.ukp.inception.recommendation.api.model.SuggestionGroup.Delta;
import de.tudarmstadt.ukp.inception.schema.api.AnnotationSchemaService;
import de.tudarmstadt.ukp.inception.schema.api.adapter.AnnotationException;
+import de.tudarmstadt.ukp.inception.schema.api.feature.FeatureSupport;
import de.tudarmstadt.ukp.inception.schema.api.feature.FeatureSupportRegistry;
/**
@@ -191,7 +195,6 @@ public void acceptSpanSuggestion(SourceDocument aDocument, User aDataOwner,
.orElseThrow(() -> new IllegalArgumentException(
"No such layer: [" + aSuggestion.getLayerId() + "]"));
var feature = schemaService.getFeature(aSuggestion.getFeature(), layer);
- var adapter = (SpanAdapter) schemaService.getAdapter(layer);
// Load CAS in which to create the annotation. This might be different from the one that
// is currently viewed by the user, e.g. if the user switched to another document after
@@ -202,7 +205,8 @@ public void acceptSpanSuggestion(SourceDocument aDocument, User aDataOwner,
// Create AnnotationFeature and FeatureSupport
var featureSupport = featureSupportRegistry.findExtension(feature).orElseThrow();
- var label = (String) featureSupport.unwrapFeatureValue(feature, cas, aValue);
+
+ var label = unwrapLabel(aValue, feature, cas, featureSupport);
// Clone of the original suggestion with the selected by the user
var suggestionWithUserSelectedLabel = aSuggestion.toBuilder().withLabel(label).build();
@@ -236,6 +240,30 @@ public void acceptSpanSuggestion(SourceDocument aDocument, User aDataOwner,
suggestionWithUserSelectedLabel.getFeature(), action, alternativeSuggestions));
}
+ private String unwrapLabel(Object aValue, AnnotationFeature feature, CAS cas,
+ FeatureSupport