/** * Get the predictions of a given window for each document, where the outer list is a list of * tokens and the inner list is a list of predictions for a token. The method filters all tokens * which already have an annotation and don't need further recommendation. */ public Map<String, SuggestionDocumentGroup> getPredictionsForWholeProject( AnnotationLayer aLayer, DocumentService aDocumentService) { Map<String, SuggestionDocumentGroup> result = new HashMap<>(); List<AnnotationDocument> docs = aDocumentService.listAnnotationDocuments(project, user); for (AnnotationDocument doc : docs) { // TODO #176 use the document Id once it it available in the CAS SuggestionDocumentGroup p = getPredictions(doc.getName(), aLayer, -1, -1); result.put(doc.getName(), p); } return result; }
SuggestionDocumentGroup groups = model.getPredictions( DocumentMetaData.get(aJcas).getDocumentTitle(), layer, windowBegin, windowEnd);