RED-9194: roll back single digit headline change

This commit is contained in:
Kilian Schuettler 2024-06-21 14:41:30 +02:00
parent 570a348a77
commit 9f7ed974ec

View File

@ -111,10 +111,12 @@ public class DocuMineClassificationService {
&& (textBlock.getMostPopularWordStyle().contains("bold")
&& Character.isDigit(textBlock.toString().charAt(0))
&& atLeast3Matcher.reset().find()
&& !textBlock.toString().contains(":") || textBlock.toString().equals(textBlock.toString().toUpperCase(Locale.ROOT))
&& atLeast3Matcher.reset().find()
&& !textBlock.toString().contains(":") || textBlock.toString().startsWith("APPENDIX") || textBlock.toString()
.startsWith("FIGURE") || textBlock.toString().startsWith("Continued TABLE") || textBlock.toString().startsWith("TABLE"))
&& !textBlock.toString().contains(":") //
|| textBlock.toString().equals(textBlock.toString().toUpperCase(Locale.ROOT)) && atLeast3Matcher.reset().find() && !textBlock.toString().contains(":") //
|| textBlock.toString().startsWith("APPENDIX") //
|| textBlock.toString().startsWith("FIGURE") //
|| textBlock.toString().startsWith("Continued TABLE") //
|| textBlock.toString().startsWith("TABLE"))
&& !textBlock.toString().endsWith(":")
&& atLeast3Matcher.reset().find()) {
PageBlockType headlineType = PageBlockType.getHeadlineType(1);