Class SearchExtractor

  • All Implemented Interfaces:
    Extractor

    public class SearchExtractor
    extends Object
    implements Extractor
    An Extractor implementation that searches for a given search text in the document.
    • Constructor Detail

      • SearchExtractor

        public SearchExtractor​(@NonNull
                               @NonNull String searchText,
                               boolean caseSensitive,
                               boolean fuzzyMatch)
        Instantiates a new SearchExtractor.
        Parameters:
        searchText - the text to search for
        caseSensitive - True - must match case, False - case does not matter
        fuzzyMatch - True - allow sub-word matching (i.e. "is" will be matched in "This"), False must match full spans of text.
    • Method Detail

      • extract

        public Extraction extract​(@NonNull
                                  @NonNull HString hString)
        Description copied from interface: Extractor
        Generate an Extraction from the given HString.
        Specified by:
        extract in interface Extractor
        Parameters:
        hString - the source text from which we will generate an Extraction
        Returns:
        the Extraction