-
Notifications
You must be signed in to change notification settings - Fork 225
/
swagger.yml
108 lines (105 loc) · 2.64 KB
/
swagger.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
---
swagger: '2.0'
info:
version: 1.0.0
title: OpenOCR
description: OpenOCR is a wrapper around Tesseract easily deployable as a service
contact:
name: Traun Leyden
email: [email protected]
license:
name: Apache2 License
schemes:
- http
basePath: /
paths:
/ocr:
post:
produces:
- application/json
parameters:
- in: body
name: body
description: Pass image url and other info to decode image to text via OCR
required: true
schema:
$ref: "#/definitions/DecodeOCR"
responses:
200:
description: OK
definitions:
DecodeOCR:
type: object
description: OCR processing request to convert an image into text
properties:
img_url:
type: string
description: The URL of the image to process.
engine:
type: string
description: The OCR engine to use
enum:
- tesseract
- go_tesseract
- mock
inplace_decode:
type: boolean
description: If true, will attempt to do ocr decode in-place rather than queuing a message on RabbitMQ for worker processing. Useful for local testing, not recommended for production.
engine_args:
type: object
description: The OCR engine arguments to pass (engine-specific)
properties:
config_vars:
type: string
description: Config vars - equivalent of -c args to tesseract
psm:
type: string
description: Page Segment Mode, equivalent of -psm arg to tesseract. To use default, omit this field from the JSON.
enum:
- 0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
lang:
type: string
description: The language to use. If omitted, will use English
enum:
- eng
- ara
- bel
- ben
- bul
- ces
- dan
- deu
- ell
- fin
- fra
- heb
- hin
- ind
- isl
- ita
- jpn
- kor
- nld
- nor
- pol
- por
- ron
- rus
- spa
- swe
- tha
- tur
- ukr
- vie
- chi-sim
- chi-tra