Tesseract-OCR command wrapper for Golang
package main
import (
"fmt"
"github.com/otiai10/gosseract"
)
func main() {
// This is the simlest way :)
out := gosseract.Must(gosseract.Params{
Src: "your/img/file.png",
Languages: "eng+heb",
})
fmt.Println(out)
// Using client
client, _ := gosseract.NewClient()
out, _ = client.Src("your/img/file.png").Out()
fmt.Println(out)
}
ocrserver: the minimum OCR server with using gosseract.
- install tesseract-ocr
- install go
- install gosseract
go get github.com/otiai10/gosseract
- install mint for testing
go get github.com/otiai10/mint
- run the tests at first↓
go test ./...
- tesseract-ocr#3.02~
- mint to simplize tests