Class SimpleHTMLFormatter

  • All Implemented Interfaces:

    public class SimpleHTMLFormatter
    extends Object
    implements Formatter
    Simple Formatter implementation to highlight terms with a pre and post tag.
    • Constructor Detail

      • SimpleHTMLFormatter

        public SimpleHTMLFormatter​(String preTag,
                                   String postTag)
      • SimpleHTMLFormatter

        public SimpleHTMLFormatter()
        Default constructor uses HTML: <B> tags to markup terms.
    • Method Detail

      • highlightTerm

        public String highlightTerm​(String originalText,
                                    TokenGroup tokenGroup)
        Specified by:
        highlightTerm in interface Formatter
        originalText - The section of text being considered for markup
        tokenGroup - contains one or several overlapping Tokens along with their scores and positions.