Comments (6)
I add Turkish ISO-8859-9 detection support d0749bc
But I have a problem. If I leave this line 0.970290 it always detect ISO-8859-2. It's wrong detection.
debug:
$ chardetect divxplanet.srt
SHIFT_JIS prober hit error at byte 8
EUC-JP prober hit error at byte 9
EUC-KR prober hit error at byte 9
CP949 prober hit error at byte 9
EUC-TW prober hit error at byte 9
GB2312 prober hit error at byte 20
Big5 prober hit error at byte 20
windows-1251 confidence = 0.0754944175953
KOI8-R confidence = 0.0
ISO-8859-5 confidence = 0.412478438097
MacCyrillic confidence = 0.0789081955208
IBM866 confidence = 0.01
IBM855 confidence = 0.0
ISO-8859-7 confidence = 0.141775571572
windows-1253 confidence = 0.141775571572
ISO-8859-5 confidence = 0.253281202428
windows-1251 confidence = 0.0
ISO-8859-2 confidence = 0.877661831311
windows-1250 confidence = 0.877661831311
TIS-620 confidence = 0.01
ISO-8859-9 confidence = 0.636039383618
ISO-8859-8 confidence = 0.0
ISO-8859-8 confidence = 0.349085294633
ISO-8859-8 confidence = 0.349085294633
windows-1251 confidence = 0.0754944175953
KOI8-R confidence = 0.0
ISO-8859-5 confidence = 0.412478438097
MacCyrillic confidence = 0.0789081955208
IBM866 confidence = 0.01
IBM855 confidence = 0.0
ISO-8859-7 confidence = 0.141775571572
windows-1253 confidence = 0.141775571572
ISO-8859-5 confidence = 0.253281202428
windows-1251 confidence = 0.0
ISO-8859-2 confidence = 0.877661831311
windows-1250 confidence = 0.877661831311
TIS-620 confidence = 0.01
ISO-8859-9 confidence = 0.636039383618
ISO-8859-8 confidence = 0.0
ISO-8859-8 confidence = 0.349085294633
ISO-8859-8 confidence = 0.349085294633
divxplanet.srt: ISO-8859-2 with confidence 0.877661831311
But if I change that number on langturkishmodel.py to 0.670290 it detects correct.
debug:
$ chardetect divxplanet.srt
SHIFT_JIS prober hit error at byte 8
EUC-JP prober hit error at byte 9
EUC-KR prober hit error at byte 9
CP949 prober hit error at byte 9
EUC-TW prober hit error at byte 9
GB2312 prober hit error at byte 20
Big5 prober hit error at byte 20
windows-1251 confidence = 0.0754944175953
KOI8-R confidence = 0.0
ISO-8859-5 confidence = 0.412478438097
MacCyrillic confidence = 0.0789081955208
IBM866 confidence = 0.01
IBM855 confidence = 0.0
ISO-8859-7 confidence = 0.141775571572
windows-1253 confidence = 0.141775571572
ISO-8859-5 confidence = 0.253281202428
windows-1251 confidence = 0.0
ISO-8859-2 confidence = 0.877661831311
windows-1250 confidence = 0.877661831311
TIS-620 confidence = 0.01
ISO-8859-9 confidence = 0.92070992187
ISO-8859-8 confidence = 0.0
ISO-8859-8 confidence = 0.349085294633
ISO-8859-8 confidence = 0.349085294633
windows-1251 confidence = 0.0754944175953
KOI8-R confidence = 0.0
ISO-8859-5 confidence = 0.412478438097
MacCyrillic confidence = 0.0789081955208
IBM866 confidence = 0.01
IBM855 confidence = 0.0
ISO-8859-7 confidence = 0.141775571572
windows-1253 confidence = 0.141775571572
ISO-8859-5 confidence = 0.253281202428
windows-1251 confidence = 0.0
ISO-8859-2 confidence = 0.877661831311
windows-1250 confidence = 0.877661831311
TIS-620 confidence = 0.01
ISO-8859-9 confidence = 0.92070992187
ISO-8859-8 confidence = 0.0
ISO-8859-8 confidence = 0.349085294633
ISO-8859-8 confidence = 0.349085294633
divxplanet.srt: ISO-8859-9 with confidence 0.92070992187
I need some guidance about how can I do it correct Turkish detection.
I took Turkish code from cChardet: https://github.com/PyYoshi/cChardet/blob/master/src/ext/libcharsetdetect/mozilla/extensions/universalchardet/src/base/LangTurkishModel.cpp
from chardet.
I'm fairly new to the chardet team, so I'm not sure how everything works yet. That said, I think whatever you have to set that number to to get it to work is fine.
The more I look at cChardet, I think their system probably works better than chardet does. We'll have to see if there's more we can do to close the gap.
from chardet.
Thanks for feedback. What do you think? Do you want me to pull request or just wait a bit and see what going to be your direction?
from chardet.
Please submit a pull request. I think we can have this in the next release.
On Wed, Jan 22, 2014 at 3:12 PM, queeup [email protected] wrote:
Thanks for feedback. What do you think? Do you want me to pull request or
just wait a bit and see what going to be your direction?—
Reply to this email directly or view it on GitHubhttps://github.com//issues/20#issuecomment-33062534
.
from chardet.
Pull request submitted. #21
from chardet.
Fixed by #41.
from chardet.
Related Issues (20)
- Predicted encoding unable to decode given string HOT 2
- Not working for .DELTA file
- [Bug]Predicted encoding error
- detect encode wrong!
- Detect pep-0263
- test_detect_all_and_detect_one_should_agree fails on Python 3.11b3 HOT 4
- Dependency warning (v5.0.0) HOT 1
- chardet 5.0 KeyError with Python 3.10 on Windows HOT 5
- Is the license LGPL v2.1 or later or just LGPLv2.1 only? HOT 3
- Documentation licensed only to non-commercial and personal use found
- Documentation licensed only to non-commercial and personal use found HOT 1
- Allow running of the package via `python3 -m chardet ...` HOT 4
- Encoding error
- Next release for Python 3.11 HOT 1
- type annotation and implementation mismatch HOT 2
- How to use Chardet for this Python code, as to read files that have ANSI encoder?
- chardetect cli: UnicodeEncodeError when filename is not utf8
- wrong result. actual johab - expected latin1 HOT 4
- Failed to detect CP932 encoded file
- pip intall chardet
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 chardet.