Class DefaultHint

    • Constructor Detail

      • DefaultHint

        public DefaultHint​(String name,
                           float support)
    • Method Detail

      • getName

        public String getName()
      • setInline

        protected void setInline​(boolean inline)
      • setBlock

        protected void setBlock​(boolean block)
      • getSupport

        public float getSupport()
        Description copied from interface: PresentationHint
        The probability of the hint based on the analyzed page.
        Specified by:
        getSupport in interface PresentationHint
        Returns:
        the hint support 0.0 .. 1.0
      • extractBoxes

        public SourceBoxList extractBoxes​(Area a,
                                          SourceBoxList current,
                                          Set<Area> processed)
        Description copied from interface: PresentationHint
        Extracts boxes from the given area and/or modifies the already existing list of boxes (preprocessing). If some additional areas were processed, they should be added to the 'processed' set.
        Specified by:
        extractBoxes in interface PresentationHint
        Returns:
      • processOccurrences

        public List<TagOccurrence> processOccurrences​(BoxText boxText,
                                                      List<TagOccurrence> occurrences)
        Description copied from interface: PresentationHint
        Applies the hint to a list of occurences extracted from the given box text (postprocessing a list of occurences)
        Specified by:
        processOccurrences in interface PresentationHint
        Parameters:
        boxText - the source box text
        occurrences - the current list of occurrences
        Returns:
        the new list of occurrences
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object