https://github.com/isekaimaou1109/vue-tesseract
Convert Image-to-Text in vueJS Using Tesseract
https://github.com/isekaimaou1109/vue-tesseract
Last synced: 2 months ago
JSON representation
Convert Image-to-Text in vueJS Using Tesseract
- Host: GitHub
- URL: https://github.com/isekaimaou1109/vue-tesseract
- Owner: isekaimaou1109
- Created: 2023-01-20T13:12:15.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-23T15:59:57.000Z (over 2 years ago)
- Last Synced: 2025-02-21T22:38:28.272Z (3 months ago)
- Language: JavaScript
- Size: 204 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# **A Vue Package for Image-To-Text Using Tesseract.js** #
## **Description:** ##
This package can be used as Component or Plugin, that is also a wrapper for tesseract.js## **Note**: ##
I've tested in VueJS 2. That was okay after all.## **Usage:** ##
> __Case 1__: ```Used as Component```
```javascriptexport default {
name: "HelloWorldComponent",
props: {
msg: {
type: String
}
},
data: () => ({
example: {
url: 'https://tesseract.projectnaptha.com/img/eng_bw.png',
lang: 'eng'
},
testData: null
}),
methods: {
logger: m => console.log(m),
async demo(cb) {
const res = (await cb(this.example.url, this.example.lang, this.logger)).data
this.testData = res
}
}
}
Click on Me!
{{ testData?.text }}
```
> __Case 2__: ```Used as Plugin```
```javascript
import Vue from 'vue'import App from './App.vue'
import router from './router'
import { TesseractPlugin } from 'vue-tesseracts'Vue.use(TesseractPlugin)
new Vue({
router,
render: (h) => h(App)
}).$mount('#app')
```**Hopefully this will help you. If you like, you can give a like. Thank you. :heart:**