tencentcloud-sdk-ocr 3.0.1107 → 3.0.1112

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 87219dbaff6aa0460944cc17f97b77934f36c2b5
4
- data.tar.gz: 55baac29e28f036329764784fa915c150d5bd3ee
3
+ metadata.gz: 5177a4d233a040b6c686c270a15e5dc2a62f5058
4
+ data.tar.gz: fd7ed46f7f31e7c2fb8e26d57921c6ab60286169
5
5
  SHA512:
6
- metadata.gz: 258530b724324df4a9d24eb41962fcaa343e323b1429b7ebe22b6683050ba20e69e431ff71f6dbaf7acb242d549ce55c730a5cd500076a81a01342885809afa4
7
- data.tar.gz: fd0e9098e638feed82ac409b92e725450334f8c266bdbb5c56deae13699af87586bfe8b4552f657c5317193612a30c3d3f9c808b3dd5a7a8366035d9a0584a7c
6
+ metadata.gz: 67b5c51d3d95725856baebd7a907dbe9cb35dd8a9cc1ac7093d76eeefbf55f98cb0746a2196d8265115883a1629be6df52bae93e627b974ffd0e2493bbaedb07
7
+ data.tar.gz: 3172788e7e96603e37d3b4ba0a2d7ce7f9c43267f205fe8651d8e38142b3f5d375a152ddcfc8ee128fc272586930d3b36fc0667ca9c181b96d6399fdbd830361
data/lib/VERSION CHANGED
@@ -1 +1 @@
1
- 3.0.1107
1
+ 3.0.1112
@@ -2170,6 +2170,32 @@ module TencentCloud
2170
2170
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2171
2171
  end
2172
2172
 
2173
+ # 基于MLLM(多模态大语言模型)的表格识别能力,针对复杂表格的算法识别效果更佳,适配财务报表识别场景,并可输出直接对接业务系统的Excel数据。
2174
+
2175
+ # 默认接口请求频率限制:1次/秒。
2176
+
2177
+ # @param request: Request instance for RecognizeTableMultiOCR.
2178
+ # @type request: :class:`Tencentcloud::ocr::V20181119::RecognizeTableMultiOCRRequest`
2179
+ # @rtype: :class:`Tencentcloud::ocr::V20181119::RecognizeTableMultiOCRResponse`
2180
+ def RecognizeTableMultiOCR(request)
2181
+ body = send_request('RecognizeTableMultiOCR', request.serialize)
2182
+ response = JSON.parse(body)
2183
+ if response['Response'].key?('Error') == false
2184
+ model = RecognizeTableMultiOCRResponse.new
2185
+ model.deserialize(response['Response'])
2186
+ model
2187
+ else
2188
+ code = response['Response']['Error']['Code']
2189
+ message = response['Response']['Error']['Message']
2190
+ reqid = response['Response']['RequestId']
2191
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2192
+ end
2193
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2194
+ raise e
2195
+ rescue StandardError => e
2196
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2197
+ end
2198
+
2173
2199
  # 本接口支持中英文图片/ PDF内常规表格、无线表格、多表格的检测和识别,支持日文有线表格识别,返回每个单元格的文字内容,支持旋转的表格图片识别,且支持将识别结果保存为 Excel 格式。
2174
2200
 
2175
2201
  # 默认接口请求频率限制:10次/秒。
@@ -6026,17 +6026,19 @@ module TencentCloud
6026
6026
  # -9108 证件模糊告警
6027
6027
  # -9109 告警能力未开通
6028
6028
  # @type WarnCardInfos: Array
6029
+ # @param CardCount: 输入图片中的卡证数量(仅请求曼谷地域[ap-bangkok]返回)
6030
+ # @type CardCount: Integer
6029
6031
  # @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
6030
6032
  # @type RequestId: String
6031
6033
 
6032
- attr_accessor :ID, :Name, :DateOfBirth, :Sex, :DateOfExpiration, :IssuingCountry, :Nationality, :Warn, :Image, :AdvancedInfo, :CodeSet, :CodeCrc, :Surname, :GivenName, :Type, :PassportRecognizeInfos, :WarnCardInfos, :RequestId
6034
+ attr_accessor :ID, :Name, :DateOfBirth, :Sex, :DateOfExpiration, :IssuingCountry, :Nationality, :Warn, :Image, :AdvancedInfo, :CodeSet, :CodeCrc, :Surname, :GivenName, :Type, :PassportRecognizeInfos, :WarnCardInfos, :CardCount, :RequestId
6033
6035
  extend Gem::Deprecate
6034
6036
  deprecate :Warn, :none, 2025, 7
6035
6037
  deprecate :Warn=, :none, 2025, 7
6036
6038
  deprecate :AdvancedInfo, :none, 2025, 7
6037
6039
  deprecate :AdvancedInfo=, :none, 2025, 7
6038
6040
 
6039
- def initialize(id=nil, name=nil, dateofbirth=nil, sex=nil, dateofexpiration=nil, issuingcountry=nil, nationality=nil, warn=nil, image=nil, advancedinfo=nil, codeset=nil, codecrc=nil, surname=nil, givenname=nil, type=nil, passportrecognizeinfos=nil, warncardinfos=nil, requestid=nil)
6041
+ def initialize(id=nil, name=nil, dateofbirth=nil, sex=nil, dateofexpiration=nil, issuingcountry=nil, nationality=nil, warn=nil, image=nil, advancedinfo=nil, codeset=nil, codecrc=nil, surname=nil, givenname=nil, type=nil, passportrecognizeinfos=nil, warncardinfos=nil, cardcount=nil, requestid=nil)
6040
6042
  @ID = id
6041
6043
  @Name = name
6042
6044
  @DateOfBirth = dateofbirth
@@ -6054,6 +6056,7 @@ module TencentCloud
6054
6056
  @Type = type
6055
6057
  @PassportRecognizeInfos = passportrecognizeinfos
6056
6058
  @WarnCardInfos = warncardinfos
6059
+ @CardCount = cardcount
6057
6060
  @RequestId = requestid
6058
6061
  end
6059
6062
 
@@ -6078,6 +6081,7 @@ module TencentCloud
6078
6081
  @PassportRecognizeInfos.deserialize(params['PassportRecognizeInfos'])
6079
6082
  end
6080
6083
  @WarnCardInfos = params['WarnCardInfos']
6084
+ @CardCount = params['CardCount']
6081
6085
  @RequestId = params['RequestId']
6082
6086
  end
6083
6087
  end
@@ -9501,6 +9505,62 @@ module TencentCloud
9501
9505
  end
9502
9506
  end
9503
9507
 
9508
+ # RecognizeTableMultiOCR请求参数结构体
9509
+ class RecognizeTableMultiOCRRequest < TencentCloud::Common::AbstractModel
9510
+ # @param ImageBase64: 图片/PDF的 Base64 值。 要求图片/PDF经Base64编码后不超过 10M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。 图片支持的像素范围:需介于20-10000px之间。 图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。
9511
+ # @type ImageBase64: String
9512
+ # @param ImageUrl: 图片/PDF的 Url 地址。 要求图片/PDF经Base64编码后不超过 10M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。 图片支持的像素范围:需介于20-10000px之间。 图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。
9513
+ # @type ImageUrl: String
9514
+ # @param PdfStartPageNumber: 文档的起始页码。 当传入文件是PDF型时,用来指定识别的起始页码,识别的页码包含当前值。
9515
+ # @type PdfStartPageNumber: Integer
9516
+ # @param PdfEndPageNumber: 文档的结束页码。 当传入文件是PDF类型时,用来指定识别的结束页码,识别的页码包含当前值。单次调用最多支持识别3页内容,即PdfEndPageNumber-PdfStartPageNumber需要不大于3。
9517
+ # @type PdfEndPageNumber: Integer
9518
+ # @param DataFormat: 配置选项,支持配置输出数据格式。
9519
+
9520
+ # * **Mdbase64** 返回 base64 编码的 markdown 格式文本。
9521
+ # * **Excelbase64** 返回 base64 编码的 excel 文件。
9522
+ # @type DataFormat: String
9523
+
9524
+ attr_accessor :ImageBase64, :ImageUrl, :PdfStartPageNumber, :PdfEndPageNumber, :DataFormat
9525
+
9526
+ def initialize(imagebase64=nil, imageurl=nil, pdfstartpagenumber=nil, pdfendpagenumber=nil, dataformat=nil)
9527
+ @ImageBase64 = imagebase64
9528
+ @ImageUrl = imageurl
9529
+ @PdfStartPageNumber = pdfstartpagenumber
9530
+ @PdfEndPageNumber = pdfendpagenumber
9531
+ @DataFormat = dataformat
9532
+ end
9533
+
9534
+ def deserialize(params)
9535
+ @ImageBase64 = params['ImageBase64']
9536
+ @ImageUrl = params['ImageUrl']
9537
+ @PdfStartPageNumber = params['PdfStartPageNumber']
9538
+ @PdfEndPageNumber = params['PdfEndPageNumber']
9539
+ @DataFormat = params['DataFormat']
9540
+ end
9541
+ end
9542
+
9543
+ # RecognizeTableMultiOCR返回参数结构体
9544
+ class RecognizeTableMultiOCRResponse < TencentCloud::Common::AbstractModel
9545
+ # @param DataBase64: Base64 编码后的 Excel 数据或 Markdown 数据。 注意:此字段可能返回空,表示取不到有效值。
9546
+ # 注意:此字段可能返回 null,表示取不到有效值。
9547
+ # @type DataBase64: String
9548
+ # @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
9549
+ # @type RequestId: String
9550
+
9551
+ attr_accessor :DataBase64, :RequestId
9552
+
9553
+ def initialize(database64=nil, requestid=nil)
9554
+ @DataBase64 = database64
9555
+ @RequestId = requestid
9556
+ end
9557
+
9558
+ def deserialize(params)
9559
+ @DataBase64 = params['DataBase64']
9560
+ @RequestId = params['RequestId']
9561
+ end
9562
+ end
9563
+
9504
9564
  # RecognizeTableOCR请求参数结构体
9505
9565
  class RecognizeTableOCRRequest < TencentCloud::Common::AbstractModel
9506
9566
  # @param ImageBase64: 图片/PDF的 Base64 值。
@@ -9651,15 +9711,17 @@ module TencentCloud
9651
9711
  # @type WarnCardInfos: Array
9652
9712
  # @param AdvancedInfo: 该字段已废弃, 将固定返回"1",不建议使用。
9653
9713
  # @type AdvancedInfo: String
9714
+ # @param CardCount: 卡证正面图片中,证件主体的数量(仅请求曼谷地域[ap-bangkok]返回)
9715
+ # @type CardCount: Integer
9654
9716
  # @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
9655
9717
  # @type RequestId: String
9656
9718
 
9657
- attr_accessor :ID, :ThaiName, :EnFirstName, :EnLastName, :IssueDate, :ExpirationDate, :EnIssueDate, :EnExpirationDate, :Birthday, :EnBirthday, :Religion, :SerialNumber, :Address, :LaserID, :PortraitImage, :WarnCardInfos, :AdvancedInfo, :RequestId
9719
+ attr_accessor :ID, :ThaiName, :EnFirstName, :EnLastName, :IssueDate, :ExpirationDate, :EnIssueDate, :EnExpirationDate, :Birthday, :EnBirthday, :Religion, :SerialNumber, :Address, :LaserID, :PortraitImage, :WarnCardInfos, :AdvancedInfo, :CardCount, :RequestId
9658
9720
  extend Gem::Deprecate
9659
9721
  deprecate :AdvancedInfo, :none, 2025, 7
9660
9722
  deprecate :AdvancedInfo=, :none, 2025, 7
9661
9723
 
9662
- def initialize(id=nil, thainame=nil, enfirstname=nil, enlastname=nil, issuedate=nil, expirationdate=nil, enissuedate=nil, enexpirationdate=nil, birthday=nil, enbirthday=nil, religion=nil, serialnumber=nil, address=nil, laserid=nil, portraitimage=nil, warncardinfos=nil, advancedinfo=nil, requestid=nil)
9724
+ def initialize(id=nil, thainame=nil, enfirstname=nil, enlastname=nil, issuedate=nil, expirationdate=nil, enissuedate=nil, enexpirationdate=nil, birthday=nil, enbirthday=nil, religion=nil, serialnumber=nil, address=nil, laserid=nil, portraitimage=nil, warncardinfos=nil, advancedinfo=nil, cardcount=nil, requestid=nil)
9663
9725
  @ID = id
9664
9726
  @ThaiName = thainame
9665
9727
  @EnFirstName = enfirstname
@@ -9677,6 +9739,7 @@ module TencentCloud
9677
9739
  @PortraitImage = portraitimage
9678
9740
  @WarnCardInfos = warncardinfos
9679
9741
  @AdvancedInfo = advancedinfo
9742
+ @CardCount = cardcount
9680
9743
  @RequestId = requestid
9681
9744
  end
9682
9745
 
@@ -9698,6 +9761,7 @@ module TencentCloud
9698
9761
  @PortraitImage = params['PortraitImage']
9699
9762
  @WarnCardInfos = params['WarnCardInfos']
9700
9763
  @AdvancedInfo = params['AdvancedInfo']
9764
+ @CardCount = params['CardCount']
9701
9765
  @RequestId = params['RequestId']
9702
9766
  end
9703
9767
  end
@@ -11500,12 +11564,15 @@ module TencentCloud
11500
11564
  # 税号 、纳税人识别号 、纳税人名称 、金额合计大写 、金额合计小写 、填发日期 、税务机关 、填票人。
11501
11565
  # 示例值:纳税人识别号
11502
11566
  # @type Content: Array
11567
+ # @param TableItems: 表格。
11568
+ # @type TableItems: Array
11503
11569
 
11504
- attr_accessor :Title, :Content
11570
+ attr_accessor :Title, :Content, :TableItems
11505
11571
 
11506
- def initialize(title=nil, content=nil)
11572
+ def initialize(title=nil, content=nil, tableitems=nil)
11507
11573
  @Title = title
11508
11574
  @Content = content
11575
+ @TableItems = tableitems
11509
11576
  end
11510
11577
 
11511
11578
  def deserialize(params)
@@ -11518,6 +11585,14 @@ module TencentCloud
11518
11585
  @Content << otherinvoiceitem_tmp
11519
11586
  end
11520
11587
  end
11588
+ unless params['TableItems'].nil?
11589
+ @TableItems = []
11590
+ params['TableItems'].each do |i|
11591
+ otherinvoicelist_tmp = OtherInvoiceList.new
11592
+ otherinvoicelist_tmp.deserialize(i)
11593
+ @TableItems << otherinvoicelist_tmp
11594
+ end
11595
+ end
11521
11596
  end
11522
11597
  end
11523
11598
 
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.1107
4
+ version: 3.0.1112
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-07-23 00:00:00.000000000 Z
11
+ date: 2025-07-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tencentcloud-sdk-common