Uploaded image for project: 'Apache Any23 (Retired)'
  1. Apache Any23 (Retired)
  2. ANY23-443

Improve efficiency of RDFa Extractor

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.4
    • None
    • None

    Description

      Our RDFa Extractor is terribly inefficient.

      1st, we parse the html "tag soup" input stream into a DOM using Jsoup
      2nd, we transform the DOM back into an input stream, containing strictly valid XML to avoid errors in the underlying semargl parser
      3rd, the underlying semargl parser resurrects this input stream as XML and hands off XML streaming events to its underlying XmlSink.
      4th, semargl's XmlSink hands its own RDF events back to RDF4J, which in turn hands them back to Any23.

      I propose cutting out all these intermediate steps by simply walking the original jsoup DOM and handing our own XML events directly to semargl's XmlSink, which we will configure to give RDF events directly back to Any23.

      This will also allow us to get rid of most (or possibly all) of the various HTML-to-XML "fixups" we had to implement to prevent extraction failures.


      TL;DR:

      Jsoup → InputStream → RDF4J → XMLReader → RdfaParser → RDF4J → Any23

      becomes

      Jsoup → RdfaParser → Any23

      Attachments

        Issue Links

          Activity

            People

              hansbrende Hans Brende
              hansbrende Hans Brende
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2h 10m
                  2h 10m