diff --git a/inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/service/RecommendationServiceImpl.java b/inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/service/RecommendationServiceImpl.java index 70a0184b7a5..9eb77b363e2 100644 --- a/inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/service/RecommendationServiceImpl.java +++ b/inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/service/RecommendationServiceImpl.java @@ -1970,8 +1970,8 @@ private static Optional getOffsetsAnchoredOnSentences(CAS aOriginalCas, if (sentences.isEmpty()) { // This can happen if a recommender uses different token boundaries (e.g. if a // remote service performs its own tokenization). We might be smart here by - // looking for overlapping sentences instead of contained sentences. - LOG.trace("Discarding suggestion because no covering sentences were found: {}", + // looking for overlapping sentences instead of covered sentences. + LOG.trace("Discarding suggestion because no covered sentences were found: {}", aPredictedAnnotation); return Optional.empty(); } @@ -2016,8 +2016,8 @@ static Optional getOffsetsAnchoredOnTokens(CAS aOriginalCas, // This can happen if a recommender uses different token boundaries (e.g. if a // remote service performs its own tokenization). We might be smart here by - // looking for overlapping tokens instead of contained tokens. - LOG.trace("Discarding suggestion because no covering tokens were found: {}", + // looking for overlapping tokens instead of covered tokens. + LOG.trace("Discarding suggestion because no covered tokens were found: {}", aPredictedAnnotation); return Optional.empty(); } diff --git a/inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/sidebar/RecommenderInfoPanel.html b/inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/sidebar/RecommenderInfoPanel.html index ae19ddc30f0..0468196f670 100644 --- a/inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/sidebar/RecommenderInfoPanel.html +++ b/inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/sidebar/RecommenderInfoPanel.html @@ -63,17 +63,17 @@ - + +
diff --git a/inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/sidebar/RecommenderInfoPanel.java b/inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/sidebar/RecommenderInfoPanel.java index ee806a73412..cdfcf870e0a 100644 --- a/inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/sidebar/RecommenderInfoPanel.java +++ b/inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/sidebar/RecommenderInfoPanel.java @@ -168,13 +168,17 @@ protected void populateItem(ListItem item) resultsContainer.add(new Label("testSampleCount", evalResult.map(EvaluationResult::getTestSetSize).orElse(0))); - resultsContainer.add(new LambdaAjaxLink("acceptBest", + item.add(resultsContainer); + + item.add(new LambdaAjaxLink("acceptBest", _tgt -> actionAcceptBest(_tgt, recommender)) .setVisible(evaluatedRecommender.map(EvaluatedRecommender::isActive) .orElse(false))); - resultsContainer.add(new LambdaAjaxLink("showDetails", - _tgt -> actionShowDetails(_tgt, recommender))); + item.add(new LambdaAjaxLink("showDetails", + _tgt -> actionShowDetails(_tgt, recommender)) + .setVisible(evalResult.map(r -> !r.isEvaluationSkipped()) + .orElse(evalResult.isPresent()))); AjaxDownloadLink exportModel = new AjaxDownloadLink("exportModel", LoadableDetachableModel.of(() -> exportModelName(recommender)), @@ -183,9 +187,7 @@ protected void populateItem(ListItem item) () -> recommendationService.getRecommenderFactory(recommender).isPresent() && recommendationService.getRecommenderFactory(recommender).get() .isModelExportSupported())); - resultsContainer.add(exportModel); - - item.add(resultsContainer); + item.add(exportModel); item.add(new Label("noEvaluationMessage", evaluatedRecommender.map(EvaluatedRecommender::getReasonForState)