diff --git a/src/main/java/org/verapdf/wcag/algorithms/semanticalgorithms/consumers/SemanticDocumentPreprocessingConsumer.java b/src/main/java/org/verapdf/wcag/algorithms/semanticalgorithms/consumers/SemanticDocumentPreprocessingConsumer.java index d48b7621..ef00ec10 100644 --- a/src/main/java/org/verapdf/wcag/algorithms/semanticalgorithms/consumers/SemanticDocumentPreprocessingConsumer.java +++ b/src/main/java/org/verapdf/wcag/algorithms/semanticalgorithms/consumers/SemanticDocumentPreprocessingConsumer.java @@ -111,12 +111,12 @@ private SortedSet getHorizontalLines(TextChunk textChunk) { -Double.MAX_VALUE, textChunk.getBaseLine()), new LineChunk(textChunk.getPageNumber(), Double.MAX_VALUE, textChunk.getBaseLine() - NodeUtils.UNDERLINED_TEXT_EPSILONS[1] * textChunk.getBoundingBox().getHeight(), Double.MAX_VALUE, - textChunk.getBaseLine() - NodeUtils.UNDERLINED_TEXT_EPSILONS[2] * textChunk.getBoundingBox().getHeight())); + textChunk.getBaseLine() - NodeUtils.UNDERLINED_TEXT_EPSILONS[1] * textChunk.getBoundingBox().getHeight())); } private boolean isUnderlinedText(TextChunk textChunk, LineChunk lineChunk) { if (NodeUtils.areOverlapping(textChunk, lineChunk) && - (lineChunk.getWidth() < NodeUtils.UNDERLINED_TEXT_EPSILONS[3] * textChunk.getBoundingBox().getHeight())) { + (lineChunk.getWidth() < NodeUtils.UNDERLINED_TEXT_EPSILONS[2] * textChunk.getBoundingBox().getHeight())) { return true; } return false; diff --git a/src/main/java/org/verapdf/wcag/algorithms/semanticalgorithms/utils/NodeUtils.java b/src/main/java/org/verapdf/wcag/algorithms/semanticalgorithms/utils/NodeUtils.java index 09fb4a7a..e94bf07d 100644 --- a/src/main/java/org/verapdf/wcag/algorithms/semanticalgorithms/utils/NodeUtils.java +++ b/src/main/java/org/verapdf/wcag/algorithms/semanticalgorithms/utils/NodeUtils.java @@ -14,7 +14,7 @@ public class NodeUtils { public static final double EPSILON = 0.0001; public static final double TABLE_BORDER_EPSILON = 0.011; - public static final double[] UNDERLINED_TEXT_EPSILONS = {0.08, 0.3, 0.3, 0.3}; + public static final double[] UNDERLINED_TEXT_EPSILONS = {0.08, 0.35, 0.3}; private static final double[] HEADING_PROBABILITY_PARAMS = {0.3, 0.0291, 0.15, 0.27, 0.1, 0.25, 0.2, 0.5, 0.05, 0.1}; private static final double[] HEADING_PROBABILITY_PARAMS_SAME_FONT = {0.55, 0.15, 0.55, 0.4, 0.5, 0.15}; private static final double[] HEADING_PROBABILITY_PARAMS_DIFF_FONT = {0.44, 0.1, 0.4, 0.23, 0.35, 0.1};