Documentation ¶
Index ¶
- func CopyMap(from map[string]string) map[string]string
- func GetJpegDirPath(sessionDirPath string) string
- func GetMaskDirPath(sessionDirPath string) string
- func GetZipDirPath(sessionDirPath string) string
- func IsSessionFile(fileName string) bool
- func MakeFlow(config Config) *flow.Flow
- func RunFlow(flow *flow.Flow, workers int, sessionDir, sourceFileName string, ...) error
- func RunFlowOnce(config Config, sessionDir, sourceFileName string, ocr OcrEngineType, ...) error
- func ZipImagesFromDir(dirpath string) error
- type AnalyzeSpec
- type Config
- type Feature
- type NerEngineType
- type OcrEngineType
- type Text
- type TextDetectionConfig
- type YandexOCRRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetJpegDirPath ¶
func GetMaskDirPath ¶
func GetZipDirPath ¶
func IsSessionFile ¶
func RunFlow ¶
func RunFlow(flow *flow.Flow, workers int, sessionDir, sourceFileName string, ocr OcrEngineType, ner NerEngineType) error
func RunFlowOnce ¶
func RunFlowOnce(config Config, sessionDir, sourceFileName string, ocr OcrEngineType, ner NerEngineType) error
func ZipImagesFromDir ¶
Types ¶
type AnalyzeSpec ¶
type Feature ¶
type Feature struct { Type string `json:"type"` TextDetectionConfig TextDetectionConfig `json:"text_detection_config"` }
type NerEngineType ¶
type NerEngineType string
var ( StanzaNER NerEngineType = "ner-stanza" HFLabsNER NerEngineType = "ner-miron" CombineNER NerEngineType = "ner-combination" CombineNERWithDicts NerEngineType = "ner-combination-dicts" )
func NerEngineFromString ¶
func NerEngineFromString(in string) NerEngineType
type OcrEngineType ¶
type OcrEngineType string
var ( YandexOCR OcrEngineType = "ocr-yandex" TesseractOCR OcrEngineType = "ocr-tesseract" TesseractPyOCR OcrEngineType = "ocr-tesseract-py" EasyocrOCR OcrEngineType = "ocr-easyocr" )
func OcrEngineFromString ¶
func OcrEngineFromString(in string) OcrEngineType
type Text ¶
type Text struct { Results []struct { Results []struct { TextDetection struct { Pages []struct { Blocks []struct { BoundingBox struct { Vertices []struct { X string `json:"x"` Y string `json:"y"` } `json:"vertices"` } `json:"boundingBox"` Lines []struct { BoundingBox struct { Vertices []struct { X string `json:"x"` Y string `json:"y"` } `json:"vertices"` } `json:"boundingBox"` Words []struct { BoundingBox struct { Vertices []struct { X string `json:"x"` Y string `json:"y"` } `json:"vertices"` } `json:"boundingBox"` Languages []struct { LanguageCode string `json:"languageCode"` Confidence float64 `json:"confidence"` } `json:"languages"` Text string `json:"text"` Confidence float64 `json:"confidence"` EntityIndex string `json:"entityIndex"` } `json:"words"` Confidence float64 `json:"confidence"` } `json:"lines"` } `json:"blocks"` Width string `json:"width"` Height string `json:"height"` } `json:"pages"` } `json:"textDetection"` } `json:"results"` } `json:"results"` }
type TextDetectionConfig ¶
type TextDetectionConfig struct {
LanguageCodes []string `json:"language_codes"`
}
type YandexOCRRequest ¶
type YandexOCRRequest struct { FolderID string `json:"folderId"` AnalyzeSpecs []AnalyzeSpec `json:"analyze_specs"` }
Click to show internal directories.
Click to hide internal directories.