RED-7375 table extractor prototype
created new branch because old one broke
This commit is contained in:
parent
ff3dc76caa
commit
ed376f1872
@ -28,6 +28,7 @@ public class TextPositionSequence implements CharSequence {
|
|||||||
|
|
||||||
public static final int HEIGHT_PADDING = 2;
|
public static final int HEIGHT_PADDING = 2;
|
||||||
private int page;
|
private int page;
|
||||||
|
@Builder.Default
|
||||||
private List<RedTextPosition> textPositions = new ArrayList<>();
|
private List<RedTextPosition> textPositions = new ArrayList<>();
|
||||||
|
|
||||||
private TextDirection dir;
|
private TextDirection dir;
|
||||||
|
|||||||
@ -13,7 +13,7 @@ import lombok.NoArgsConstructor;
|
|||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class Classification {
|
public class Classification {
|
||||||
|
@Builder.Default
|
||||||
private Map<String, Float> probabilities = new HashMap<>();
|
private Map<String, Float> probabilities = new HashMap<>();
|
||||||
private String label;
|
private String label;
|
||||||
|
|
||||||
|
|||||||
@ -22,8 +22,9 @@ public class ImageServiceResponse {
|
|||||||
|
|
||||||
@JsonProperty(value = "imageMetadata")
|
@JsonProperty(value = "imageMetadata")
|
||||||
@JsonAlias("data")
|
@JsonAlias("data")
|
||||||
|
@Builder.Default
|
||||||
private List<ImageMetadata> data = new ArrayList<>();
|
private List<ImageMetadata> data = new ArrayList<>();
|
||||||
|
@Builder.Default
|
||||||
private List<ImageMetadata> dataCV = new ArrayList<>();
|
private List<ImageMetadata> dataCV = new ArrayList<>();
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -15,6 +15,7 @@ import lombok.NoArgsConstructor;
|
|||||||
public class TableData {
|
public class TableData {
|
||||||
|
|
||||||
private PageInfo pageInfo;
|
private PageInfo pageInfo;
|
||||||
|
@Builder.Default
|
||||||
private List<TableCells> tableCells = new ArrayList<>();
|
private List<TableCells> tableCells = new ArrayList<>();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,7 +19,7 @@ public class TableServiceResponse {
|
|||||||
private String operation;
|
private String operation;
|
||||||
private String targetFileExtension;
|
private String targetFileExtension;
|
||||||
private String responseFileExtension;
|
private String responseFileExtension;
|
||||||
|
@Builder.Default
|
||||||
private List<TableData> data = new ArrayList<>();
|
private List<TableData> data = new ArrayList<>();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -26,7 +26,7 @@ public class ViewerDocumentTest extends BuildDocumentTest {
|
|||||||
ViewerDocumentService viewerDocumentService = new ViewerDocumentService(layoutGridService, null);
|
ViewerDocumentService viewerDocumentService = new ViewerDocumentService(layoutGridService, null);
|
||||||
Document document = buildGraph(fileName, LayoutParsingType.REDACT_MANAGER);
|
Document document = buildGraph(fileName, LayoutParsingType.REDACT_MANAGER);
|
||||||
var documentFile = new ClassPathResource(fileName).getFile();
|
var documentFile = new ClassPathResource(fileName).getFile();
|
||||||
viewerDocumentService.createViewerDocument(documentFile, document, new File(tmpFileName), true);
|
viewerDocumentService.createViewerDocument(documentFile, document, new File(tmpFileName),null, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user