Class NodeUtils
- java.lang.Object
-
- org.verapdf.wcag.algorithms.semanticalgorithms.utils.NodeUtils
-
public class NodeUtils extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static doubleBACKGROUND_FIRST_COLOR_EPSILONstatic doubleBACKGROUND_SECOND_COLOR_EPSILONstatic doubleEPSILONstatic double[]HEADING_EPSILONSstatic doubleMIN_GOOD_HEADING_PROBABILITYstatic doubleTABLE_BORDER_EPSILONstatic double[]UNDERLINED_TEXT_EPSILONS
-
Constructor Summary
Constructors Constructor Description NodeUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanareCloseNumbers(double d1, double d2)static booleanareCloseNumbers(double d1, double d2, double epsilon)static booleanareOverlapping(TextChunk textChunk, LineChunk lineChunk)static INodegetNextNonEmptyNode(INode node)static booleanhasSameStyle(SemanticTextNode textNode, SemanticTextNode neighborTextNode, double weightEps, double fontEps)static booleanhasSimilarBackgroundColor(double[] firstColor, double[] secondColor)static booleanhasSimilarBackgroundColor(Color firstColor, Color secondColor)static doubleheadingProbability(SemanticTextNode textNode, INode neighborNode)static doubleheadingProbability(SemanticTextNode textNode, SemanticTextNode previousNode, SemanticTextNode nextNode, INode initialNode)
-
-
-
Field Detail
-
EPSILON
public static final double EPSILON
- See Also:
- Constant Field Values
-
TABLE_BORDER_EPSILON
public static final double TABLE_BORDER_EPSILON
- See Also:
- Constant Field Values
-
UNDERLINED_TEXT_EPSILONS
public static final double[] UNDERLINED_TEXT_EPSILONS
-
HEADING_EPSILONS
public static final double[] HEADING_EPSILONS
-
BACKGROUND_FIRST_COLOR_EPSILON
public static final double BACKGROUND_FIRST_COLOR_EPSILON
- See Also:
- Constant Field Values
-
BACKGROUND_SECOND_COLOR_EPSILON
public static final double BACKGROUND_SECOND_COLOR_EPSILON
- See Also:
- Constant Field Values
-
MIN_GOOD_HEADING_PROBABILITY
public static final double MIN_GOOD_HEADING_PROBABILITY
- See Also:
- Constant Field Values
-
-
Method Detail
-
headingProbability
public static double headingProbability(SemanticTextNode textNode, SemanticTextNode previousNode, SemanticTextNode nextNode, INode initialNode)
-
headingProbability
public static double headingProbability(SemanticTextNode textNode, INode neighborNode)
-
hasSameStyle
public static boolean hasSameStyle(SemanticTextNode textNode, SemanticTextNode neighborTextNode, double weightEps, double fontEps)
-
areCloseNumbers
public static boolean areCloseNumbers(double d1, double d2, double epsilon)
-
areCloseNumbers
public static boolean areCloseNumbers(double d1, double d2)
-
hasSimilarBackgroundColor
public static boolean hasSimilarBackgroundColor(double[] firstColor, double[] secondColor)
-
-