service

package
v0.0.0-...-67d91c4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 2, 2022 License: MIT Imports: 32 Imported by: 0

Documentation

Overview

宿主机 需要安装 tesseract

#显示安装的语言包 tesseract --list-langs

#显示帮助 tesseract --help tesseract --help-extra tesseract --version

https://tesseract-ocr.github.io/tessdoc/Data-Files.html 下载词典

## 字体库

字体库 (tessdata_best) : 基于LSTM引擎的训练数据,最佳最准确的 https://github.com/tesseract-ocr/tessdata_best

字体库 (tessdata) : 支持双引擎(LSTM和传统引擎),但LSTM训练数据不是最新的版本 https://github.com/tesseract-ocr/tessdata

字体库(tessdata_fast) : 基于LSTM引擎的训练数据,快速(精简)版本 https://github.com/tesseract-ocr/tessdata_fast

总结 : 推荐使用tessdata_best,虽然识别速度相对于tessdata_fast稍慢,但是准确率可以保证

Index

Constants

View Source
const (
	CBC = "CBC"
	ECB = "ECB"
	CFB = "CFB"
	CTR = "CTR"
)

Variables

This section is empty.

Functions

func Conversion

func Conversion(file multipart.File, handler *multipart.FileHeader, target string) (string, error)

func GetOCRLanguages

func GetOCRLanguages() ([]string, error)

func GetOCRVersion

func GetOCRVersion() string

func HmacMD5

func HmacMD5(str, key string) string

HmacMD5

func HmacSHA1

func HmacSHA1(str, key string) string

HmacSHA1

func HmacSHA256

func HmacSHA256(str, key string) string

HmacSHA256

func HmacSHA512

func HmacSHA512(str, key string) string

HmacSHA512

func Huihua

func Huihua(imgData []byte) []byte

func JieBa

func JieBa(str string, jieBaType int) []interface{}

[jieBaType]

		1: 全模式
		2: 精确模式
		3: 搜索引擎模式
		4: 词性标注
     5: Tokenize 搜索引擎模式
     6: Tokenize 默认模式
     7: Extract

func MarkdownToHTML

func MarkdownToHTML(md string) string

func OCR

func OCR(imgData []byte, lang string) (string, error)

func PBKDF2

func PBKDF2(str, salt []byte, iterations, keySize int) []byte

PBKDF2

Types

type AES

type AES interface {
	Encrypt(str, key []byte) ([]byte, error)
	Decrypt(str, key []byte) ([]byte, error)
}

func NewAES

func NewAES(typeName string, arg ...[]byte) AES

NewAES : use NewAES(AES_CBC)

type DES

type DES interface {
	Encrypt(str, key []byte) ([]byte, error)
	Decrypt(str, key []byte) ([]byte, error)
}

func NewDES

func NewDES(typeName string, arg ...[]byte) DES

NewAES

Directories

Path Synopsis
Package pdf implements reading of PDF files.
Package pdf implements reading of PDF files.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL