Package cz.vutbr.fit.layout.text.chunks
Interface PresentationHint
-
- All Known Implementing Classes:
DefaultHint,HintForceResolved,HintInLine,HintMultiBox,HintSeparator,HintWholeBox
public interface PresentationHintA hint that influences the chunk extraction in different points of the chunk extraction phases as defined by thePresentationBasedChunksSource.- Author:
- burgetr
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SourceBoxListextractBoxes(Area a, SourceBoxList current, Set<Area> processed)Extracts boxes from the given area and/or modifies the already existing list of boxes (preprocessing).floatgetSupport()The probability of the hint based on the analyzed page.booleanimpliesBlock()Does the hint imply that the area has block layout?booleanimpliesInline()Does the hint imply that the area has inline layout?List<TextChunk>postprocessChunks(List<TextChunk> chunks)Applies the hint to the current list of chunks (postprocessing the whole list)List<TextChunk>processChunks(Area src, List<TextChunk> chunks)Applies the hint to the list of chunks for the given area (postprocessing a list for a given area)List<TagOccurrence>processOccurrences(BoxText boxText, List<TagOccurrence> occurrences)Applies the hint to a list of occurences extracted from the given box text (postprocessing a list of occurences)
-
-
-
Method Detail
-
impliesBlock
boolean impliesBlock()
Does the hint imply that the area has block layout?- Returns:
-
impliesInline
boolean impliesInline()
Does the hint imply that the area has inline layout?- Returns:
-
getSupport
float getSupport()
The probability of the hint based on the analyzed page.- Returns:
- the hint support 0.0 .. 1.0
-
extractBoxes
SourceBoxList extractBoxes(Area a, SourceBoxList current, Set<Area> processed)
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.- Parameters:
a-current-processed-- Returns:
-
processOccurrences
List<TagOccurrence> processOccurrences(BoxText boxText, List<TagOccurrence> occurrences)
Applies the hint to a list of occurences extracted from the given box text (postprocessing a list of occurences)- Parameters:
boxText- the source box textoccurrences- the current list of occurrences- Returns:
- the new list of occurrences
-
processChunks
List<TextChunk> processChunks(Area src, List<TextChunk> chunks)
Applies the hint to the list of chunks for the given area (postprocessing a list for a given area)- Parameters:
src-chunks-- Returns:
-
-