Giter Site home page Giter Site logo

filter_with_english_letters about chardet HOT 5 CLOSED

chardet avatar chardet commented on June 12, 2024
filter_with_english_letters

from chardet.

Comments (5)

sigmavirus24 avatar sigmavirus24 commented on June 12, 2024

You're referring to filter_with_english_letters right? I'm surprised that function is doing anything when used from here. Could you expand on this?

from chardet.

rsnair2 avatar rsnair2 commented on June 12, 2024

Oh sorry, I should have been more specific. I was referring to the original implementation by Mozilla which can be found at cChardet as well: cChardet .

from chardet.

dan-blanchard avatar dan-blanchard commented on June 12, 2024

The implementation used by cChardet is not actually the current reference implementation anymore. I'm trying to target revision 207643 on the Mozilla Hg repository because that was the last version before they pulled out support for several older encodings. I've got a bit of a start on that in #42 .

from chardet.

dan-blanchard avatar dan-blanchard commented on June 12, 2024

I've now got this added to #42. It's currently a fairly literal C translation, but could probably be improved in places.

As I'm going over more of the upstream code, I'm becoming more and more convinced that we likely do not want to emulate the Mozilla implementation anymore when it comes to Western encodings. Like @rsnair2 said, filter_with_english_letters does some really bizarre HTML tag removal, but it's only used for Latin1Prober. I'm not sure it makes sense to apply to all documents, since there are plenty of non-XML/HTML documents that use < and > that will probably be thrown off by that filtering.

Another weird bit I've discovered in the current Mozilla code is that the Hungarian detectors are just commented out and unused. We don't have them commented out, and we frequently detect them instead of Windows-1252.

from chardet.

dan-blanchard avatar dan-blanchard commented on June 12, 2024

Fixed via #42.

from chardet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.