Skip to content

How do i use my own/custom chi_sim.traineddata? #908

Closed Answered by Balearica
piscopancer asked this question in Q&A
Discussion options

You must be logged in to vote

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 the gzip argument to false 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.

  const worker = await createWorker("chi_sim", 1, {
    langPath: './custom_data',
    gzip: false,
  });  

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@piscopancer
Comment options

Answer selected by Balearica
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants