Comments (1)
No uchardet is made to detect correctly coded files. I don't think that it should be its role to detect broken encodings. Actually even if just considering the cases of single corruption (not reopened again and again with other encodings), we would get nb-of-encoding*nb-of-encoding cases.
Just for this reason, I would reject the feature request. uchardet should remain as simple as possible in its use cases. I am thinking about adding language detection since the algorithm is already doing it anyway (so we are already half the way), but that's about it.
Finally I am not even sure how feasible this would be with statistical algorithms. It would require generating statistics about every couple of encoding with datasets of files decoded by error in this given couple (actually even a 3-tuple because language matters), so that we get statistics data of characters and character sequences. Well not sure where to get this data reliably so we'd have to basically build it ourselves. That's a lot of work (that's already a lot of work to make data for every (lang, charset), now we'd have to get it for every (lang, charset1, charset2)?) for a very uncertain result.
So I'm thinking that uchardet algorithm is very efficient for charset detection, but I'm not sure how efficient it would be in charset decoding error detection. I guess someone would have to try. But it may turn out that another algorithm would be a better suit.
So thanks for the proposition, but I will close this feature request now.
from uchardet.
Related Issues (20)
- Windows-1251 detection failed on a file in Russian. HOT 1
- Invalid WINDOWS-1255 file detected as WINDOWS-1255 HOT 10
- PACKAGE_NAME opencc??? HOT 1
- Add a dbus service HOT 1
- Transferring to uchardet organization? HOT 17
- GB18030 file detected as WINDOWS-1252 HOT 6
- Can't detect GBK. HOT 2
- Next release HOT 4
- WINDOWS-1253 file detected as ISO-8859-7 HOT 10
- Possibly incomplete project license HOT 2
- LangModels refs error HOT 21
- Cast unsigned int HOT 1
- The code make me egg pain. HOT 1
- Can this code be used to make a Windows DLL? How? HOT 6
- UTF-8 with right single quote (U+2019) mistaken as Windows-1250 HOT 2
- lower case german umlauts in utf-8 are detected incorrectly HOT 1
- uchardet wrongly determines the text as WINDOWS-1252 HOT 2
- Make a portable executable
- libuchardet-ios.a能不能支持下iOS Simulator~~~~ HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from uchardet.