Th3G33k

Results 18 comments of Th3G33k

@xenova Those changes are already in v3. This PR should be merge into main, or close until v3 arrives

As a workaround, you can: ```js cnchar.dict.spell.hng = '0:' cnchar.setSpell('哼', ['hng']) console.log(cnchar.spellToWord('hng')) ```

You can set the background color in the options. ```js // example cnchar.draw('我', { style: { backgroundColor: 'red' } }) ``` Full draw option list : https://github.com/theajack/cnchar/blob/ae958da35c00843bb0fdaf263cdb329bb9cf54ff/helper/README.md?plain=1#L336-L382

Thanks for the review. It is already separated in three parts. The third part starts from here : ```html ``` I was trying to add more useful tags.

We could also add custom pipelines directly to supported_task, if we removed the object freeze ```js const SUPPORTED_TASKS = Object.freeze({ ```

@xenova What do you think about this PR ? It would be similar to python transformers [register_pipeline](https://huggingface.co/docs/transformers/add_new_pipeline)

### Service worker ```html ``` ```js // sw-transformers.js if (self.document) { // main script navigator.serviceWorker?.register("sw-transformers.js"); } else { // service worker script self.addEventListener("fetch", (event) => { event.respondWith( (async () =>...

### Clear browser cache ```js async function clearBrowserCache() { return await caches.delete('transformers-cache'); } ``` [Scroll to top](https://github.com/xenova/transformers.js/issues/735#issue-2277011597)

### Node.js progress callback ```js const { pipeline } = await import('@xenova/transformers'); function progress_callback(args) { if (args.status != 'progress') return; let n = Math.floor(args.progress / 5); let str = '\r['...