Class NodeUtils
java.lang.Object
org.verapdf.wcag.algorithms.semanticalgorithms.utils.NodeUtils
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final doublestatic final doublestatic final doublestatic final double[]static final doublestatic final doublestatic final double[]static final doublestatic final double -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic 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, boolean isNextNode) static doubleheadingProbability(SemanticTextNode textNode, SemanticTextNode previousNode, SemanticTextNode nextNode, INode initialNode)
-
Field Details
-
EPSILON
public static final double EPSILON- See Also:
-
VERTEX_FACTOR
public static final double VERTEX_FACTOR- See Also:
-
VERTEX_TABLE_FACTOR
public static final double VERTEX_TABLE_FACTOR- See Also:
-
UNDERLINED_TEXT_EPSILONS
public static final double[] UNDERLINED_TEXT_EPSILONS -
HEADING_PROBABILITY_FAR_FROM_NEIGHBOR_BOOST
public static final double HEADING_PROBABILITY_FAR_FROM_NEIGHBOR_BOOST- See Also:
-
HEADING_EPSILONS
public static final double[] HEADING_EPSILONS -
BACKGROUND_FIRST_COLOR_EPSILON
public static final double BACKGROUND_FIRST_COLOR_EPSILON- See Also:
-
BACKGROUND_SECOND_COLOR_EPSILON
public static final double BACKGROUND_SECOND_COLOR_EPSILON- See Also:
-
MIN_GOOD_HEADING_PROBABILITY
public static final double MIN_GOOD_HEADING_PROBABILITY- See Also:
-
-
Constructor Details
-
NodeUtils
public NodeUtils()
-
-
Method Details
-
headingProbability
public static double headingProbability(SemanticTextNode textNode, SemanticTextNode previousNode, SemanticTextNode nextNode, INode initialNode) -
getNextNonEmptyNode
-
headingProbability
public static double headingProbability(SemanticTextNode textNode, INode neighborNode, boolean isNextNode) -
hasSameStyle
public static boolean hasSameStyle(SemanticTextNode textNode, SemanticTextNode neighborTextNode, double weightEps, double fontEps) -
areOverlapping
-
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) -
hasSimilarBackgroundColor
-