tencentcloud-sdk-ocr 3.0.988 → 3.0.989
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 +61 -7
- data/lib/v20181119/models.rb +340 -110
- 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: 43ab6707840cc9fadb6ed90f086a60a0523ecf86
|
|
4
|
+
data.tar.gz: a67259e59b8812b9ff374d95c55e54ff0e723e74
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ae7e511814fb014328015edf733fe4d2f17ada1112abd4fd5043fbea4fe7eaddcee0f9ff80828975e661e8ce268c291e9aa1a45101ca16aa399b0179e6d74b0a
|
|
7
|
+
data.tar.gz: 9bb1952d557c7b3764e015adb295382fa78b781e89d3b0a7a8e5806bf4ac64bcc1bb6a446a12c5fd0696cbe70cf1153deda0b64b4635cdba4e50dc8762399bfd
|
data/lib/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
3.0.
|
|
1
|
+
3.0.989
|
data/lib/v20181119/client.rb
CHANGED
|
@@ -1485,6 +1485,58 @@ module TencentCloud
|
|
|
1485
1485
|
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
1486
1486
|
end
|
|
1487
1487
|
|
|
1488
|
+
# 题目识别是教育的基础OCR识别能力。可支持扫描、拍照场景的单题题目识别。接口支持印刷体文本、手写体文本及公式的OCR识别和坐标返回,此外,接口还可对题目中的配图位置进行检测并返回坐标位置。适用于智能批改等场景的题目内容识别作为检索输入。
|
|
1489
|
+
|
|
1490
|
+
# 默认接口请求频率限制:2次/秒。
|
|
1491
|
+
|
|
1492
|
+
# @param request: Request instance for QuestionOCR.
|
|
1493
|
+
# @type request: :class:`Tencentcloud::ocr::V20181119::QuestionOCRRequest`
|
|
1494
|
+
# @rtype: :class:`Tencentcloud::ocr::V20181119::QuestionOCRResponse`
|
|
1495
|
+
def QuestionOCR(request)
|
|
1496
|
+
body = send_request('QuestionOCR', request.serialize)
|
|
1497
|
+
response = JSON.parse(body)
|
|
1498
|
+
if response['Response'].key?('Error') == false
|
|
1499
|
+
model = QuestionOCRResponse.new
|
|
1500
|
+
model.deserialize(response['Response'])
|
|
1501
|
+
model
|
|
1502
|
+
else
|
|
1503
|
+
code = response['Response']['Error']['Code']
|
|
1504
|
+
message = response['Response']['Error']['Message']
|
|
1505
|
+
reqid = response['Response']['RequestId']
|
|
1506
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
1507
|
+
end
|
|
1508
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
1509
|
+
raise e
|
|
1510
|
+
rescue StandardError => e
|
|
1511
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
1512
|
+
end
|
|
1513
|
+
|
|
1514
|
+
# 试卷切题识别可将整页练习册、试卷或教辅中的题目进行自动切题,并识别出其中的文字内容和坐标位置。
|
|
1515
|
+
|
|
1516
|
+
# 默认接口请求频率限制:2次/秒。
|
|
1517
|
+
|
|
1518
|
+
# @param request: Request instance for QuestionSplitOCR.
|
|
1519
|
+
# @type request: :class:`Tencentcloud::ocr::V20181119::QuestionSplitOCRRequest`
|
|
1520
|
+
# @rtype: :class:`Tencentcloud::ocr::V20181119::QuestionSplitOCRResponse`
|
|
1521
|
+
def QuestionSplitOCR(request)
|
|
1522
|
+
body = send_request('QuestionSplitOCR', request.serialize)
|
|
1523
|
+
response = JSON.parse(body)
|
|
1524
|
+
if response['Response'].key?('Error') == false
|
|
1525
|
+
model = QuestionSplitOCRResponse.new
|
|
1526
|
+
model.deserialize(response['Response'])
|
|
1527
|
+
model
|
|
1528
|
+
else
|
|
1529
|
+
code = response['Response']['Error']['Code']
|
|
1530
|
+
message = response['Response']['Error']['Message']
|
|
1531
|
+
reqid = response['Response']['RequestId']
|
|
1532
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
1533
|
+
end
|
|
1534
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
1535
|
+
raise e
|
|
1536
|
+
rescue StandardError => e
|
|
1537
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
1538
|
+
end
|
|
1539
|
+
|
|
1488
1540
|
# 本接口支持定额发票的发票号码、发票代码、金额(大小写)、发票消费类型、地区及是否有公司印章等关键字段的识别。
|
|
1489
1541
|
|
|
1490
1542
|
# 默认接口请求频率限制:5次/秒。
|
|
@@ -1635,16 +1687,18 @@ module TencentCloud
|
|
|
1635
1687
|
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
1636
1688
|
end
|
|
1637
1689
|
|
|
1638
|
-
#
|
|
1690
|
+
# 公式识别是教育的基础OCR识别能力,可支持理科(数学、物理、化学、生物)的印刷体和手写体的公式识别。
|
|
1691
|
+
|
|
1692
|
+
# 默认接口请求频率限制:2次/秒。
|
|
1639
1693
|
|
|
1640
|
-
# @param request: Request instance for
|
|
1641
|
-
# @type request: :class:`Tencentcloud::ocr::V20181119::
|
|
1642
|
-
# @rtype: :class:`Tencentcloud::ocr::V20181119::
|
|
1643
|
-
def
|
|
1644
|
-
body = send_request('
|
|
1694
|
+
# @param request: Request instance for RecognizeFormulaOCR.
|
|
1695
|
+
# @type request: :class:`Tencentcloud::ocr::V20181119::RecognizeFormulaOCRRequest`
|
|
1696
|
+
# @rtype: :class:`Tencentcloud::ocr::V20181119::RecognizeFormulaOCRResponse`
|
|
1697
|
+
def RecognizeFormulaOCR(request)
|
|
1698
|
+
body = send_request('RecognizeFormulaOCR', request.serialize)
|
|
1645
1699
|
response = JSON.parse(body)
|
|
1646
1700
|
if response['Response'].key?('Error') == false
|
|
1647
|
-
model =
|
|
1701
|
+
model = RecognizeFormulaOCRResponse.new
|
|
1648
1702
|
model.deserialize(response['Response'])
|
|
1649
1703
|
model
|
|
1650
1704
|
else
|
data/lib/v20181119/models.rb
CHANGED
|
@@ -2586,6 +2586,49 @@ module TencentCloud
|
|
|
2586
2586
|
end
|
|
2587
2587
|
end
|
|
2588
2588
|
|
|
2589
|
+
# 试题识别结果-元素内容
|
|
2590
|
+
class Element < TencentCloud::Common::AbstractModel
|
|
2591
|
+
# @param Text: 元素内容,当type为figure时该字段内容为图片的位置
|
|
2592
|
+
# @type Text: String
|
|
2593
|
+
# @param Coord: 元素坐标
|
|
2594
|
+
# @type Coord: :class:`Tencentcloud::Ocr.v20181119.models.Polygon`
|
|
2595
|
+
# @param GroupType: 元素group类型,包括multiple-choice(选择题)、fill-in-the-blank(填空题)、problem-solving(解答题)、arithmetic(算术题)
|
|
2596
|
+
# @type GroupType: String
|
|
2597
|
+
# @param ResultList: 结果列表
|
|
2598
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
|
2599
|
+
# @type ResultList: Array
|
|
2600
|
+
# @param Index: 元素索引
|
|
2601
|
+
# @type Index: Integer
|
|
2602
|
+
|
|
2603
|
+
attr_accessor :Text, :Coord, :GroupType, :ResultList, :Index
|
|
2604
|
+
|
|
2605
|
+
def initialize(text=nil, coord=nil, grouptype=nil, resultlist=nil, index=nil)
|
|
2606
|
+
@Text = text
|
|
2607
|
+
@Coord = coord
|
|
2608
|
+
@GroupType = grouptype
|
|
2609
|
+
@ResultList = resultlist
|
|
2610
|
+
@Index = index
|
|
2611
|
+
end
|
|
2612
|
+
|
|
2613
|
+
def deserialize(params)
|
|
2614
|
+
@Text = params['Text']
|
|
2615
|
+
unless params['Coord'].nil?
|
|
2616
|
+
@Coord = Polygon.new
|
|
2617
|
+
@Coord.deserialize(params['Coord'])
|
|
2618
|
+
end
|
|
2619
|
+
@GroupType = params['GroupType']
|
|
2620
|
+
unless params['ResultList'].nil?
|
|
2621
|
+
@ResultList = []
|
|
2622
|
+
params['ResultList'].each do |i|
|
|
2623
|
+
resultlist_tmp = ResultList.new
|
|
2624
|
+
resultlist_tmp.deserialize(i)
|
|
2625
|
+
@ResultList << resultlist_tmp
|
|
2626
|
+
end
|
|
2627
|
+
end
|
|
2628
|
+
@Index = params['Index']
|
|
2629
|
+
end
|
|
2630
|
+
end
|
|
2631
|
+
|
|
2589
2632
|
# 敏感数据加密
|
|
2590
2633
|
class Encryption < TencentCloud::Common::AbstractModel
|
|
2591
2634
|
# @param CiphertextBlob: 有加密需求的用户,接入传入kms的CiphertextBlob(Base64编码),关于数据加密可查阅[敏感数据加密指引](https://cloud.tencent.com/document/product/866/106048)文档。
|
|
@@ -3682,37 +3725,6 @@ module TencentCloud
|
|
|
3682
3725
|
end
|
|
3683
3726
|
end
|
|
3684
3727
|
|
|
3685
|
-
# 通用卡证鉴伪告警信息
|
|
3686
|
-
class GeneralCardWarnInfo < TencentCloud::Common::AbstractModel
|
|
3687
|
-
# @param IsWarn: 是否存在该告警
|
|
3688
|
-
# @type IsWarn: Boolean
|
|
3689
|
-
# @param RiskConfidence: 风险程度
|
|
3690
|
-
# @type RiskConfidence: Float
|
|
3691
|
-
# @param Polygon: 告警位置四点坐标
|
|
3692
|
-
# @type Polygon: Array
|
|
3693
|
-
|
|
3694
|
-
attr_accessor :IsWarn, :RiskConfidence, :Polygon
|
|
3695
|
-
|
|
3696
|
-
def initialize(iswarn=nil, riskconfidence=nil, polygon=nil)
|
|
3697
|
-
@IsWarn = iswarn
|
|
3698
|
-
@RiskConfidence = riskconfidence
|
|
3699
|
-
@Polygon = polygon
|
|
3700
|
-
end
|
|
3701
|
-
|
|
3702
|
-
def deserialize(params)
|
|
3703
|
-
@IsWarn = params['IsWarn']
|
|
3704
|
-
@RiskConfidence = params['RiskConfidence']
|
|
3705
|
-
unless params['Polygon'].nil?
|
|
3706
|
-
@Polygon = []
|
|
3707
|
-
params['Polygon'].each do |i|
|
|
3708
|
-
polygon_tmp = Polygon.new
|
|
3709
|
-
polygon_tmp.deserialize(i)
|
|
3710
|
-
@Polygon << polygon_tmp
|
|
3711
|
-
end
|
|
3712
|
-
end
|
|
3713
|
-
end
|
|
3714
|
-
end
|
|
3715
|
-
|
|
3716
3728
|
# GeneralEfficientOCR请求参数结构体
|
|
3717
3729
|
class GeneralEfficientOCRRequest < TencentCloud::Common::AbstractModel
|
|
3718
3730
|
# @param ImageBase64: 图片的 Base64 值。
|
|
@@ -7636,6 +7648,113 @@ module TencentCloud
|
|
|
7636
7648
|
end
|
|
7637
7649
|
end
|
|
7638
7650
|
|
|
7651
|
+
# 试题识别结果
|
|
7652
|
+
class QuestionInfo < TencentCloud::Common::AbstractModel
|
|
7653
|
+
# @param Angle: 旋转角度
|
|
7654
|
+
# @type Angle: Float
|
|
7655
|
+
# @param Height: 预处理后图片高度
|
|
7656
|
+
# @type Height: Integer
|
|
7657
|
+
# @param Width: 预处理后图片宽度
|
|
7658
|
+
# @type Width: Integer
|
|
7659
|
+
# @param ResultList: 文档元素
|
|
7660
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
|
7661
|
+
# @type ResultList: Array
|
|
7662
|
+
# @param OrgHeight: 输入图片高度
|
|
7663
|
+
# @type OrgHeight: Integer
|
|
7664
|
+
# @param OrgWidth: 输入图片宽度
|
|
7665
|
+
# @type OrgWidth: Integer
|
|
7666
|
+
# @param ImageBase64: 预处理后的图片base64编码
|
|
7667
|
+
# @type ImageBase64: String
|
|
7668
|
+
|
|
7669
|
+
attr_accessor :Angle, :Height, :Width, :ResultList, :OrgHeight, :OrgWidth, :ImageBase64
|
|
7670
|
+
|
|
7671
|
+
def initialize(angle=nil, height=nil, width=nil, resultlist=nil, orgheight=nil, orgwidth=nil, imagebase64=nil)
|
|
7672
|
+
@Angle = angle
|
|
7673
|
+
@Height = height
|
|
7674
|
+
@Width = width
|
|
7675
|
+
@ResultList = resultlist
|
|
7676
|
+
@OrgHeight = orgheight
|
|
7677
|
+
@OrgWidth = orgwidth
|
|
7678
|
+
@ImageBase64 = imagebase64
|
|
7679
|
+
end
|
|
7680
|
+
|
|
7681
|
+
def deserialize(params)
|
|
7682
|
+
@Angle = params['Angle']
|
|
7683
|
+
@Height = params['Height']
|
|
7684
|
+
@Width = params['Width']
|
|
7685
|
+
unless params['ResultList'].nil?
|
|
7686
|
+
@ResultList = []
|
|
7687
|
+
params['ResultList'].each do |i|
|
|
7688
|
+
resultlist_tmp = ResultList.new
|
|
7689
|
+
resultlist_tmp.deserialize(i)
|
|
7690
|
+
@ResultList << resultlist_tmp
|
|
7691
|
+
end
|
|
7692
|
+
end
|
|
7693
|
+
@OrgHeight = params['OrgHeight']
|
|
7694
|
+
@OrgWidth = params['OrgWidth']
|
|
7695
|
+
@ImageBase64 = params['ImageBase64']
|
|
7696
|
+
end
|
|
7697
|
+
end
|
|
7698
|
+
|
|
7699
|
+
# QuestionOCR请求参数结构体
|
|
7700
|
+
class QuestionOCRRequest < TencentCloud::Common::AbstractModel
|
|
7701
|
+
# @param ImageUrl: 图片的 Url 地址。支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。支持的图片大小:所下载图片经 Base64 编码后不超过 10M。图片下载时间不超过 3 秒。支持的图片像素:需介于20-10000px之间。图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。
|
|
7702
|
+
# @type ImageUrl: String
|
|
7703
|
+
# @param ImageBase64: 图片的 Base64 值。支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。支持的图片大小:所下载图片经Base64编码后不超过 10M。图片下载时间不超过 3 秒。支持的图片像素:需介于20-10000px之间。图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。
|
|
7704
|
+
# @type ImageBase64: String
|
|
7705
|
+
# @param IsPdf: 是否开启PDF识别,默认值为false,开启后可同时支持图片和PDF的识别。
|
|
7706
|
+
# @type IsPdf: Boolean
|
|
7707
|
+
# @param PdfPageNumber: 需要识别的PDF页面的对应页码,仅支持PDF单页识别,当上传文件为PDF且IsPdf参数值为true时有效,默认值为1。
|
|
7708
|
+
# @type PdfPageNumber: Integer
|
|
7709
|
+
# @param EnableImageCrop: 是否开启切边增强和弯曲矫正,默认为false不开启
|
|
7710
|
+
# @type EnableImageCrop: Boolean
|
|
7711
|
+
|
|
7712
|
+
attr_accessor :ImageUrl, :ImageBase64, :IsPdf, :PdfPageNumber, :EnableImageCrop
|
|
7713
|
+
|
|
7714
|
+
def initialize(imageurl=nil, imagebase64=nil, ispdf=nil, pdfpagenumber=nil, enableimagecrop=nil)
|
|
7715
|
+
@ImageUrl = imageurl
|
|
7716
|
+
@ImageBase64 = imagebase64
|
|
7717
|
+
@IsPdf = ispdf
|
|
7718
|
+
@PdfPageNumber = pdfpagenumber
|
|
7719
|
+
@EnableImageCrop = enableimagecrop
|
|
7720
|
+
end
|
|
7721
|
+
|
|
7722
|
+
def deserialize(params)
|
|
7723
|
+
@ImageUrl = params['ImageUrl']
|
|
7724
|
+
@ImageBase64 = params['ImageBase64']
|
|
7725
|
+
@IsPdf = params['IsPdf']
|
|
7726
|
+
@PdfPageNumber = params['PdfPageNumber']
|
|
7727
|
+
@EnableImageCrop = params['EnableImageCrop']
|
|
7728
|
+
end
|
|
7729
|
+
end
|
|
7730
|
+
|
|
7731
|
+
# QuestionOCR返回参数结构体
|
|
7732
|
+
class QuestionOCRResponse < TencentCloud::Common::AbstractModel
|
|
7733
|
+
# @param QuestionInfo: 检测到的文本信息
|
|
7734
|
+
# @type QuestionInfo: Array
|
|
7735
|
+
# @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
|
7736
|
+
# @type RequestId: String
|
|
7737
|
+
|
|
7738
|
+
attr_accessor :QuestionInfo, :RequestId
|
|
7739
|
+
|
|
7740
|
+
def initialize(questioninfo=nil, requestid=nil)
|
|
7741
|
+
@QuestionInfo = questioninfo
|
|
7742
|
+
@RequestId = requestid
|
|
7743
|
+
end
|
|
7744
|
+
|
|
7745
|
+
def deserialize(params)
|
|
7746
|
+
unless params['QuestionInfo'].nil?
|
|
7747
|
+
@QuestionInfo = []
|
|
7748
|
+
params['QuestionInfo'].each do |i|
|
|
7749
|
+
questioninfo_tmp = QuestionInfo.new
|
|
7750
|
+
questioninfo_tmp.deserialize(i)
|
|
7751
|
+
@QuestionInfo << questioninfo_tmp
|
|
7752
|
+
end
|
|
7753
|
+
end
|
|
7754
|
+
@RequestId = params['RequestId']
|
|
7755
|
+
end
|
|
7756
|
+
end
|
|
7757
|
+
|
|
7639
7758
|
# 试题识别结构化信息
|
|
7640
7759
|
class QuestionObj < TencentCloud::Common::AbstractModel
|
|
7641
7760
|
# @param QuestionTextNo: 题号
|
|
@@ -7682,6 +7801,65 @@ module TencentCloud
|
|
|
7682
7801
|
end
|
|
7683
7802
|
end
|
|
7684
7803
|
|
|
7804
|
+
# QuestionSplitOCR请求参数结构体
|
|
7805
|
+
class QuestionSplitOCRRequest < TencentCloud::Common::AbstractModel
|
|
7806
|
+
# @param ImageUrl: 图片的 Url 地址。支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。支持的图片大小:所下载图片经 Base64 编码后不超过 10M。图片下载时间不超过 3 秒。支持的图片像素:需介于20-10000px之间。图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。
|
|
7807
|
+
# @type ImageUrl: String
|
|
7808
|
+
# @param ImageBase64: 图片的 Base64 值。支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。支持的图片大小:所下载图片经Base64编码后不超过 10M。图片下载时间不超过 3 秒。支持的图片像素:需介于20-10000px之间。图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。
|
|
7809
|
+
# @type ImageBase64: String
|
|
7810
|
+
# @param IsPdf: 是否开启PDF识别,默认值为false,开启后可同时支持图片和PDF的识别。
|
|
7811
|
+
# @type IsPdf: Boolean
|
|
7812
|
+
# @param PdfPageNumber: 需要识别的PDF页面的对应页码,仅支持PDF单页识别,当上传文件为PDF且IsPdf参数值为true时有效,默认值为1。
|
|
7813
|
+
# @type PdfPageNumber: Integer
|
|
7814
|
+
# @param EnableImageCrop: 是否开启切边增强和弯曲矫正,默认为false不开启
|
|
7815
|
+
# @type EnableImageCrop: Boolean
|
|
7816
|
+
|
|
7817
|
+
attr_accessor :ImageUrl, :ImageBase64, :IsPdf, :PdfPageNumber, :EnableImageCrop
|
|
7818
|
+
|
|
7819
|
+
def initialize(imageurl=nil, imagebase64=nil, ispdf=nil, pdfpagenumber=nil, enableimagecrop=nil)
|
|
7820
|
+
@ImageUrl = imageurl
|
|
7821
|
+
@ImageBase64 = imagebase64
|
|
7822
|
+
@IsPdf = ispdf
|
|
7823
|
+
@PdfPageNumber = pdfpagenumber
|
|
7824
|
+
@EnableImageCrop = enableimagecrop
|
|
7825
|
+
end
|
|
7826
|
+
|
|
7827
|
+
def deserialize(params)
|
|
7828
|
+
@ImageUrl = params['ImageUrl']
|
|
7829
|
+
@ImageBase64 = params['ImageBase64']
|
|
7830
|
+
@IsPdf = params['IsPdf']
|
|
7831
|
+
@PdfPageNumber = params['PdfPageNumber']
|
|
7832
|
+
@EnableImageCrop = params['EnableImageCrop']
|
|
7833
|
+
end
|
|
7834
|
+
end
|
|
7835
|
+
|
|
7836
|
+
# QuestionSplitOCR返回参数结构体
|
|
7837
|
+
class QuestionSplitOCRResponse < TencentCloud::Common::AbstractModel
|
|
7838
|
+
# @param QuestionInfo: 检测到的文本信息
|
|
7839
|
+
# @type QuestionInfo: Array
|
|
7840
|
+
# @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
|
7841
|
+
# @type RequestId: String
|
|
7842
|
+
|
|
7843
|
+
attr_accessor :QuestionInfo, :RequestId
|
|
7844
|
+
|
|
7845
|
+
def initialize(questioninfo=nil, requestid=nil)
|
|
7846
|
+
@QuestionInfo = questioninfo
|
|
7847
|
+
@RequestId = requestid
|
|
7848
|
+
end
|
|
7849
|
+
|
|
7850
|
+
def deserialize(params)
|
|
7851
|
+
unless params['QuestionInfo'].nil?
|
|
7852
|
+
@QuestionInfo = []
|
|
7853
|
+
params['QuestionInfo'].each do |i|
|
|
7854
|
+
questioninfo_tmp = QuestionInfo.new
|
|
7855
|
+
questioninfo_tmp.deserialize(i)
|
|
7856
|
+
@QuestionInfo << questioninfo_tmp
|
|
7857
|
+
end
|
|
7858
|
+
end
|
|
7859
|
+
@RequestId = params['RequestId']
|
|
7860
|
+
end
|
|
7861
|
+
end
|
|
7862
|
+
|
|
7685
7863
|
# 定额发票
|
|
7686
7864
|
class QuotaInvoice < TencentCloud::Common::AbstractModel
|
|
7687
7865
|
# @param Title: 发票名称
|
|
@@ -8284,35 +8462,22 @@ module TencentCloud
|
|
|
8284
8462
|
end
|
|
8285
8463
|
end
|
|
8286
8464
|
|
|
8287
|
-
#
|
|
8288
|
-
class
|
|
8289
|
-
# @param ImageUrl:
|
|
8465
|
+
# RecognizeFormulaOCR请求参数结构体
|
|
8466
|
+
class RecognizeFormulaOCRRequest < TencentCloud::Common::AbstractModel
|
|
8467
|
+
# @param ImageUrl: 图片的 Url 地址。支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。支持的图片大小:所下载图片经 Base64 编码后不超过 10M。图片下载时间不超过 3 秒。支持的图片像素:需介于20-10000px之间。图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。
|
|
8290
8468
|
# @type ImageUrl: String
|
|
8291
|
-
# @param ImageBase64:
|
|
8469
|
+
# @param ImageBase64: 图片的 Base64 值。支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。支持的图片大小:所下载图片经Base64编码后不超过 10M。图片下载时间不超过 3 秒。支持的图片像素:需介于20-10000px之间。图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。
|
|
8292
8470
|
# @type ImageBase64: String
|
|
8293
|
-
# @param CardType: 卡证类型参数,包含以下范围:
|
|
8294
|
-
# default:通用卡证
|
|
8295
|
-
# idcard:身份证
|
|
8296
|
-
# passport:护照
|
|
8297
|
-
# bizlicense:营业执照
|
|
8298
|
-
# regcertificate:登记证书
|
|
8299
|
-
# residpermit:居住证
|
|
8300
|
-
# transpermit:通行证
|
|
8301
|
-
# signboard:门头照
|
|
8302
|
-
# bankcard:银行卡
|
|
8303
|
-
# drivinglicense:驾驶证、行驶证
|
|
8304
|
-
# @type CardType: String
|
|
8305
8471
|
# @param IsPdf: 是否开启PDF识别,默认值为false,开启后可同时支持图片和PDF的识别。
|
|
8306
8472
|
# @type IsPdf: Boolean
|
|
8307
8473
|
# @param PdfPageNumber: 需要识别的PDF页面的对应页码,仅支持PDF单页识别,当上传文件为PDF且IsPdf参数值为true时有效,默认值为1。
|
|
8308
8474
|
# @type PdfPageNumber: Integer
|
|
8309
8475
|
|
|
8310
|
-
attr_accessor :ImageUrl, :ImageBase64, :
|
|
8476
|
+
attr_accessor :ImageUrl, :ImageBase64, :IsPdf, :PdfPageNumber
|
|
8311
8477
|
|
|
8312
|
-
def initialize(imageurl=nil, imagebase64=nil,
|
|
8478
|
+
def initialize(imageurl=nil, imagebase64=nil, ispdf=nil, pdfpagenumber=nil)
|
|
8313
8479
|
@ImageUrl = imageurl
|
|
8314
8480
|
@ImageBase64 = imagebase64
|
|
8315
|
-
@CardType = cardtype
|
|
8316
8481
|
@IsPdf = ispdf
|
|
8317
8482
|
@PdfPageNumber = pdfpagenumber
|
|
8318
8483
|
end
|
|
@@ -8320,79 +8485,37 @@ module TencentCloud
|
|
|
8320
8485
|
def deserialize(params)
|
|
8321
8486
|
@ImageUrl = params['ImageUrl']
|
|
8322
8487
|
@ImageBase64 = params['ImageBase64']
|
|
8323
|
-
@CardType = params['CardType']
|
|
8324
8488
|
@IsPdf = params['IsPdf']
|
|
8325
8489
|
@PdfPageNumber = params['PdfPageNumber']
|
|
8326
8490
|
end
|
|
8327
8491
|
end
|
|
8328
8492
|
|
|
8329
|
-
#
|
|
8330
|
-
class
|
|
8331
|
-
# @param
|
|
8332
|
-
#
|
|
8333
|
-
#
|
|
8334
|
-
#
|
|
8335
|
-
# bizlicense:营业执照
|
|
8336
|
-
# regcertificate:登记证书
|
|
8337
|
-
# residpermit:居住证
|
|
8338
|
-
# transpermit:通行证
|
|
8339
|
-
# signboard:门头照
|
|
8340
|
-
# bankcard:银行卡
|
|
8341
|
-
# drivinglicense:驾驶证、行驶证
|
|
8342
|
-
# @type CardType: String
|
|
8343
|
-
# @param Blur: 模糊信息
|
|
8344
|
-
# @type Blur: :class:`Tencentcloud::Ocr.v20181119.models.GeneralCardWarnInfo`
|
|
8345
|
-
# @param BorderIncomplete: 边框不完整信息
|
|
8346
|
-
# @type BorderIncomplete: :class:`Tencentcloud::Ocr.v20181119.models.GeneralCardWarnInfo`
|
|
8347
|
-
# @param Copy: 复印件信息
|
|
8348
|
-
# @type Copy: :class:`Tencentcloud::Ocr.v20181119.models.GeneralCardWarnInfo`
|
|
8349
|
-
# @param Ps: ps篡改信息
|
|
8350
|
-
# @type Ps: :class:`Tencentcloud::Ocr.v20181119.models.GeneralCardWarnInfo`
|
|
8351
|
-
# @param Reflection: 反光信息
|
|
8352
|
-
# @type Reflection: :class:`Tencentcloud::Ocr.v20181119.models.GeneralCardWarnInfo`
|
|
8353
|
-
# @param Reprint: 翻拍件信息
|
|
8354
|
-
# @type Reprint: :class:`Tencentcloud::Ocr.v20181119.models.GeneralCardWarnInfo`
|
|
8493
|
+
# RecognizeFormulaOCR返回参数结构体
|
|
8494
|
+
class RecognizeFormulaOCRResponse < TencentCloud::Common::AbstractModel
|
|
8495
|
+
# @param Angle: 图片旋转角度(角度制),文本的水平方向为 0;顺时针为正,逆时针为负
|
|
8496
|
+
# @type Angle: Float
|
|
8497
|
+
# @param FormulaInfoList: 检测到的文本信息
|
|
8498
|
+
# @type FormulaInfoList: Array
|
|
8355
8499
|
# @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
|
8356
8500
|
# @type RequestId: String
|
|
8357
8501
|
|
|
8358
|
-
attr_accessor :
|
|
8502
|
+
attr_accessor :Angle, :FormulaInfoList, :RequestId
|
|
8359
8503
|
|
|
8360
|
-
def initialize(
|
|
8361
|
-
@
|
|
8362
|
-
@
|
|
8363
|
-
@BorderIncomplete = borderincomplete
|
|
8364
|
-
@Copy = copy
|
|
8365
|
-
@Ps = ps
|
|
8366
|
-
@Reflection = reflection
|
|
8367
|
-
@Reprint = reprint
|
|
8504
|
+
def initialize(angle=nil, formulainfolist=nil, requestid=nil)
|
|
8505
|
+
@Angle = angle
|
|
8506
|
+
@FormulaInfoList = formulainfolist
|
|
8368
8507
|
@RequestId = requestid
|
|
8369
8508
|
end
|
|
8370
8509
|
|
|
8371
8510
|
def deserialize(params)
|
|
8372
|
-
@
|
|
8373
|
-
unless params['
|
|
8374
|
-
@
|
|
8375
|
-
|
|
8376
|
-
|
|
8377
|
-
|
|
8378
|
-
|
|
8379
|
-
|
|
8380
|
-
end
|
|
8381
|
-
unless params['Copy'].nil?
|
|
8382
|
-
@Copy = GeneralCardWarnInfo.new
|
|
8383
|
-
@Copy.deserialize(params['Copy'])
|
|
8384
|
-
end
|
|
8385
|
-
unless params['Ps'].nil?
|
|
8386
|
-
@Ps = GeneralCardWarnInfo.new
|
|
8387
|
-
@Ps.deserialize(params['Ps'])
|
|
8388
|
-
end
|
|
8389
|
-
unless params['Reflection'].nil?
|
|
8390
|
-
@Reflection = GeneralCardWarnInfo.new
|
|
8391
|
-
@Reflection.deserialize(params['Reflection'])
|
|
8392
|
-
end
|
|
8393
|
-
unless params['Reprint'].nil?
|
|
8394
|
-
@Reprint = GeneralCardWarnInfo.new
|
|
8395
|
-
@Reprint.deserialize(params['Reprint'])
|
|
8511
|
+
@Angle = params['Angle']
|
|
8512
|
+
unless params['FormulaInfoList'].nil?
|
|
8513
|
+
@FormulaInfoList = []
|
|
8514
|
+
params['FormulaInfoList'].each do |i|
|
|
8515
|
+
textformulainfo_tmp = TextFormulaInfo.new
|
|
8516
|
+
textformulainfo_tmp.deserialize(i)
|
|
8517
|
+
@FormulaInfoList << textformulainfo_tmp
|
|
8518
|
+
end
|
|
8396
8519
|
end
|
|
8397
8520
|
@RequestId = params['RequestId']
|
|
8398
8521
|
end
|
|
@@ -9756,6 +9879,90 @@ module TencentCloud
|
|
|
9756
9879
|
end
|
|
9757
9880
|
end
|
|
9758
9881
|
|
|
9882
|
+
# 结果列表
|
|
9883
|
+
class ResultList < TencentCloud::Common::AbstractModel
|
|
9884
|
+
# @param Question: 题干
|
|
9885
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
|
9886
|
+
# @type Question: Array
|
|
9887
|
+
# @param Option: 选项
|
|
9888
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
|
9889
|
+
# @type Option: Array
|
|
9890
|
+
# @param Figure: 插图
|
|
9891
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
|
9892
|
+
# @type Figure: Array
|
|
9893
|
+
# @param Table: 表格
|
|
9894
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
|
9895
|
+
# @type Table: Array
|
|
9896
|
+
# @param Answer: 答案
|
|
9897
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
|
9898
|
+
# @type Answer: Array
|
|
9899
|
+
# @param Coord: 整题的坐标
|
|
9900
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
|
9901
|
+
# @type Coord: Array
|
|
9902
|
+
|
|
9903
|
+
attr_accessor :Question, :Option, :Figure, :Table, :Answer, :Coord
|
|
9904
|
+
|
|
9905
|
+
def initialize(question=nil, option=nil, figure=nil, table=nil, answer=nil, coord=nil)
|
|
9906
|
+
@Question = question
|
|
9907
|
+
@Option = option
|
|
9908
|
+
@Figure = figure
|
|
9909
|
+
@Table = table
|
|
9910
|
+
@Answer = answer
|
|
9911
|
+
@Coord = coord
|
|
9912
|
+
end
|
|
9913
|
+
|
|
9914
|
+
def deserialize(params)
|
|
9915
|
+
unless params['Question'].nil?
|
|
9916
|
+
@Question = []
|
|
9917
|
+
params['Question'].each do |i|
|
|
9918
|
+
element_tmp = Element.new
|
|
9919
|
+
element_tmp.deserialize(i)
|
|
9920
|
+
@Question << element_tmp
|
|
9921
|
+
end
|
|
9922
|
+
end
|
|
9923
|
+
unless params['Option'].nil?
|
|
9924
|
+
@Option = []
|
|
9925
|
+
params['Option'].each do |i|
|
|
9926
|
+
element_tmp = Element.new
|
|
9927
|
+
element_tmp.deserialize(i)
|
|
9928
|
+
@Option << element_tmp
|
|
9929
|
+
end
|
|
9930
|
+
end
|
|
9931
|
+
unless params['Figure'].nil?
|
|
9932
|
+
@Figure = []
|
|
9933
|
+
params['Figure'].each do |i|
|
|
9934
|
+
element_tmp = Element.new
|
|
9935
|
+
element_tmp.deserialize(i)
|
|
9936
|
+
@Figure << element_tmp
|
|
9937
|
+
end
|
|
9938
|
+
end
|
|
9939
|
+
unless params['Table'].nil?
|
|
9940
|
+
@Table = []
|
|
9941
|
+
params['Table'].each do |i|
|
|
9942
|
+
element_tmp = Element.new
|
|
9943
|
+
element_tmp.deserialize(i)
|
|
9944
|
+
@Table << element_tmp
|
|
9945
|
+
end
|
|
9946
|
+
end
|
|
9947
|
+
unless params['Answer'].nil?
|
|
9948
|
+
@Answer = []
|
|
9949
|
+
params['Answer'].each do |i|
|
|
9950
|
+
element_tmp = Element.new
|
|
9951
|
+
element_tmp.deserialize(i)
|
|
9952
|
+
@Answer << element_tmp
|
|
9953
|
+
end
|
|
9954
|
+
end
|
|
9955
|
+
unless params['Coord'].nil?
|
|
9956
|
+
@Coord = []
|
|
9957
|
+
params['Coord'].each do |i|
|
|
9958
|
+
polygon_tmp = Polygon.new
|
|
9959
|
+
polygon_tmp.deserialize(i)
|
|
9960
|
+
@Coord << polygon_tmp
|
|
9961
|
+
end
|
|
9962
|
+
end
|
|
9963
|
+
end
|
|
9964
|
+
end
|
|
9965
|
+
|
|
9759
9966
|
# RideHailingDriverLicenseOCR请求参数结构体
|
|
9760
9967
|
class RideHailingDriverLicenseOCRRequest < TencentCloud::Common::AbstractModel
|
|
9761
9968
|
# @param ImageBase64: 图片的 Base64 值。要求图片经Base64编码后不超过 7M,分辨率建议500*800以上,支持PNG、JPG、JPEG、BMP格式。建议卡片部分占据图片2/3以上。
|
|
@@ -11610,6 +11817,29 @@ module TencentCloud
|
|
|
11610
11817
|
end
|
|
11611
11818
|
end
|
|
11612
11819
|
|
|
11820
|
+
# 公式识别结果
|
|
11821
|
+
class TextFormulaInfo < TencentCloud::Common::AbstractModel
|
|
11822
|
+
# @param DetectedText: 识别出的文本行内容
|
|
11823
|
+
# @type DetectedText: String
|
|
11824
|
+
# @param Coord: 识别出的文本行内容坐标
|
|
11825
|
+
# @type Coord: :class:`Tencentcloud::Ocr.v20181119.models.Polygon`
|
|
11826
|
+
|
|
11827
|
+
attr_accessor :DetectedText, :Coord
|
|
11828
|
+
|
|
11829
|
+
def initialize(detectedtext=nil, coord=nil)
|
|
11830
|
+
@DetectedText = detectedtext
|
|
11831
|
+
@Coord = coord
|
|
11832
|
+
end
|
|
11833
|
+
|
|
11834
|
+
def deserialize(params)
|
|
11835
|
+
@DetectedText = params['DetectedText']
|
|
11836
|
+
unless params['Coord'].nil?
|
|
11837
|
+
@Coord = Polygon.new
|
|
11838
|
+
@Coord.deserialize(params['Coord'])
|
|
11839
|
+
end
|
|
11840
|
+
end
|
|
11841
|
+
end
|
|
11842
|
+
|
|
11613
11843
|
# 文字识别结果
|
|
11614
11844
|
class TextGeneralHandwriting < TencentCloud::Common::AbstractModel
|
|
11615
11845
|
# @param DetectedText: 识别出的文本行内容
|
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.989
|
|
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-01-
|
|
11
|
+
date: 2025-01-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: tencentcloud-sdk-common
|