diff --git a/inception/inception-model-vdoc/src/main/java/de/tudarmstadt/ukp/inception/rendering/vmodel/VArc.java b/inception/inception-model-vdoc/src/main/java/de/tudarmstadt/ukp/inception/rendering/vmodel/VArc.java index 3cd81b1f41d..849a018d0bd 100644 --- a/inception/inception-model-vdoc/src/main/java/de/tudarmstadt/ukp/inception/rendering/vmodel/VArc.java +++ b/inception/inception-model-vdoc/src/main/java/de/tudarmstadt/ukp/inception/rendering/vmodel/VArc.java @@ -159,7 +159,7 @@ public static final class Builder { private AnnotationLayer layer; private VID vid; - private int equivalenceSet; + private int equivalenceSet = -1; private Map features = Collections.emptyMap(); private VID source; private VID target; @@ -178,61 +178,61 @@ public Builder forAnnotation(AnnotationFS aAnnotation) public Builder withLayer(AnnotationLayer aLayer) { - this.layer = aLayer; + layer = aLayer; return this; } public Builder withVid(VID aVid) { - this.vid = aVid; + vid = aVid; return this; } public Builder withEquivalenceSet(int aEquivalenceSet) { - this.equivalenceSet = aEquivalenceSet; + equivalenceSet = aEquivalenceSet; return this; } public Builder withFeatures(Map aFeatures) { - this.features = aFeatures; + features = aFeatures; return this; } public Builder withSource(FeatureStructure aSource) { - this.source = VID.of(aSource); + source = VID.of(aSource); return this; } public Builder withSource(VID aSource) { - this.source = aSource; + source = aSource; return this; } public Builder withTarget(FeatureStructure aTarget) { - this.target = VID.of(aTarget); + target = VID.of(aTarget); return this; } public Builder withTarget(VID aTarget) { - this.target = aTarget; + target = aTarget; return this; } public Builder withLabel(String aLabel) { - this.label = aLabel; + label = aLabel; return this; } public Builder placeholder() { - this.placeholder = true; + placeholder = true; return this; } diff --git a/inception/inception-model-vdoc/src/main/java/de/tudarmstadt/ukp/inception/rendering/vmodel/VSpan.java b/inception/inception-model-vdoc/src/main/java/de/tudarmstadt/ukp/inception/rendering/vmodel/VSpan.java index 08c3a4b0d50..72bbcb7f838 100644 --- a/inception/inception-model-vdoc/src/main/java/de/tudarmstadt/ukp/inception/rendering/vmodel/VSpan.java +++ b/inception/inception-model-vdoc/src/main/java/de/tudarmstadt/ukp/inception/rendering/vmodel/VSpan.java @@ -138,7 +138,7 @@ public static final class Builder { private AnnotationLayer layer; private VID vid; - private int equivalenceSet; + private int equivalenceSet = -1; private Map features = Collections.emptyMap(); private List ranges; private String label; @@ -156,43 +156,43 @@ public Builder forAnnotation(AnnotationFS aAnnotation) public Builder withLayer(AnnotationLayer aLayer) { - this.layer = aLayer; + layer = aLayer; return this; } public Builder withVid(VID aVid) { - this.vid = aVid; + vid = aVid; return this; } public Builder withEquivalenceSet(int aEquivalenceSet) { - this.equivalenceSet = aEquivalenceSet; + equivalenceSet = aEquivalenceSet; return this; } public Builder withFeatures(Map aFeatures) { - this.features = aFeatures; + features = aFeatures; return this; } public Builder withRange(VRange aRange) { - this.ranges = asList(aRange); + ranges = asList(aRange); return this; } public Builder withLabel(String aLabel) { - this.label = aLabel; + label = aLabel; return this; } public Builder placeholder() { - this.placeholder = true; + placeholder = true; return this; } diff --git a/inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/tasks/PredictionTask.java b/inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/tasks/PredictionTask.java index 5998f22f650..d9b546aad2f 100644 --- a/inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/tasks/PredictionTask.java +++ b/inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/tasks/PredictionTask.java @@ -546,19 +546,19 @@ private void invokeRecommender(Predictions aIncomingPredictions, PredictionConte // Extract the suggestions from the data which the recommender has written into the CAS // We need this only for the extraction, but there is no point in investing the time for // the prediction if we cannot extract the data afterwards - hence we obtain it now and - // skip the prediciton if it is not available + // skip the prediction if it is not available var maybeSuggestionSupport = suggestionSupportRegistry.findGenericExtension(rec); if (maybeSuggestionSupport.isEmpty()) { logNoSuggestionSupportAvailable(aIncomingPredictions, rec); return; } - var suggestionSupport = maybeSuggestionSupport.get(); // Perform the actual prediction var startTime = System.currentTimeMillis(); var predictedRange = predict(aIncomingPredictions, aCtx, aEngine, aPredictionCas, aPredictionRange); + var suggestionSupport = maybeSuggestionSupport.get(); var generatedSuggestions = extractSuggestions(aIncomingPredictions, aDocument, aOriginalCas, aPredictionCas, rec, suggestionSupport);