RED-3189: Fixed calculate flags after surrounding text analysis
This commit is contained in:
parent
0e9082fadc
commit
881c1cd25b
@ -47,6 +47,7 @@ public class RedactionMessageReceiver {
|
|||||||
log.info("Successfully reanalyzed dossier {} file {} took: {}", analyzeRequest.getDossierId(), analyzeRequest.getFileId(), result.getDuration());
|
log.info("Successfully reanalyzed dossier {} file {} took: {}", analyzeRequest.getDossierId(), analyzeRequest.getFileId(), result.getDuration());
|
||||||
break;
|
break;
|
||||||
case FULL_ANALYSE:
|
case FULL_ANALYSE:
|
||||||
|
log.info("IN FULL!!");
|
||||||
// TODO Seperate stucture analysis by other queue
|
// TODO Seperate stucture analysis by other queue
|
||||||
analyzeService.analyzeDocumentStructure(new StructureAnalyzeRequest(analyzeRequest.getDossierId(), analyzeRequest.getFileId()));
|
analyzeService.analyzeDocumentStructure(new StructureAnalyzeRequest(analyzeRequest.getDossierId(), analyzeRequest.getFileId()));
|
||||||
|
|
||||||
|
|||||||
@ -83,6 +83,7 @@ public class AnalyzeService {
|
|||||||
|
|
||||||
public AnalyzeResult analyze(AnalyzeRequest analyzeRequest) {
|
public AnalyzeResult analyze(AnalyzeRequest analyzeRequest) {
|
||||||
|
|
||||||
|
log.info("In ANALYSE");
|
||||||
long startTime = System.currentTimeMillis();
|
long startTime = System.currentTimeMillis();
|
||||||
|
|
||||||
var text = redactionStorageService.getText(analyzeRequest.getDossierId(), analyzeRequest.getFileId());
|
var text = redactionStorageService.getText(analyzeRequest.getDossierId(), analyzeRequest.getFileId());
|
||||||
@ -124,6 +125,7 @@ public class AnalyzeService {
|
|||||||
|
|
||||||
// not yet ready for reanalysis
|
// not yet ready for reanalysis
|
||||||
if (redactionLog == null || text == null || text.getNumberOfPages() == 0) {
|
if (redactionLog == null || text == null || text.getNumberOfPages() == 0) {
|
||||||
|
log.info("redactionLog != null: {}, text != null: {}, text.getNumberOfPages() == 0: {}",redactionLog == null, text == null, text.getNumberOfPages() == 0);
|
||||||
return analyze(analyzeRequest);
|
return analyze(analyzeRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -139,6 +141,7 @@ public class AnalyzeService {
|
|||||||
|
|
||||||
var nerEntities = redactionStorageService.getNerEntities(analyzeRequest.getDossierId(), analyzeRequest.getFileId());
|
var nerEntities = redactionStorageService.getNerEntities(analyzeRequest.getDossierId(), analyzeRequest.getFileId());
|
||||||
if (redactionServiceSettings.isEnableEntityRecognition() && nerEntities == null) {
|
if (redactionServiceSettings.isEnableEntityRecognition() && nerEntities == null) {
|
||||||
|
log.info("In NER reanalyse");
|
||||||
nerAnalyserService.computeNerEntities(analyzeRequest.getDossierId(), analyzeRequest.getFileId());
|
nerAnalyserService.computeNerEntities(analyzeRequest.getDossierId(), analyzeRequest.getFileId());
|
||||||
nerEntities = redactionStorageService.getNerEntities(analyzeRequest.getDossierId(), analyzeRequest.getFileId());
|
nerEntities = redactionStorageService.getNerEntities(analyzeRequest.getDossierId(), analyzeRequest.getFileId());
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user