Uploaded image for project: 'Tika'
  1. Tika
  2. TIKA-564

Support returning original markup in BoilerpipeContentHandler

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.8
    • 0.9
    • parser
    • None

    Description

      Currently the BoilerpipeContentHandler emits all non-boilerplate text (as defined by Boilerpipe) as a series of <p>xxx</p> text blocks, without any markup.

      But if you need to find URLs in these blocks, or section headers, then the original markup has to be preserved.

      Unfortunately Boilerpipe currently assumes that you have the ability to replay the input stream, and parse it a second time to match up text with what's been extracted (e.g. see HTMLHighlighter), but with Tika that's not easy to do - the interface is a ContentHandler, so you don't have the original inputstream to spool out.

      Instead I plan to record the minimum SAX events, and replay those.

      Attachments

        1. TIKA-564.patch
          14 kB
          Kenneth William Krugler

        Activity

          People

            kkrugler Kenneth William Krugler
            kkrugler Kenneth William Krugler
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: