[ 
https://issues.apache.org/jira/browse/TIKA-2038?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16698539#comment-16698539
 ] 

Hans Brende commented on TIKA-2038:
-----------------------------------

The success of this IUST implementation (even if based on "mis"-using jchardet) 
makes perfect sense to me though: UTF-8 currently makes up over 92% of the web. 
Therefore, UTF-8 *should* be biased towards false positives, as that will 
result in an average increase in accuracy, whereas, if anything other than 
UTF-8 is biased towards false positives, that is practically guaranteed to 
decrease overall accuracy.

IMHO, the absence of indicators that data is not UTF-8 encoded should be 
sufficient indication that it is. (And IUST's success seems to support this 
notion.) This probably wasn't the case even 5 years ago, but today, the only 
way to make encoding detectors more accurate is to first identify the best 
indicators that data is *not* UTF-8 encoded, and only *then* to fall back to 
other non-UTF-8 detection algorithms.

> A more accurate facility for detecting Charset Encoding of HTML documents
> -------------------------------------------------------------------------
>
>                 Key: TIKA-2038
>                 URL: https://issues.apache.org/jira/browse/TIKA-2038
>             Project: Tika
>          Issue Type: Improvement
>          Components: core, detector
>            Reporter: Shabanali Faghani
>            Priority: Minor
>         Attachments: comparisons_20160803b.xlsx, comparisons_20160804.xlsx, 
> iust_encodings.zip, lang-wise-eval_results.zip, lang-wise-eval_runnable.zip, 
> lang-wise-eval_source_code.zip, proposedTLDSampling.csv, 
> tika_1_14-SNAPSHOT_encoding_detector.zip, tld_text_html.xlsx, 
> tld_text_html_plus_H_column.xlsx
>
>
> Currently, Tika uses icu4j for detecting charset encoding of HTML documents 
> as well as the other naturally text documents. But the accuracy of encoding 
> detector tools, including icu4j, in dealing with the HTML documents is 
> meaningfully less than from which the other text documents. Hence, in our 
> project I developed a library that works pretty well for HTML documents, 
> which is available here: https://github.com/shabanali-faghani/IUST-HTMLCharDet
> Since Tika is widely used with and within some of other Apache stuffs such as 
> Nutch, Lucene, Solr, etc. and these projects are strongly in connection with 
> the HTML documents, it seems that having such an facility in Tika also will 
> help them to become more accurate.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to