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
|
&& isAtLeast3Characters
|
||||||
&& !headlineWithSlashesMatches
|
&& !headlineWithSlashesMatches
|
||||||
&& !isAmount
|
&& !isAmount
|
||||||
&& !isTocItem
|
&& !isTocItem) {
|
||||||
&& enoughChars) {
|
|
||||||
|
|
||||||
setAsHeadline(headlineClassificationService, textBlock, document, headlineFontSizes);
|
setAsHeadline(headlineClassificationService, textBlock, document, headlineFontSizes);
|
||||||
} else if (!isTocItem
|
} else if (!isTocItem
|
||||||
@ -182,8 +181,7 @@ public class DocuMineClassificationService {
|
|||||||
&& PositionUtils.getApproxLineCount(textBlock) < 2.9
|
&& PositionUtils.getApproxLineCount(textBlock) < 2.9
|
||||||
&& (tableOrFigureMatcher.reset().find() || headlineWithSingleIdentifierMatcher.reset().find())
|
&& (tableOrFigureMatcher.reset().find() || headlineWithSingleIdentifierMatcher.reset().find())
|
||||||
&& !isAmount
|
&& !isAmount
|
||||||
&& !headlineWithSlashesMatches
|
&& !headlineWithSlashesMatches) {
|
||||||
&& enoughChars) {
|
|
||||||
|
|
||||||
setAsHeadline(headlineClassificationService, textBlock, document, headlineFontSizes);
|
setAsHeadline(headlineClassificationService, textBlock, document, headlineFontSizes);
|
||||||
} else if (PositionUtils.isWithinBodyTextFrame(bodyTextFrame, textBlock)
|
} else if (PositionUtils.isWithinBodyTextFrame(bodyTextFrame, textBlock)
|
||||||
@ -248,7 +246,8 @@ public class DocuMineClassificationService {
|
|||||||
|
|
||||||
return surroundingBlocks.stream()
|
return surroundingBlocks.stream()
|
||||||
.mapToDouble(surroundingBlock -> calculateSeparation(textBlock, surroundingBlock))
|
.mapToDouble(surroundingBlock -> calculateSeparation(textBlock, surroundingBlock))
|
||||||
.min().orElse(Double.MAX_VALUE);
|
.min()
|
||||||
|
.orElse(Double.MAX_VALUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user