|
@@ -261,6 +261,12 @@ public class EntityLabelsRelationServiceImpl extends ServiceImpl<EntityLabelsRel
|
|
|
List<AnnotationData> annotationDatas = new ArrayList<>();// 图谱下的所有文档标注信息。
|
|
|
for (String fileId : fileIds) {
|
|
|
String fileTextContent = sysFileService.getFileTextContent(fileId);
|
|
|
+ // 查询前端存储的文本内容给算法。
|
|
|
+ List<AnnotationList> annotationLists = annotationListMapper.selectList(new QueryWrapper<AnnotationList>().lambda().eq(AnnotationList::getKgId, kgId).eq(AnnotationList::getFileId, fileId));
|
|
|
+ String textFront = "";
|
|
|
+ if (!CollectionUtils.isEmpty(annotationLists)){
|
|
|
+ textFront = annotationLists.get(0).getTextFront();
|
|
|
+ }
|
|
|
if (null != fileTextContent && StringUtils.isNotBlank(fileTextContent)) {
|
|
|
// log.info("文本内容不为空:{}", fileTextContent);
|
|
|
log.info("--->fileId:{}", fileId);
|
|
@@ -272,7 +278,7 @@ public class EntityLabelsRelationServiceImpl extends ServiceImpl<EntityLabelsRel
|
|
|
// 获取历史标注实体间关系数据列表,即图谱下的实体关系标注信息列表。
|
|
|
List<AnnotationEntityRelation> relations = getAnnotationEntityRelationByKgIdAndFileId(kgId, fileId);
|
|
|
log.info("--->relations:{}", entities.size());
|
|
|
- AnnotationData annotationData = AnnotationData.builder().text(fileTextContent).entities(entities).relations(relations).build();
|
|
|
+ AnnotationData annotationData = AnnotationData.builder().text(fileTextContent).textFront(textFront).entities(entities).relations(relations).build();
|
|
|
annotationDatas.add(annotationData);
|
|
|
}
|
|
|
}
|