tencentcloud-sdk-ocr 3.0.1081 → 3.0.1083
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 +0 -52
- data/lib/v20181119/models.rb +0 -224
- 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: b0d11b60f97151c3c5f26840b78ec1b9954a3345
|
4
|
+
data.tar.gz: bd8d1badeb514ecc9b57c164c19fabc4832d9e3e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c902b160e7add3bb4210baff29ff4d5a2ece8ca2a8f14418307913387fea141b641650e125609e0aeb1064df400d0ed8935434a1d08075676b4f62f80fe6e93
|
7
|
+
data.tar.gz: 01d83457fc5bbc796107cb4d6003eb0c59f96de4b311ae8d730f5e0eabf03ae8a2bb4f21be799382e3d7b08688827288380bfb18e5c3a0f41289b13299911a3e
|
data/lib/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.0.
|
1
|
+
3.0.1083
|
data/lib/v20181119/client.rb
CHANGED
@@ -2419,58 +2419,6 @@ module TencentCloud
|
|
2419
2419
|
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
2420
2420
|
end
|
2421
2421
|
|
2422
|
-
# 本接口支持识别并提取制式卡证、票据、表单等结构化场景的字段信息。无需任何配置,灵活高效。适用于各类结构化信息录入场景。点击[立即体验](https://ocrdemo.cloud.tencent.com/)。
|
2423
|
-
|
2424
|
-
# 默认接口请求频率限制:5次/秒。
|
2425
|
-
|
2426
|
-
# @param request: Request instance for SmartStructuralOCRV2.
|
2427
|
-
# @type request: :class:`Tencentcloud::ocr::V20181119::SmartStructuralOCRV2Request`
|
2428
|
-
# @rtype: :class:`Tencentcloud::ocr::V20181119::SmartStructuralOCRV2Response`
|
2429
|
-
def SmartStructuralOCRV2(request)
|
2430
|
-
body = send_request('SmartStructuralOCRV2', request.serialize)
|
2431
|
-
response = JSON.parse(body)
|
2432
|
-
if response['Response'].key?('Error') == false
|
2433
|
-
model = SmartStructuralOCRV2Response.new
|
2434
|
-
model.deserialize(response['Response'])
|
2435
|
-
model
|
2436
|
-
else
|
2437
|
-
code = response['Response']['Error']['Code']
|
2438
|
-
message = response['Response']['Error']['Message']
|
2439
|
-
reqid = response['Response']['RequestId']
|
2440
|
-
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
2441
|
-
end
|
2442
|
-
rescue TencentCloud::Common::TencentCloudSDKException => e
|
2443
|
-
raise e
|
2444
|
-
rescue StandardError => e
|
2445
|
-
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
2446
|
-
end
|
2447
|
-
|
2448
|
-
# 本接口支持识别并提取场景复杂、版式多等结构化场景的字段信息。重点场景包括:金融、医疗、交通、出行、保险。点击[立即体验](https://ocrdemo.cloud.tencent.com/)。
|
2449
|
-
|
2450
|
-
# 默认接口请求频率限制:5次/秒。
|
2451
|
-
|
2452
|
-
# @param request: Request instance for SmartStructuralPro.
|
2453
|
-
# @type request: :class:`Tencentcloud::ocr::V20181119::SmartStructuralProRequest`
|
2454
|
-
# @rtype: :class:`Tencentcloud::ocr::V20181119::SmartStructuralProResponse`
|
2455
|
-
def SmartStructuralPro(request)
|
2456
|
-
body = send_request('SmartStructuralPro', request.serialize)
|
2457
|
-
response = JSON.parse(body)
|
2458
|
-
if response['Response'].key?('Error') == false
|
2459
|
-
model = SmartStructuralProResponse.new
|
2460
|
-
model.deserialize(response['Response'])
|
2461
|
-
model
|
2462
|
-
else
|
2463
|
-
code = response['Response']['Error']['Code']
|
2464
|
-
message = response['Response']['Error']['Message']
|
2465
|
-
reqid = response['Response']['RequestId']
|
2466
|
-
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
2467
|
-
end
|
2468
|
-
rescue TencentCloud::Common::TencentCloudSDKException => e
|
2469
|
-
raise e
|
2470
|
-
rescue StandardError => e
|
2471
|
-
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
2472
|
-
end
|
2473
|
-
|
2474
2422
|
# <b>此接口为表格识别的旧版本服务,不再进行服务升级,建议您使用识别能力更强、服务性能更优的<a href="https://cloud.tencent.com/document/product/866/49525">新版表格识别</a>。</b>
|
2475
2423
|
|
2476
2424
|
# 本接口支持图片内表格文档的检测和识别,返回每个单元格的文字内容,支持将识别结果保存为 Excel 格式。
|
data/lib/v20181119/models.rb
CHANGED
@@ -11322,230 +11322,6 @@ module TencentCloud
|
|
11322
11322
|
end
|
11323
11323
|
end
|
11324
11324
|
|
11325
|
-
# SmartStructuralOCRV2请求参数结构体
|
11326
|
-
class SmartStructuralOCRV2Request < TencentCloud::Common::AbstractModel
|
11327
|
-
# @param ImageUrl: 图片的 Url 地址。支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。支持的图片大小:所下载图片经 Base64 编码后不超过 10M。图片下载时间不超过 3 秒。支持的图片像素:需介于20-10000px之间。图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。
|
11328
|
-
# @type ImageUrl: String
|
11329
|
-
# @param ImageBase64: 图片的 Base64 值。支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。支持的图片大小:所下载图片经Base64编码后不超过 10M。图片下载时间不超过 3 秒。支持的图片像素:需介于20-10000px之间。图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。
|
11330
|
-
# @type ImageBase64: String
|
11331
|
-
# @param IsPdf: 是否开启PDF识别,默认值为false,开启后可同时支持图片和PDF的识别。
|
11332
|
-
# @type IsPdf: Boolean
|
11333
|
-
# @param PdfPageNumber: 需要识别的PDF页面的对应页码,仅支持PDF单页识别,当上传文件为PDF且IsPdf参数值为true时有效,默认值为1。
|
11334
|
-
# @type PdfPageNumber: Integer
|
11335
|
-
# @param ItemNames: 自定义结构化功能需返回的字段名称,例:
|
11336
|
-
# 若客户只想返回姓名、性别两个字段的识别结果,则输入
|
11337
|
-
# ItemNames=["姓名","性别"]
|
11338
|
-
# @type ItemNames: Array
|
11339
|
-
# @param ReturnFullText: 是否开启全文字段识别
|
11340
|
-
# @type ReturnFullText: Boolean
|
11341
|
-
# @param ConfigId: 配置id支持:
|
11342
|
-
# General -- 通用场景
|
11343
|
-
# OnlineTaxiItinerary -- 网约车行程单
|
11344
|
-
# RideHailingDriverLicense -- 网约车驾驶证
|
11345
|
-
# RideHailingTransportLicense -- 网约车运输证
|
11346
|
-
# WayBill -- 快递运单
|
11347
|
-
# AccountOpeningPermit -- 银行开户许可证
|
11348
|
-
# InvoiceEng -- 海外发票模版
|
11349
|
-
# Coin --钱币识别模板
|
11350
|
-
# OnboardingDocuments -- 入职材料识别
|
11351
|
-
# PropertyOwnershipCertificate -- 房产证识别
|
11352
|
-
# RealEstateCertificate --不动产权证识别
|
11353
|
-
# HouseEncumbranceCertificate -- 他权证识别
|
11354
|
-
# CarInsurance -- 车险保单
|
11355
|
-
# MultiRealEstateCertificate -- 房产证、不动产证、产权证等材料合一模板
|
11356
|
-
# @type ConfigId: String
|
11357
|
-
# @param EnableSealRecognize: 是否打开印章识别
|
11358
|
-
# @type EnableSealRecognize: Boolean
|
11359
|
-
|
11360
|
-
attr_accessor :ImageUrl, :ImageBase64, :IsPdf, :PdfPageNumber, :ItemNames, :ReturnFullText, :ConfigId, :EnableSealRecognize
|
11361
|
-
|
11362
|
-
def initialize(imageurl=nil, imagebase64=nil, ispdf=nil, pdfpagenumber=nil, itemnames=nil, returnfulltext=nil, configid=nil, enablesealrecognize=nil)
|
11363
|
-
@ImageUrl = imageurl
|
11364
|
-
@ImageBase64 = imagebase64
|
11365
|
-
@IsPdf = ispdf
|
11366
|
-
@PdfPageNumber = pdfpagenumber
|
11367
|
-
@ItemNames = itemnames
|
11368
|
-
@ReturnFullText = returnfulltext
|
11369
|
-
@ConfigId = configid
|
11370
|
-
@EnableSealRecognize = enablesealrecognize
|
11371
|
-
end
|
11372
|
-
|
11373
|
-
def deserialize(params)
|
11374
|
-
@ImageUrl = params['ImageUrl']
|
11375
|
-
@ImageBase64 = params['ImageBase64']
|
11376
|
-
@IsPdf = params['IsPdf']
|
11377
|
-
@PdfPageNumber = params['PdfPageNumber']
|
11378
|
-
@ItemNames = params['ItemNames']
|
11379
|
-
@ReturnFullText = params['ReturnFullText']
|
11380
|
-
@ConfigId = params['ConfigId']
|
11381
|
-
@EnableSealRecognize = params['EnableSealRecognize']
|
11382
|
-
end
|
11383
|
-
end
|
11384
|
-
|
11385
|
-
# SmartStructuralOCRV2返回参数结构体
|
11386
|
-
class SmartStructuralOCRV2Response < TencentCloud::Common::AbstractModel
|
11387
|
-
# @param Angle: 图片旋转角度(角度制),文本的水平方向
|
11388
|
-
# 为 0;顺时针为正,逆时针为负
|
11389
|
-
# @type Angle: Float
|
11390
|
-
# @param StructuralList: 配置结构化文本信息
|
11391
|
-
# @type StructuralList: Array
|
11392
|
-
# @param WordList: 还原文本信息
|
11393
|
-
# @type WordList: Array
|
11394
|
-
# @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
11395
|
-
# @type RequestId: String
|
11396
|
-
|
11397
|
-
attr_accessor :Angle, :StructuralList, :WordList, :RequestId
|
11398
|
-
|
11399
|
-
def initialize(angle=nil, structurallist=nil, wordlist=nil, requestid=nil)
|
11400
|
-
@Angle = angle
|
11401
|
-
@StructuralList = structurallist
|
11402
|
-
@WordList = wordlist
|
11403
|
-
@RequestId = requestid
|
11404
|
-
end
|
11405
|
-
|
11406
|
-
def deserialize(params)
|
11407
|
-
@Angle = params['Angle']
|
11408
|
-
unless params['StructuralList'].nil?
|
11409
|
-
@StructuralList = []
|
11410
|
-
params['StructuralList'].each do |i|
|
11411
|
-
groupinfo_tmp = GroupInfo.new
|
11412
|
-
groupinfo_tmp.deserialize(i)
|
11413
|
-
@StructuralList << groupinfo_tmp
|
11414
|
-
end
|
11415
|
-
end
|
11416
|
-
unless params['WordList'].nil?
|
11417
|
-
@WordList = []
|
11418
|
-
params['WordList'].each do |i|
|
11419
|
-
worditem_tmp = WordItem.new
|
11420
|
-
worditem_tmp.deserialize(i)
|
11421
|
-
@WordList << worditem_tmp
|
11422
|
-
end
|
11423
|
-
end
|
11424
|
-
@RequestId = params['RequestId']
|
11425
|
-
end
|
11426
|
-
end
|
11427
|
-
|
11428
|
-
# SmartStructuralPro请求参数结构体
|
11429
|
-
class SmartStructuralProRequest < TencentCloud::Common::AbstractModel
|
11430
|
-
# @param ImageUrl: 图片的 Url 地址。支持的图片格式:PNG、JPG、JPEG,WORD,EXCEL,暂不支持 GIF 格式。支持的图片大小:所下载图片经 Base64 编码后不超过 7M。图片下载时间不超过 3 秒。支持的图片像素:需介于20-10000px之间。图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。
|
11431
|
-
# @type ImageUrl: String
|
11432
|
-
# @param ImageBase64: 图片的 Base64 值。支持的图片格式:PNG、JPG、JPEG,WORD,EXCEL,暂不支持 GIF 格式。支持的图片大小:所下载图片经Base64编码后不超过 7M。图片下载时间不超过 3 秒。支持的图片像素:需介于20-10000px之间。图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。
|
11433
|
-
# @type ImageBase64: String
|
11434
|
-
# @param PdfPageNumber: 需要识别的PDF页面的对应页码,仅支持PDF单页识别,当上传文件为PDF且IsPdf参数值为true时有效,默认值为前3页。
|
11435
|
-
# @type PdfPageNumber: Integer
|
11436
|
-
# @param ItemNames: 自定义结构化功能需返回的字段名称,例:若客户想新增返回姓名、性别两个字段的识别结果,则输入ItemNames=["姓名","性别"]
|
11437
|
-
# @type ItemNames: Array
|
11438
|
-
# @param ItemNamesShowMode: true:仅输出自定义字段
|
11439
|
-
# flase:输出默认字段+自定义字段
|
11440
|
-
# 默认true
|
11441
|
-
# @type ItemNamesShowMode: Boolean
|
11442
|
-
# @param ReturnFullText: 是否开启全文字段识别
|
11443
|
-
# @type ReturnFullText: Boolean
|
11444
|
-
# @param ConfigId: 配置id支持:
|
11445
|
-
# General -- 通用场景
|
11446
|
-
# InvoiceEng -- 国际invoice模版
|
11447
|
-
# WayBillEng --海运订单模板
|
11448
|
-
# CustomsDeclaration -- 进出口报关单
|
11449
|
-
# WeightNote -- 磅单
|
11450
|
-
# MedicalMeter -- 血压仪表识别
|
11451
|
-
# BillOfLading -- 海运提单
|
11452
|
-
# EntrustmentBook -- 海运托书
|
11453
|
-
# WordRecognize -- 手写英文作文模版
|
11454
|
-
# Statement -- 对账单识别模板
|
11455
|
-
# BookingConfirmation -- 配舱通知书识别模板
|
11456
|
-
# AirWayBill -- 航空运单识别模板
|
11457
|
-
# DispatchWeightNote -- 磅单发货单识别模板
|
11458
|
-
# ReceiptWeightNote -- 磅单收货单识别模板
|
11459
|
-
# ArticalRecognize -- 手写作文模版
|
11460
|
-
# Table -- 表格模版
|
11461
|
-
# SteelLabel -- 实物标签识别模板
|
11462
|
-
# CarInsurance -- 车辆保险单识别模板
|
11463
|
-
# @type ConfigId: String
|
11464
|
-
# @param EnableCoord: 是否开启全文字段坐标值的识别
|
11465
|
-
# @type EnableCoord: Boolean
|
11466
|
-
# @param OutputParentKey: 是否开启父子key识别,默认是
|
11467
|
-
# @type OutputParentKey: Boolean
|
11468
|
-
# @param ConfigAdvanced: 模版的单个属性配置
|
11469
|
-
# @type ConfigAdvanced: :class:`Tencentcloud::Ocr.v20181119.models.ConfigAdvanced`
|
11470
|
-
|
11471
|
-
attr_accessor :ImageUrl, :ImageBase64, :PdfPageNumber, :ItemNames, :ItemNamesShowMode, :ReturnFullText, :ConfigId, :EnableCoord, :OutputParentKey, :ConfigAdvanced
|
11472
|
-
|
11473
|
-
def initialize(imageurl=nil, imagebase64=nil, pdfpagenumber=nil, itemnames=nil, itemnamesshowmode=nil, returnfulltext=nil, configid=nil, enablecoord=nil, outputparentkey=nil, configadvanced=nil)
|
11474
|
-
@ImageUrl = imageurl
|
11475
|
-
@ImageBase64 = imagebase64
|
11476
|
-
@PdfPageNumber = pdfpagenumber
|
11477
|
-
@ItemNames = itemnames
|
11478
|
-
@ItemNamesShowMode = itemnamesshowmode
|
11479
|
-
@ReturnFullText = returnfulltext
|
11480
|
-
@ConfigId = configid
|
11481
|
-
@EnableCoord = enablecoord
|
11482
|
-
@OutputParentKey = outputparentkey
|
11483
|
-
@ConfigAdvanced = configadvanced
|
11484
|
-
end
|
11485
|
-
|
11486
|
-
def deserialize(params)
|
11487
|
-
@ImageUrl = params['ImageUrl']
|
11488
|
-
@ImageBase64 = params['ImageBase64']
|
11489
|
-
@PdfPageNumber = params['PdfPageNumber']
|
11490
|
-
@ItemNames = params['ItemNames']
|
11491
|
-
@ItemNamesShowMode = params['ItemNamesShowMode']
|
11492
|
-
@ReturnFullText = params['ReturnFullText']
|
11493
|
-
@ConfigId = params['ConfigId']
|
11494
|
-
@EnableCoord = params['EnableCoord']
|
11495
|
-
@OutputParentKey = params['OutputParentKey']
|
11496
|
-
unless params['ConfigAdvanced'].nil?
|
11497
|
-
@ConfigAdvanced = ConfigAdvanced.new
|
11498
|
-
@ConfigAdvanced.deserialize(params['ConfigAdvanced'])
|
11499
|
-
end
|
11500
|
-
end
|
11501
|
-
end
|
11502
|
-
|
11503
|
-
# SmartStructuralPro返回参数结构体
|
11504
|
-
class SmartStructuralProResponse < TencentCloud::Common::AbstractModel
|
11505
|
-
# @param Angle: 图片旋转角度(角度制),文本的水平方向为 0;顺时针为正,逆时针为负
|
11506
|
-
# @type Angle: Float
|
11507
|
-
# @param StructuralList: 配置结构化文本信息
|
11508
|
-
# @type StructuralList: Array
|
11509
|
-
# @param WordList: 还原文本信息
|
11510
|
-
# @type WordList: Array
|
11511
|
-
# @param TokenNum: 识别出的token个数
|
11512
|
-
# @type TokenNum: Integer
|
11513
|
-
# @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
11514
|
-
# @type RequestId: String
|
11515
|
-
|
11516
|
-
attr_accessor :Angle, :StructuralList, :WordList, :TokenNum, :RequestId
|
11517
|
-
|
11518
|
-
def initialize(angle=nil, structurallist=nil, wordlist=nil, tokennum=nil, requestid=nil)
|
11519
|
-
@Angle = angle
|
11520
|
-
@StructuralList = structurallist
|
11521
|
-
@WordList = wordlist
|
11522
|
-
@TokenNum = tokennum
|
11523
|
-
@RequestId = requestid
|
11524
|
-
end
|
11525
|
-
|
11526
|
-
def deserialize(params)
|
11527
|
-
@Angle = params['Angle']
|
11528
|
-
unless params['StructuralList'].nil?
|
11529
|
-
@StructuralList = []
|
11530
|
-
params['StructuralList'].each do |i|
|
11531
|
-
groupinfo_tmp = GroupInfo.new
|
11532
|
-
groupinfo_tmp.deserialize(i)
|
11533
|
-
@StructuralList << groupinfo_tmp
|
11534
|
-
end
|
11535
|
-
end
|
11536
|
-
unless params['WordList'].nil?
|
11537
|
-
@WordList = []
|
11538
|
-
params['WordList'].each do |i|
|
11539
|
-
worditem_tmp = WordItem.new
|
11540
|
-
worditem_tmp.deserialize(i)
|
11541
|
-
@WordList << worditem_tmp
|
11542
|
-
end
|
11543
|
-
end
|
11544
|
-
@TokenNum = params['TokenNum']
|
11545
|
-
@RequestId = params['RequestId']
|
11546
|
-
end
|
11547
|
-
end
|
11548
|
-
|
11549
11325
|
# 门头照识别结果
|
11550
11326
|
class StoreInfo < TencentCloud::Common::AbstractModel
|
11551
11327
|
# @param Name: 识别出的字段名称(关键字),如商店名称
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
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.1083
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tencent Cloud
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-06-
|
11
|
+
date: 2025-06-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tencentcloud-sdk-common
|