Class Config


  • public class Config
    extends Object
    Segmenation algorithm configuration. This class allows to select the implementation of used algorithms.
    Author:
    burgetr
    • Field Detail

      • MAX_LINE_EM_SPACE

        public static final float MAX_LINE_EM_SPACE
        The maximal distance of two areas allowed within a single line (in 'em' units)
        See Also:
        Constant Field Values
      • SEPARATOR_WEIGHT_THRESHOLD

        public static final int SEPARATOR_WEIGHT_THRESHOLD
        The maximal difference of separator weights that are considered to be 'the same'
        See Also:
        Constant Field Values
      • CENTERING_THRESHOLD

        public static final double CENTERING_THRESHOLD
        Maximal difference between left and right margin to consider the area to be centered (percentage of the parent area width)
        See Also:
        Constant Field Values
      • FONT_SIZE_THRESHOLD

        public static final double FONT_SIZE_THRESHOLD
        The maximal visual difference that is consideres as 'the same style'
        See Also:
        Constant Field Values
      • FONT_WEIGHT_THRESHOLD

        public static final double FONT_WEIGHT_THRESHOLD
        See Also:
        Constant Field Values
      • TEXT_LUMINOSITY_THRESHOLD

        public static final double TEXT_LUMINOSITY_THRESHOLD
        See Also:
        Constant Field Values
      • CONSISTENT_LINE_STYLE

        public static final boolean CONSISTENT_LINE_STYLE
        Maintain the same style during the line detection
        See Also:
        Constant Field Values
      • TAG_PROBABILITY_THRESHOLD

        public static final double TAG_PROBABILITY_THRESHOLD
        Tag probability threshold for considering the tag. The tags with their probability below this threshold won't be considered at all.
        See Also:
        Constant Field Values
    • Constructor Detail

      • Config

        public Config()
    • Method Detail

      • createGroupAnalyzer

        public static GroupAnalyzer createGroupAnalyzer​(Area root)
        Creates a group analyzer for an area using the selected implementation.
        Parameters:
        root - the root area for separator detection
        Returns:
        the created group analyzer
      • createSeparators

        public static SeparatorSet createSeparators​(Area root)
        Creates the separators for an area using the selected algorithm
        Parameters:
        root - the root area
        Returns:
        the created separator set