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

Legacy code/data not being automatically downloaded when oem set to 2 #938

Closed
Balearica opened this issue Jul 27, 2024 · 0 comments · Fixed by #943
Closed

Legacy code/data not being automatically downloaded when oem set to 2 #938

Balearica opened this issue Jul 27, 2024 · 0 comments · Fixed by #943

Comments

@Balearica
Copy link
Member

When oem is set to 2 (LSTM + Legacy fallback) within createWorker, the Legacy data should be automatically downloaded if it has not already been downloaded. However, this does not appear to be happening at present. Unless the user already has this data downloaded and cached, or forces it to be downloaded using options, using oem mode 2 results in an error. See motivating example below.

#859 (comment)

For users who experience this issue before it is patched, it can be easily resolved by forcing the Legacy code/data to be downloaded by setting the options legacyCore and legacyLang both to true.

const worker = await Tesseract.createWorker("eng", 2, {legacyCore: true, legacyLang: true});
Balearica added a commit that referenced this issue Aug 24, 2024
Balearica added a commit that referenced this issue Aug 24, 2024
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

Successfully merging a pull request may close this issue.

1 participant