tencentcloud-sdk-ocr 3.0.1138 → 3.0.1139
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/VERSION +1 -1
- data/lib/v20181119/client.rb +48 -0
- data/lib/v20181119/models.rb +154 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c3d71209ba7087abe1eb8122912864fa927703b
|
4
|
+
data.tar.gz: 5103b1563cd68c7066d3cc0dcc212dd86c9200e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f46dc29ba7045de44c24438089cc5497d2f1bf0638a0f0fd5489c4ea7a97ff5ba562b0194a543ecc95d1b6e040554460a4b8b13a55d29181ad6e6b8e70aa114
|
7
|
+
data.tar.gz: 6fdd5686edcb4a7497476c21bd9e6a8d9a2554fbfce08d7cec951a806575ad2a6d4d48b1ecf83d943ff3e5f2a66660a69b62ad3720e7b88f849684011119b2d5
|
data/lib/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.0.
|
1
|
+
3.0.1139
|
data/lib/v20181119/client.rb
CHANGED
@@ -291,6 +291,30 @@ module TencentCloud
|
|
291
291
|
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
292
292
|
end
|
293
293
|
|
294
|
+
# 用于查询文档处理任务。文档处理领域里常见的通用Agent 如抽取、比对之类的,目前我们提供的抽取,但未来可以根据实际情况和客户需求扩展。
|
295
|
+
|
296
|
+
# @param request: Request instance for DescribeExtractDocAgentJob.
|
297
|
+
# @type request: :class:`Tencentcloud::ocr::V20181119::DescribeExtractDocAgentJobRequest`
|
298
|
+
# @rtype: :class:`Tencentcloud::ocr::V20181119::DescribeExtractDocAgentJobResponse`
|
299
|
+
def DescribeExtractDocAgentJob(request)
|
300
|
+
body = send_request('DescribeExtractDocAgentJob', request.serialize)
|
301
|
+
response = JSON.parse(body)
|
302
|
+
if response['Response'].key?('Error') == false
|
303
|
+
model = DescribeExtractDocAgentJobResponse.new
|
304
|
+
model.deserialize(response['Response'])
|
305
|
+
model
|
306
|
+
else
|
307
|
+
code = response['Response']['Error']['Code']
|
308
|
+
message = response['Response']['Error']['Message']
|
309
|
+
reqid = response['Response']['RequestId']
|
310
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
311
|
+
end
|
312
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
313
|
+
raise e
|
314
|
+
rescue StandardError => e
|
315
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
316
|
+
end
|
317
|
+
|
294
318
|
# 本接口支持驾驶证主页和副页所有字段的自动定位与识别,重点字段的识别准确度达到99%以上。
|
295
319
|
|
296
320
|
# 驾驶证主页:包括证号、姓名、性别、国籍、住址、出生日期、初次领证日期、准驾车型、有效期限、发证单位
|
@@ -2456,6 +2480,30 @@ module TencentCloud
|
|
2456
2480
|
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
2457
2481
|
end
|
2458
2482
|
|
2483
|
+
# 文档处理领域里常见的通用Agent 如抽取、比对之类的,目前我们提供的抽取,但未来可以根据实际情况和客户需求扩展。
|
2484
|
+
|
2485
|
+
# @param request: Request instance for SubmitExtractDocAgentJob.
|
2486
|
+
# @type request: :class:`Tencentcloud::ocr::V20181119::SubmitExtractDocAgentJobRequest`
|
2487
|
+
# @rtype: :class:`Tencentcloud::ocr::V20181119::SubmitExtractDocAgentJobResponse`
|
2488
|
+
def SubmitExtractDocAgentJob(request)
|
2489
|
+
body = send_request('SubmitExtractDocAgentJob', request.serialize)
|
2490
|
+
response = JSON.parse(body)
|
2491
|
+
if response['Response'].key?('Error') == false
|
2492
|
+
model = SubmitExtractDocAgentJobResponse.new
|
2493
|
+
model.deserialize(response['Response'])
|
2494
|
+
model
|
2495
|
+
else
|
2496
|
+
code = response['Response']['Error']['Code']
|
2497
|
+
message = response['Response']['Error']['Message']
|
2498
|
+
reqid = response['Response']['RequestId']
|
2499
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
2500
|
+
end
|
2501
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
2502
|
+
raise e
|
2503
|
+
rescue StandardError => e
|
2504
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
2505
|
+
end
|
2506
|
+
|
2459
2507
|
# <b>此接口为表格识别的旧版本服务,不再进行服务升级,建议您使用识别能力更强、服务性能更优的<a href="https://cloud.tencent.com/document/product/866/49525">新版表格识别</a>。</b>
|
2460
2508
|
|
2461
2509
|
# 本接口支持图片内表格文档的检测和识别,返回每个单元格的文字内容,支持将识别结果保存为 Excel 格式。
|
data/lib/v20181119/models.rb
CHANGED
@@ -1639,6 +1639,69 @@ module TencentCloud
|
|
1639
1639
|
end
|
1640
1640
|
end
|
1641
1641
|
|
1642
|
+
# DescribeExtractDocAgentJob请求参数结构体
|
1643
|
+
class DescribeExtractDocAgentJobRequest < TencentCloud::Common::AbstractModel
|
1644
|
+
# @param JobId: 任务唯一ID。由服务端生成。
|
1645
|
+
# @type JobId: String
|
1646
|
+
|
1647
|
+
attr_accessor :JobId
|
1648
|
+
|
1649
|
+
def initialize(jobid=nil)
|
1650
|
+
@JobId = jobid
|
1651
|
+
end
|
1652
|
+
|
1653
|
+
def deserialize(params)
|
1654
|
+
@JobId = params['JobId']
|
1655
|
+
end
|
1656
|
+
end
|
1657
|
+
|
1658
|
+
# DescribeExtractDocAgentJob返回参数结构体
|
1659
|
+
class DescribeExtractDocAgentJobResponse < TencentCloud::Common::AbstractModel
|
1660
|
+
# @param Angle: 图片旋转角度(角度制),文本的水平方向为 0;顺时针为正,逆时针为负。
|
1661
|
+
# @type Angle: Float
|
1662
|
+
# @param StructuralList: 配置结构化文本信息。
|
1663
|
+
# @type StructuralList: Array
|
1664
|
+
# @param ErrorCode: 任务执行错误码。当任务状态不为 FAIL 时,该值为""。
|
1665
|
+
# @type ErrorCode: String
|
1666
|
+
# @param ErrorMessage: 任务执行错误信息。当任务状态不为 FAIL 时,该值为""。
|
1667
|
+
# @type ErrorMessage: String
|
1668
|
+
# @param JobStatus: 任务状态。WAIT:等待中,RUN:执行中,FAIL:任务失败,DONE:任务成功
|
1669
|
+
# @type JobStatus: String
|
1670
|
+
# @param ThoughtContent: 思考过程
|
1671
|
+
# @type ThoughtContent: String
|
1672
|
+
# @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
1673
|
+
# @type RequestId: String
|
1674
|
+
|
1675
|
+
attr_accessor :Angle, :StructuralList, :ErrorCode, :ErrorMessage, :JobStatus, :ThoughtContent, :RequestId
|
1676
|
+
|
1677
|
+
def initialize(angle=nil, structurallist=nil, errorcode=nil, errormessage=nil, jobstatus=nil, thoughtcontent=nil, requestid=nil)
|
1678
|
+
@Angle = angle
|
1679
|
+
@StructuralList = structurallist
|
1680
|
+
@ErrorCode = errorcode
|
1681
|
+
@ErrorMessage = errormessage
|
1682
|
+
@JobStatus = jobstatus
|
1683
|
+
@ThoughtContent = thoughtcontent
|
1684
|
+
@RequestId = requestid
|
1685
|
+
end
|
1686
|
+
|
1687
|
+
def deserialize(params)
|
1688
|
+
@Angle = params['Angle']
|
1689
|
+
unless params['StructuralList'].nil?
|
1690
|
+
@StructuralList = []
|
1691
|
+
params['StructuralList'].each do |i|
|
1692
|
+
groupinfo_tmp = GroupInfo.new
|
1693
|
+
groupinfo_tmp.deserialize(i)
|
1694
|
+
@StructuralList << groupinfo_tmp
|
1695
|
+
end
|
1696
|
+
end
|
1697
|
+
@ErrorCode = params['ErrorCode']
|
1698
|
+
@ErrorMessage = params['ErrorMessage']
|
1699
|
+
@JobStatus = params['JobStatus']
|
1700
|
+
@ThoughtContent = params['ThoughtContent']
|
1701
|
+
@RequestId = params['RequestId']
|
1702
|
+
end
|
1703
|
+
end
|
1704
|
+
|
1642
1705
|
# 机票详细信息元组
|
1643
1706
|
class DetailInformationOfAirTicketTupleList < TencentCloud::Common::AbstractModel
|
1644
1707
|
# @param DepartureStation: 出发站(自)
|
@@ -5707,6 +5770,30 @@ module TencentCloud
|
|
5707
5770
|
end
|
5708
5771
|
end
|
5709
5772
|
|
5773
|
+
# 自定义抽取需要的字段名称、字段类型、字段提示词。
|
5774
|
+
class ItemNames < TencentCloud::Common::AbstractModel
|
5775
|
+
# @param KeyName: 自定义抽取功能需返回的字段名称。
|
5776
|
+
# @type KeyName: String
|
5777
|
+
# @param KeyType: 默认 0;0表示kv对 1表示 表格字段。
|
5778
|
+
# @type KeyType: Integer
|
5779
|
+
# @param KeyPrompt: 抽取字段的描述内容。
|
5780
|
+
# @type KeyPrompt: String
|
5781
|
+
|
5782
|
+
attr_accessor :KeyName, :KeyType, :KeyPrompt
|
5783
|
+
|
5784
|
+
def initialize(keyname=nil, keytype=nil, keyprompt=nil)
|
5785
|
+
@KeyName = keyname
|
5786
|
+
@KeyType = keytype
|
5787
|
+
@KeyPrompt = keyprompt
|
5788
|
+
end
|
5789
|
+
|
5790
|
+
def deserialize(params)
|
5791
|
+
@KeyName = params['KeyName']
|
5792
|
+
@KeyType = params['KeyType']
|
5793
|
+
@KeyPrompt = params['KeyPrompt']
|
5794
|
+
end
|
5795
|
+
end
|
5796
|
+
|
5710
5797
|
# 发票字段坐标信息。包括字段英文名称、字段值所在位置的四点坐标、字段所属行号,具体内容请点击左侧链接。
|
5711
5798
|
class ItemPolygonInfo < TencentCloud::Common::AbstractModel
|
5712
5799
|
# @param Key: 发票的英文字段名称(如Title)
|
@@ -11324,6 +11411,73 @@ module TencentCloud
|
|
11324
11411
|
end
|
11325
11412
|
end
|
11326
11413
|
|
11414
|
+
# SubmitExtractDocAgentJob请求参数结构体
|
11415
|
+
class SubmitExtractDocAgentJobRequest < TencentCloud::Common::AbstractModel
|
11416
|
+
# @param ImageBase64: 图片/PDF的 Base64 值。 要求图片/PDF经Base64编码后不超过 10M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP、PDF、WORD、EXCEL格式。 图片支持的像素范围:需介于20-10000px之间。 图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。
|
11417
|
+
# @type ImageBase64: String
|
11418
|
+
# @param ImageUrl: 图片/PDF的 Url 地址。 要求图片/PDF经Base64编码后不超过 10M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP、PDF、WORD、EXCEL格式。 图片支持的像素范围:需介于20-10000px之间。 图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。
|
11419
|
+
# @type ImageUrl: String
|
11420
|
+
# @param PdfPageNumber: 需要识别的PDF页面的对应页码,仅支持PDF单页识别,当上传文件为PDF且IsPdf参数值为true时有效,默认值为前5页。
|
11421
|
+
# @type PdfPageNumber: Integer
|
11422
|
+
# @param ItemNames: 自定义抽取需要的字段名称、字段类型、字段提示词。
|
11423
|
+
# @type ItemNames: Array
|
11424
|
+
# @param EnableCoord: 是否需要返回坐标,默认false。
|
11425
|
+
# @type EnableCoord: Boolean
|
11426
|
+
# @param FileStartPageNumber: 起始页
|
11427
|
+
# @type FileStartPageNumber: Integer
|
11428
|
+
# @param FileEndPageNumber: 结束页
|
11429
|
+
# @type FileEndPageNumber: Integer
|
11430
|
+
|
11431
|
+
attr_accessor :ImageBase64, :ImageUrl, :PdfPageNumber, :ItemNames, :EnableCoord, :FileStartPageNumber, :FileEndPageNumber
|
11432
|
+
|
11433
|
+
def initialize(imagebase64=nil, imageurl=nil, pdfpagenumber=nil, itemnames=nil, enablecoord=nil, filestartpagenumber=nil, fileendpagenumber=nil)
|
11434
|
+
@ImageBase64 = imagebase64
|
11435
|
+
@ImageUrl = imageurl
|
11436
|
+
@PdfPageNumber = pdfpagenumber
|
11437
|
+
@ItemNames = itemnames
|
11438
|
+
@EnableCoord = enablecoord
|
11439
|
+
@FileStartPageNumber = filestartpagenumber
|
11440
|
+
@FileEndPageNumber = fileendpagenumber
|
11441
|
+
end
|
11442
|
+
|
11443
|
+
def deserialize(params)
|
11444
|
+
@ImageBase64 = params['ImageBase64']
|
11445
|
+
@ImageUrl = params['ImageUrl']
|
11446
|
+
@PdfPageNumber = params['PdfPageNumber']
|
11447
|
+
unless params['ItemNames'].nil?
|
11448
|
+
@ItemNames = []
|
11449
|
+
params['ItemNames'].each do |i|
|
11450
|
+
itemnames_tmp = ItemNames.new
|
11451
|
+
itemnames_tmp.deserialize(i)
|
11452
|
+
@ItemNames << itemnames_tmp
|
11453
|
+
end
|
11454
|
+
end
|
11455
|
+
@EnableCoord = params['EnableCoord']
|
11456
|
+
@FileStartPageNumber = params['FileStartPageNumber']
|
11457
|
+
@FileEndPageNumber = params['FileEndPageNumber']
|
11458
|
+
end
|
11459
|
+
end
|
11460
|
+
|
11461
|
+
# SubmitExtractDocAgentJob返回参数结构体
|
11462
|
+
class SubmitExtractDocAgentJobResponse < TencentCloud::Common::AbstractModel
|
11463
|
+
# @param JobId: 任务唯一ID。由服务端生成。
|
11464
|
+
# @type JobId: String
|
11465
|
+
# @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
11466
|
+
# @type RequestId: String
|
11467
|
+
|
11468
|
+
attr_accessor :JobId, :RequestId
|
11469
|
+
|
11470
|
+
def initialize(jobid=nil, requestid=nil)
|
11471
|
+
@JobId = jobid
|
11472
|
+
@RequestId = requestid
|
11473
|
+
end
|
11474
|
+
|
11475
|
+
def deserialize(params)
|
11476
|
+
@JobId = params['JobId']
|
11477
|
+
@RequestId = params['RequestId']
|
11478
|
+
end
|
11479
|
+
end
|
11480
|
+
|
11327
11481
|
# 单元格数据
|
11328
11482
|
class TableCell < TencentCloud::Common::AbstractModel
|
11329
11483
|
# @param ColTl: 单元格左上角的列索引
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tencentcloud-sdk-ocr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.1139
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tencent Cloud
|
@@ -34,8 +34,8 @@ extensions: []
|
|
34
34
|
extra_rdoc_files: []
|
35
35
|
files:
|
36
36
|
- lib/tencentcloud-sdk-ocr.rb
|
37
|
-
- lib/v20181119/client.rb
|
38
37
|
- lib/v20181119/models.rb
|
38
|
+
- lib/v20181119/client.rb
|
39
39
|
- lib/VERSION
|
40
40
|
homepage: https://github.com/TencentCloud/tencentcloud-sdk-ruby
|
41
41
|
licenses:
|