RED-9974: Ignore enoughChars when section identifierer regex matches for documine old
This commit is contained in:
parent
a4d6d2326e
commit
6acc85266c
@ -172,8 +172,7 @@ public class DocuMineClassificationService {
|
||||
&& isAtLeast3Characters
|
||||
&& !headlineWithSlashesMatches
|
||||
&& !isAmount
|
||||
&& !isTocItem
|
||||
&& enoughChars) {
|
||||
&& !isTocItem) {
|
||||
|
||||
setAsHeadline(headlineClassificationService, textBlock, document, headlineFontSizes);
|
||||
} else if (!isTocItem
|
||||
@ -182,8 +181,7 @@ public class DocuMineClassificationService {
|
||||
&& PositionUtils.getApproxLineCount(textBlock) < 2.9
|
||||
&& (tableOrFigureMatcher.reset().find() || headlineWithSingleIdentifierMatcher.reset().find())
|
||||
&& !isAmount
|
||||
&& !headlineWithSlashesMatches
|
||||
&& enoughChars) {
|
||||
&& !headlineWithSlashesMatches) {
|
||||
|
||||
setAsHeadline(headlineClassificationService, textBlock, document, headlineFontSizes);
|
||||
} else if (PositionUtils.isWithinBodyTextFrame(bodyTextFrame, textBlock)
|
||||
@ -248,7 +246,8 @@ public class DocuMineClassificationService {
|
||||
|
||||
return surroundingBlocks.stream()
|
||||
.mapToDouble(surroundingBlock -> calculateSeparation(textBlock, surroundingBlock))
|
||||
.min().orElse(Double.MAX_VALUE);
|
||||
.min()
|
||||
.orElse(Double.MAX_VALUE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user