pacman -S mingw-w64-x86_64-toolchain
make -f Make_ming.mak ARCH=x86-64 OPTIMIZE=MAXSPEED STATIC_STDCPLUS=yes FEATURES=HUGE GUI=no
| var request = require('request'); | |
| app.use('/api', function(req, res) { | |
| var url = apiUrl + req.url; | |
| req.pipe(request(url)).pipe(res); | |
| }); |
pacman -S mingw-w64-x86_64-toolchain
make -f Make_ming.mak ARCH=x86-64 OPTIMIZE=MAXSPEED STATIC_STDCPLUS=yes FEATURES=HUGE GUI=no
Show dependenceis
$ ./gradlew -q dependencies
# or
$ ./gradlew -q :projectName:dependencies
| // Typical usage of tesseract.js | |
| const { TesseractWorker } = Tesseract; | |
| const worker = new TesseractWorker(); | |
| const image = 'https://tesseract.projectnaptha.com/img/eng_bw.png'; | |
| worker.recognize(image) | |
| .then(({ text }) => { | |
| console.log(text); | |
| }); |
| // tesseract.js@^2.0.0-beta.1 | |
| const { createWorker } = require('tesseract.js'); | |
| const image = 'https://tesseract.projectnaptha.com/img/eng_bw.png'; | |
| const worker = createWorker(); | |
| (async ()=> { | |
| await worker.load(); | |
| await worker.loadLanguage('eng'); | |
| await worker.initialize('eng'); | |
| const { data: { text } } = await worker.recognize(image); | |
| console.log(text); |
| const { createWorker } = require('tesseract.js'); | |
| const image = 'https://tesseract.projectnaptha.com/img/eng_bw.png'; | |
| const worker = createWorker(); | |
| let isReady = false; | |
| // Called as early as possible | |
| (async ()=> { | |
| await worker.load(); | |
| await worker.loadLanguage('eng'); | |
| await worker.initialize('eng'); | |
| isReady = true; |
| const { createWorker, createScheduler } = require('tesseract.js'); | |
| const image = 'https://tesseract.projectnaptha.com/img/eng_bw.png'; | |
| const scheduler = createScheduler(); | |
| (async () => { | |
| for (let i = 0; i < 4; i++) { | |
| const w = createWorker(); | |
| await w.load(); | |
| await w.loadLanguage('eng'); |
| <html> | |
| <head> | |
| <script src='https://unpkg.com/[email protected]/dist/tesseract.min.js'></script> | |
| </head> | |
| <body> | |
| <button id="recBtn">Recognize</button> | |
| <script> | |
| const recognize = async () => { | |
| const { createWorker } = Tesseract; | |
| const worker = createWorker({ |
| #!/bin/bash | |
| NPROC=$(grep -c ^processor /proc/cpuinfo) | |
| BUILD_DIR=$PWD/build | |
| apt-get update && apt-get install -y autoconf libtool | |
| mkdir third_party | |
| git submodule add [email protected]:dbry/WavPack.git third_party/WavPack |