An open API service indexing awesome lists of open source software.

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

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```
```javascript

export 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:**