Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chinese traineddata does not use ISO 639-3 code #28

Open
Blightbuster opened this issue Jan 14, 2022 · 7 comments
Open

Chinese traineddata does not use ISO 639-3 code #28

Blightbuster opened this issue Jan 14, 2022 · 7 comments

Comments

@Blightbuster
Copy link

The chinese models chi_sim, chi_sim_vert, chi_tra and chi_tra_vert use chi instead of zho which is the ISO 639-3 standard.

Since all other files are named according to this standard I dont see a reason why this should not be the case for chinese.

@zdenop
Copy link
Contributor

zdenop commented Jan 14, 2022

AFAIK chi is (also) valid code for Chinese:
https://www.w3.org/WAI/ER/IG/ert/iso639.htm
https://www.loc.gov/standards/iso639-2/php/code_list.php
https://iso639-3.sil.org/code/chi

Never rely on one source (especially if anybody can change it).

@Blightbuster
Copy link
Author

Blightbuster commented Jan 14, 2022

Here is the official site, I should have probably linked to that instead of wikipedia in the first place.

While yes, chi is also a valid code for chinese, it is the ISO 639-2/B code (as can also be seen on the official site which you also linked to).
All other languages use the ISO 639-3 codes however. For example Czech is ces.traineddata (ISO 639-3) and not cze.traineddata (ISO 639-2/B).

@stweil
Copy link
Contributor

stweil commented Jan 14, 2022

The Tesseract documentation is not clear about the question whether ISO 639-2 or ISO 639-3 is used:

doc/combine_lang_model.1.asc:   Tesseract uses 3-character ISO 639-2 language codes. (See LANGUAGES)
doc/tesseract.1.asc:  Tesseract uses 3-character ISO 639-2 language codes
include/tesseract/baseapi.h:   * The language is (usually) an ISO 639-3 string or nullptr will default to
src/api/baseapi.cpp: * The language is (usually) an ISO 639-3 string or nullptr will default to eng.

I don't mind fixing this and using ISO 639-3 everywhere, but would like to get more feedback here from people who are affected by a renaming of the models for Chinese.

@Blightbuster
Copy link
Author

Thats really unfortunate, that tesseract it self isnt even consistent with the used standard.
Note the (usually) 😆

@stweil
Copy link
Contributor

stweil commented Jan 14, 2022

There exist more ISO 639-3 codes for Chinese variants (at least cmn, yue, nan).

@Blightbuster
Copy link
Author

Yes those are for variants of the language although Id argue that the model is applicable for the macro language chinese hence zho fits best. Ofcause it would also be possible to have multiple models for individual chinese languages.

@stweil
Copy link
Contributor

stweil commented Feb 9, 2022

So the suggestion is that the OCR models starting with chi_ be renamed to zho_ instead.

Comments from Chinese users of Tesseract are welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants