lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler (JIRA)" <>
Subject [jira] [Updated] (LUCENE-4220) Replace benchmarks crazy HTML parser by a nekohtml 10-liner
Date Sun, 15 Jul 2012 15:10:33 GMT


Uwe Schindler updated LUCENE-4220:

    Attachment: LUCENE-4220.patch

Path using NekoHTML.

The patch currently has a workaround for the Turkish Locale bug, because NekoHTML uses toLowerCase/toUpperCase
without locale to "normalize" element and attribute names (see []).
I opened NekoHTML bug: []

The patch mimics most of the behaviour of the old JavaCC based parser (but it does *not* lowercase
META element values, which is bogus. Keys are lowercased - with Locale).

I copied the old parser's test to the feeds package and added some additional tests for turkish
and some other types of invalid HTML like plain text or missing elements.
> Replace benchmarks crazy HTML parser by a nekohtml 10-liner
> -----------------------------------------------------------
>                 Key: LUCENE-4220
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: modules/benchmark
>    Affects Versions: 4.0-ALPHA
>            Reporter: Uwe Schindler
>             Fix For: 4.0, 5.0
>         Attachments: LUCENE-4220.patch
> Benchmark contains a javacc-based HTML parser which of course violates all specs, is
huge and error prone.
> I can replace it by a NEKOHTML based one (approx 10 - 20 lines of code). NEKOHTML is
an extension for XERCES (that we already use to read wikipedia), that produces SAX-events
or DOM tree out of a HTML file usingg standard XML APIS. We could also use TIKA, but I refuse
to download the Internet to get TIKA running for just parsing a HTML file.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message