How do i use my own/custom chi_sim.traineddata
?
#908
-
Node 20, Next How do i use this traineddata? where should it go? the docs is too brief about using custom .traineddata files. Can i upload it remotely and pass a url or should i store it in my project and import it? I generally have very blurred understanding of what's going on in this config even after reading the docs const worker = await createWorker('chi_sim', 1, {
langPath: '', // ?
dataPath: '', // ?
}) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
For Node.js only (not browser), you can point Tesseract.js to a file on your local file system. You would (1) set For example, if the path to one of your files is const worker = await createWorker("chi_sim", 1, {
langPath: './custom_data',
gzip: false,
}); |
Beta Was this translation helpful? Give feedback.
For Node.js only (not browser), you can point Tesseract.js to a file on your local file system. You would (1) set
langPath
to the directory that contains the.traineddata
files and (2) set thegzip
argument tofalse
to tell Tesseract.js to look for.traineddata
files rather than.traineddata.gz
files.For example, if the path to one of your files is
./custom_data/chi_sim.traineddata
, you could set the following arguments.