Skip to content

Commit

Permalink
#1208 - No recommendations if document title doesn't match file name
Browse files Browse the repository at this point in the history
- Obtain the document ID from the CasMetadata
  • Loading branch information
reckart committed May 27, 2019
1 parent ee13ee2 commit 2287f6e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
import de.tudarmstadt.ukp.clarin.webanno.api.annotation.rendering.model.VRange;
import de.tudarmstadt.ukp.clarin.webanno.api.annotation.rendering.model.VSpan;
import de.tudarmstadt.ukp.clarin.webanno.api.annotation.util.TypeUtil;
import de.tudarmstadt.ukp.clarin.webanno.api.dao.CasMetadataUtils;
import de.tudarmstadt.ukp.clarin.webanno.model.AnnotationFeature;
import de.tudarmstadt.ukp.clarin.webanno.model.AnnotationLayer;
import de.tudarmstadt.ukp.inception.recommendation.api.LearningRecordService;
Expand Down Expand Up @@ -99,7 +100,9 @@ public void render(CAS aCas, VDocument vdoc, AnnotatorState aState,
}

// TODO #176 use the document Id once it it available in the CAS
SuggestionDocumentGroup groups = model.getPredictions(getDocumentTitle(aCas), layer,
String sourceDocumentName = CasMetadataUtils.getSourceDocumentName(aCas)
.orElse(getDocumentTitle(aCas));
SuggestionDocumentGroup groups = model.getPredictions(sourceDocumentName, layer,
aWindowBeginOffset, aWindowEndOffset);

// No recommendations to render for this layer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,8 @@ public AnnotationSchemaService annotationSchemaService()
@Bean
public CasStorageService casStorageService()
{
return new CasStorageServiceImpl(null, repositoryProperties(), backupProperties());
return new CasStorageServiceImpl(null, null, repositoryProperties(),
backupProperties());
}

@Bean
Expand Down

0 comments on commit 2287f6e

Please sign in to comment.