tencentcloud-sdk-ocr 3.0.1078 → 3.0.1079

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: 58490924dc0313a0375863a43eb0c9719011036f
4
- data.tar.gz: d9f01a0ce882cdc2acf183f26a553314e0c0b2ae
3
+ metadata.gz: bc8071ff01d83fefec24e031560c84d7fef7c97c
4
+ data.tar.gz: 0a3cffab39570b86933aef2d94d7f22aa9692226
5
5
  SHA512:
6
- metadata.gz: 318e06a4ab20853afabe36a45c2fd4dd5a8678db3012540931fa04d75550155dc92b757c207cfd6914804a9edecf038c2b15ea58aecf3d97a8b67f12a7b88c62
7
- data.tar.gz: d0d56f71900f4061f29e0f2f0b59f015a47eeab3946a301a46b193c08002bceb45486f4a2dd8dc155732b3ea126dd72be9b819a8c7c5b8ec699aa7c68a13e453
6
+ metadata.gz: 2e05f7772414d639462f4337c82bf0e6ae81b77f33f9293e7ba46787e8720ae7350b2a5d13d4c99ac39db8e4d31b767f3c068fa0c07d5efb18cba6aced2984de
7
+ data.tar.gz: 51cbfaa33078eb9190b4c025ca3c6fe60e113bcd34b0c3a44b84d442426f084193d0c33a390bd8b7fc18f52da400a50fb066ad505b6a9c5810fa7f19e5b91397
data/lib/VERSION CHANGED
@@ -1 +1 @@
1
- 3.0.1078
1
+ 3.0.1079
@@ -454,6 +454,88 @@ module TencentCloud
454
454
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
455
455
  end
456
456
 
457
+ # 本接口支持识别并提取制式卡证、票据、表单等结构化场景的字段信息。无需任何配置,灵活高效。适用于各类结构化信息录入场景。点击[立即体验](https://ocrdemo.cloud.tencent.com/)。
458
+
459
+ # 接口别名:SmartStructuralOCRV2
460
+
461
+ # 默认接口请求频率限制:5次/秒。
462
+
463
+ # @param request: Request instance for ExtractDocBasic.
464
+ # @type request: :class:`Tencentcloud::ocr::V20181119::ExtractDocBasicRequest`
465
+ # @rtype: :class:`Tencentcloud::ocr::V20181119::ExtractDocBasicResponse`
466
+ def ExtractDocBasic(request)
467
+ body = send_request('ExtractDocBasic', request.serialize)
468
+ response = JSON.parse(body)
469
+ if response['Response'].key?('Error') == false
470
+ model = ExtractDocBasicResponse.new
471
+ model.deserialize(response['Response'])
472
+ model
473
+ else
474
+ code = response['Response']['Error']['Code']
475
+ message = response['Response']['Error']['Message']
476
+ reqid = response['Response']['RequestId']
477
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
478
+ end
479
+ rescue TencentCloud::Common::TencentCloudSDKException => e
480
+ raise e
481
+ rescue StandardError => e
482
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
483
+ end
484
+
485
+ # 本接口支持识别并提取场景复杂、版式多等结构化场景的字段信息。重点场景包括:金融、医疗、交通、出行、保险。点击[立即体验](https://ocrdemo.cloud.tencent.com/)。
486
+
487
+ # 接口别名:SmartStructuralPro
488
+
489
+ # 默认接口请求频率限制:5次/秒。
490
+
491
+ # @param request: Request instance for ExtractDocMulti.
492
+ # @type request: :class:`Tencentcloud::ocr::V20181119::ExtractDocMultiRequest`
493
+ # @rtype: :class:`Tencentcloud::ocr::V20181119::ExtractDocMultiResponse`
494
+ def ExtractDocMulti(request)
495
+ body = send_request('ExtractDocMulti', request.serialize)
496
+ response = JSON.parse(body)
497
+ if response['Response'].key?('Error') == false
498
+ model = ExtractDocMultiResponse.new
499
+ model.deserialize(response['Response'])
500
+ model
501
+ else
502
+ code = response['Response']['Error']['Code']
503
+ message = response['Response']['Error']['Message']
504
+ reqid = response['Response']['RequestId']
505
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
506
+ end
507
+ rescue TencentCloud::Common::TencentCloudSDKException => e
508
+ raise e
509
+ rescue StandardError => e
510
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
511
+ end
512
+
513
+ # 本接口当前仅支持复杂磅单收发货单抽取,更多强推理场景支持定制咨询。点击[立即体验](https://ocrdemo.cloud.tencent.com/)。
514
+
515
+ # 默认接口请求频率限制:5次/秒。
516
+
517
+ # @param request: Request instance for ExtractDocMultiPro.
518
+ # @type request: :class:`Tencentcloud::ocr::V20181119::ExtractDocMultiProRequest`
519
+ # @rtype: :class:`Tencentcloud::ocr::V20181119::ExtractDocMultiProResponse`
520
+ def ExtractDocMultiPro(request)
521
+ body = send_request('ExtractDocMultiPro', request.serialize)
522
+ response = JSON.parse(body)
523
+ if response['Response'].key?('Error') == false
524
+ model = ExtractDocMultiProResponse.new
525
+ model.deserialize(response['Response'])
526
+ model
527
+ else
528
+ code = response['Response']['Error']['Code']
529
+ message = response['Response']['Error']['Message']
530
+ reqid = response['Response']['RequestId']
531
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
532
+ end
533
+ rescue TencentCloud::Common::TencentCloudSDKException => e
534
+ raise e
535
+ rescue StandardError => e
536
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
537
+ end
538
+
457
539
  # 本接口支持常见银行票据的自动分类和识别。整单识别包括支票(含现金支票、普通支票、转账支票),承兑汇票(含银行承兑汇票、商业承兑汇票)以及进账单等,适用于中国人民银行印发的 2010 版银行票据凭证版式(银发[2010]299 号)。
458
540
 
459
541
  # 默认接口请求频率限制:5次/秒。
@@ -942,6 +1024,32 @@ module TencentCloud
942
1024
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
943
1025
  end
944
1026
 
1027
+ # 本接口专为教育场景设计,可高精度识别中英文手写字符,智能分栏并按阅读顺序分割内容,自动过滤手写与印刷体混排干扰,精准返回词、行、段落及标题的文本与坐标信息。点击[立即体验](https://ocrdemo.cloud.tencent.com/)。
1028
+
1029
+ # 默认接口请求频率限制:5次/秒。
1030
+
1031
+ # @param request: Request instance for HandwritingEssayOCR.
1032
+ # @type request: :class:`Tencentcloud::ocr::V20181119::HandwritingEssayOCRRequest`
1033
+ # @rtype: :class:`Tencentcloud::ocr::V20181119::HandwritingEssayOCRResponse`
1034
+ def HandwritingEssayOCR(request)
1035
+ body = send_request('HandwritingEssayOCR', request.serialize)
1036
+ response = JSON.parse(body)
1037
+ if response['Response'].key?('Error') == false
1038
+ model = HandwritingEssayOCRResponse.new
1039
+ model.deserialize(response['Response'])
1040
+ model
1041
+ else
1042
+ code = response['Response']['Error']['Code']
1043
+ message = response['Response']['Error']['Message']
1044
+ reqid = response['Response']['RequestId']
1045
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1046
+ end
1047
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1048
+ raise e
1049
+ rescue StandardError => e
1050
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1051
+ end
1052
+
945
1053
  # 港澳台居住证OCR支持港澳台居住证正反面全字段内容检测识别功能,包括姓名、性别、出生日期、地址、身份证号、签发机关、有效期限、签发次数、通行证号码关键字段识别。可以应用于港澳台居住证信息识别场景,例如银行开户、用户注册等。
946
1054
 
947
1055
  # 默认接口请求频率限制:20次/秒。
@@ -2311,7 +2419,7 @@ module TencentCloud
2311
2419
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2312
2420
  end
2313
2421
 
2314
- # 本接口支持智能提取各类证照、票据、表单、合同等结构化场景的key:value字段信息,并支持提取表格信息的key:value组的结构化,灵活高效,适用于各类非标准材料的信息录入场景,点击[立即体验](https://ocrdemo.cloud.tencent.com/)。
2422
+ # 本接口支持识别并提取制式卡证、票据、表单等结构化场景的字段信息。无需任何配置,灵活高效。适用于各类结构化信息录入场景。点击[立即体验](https://ocrdemo.cloud.tencent.com/)。
2315
2423
 
2316
2424
  # 默认接口请求频率限制:5次/秒。
2317
2425
 
@@ -2337,7 +2445,7 @@ module TencentCloud
2337
2445
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2338
2446
  end
2339
2447
 
2340
- # 本接口支持智能提取各类证照、票据、表单、合同等结构化场景的key:value字段信息,并支持提取表格信息的key:value组的结构化,灵活高效,适用于各类非标准材料的信息录入场景,点击[立即体验](https://ocrdemo.cloud.tencent.com/)。
2448
+ # 本接口支持识别并提取场景复杂、版式多等结构化场景的字段信息。重点场景包括:金融、医疗、交通、出行、保险。点击[立即体验](https://ocrdemo.cloud.tencent.com/)。
2341
2449
 
2342
2450
  # 默认接口请求频率限制:5次/秒。
2343
2451
 
@@ -2844,6 +2844,336 @@ module TencentCloud
2844
2844
  end
2845
2845
  end
2846
2846
 
2847
+ # ExtractDocBasic请求参数结构体
2848
+ class ExtractDocBasicRequest < TencentCloud::Common::AbstractModel
2849
+ # @param ImageUrl: 图片的 Url 地址。支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。支持的图片大小:所下载图片经 Base64 编码后不超过 10M。图片下载时间不超过 3 秒。支持的图片像素:需介于20-10000px之间。图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。
2850
+ # @type ImageUrl: String
2851
+ # @param ImageBase64: 图片的 Base64 值。支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。支持的图片大小:所下载图片经Base64编码后不超过 10M。图片下载时间不超过 3 秒。支持的图片像素:需介于20-10000px之间。图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。
2852
+ # @type ImageBase64: String
2853
+ # @param IsPdf: 是否开启PDF识别,默认值为false,开启后可同时支持图片和PDF的识别。
2854
+ # @type IsPdf: Boolean
2855
+ # @param PdfPageNumber: 需要识别的PDF页面的对应页码,仅支持PDF单页识别,当上传文件为PDF且IsPdf参数值为true时有效,默认值为1。
2856
+ # @type PdfPageNumber: Integer
2857
+ # @param ItemNames: 自定义结构化功能需返回的字段名称,例:
2858
+ # 若客户只想返回姓名、性别两个字段的识别结果,则输入
2859
+ # ItemNames=["姓名","性别"]
2860
+ # @type ItemNames: Array
2861
+ # @param ReturnFullText: 是否开启全文字段识别
2862
+ # @type ReturnFullText: Boolean
2863
+ # @param ConfigId: 配置id支持:
2864
+ # General -- 通用场景
2865
+ # OnlineTaxiItinerary -- 网约车行程单
2866
+ # RideHailingDriverLicense -- 网约车驾驶证
2867
+ # RideHailingTransportLicense -- 网约车运输证
2868
+ # WayBill -- 快递运单
2869
+ # AccountOpeningPermit -- 银行开户许可证
2870
+ # InvoiceEng -- 海外发票模版
2871
+ # Coin --钱币识别模板
2872
+ # OnboardingDocuments -- 入职材料识别
2873
+ # PropertyOwnershipCertificate -- 房产证识别
2874
+ # RealEstateCertificate --不动产权证识别
2875
+ # HouseEncumbranceCertificate -- 他权证识别
2876
+ # CarInsurance -- 车险保单
2877
+ # MultiRealEstateCertificate -- 房产证、不动产证、产权证等材料合一模板
2878
+ # @type ConfigId: String
2879
+ # @param EnableSealRecognize: 是否打开印章识别
2880
+ # @type EnableSealRecognize: Boolean
2881
+
2882
+ attr_accessor :ImageUrl, :ImageBase64, :IsPdf, :PdfPageNumber, :ItemNames, :ReturnFullText, :ConfigId, :EnableSealRecognize
2883
+
2884
+ def initialize(imageurl=nil, imagebase64=nil, ispdf=nil, pdfpagenumber=nil, itemnames=nil, returnfulltext=nil, configid=nil, enablesealrecognize=nil)
2885
+ @ImageUrl = imageurl
2886
+ @ImageBase64 = imagebase64
2887
+ @IsPdf = ispdf
2888
+ @PdfPageNumber = pdfpagenumber
2889
+ @ItemNames = itemnames
2890
+ @ReturnFullText = returnfulltext
2891
+ @ConfigId = configid
2892
+ @EnableSealRecognize = enablesealrecognize
2893
+ end
2894
+
2895
+ def deserialize(params)
2896
+ @ImageUrl = params['ImageUrl']
2897
+ @ImageBase64 = params['ImageBase64']
2898
+ @IsPdf = params['IsPdf']
2899
+ @PdfPageNumber = params['PdfPageNumber']
2900
+ @ItemNames = params['ItemNames']
2901
+ @ReturnFullText = params['ReturnFullText']
2902
+ @ConfigId = params['ConfigId']
2903
+ @EnableSealRecognize = params['EnableSealRecognize']
2904
+ end
2905
+ end
2906
+
2907
+ # ExtractDocBasic返回参数结构体
2908
+ class ExtractDocBasicResponse < TencentCloud::Common::AbstractModel
2909
+ # @param Angle: 图片旋转角度(角度制),文本的水平方向
2910
+ # 为 0;顺时针为正,逆时针为负
2911
+ # @type Angle: Float
2912
+ # @param StructuralList: 配置结构化文本信息
2913
+ # @type StructuralList: Array
2914
+ # @param WordList: 还原文本信息
2915
+ # @type WordList: Array
2916
+ # @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
2917
+ # @type RequestId: String
2918
+
2919
+ attr_accessor :Angle, :StructuralList, :WordList, :RequestId
2920
+
2921
+ def initialize(angle=nil, structurallist=nil, wordlist=nil, requestid=nil)
2922
+ @Angle = angle
2923
+ @StructuralList = structurallist
2924
+ @WordList = wordlist
2925
+ @RequestId = requestid
2926
+ end
2927
+
2928
+ def deserialize(params)
2929
+ @Angle = params['Angle']
2930
+ unless params['StructuralList'].nil?
2931
+ @StructuralList = []
2932
+ params['StructuralList'].each do |i|
2933
+ groupinfo_tmp = GroupInfo.new
2934
+ groupinfo_tmp.deserialize(i)
2935
+ @StructuralList << groupinfo_tmp
2936
+ end
2937
+ end
2938
+ unless params['WordList'].nil?
2939
+ @WordList = []
2940
+ params['WordList'].each do |i|
2941
+ worditem_tmp = WordItem.new
2942
+ worditem_tmp.deserialize(i)
2943
+ @WordList << worditem_tmp
2944
+ end
2945
+ end
2946
+ @RequestId = params['RequestId']
2947
+ end
2948
+ end
2949
+
2950
+ # ExtractDocMultiPro请求参数结构体
2951
+ class ExtractDocMultiProRequest < TencentCloud::Common::AbstractModel
2952
+ # @param ImageUrl: 图片的 Url 地址。支持的图片格式:PNG、JPG、JPEG,WORD,EXCEL,暂不支持 GIF 格式。支持的图片大小:所下载图片经 Base64 编码后不超过 7M。图片下载时间不超过 3 秒。支持的图片像素:需介于20-10000px之间。图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。
2953
+ # @type ImageUrl: String
2954
+ # @param ImageBase64: 图片的 Base64 值。支持的图片格式:PNG、JPG、JPEG,WORD,EXCEL,暂不支持 GIF 格式。支持的图片大小:所下载图片经Base64编码后不超过 7M。图片下载时间不超过 3 秒。支持的图片像素:需介于20-10000px之间。图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。
2955
+ # @type ImageBase64: String
2956
+ # @param PdfPageNumber: 需要识别的PDF页面的对应页码,仅支持PDF单页识别,当上传文件为PDF且IsPdf参数值为true时有效,默认值为前3页。
2957
+ # @type PdfPageNumber: Integer
2958
+ # @param ItemNames: 自定义结构化功能需返回的字段名称,例:若客户想新增返回姓名、性别两个字段的识别结果,则输入ItemNames=["姓名","性别"]
2959
+ # @type ItemNames: Array
2960
+ # @param ItemNamesShowMode: true:仅输出自定义字段
2961
+ # flase:输出默认字段+自定义字段
2962
+ # 默认true
2963
+ # @type ItemNamesShowMode: Boolean
2964
+ # @param ReturnFullText: 是否开启全文字段识别
2965
+ # @type ReturnFullText: Boolean
2966
+ # @param ConfigId: 配置id支持:
2967
+ # DispatchWeightNote -- 磅单发货单识别模板
2968
+ # ReceiptWeightNote -- 磅单收货单识别模板
2969
+ # 默认:DispatchWeightNote
2970
+ # @type ConfigId: String
2971
+ # @param EnableCoord: 是否开启全文字段坐标值的识别
2972
+ # @type EnableCoord: Boolean
2973
+ # @param OutputParentKey: 是否开启父子key识别,默认是
2974
+ # @type OutputParentKey: Boolean
2975
+ # @param ConfigAdvanced: 模版的单个属性配置
2976
+ # @type ConfigAdvanced: :class:`Tencentcloud::Ocr.v20181119.models.ConfigAdvanced`
2977
+
2978
+ attr_accessor :ImageUrl, :ImageBase64, :PdfPageNumber, :ItemNames, :ItemNamesShowMode, :ReturnFullText, :ConfigId, :EnableCoord, :OutputParentKey, :ConfigAdvanced
2979
+
2980
+ def initialize(imageurl=nil, imagebase64=nil, pdfpagenumber=nil, itemnames=nil, itemnamesshowmode=nil, returnfulltext=nil, configid=nil, enablecoord=nil, outputparentkey=nil, configadvanced=nil)
2981
+ @ImageUrl = imageurl
2982
+ @ImageBase64 = imagebase64
2983
+ @PdfPageNumber = pdfpagenumber
2984
+ @ItemNames = itemnames
2985
+ @ItemNamesShowMode = itemnamesshowmode
2986
+ @ReturnFullText = returnfulltext
2987
+ @ConfigId = configid
2988
+ @EnableCoord = enablecoord
2989
+ @OutputParentKey = outputparentkey
2990
+ @ConfigAdvanced = configadvanced
2991
+ end
2992
+
2993
+ def deserialize(params)
2994
+ @ImageUrl = params['ImageUrl']
2995
+ @ImageBase64 = params['ImageBase64']
2996
+ @PdfPageNumber = params['PdfPageNumber']
2997
+ @ItemNames = params['ItemNames']
2998
+ @ItemNamesShowMode = params['ItemNamesShowMode']
2999
+ @ReturnFullText = params['ReturnFullText']
3000
+ @ConfigId = params['ConfigId']
3001
+ @EnableCoord = params['EnableCoord']
3002
+ @OutputParentKey = params['OutputParentKey']
3003
+ unless params['ConfigAdvanced'].nil?
3004
+ @ConfigAdvanced = ConfigAdvanced.new
3005
+ @ConfigAdvanced.deserialize(params['ConfigAdvanced'])
3006
+ end
3007
+ end
3008
+ end
3009
+
3010
+ # ExtractDocMultiPro返回参数结构体
3011
+ class ExtractDocMultiProResponse < TencentCloud::Common::AbstractModel
3012
+ # @param Angle: 图片旋转角度(角度制),文本的水平方向为 0;顺时针为正,逆时针为负
3013
+ # @type Angle: Float
3014
+ # @param StructuralList: 配置结构化文本信息
3015
+ # @type StructuralList: Array
3016
+ # @param WordList: 还原文本信息
3017
+ # @type WordList: Array
3018
+ # @param TokenNum: 样本识别字段数
3019
+ # @type TokenNum: Integer
3020
+ # @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
3021
+ # @type RequestId: String
3022
+
3023
+ attr_accessor :Angle, :StructuralList, :WordList, :TokenNum, :RequestId
3024
+
3025
+ def initialize(angle=nil, structurallist=nil, wordlist=nil, tokennum=nil, requestid=nil)
3026
+ @Angle = angle
3027
+ @StructuralList = structurallist
3028
+ @WordList = wordlist
3029
+ @TokenNum = tokennum
3030
+ @RequestId = requestid
3031
+ end
3032
+
3033
+ def deserialize(params)
3034
+ @Angle = params['Angle']
3035
+ unless params['StructuralList'].nil?
3036
+ @StructuralList = []
3037
+ params['StructuralList'].each do |i|
3038
+ groupinfo_tmp = GroupInfo.new
3039
+ groupinfo_tmp.deserialize(i)
3040
+ @StructuralList << groupinfo_tmp
3041
+ end
3042
+ end
3043
+ unless params['WordList'].nil?
3044
+ @WordList = []
3045
+ params['WordList'].each do |i|
3046
+ worditem_tmp = WordItem.new
3047
+ worditem_tmp.deserialize(i)
3048
+ @WordList << worditem_tmp
3049
+ end
3050
+ end
3051
+ @TokenNum = params['TokenNum']
3052
+ @RequestId = params['RequestId']
3053
+ end
3054
+ end
3055
+
3056
+ # ExtractDocMulti请求参数结构体
3057
+ class ExtractDocMultiRequest < TencentCloud::Common::AbstractModel
3058
+ # @param ImageUrl: 图片的 Url 地址。支持的图片格式:PNG、JPG、JPEG,WORD,EXCEL,暂不支持 GIF 格式。支持的图片大小:所下载图片经 Base64 编码后不超过 7M。图片下载时间不超过 3 秒。支持的图片像素:需介于20-10000px之间。图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。
3059
+ # @type ImageUrl: String
3060
+ # @param ImageBase64: 图片的 Base64 值。支持的图片格式:PNG、JPG、JPEG,WORD,EXCEL,暂不支持 GIF 格式。支持的图片大小:所下载图片经Base64编码后不超过 7M。图片下载时间不超过 3 秒。支持的图片像素:需介于20-10000px之间。图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。
3061
+ # @type ImageBase64: String
3062
+ # @param PdfPageNumber: 需要识别的PDF页面的对应页码,仅支持PDF单页识别,当上传文件为PDF且IsPdf参数值为true时有效,默认值为前3页。
3063
+ # @type PdfPageNumber: Integer
3064
+ # @param ItemNames: 自定义结构化功能需返回的字段名称,例:若客户想新增返回姓名、性别两个字段的识别结果,则输入ItemNames=["姓名","性别"]
3065
+ # @type ItemNames: Array
3066
+ # @param ItemNamesShowMode: true:仅输出自定义字段
3067
+ # flase:输出默认字段+自定义字段
3068
+ # 默认true
3069
+ # @type ItemNamesShowMode: Boolean
3070
+ # @param ReturnFullText: 是否开启全文字段识别
3071
+ # @type ReturnFullText: Boolean
3072
+ # @param ConfigId: 配置id支持:
3073
+ # General -- 通用场景
3074
+ # InvoiceEng -- 国际invoice模版
3075
+ # WayBillEng --海运订单模板
3076
+ # CustomsDeclaration -- 进出口报关单
3077
+ # WeightNote -- 磅单
3078
+ # MedicalMeter -- 血压仪表识别
3079
+ # BillOfLading -- 海运提单
3080
+ # EntrustmentBook -- 海运托书
3081
+ # WordRecognize -- 手写英文作文模版
3082
+ # Statement -- 对账单识别模板
3083
+ # BookingConfirmation -- 配舱通知书识别模板
3084
+ # AirWayBill -- 航空运单识别模板
3085
+ # DispatchWeightNote -- 磅单发货单识别模板
3086
+ # ReceiptWeightNote -- 磅单收货单识别模板
3087
+ # ArticalRecognize -- 手写作文模版
3088
+ # Table -- 表格模版
3089
+ # SteelLabel -- 实物标签识别模板
3090
+ # CarInsurance -- 车辆保险单识别模板
3091
+ # @type ConfigId: String
3092
+ # @param EnableCoord: 是否开启全文字段坐标值的识别
3093
+ # @type EnableCoord: Boolean
3094
+ # @param OutputParentKey: 是否开启父子key识别,默认是
3095
+ # @type OutputParentKey: Boolean
3096
+ # @param ConfigAdvanced: 模版的单个属性配置
3097
+ # @type ConfigAdvanced: :class:`Tencentcloud::Ocr.v20181119.models.ConfigAdvanced`
3098
+
3099
+ attr_accessor :ImageUrl, :ImageBase64, :PdfPageNumber, :ItemNames, :ItemNamesShowMode, :ReturnFullText, :ConfigId, :EnableCoord, :OutputParentKey, :ConfigAdvanced
3100
+
3101
+ def initialize(imageurl=nil, imagebase64=nil, pdfpagenumber=nil, itemnames=nil, itemnamesshowmode=nil, returnfulltext=nil, configid=nil, enablecoord=nil, outputparentkey=nil, configadvanced=nil)
3102
+ @ImageUrl = imageurl
3103
+ @ImageBase64 = imagebase64
3104
+ @PdfPageNumber = pdfpagenumber
3105
+ @ItemNames = itemnames
3106
+ @ItemNamesShowMode = itemnamesshowmode
3107
+ @ReturnFullText = returnfulltext
3108
+ @ConfigId = configid
3109
+ @EnableCoord = enablecoord
3110
+ @OutputParentKey = outputparentkey
3111
+ @ConfigAdvanced = configadvanced
3112
+ end
3113
+
3114
+ def deserialize(params)
3115
+ @ImageUrl = params['ImageUrl']
3116
+ @ImageBase64 = params['ImageBase64']
3117
+ @PdfPageNumber = params['PdfPageNumber']
3118
+ @ItemNames = params['ItemNames']
3119
+ @ItemNamesShowMode = params['ItemNamesShowMode']
3120
+ @ReturnFullText = params['ReturnFullText']
3121
+ @ConfigId = params['ConfigId']
3122
+ @EnableCoord = params['EnableCoord']
3123
+ @OutputParentKey = params['OutputParentKey']
3124
+ unless params['ConfigAdvanced'].nil?
3125
+ @ConfigAdvanced = ConfigAdvanced.new
3126
+ @ConfigAdvanced.deserialize(params['ConfigAdvanced'])
3127
+ end
3128
+ end
3129
+ end
3130
+
3131
+ # ExtractDocMulti返回参数结构体
3132
+ class ExtractDocMultiResponse < TencentCloud::Common::AbstractModel
3133
+ # @param Angle: 图片旋转角度(角度制),文本的水平方向为 0;顺时针为正,逆时针为负
3134
+ # @type Angle: Float
3135
+ # @param StructuralList: 配置结构化文本信息
3136
+ # @type StructuralList: Array
3137
+ # @param WordList: 还原文本信息
3138
+ # @type WordList: Array
3139
+ # @param TokenNum: 样本识别字段数
3140
+ # @type TokenNum: Integer
3141
+ # @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
3142
+ # @type RequestId: String
3143
+
3144
+ attr_accessor :Angle, :StructuralList, :WordList, :TokenNum, :RequestId
3145
+
3146
+ def initialize(angle=nil, structurallist=nil, wordlist=nil, tokennum=nil, requestid=nil)
3147
+ @Angle = angle
3148
+ @StructuralList = structurallist
3149
+ @WordList = wordlist
3150
+ @TokenNum = tokennum
3151
+ @RequestId = requestid
3152
+ end
3153
+
3154
+ def deserialize(params)
3155
+ @Angle = params['Angle']
3156
+ unless params['StructuralList'].nil?
3157
+ @StructuralList = []
3158
+ params['StructuralList'].each do |i|
3159
+ groupinfo_tmp = GroupInfo.new
3160
+ groupinfo_tmp.deserialize(i)
3161
+ @StructuralList << groupinfo_tmp
3162
+ end
3163
+ end
3164
+ unless params['WordList'].nil?
3165
+ @WordList = []
3166
+ params['WordList'].each do |i|
3167
+ worditem_tmp = WordItem.new
3168
+ worditem_tmp.deserialize(i)
3169
+ @WordList << worditem_tmp
3170
+ end
3171
+ end
3172
+ @TokenNum = params['TokenNum']
3173
+ @RequestId = params['RequestId']
3174
+ end
3175
+ end
3176
+
2847
3177
  # 金融票据整单识别单个字段的内容
2848
3178
  class FinanBillInfo < TencentCloud::Common::AbstractModel
2849
3179
  # @param Name: 识别出的字段名称(关键字),支持以下字段:
@@ -4229,6 +4559,71 @@ module TencentCloud
4229
4559
  end
4230
4560
  end
4231
4561
 
4562
+ # HandwritingEssayOCR请求参数结构体
4563
+ class HandwritingEssayOCRRequest < TencentCloud::Common::AbstractModel
4564
+ # @param ImageUrl: 图片的 Url 地址。支持的图片格式:PNG、JPG、JPEG,WORD,EXCEL,暂不支持 GIF 格式。支持的图片大小:所下载图片经 Base64 编码后不超过 7M。图片下载时间不超过 3 秒。支持的图片像素:需介于20-10000px之间。图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。
4565
+ # @type ImageUrl: String
4566
+ # @param ImageBase64: 图片的 Base64 值。支持的图片格式:PNG、JPG、JPEG,WORD,EXCEL,暂不支持 GIF 格式。支持的图片大小:所下载图片经Base64编码后不超过 7M。图片下载时间不超过 3 秒。支持的图片像素:需介于20-10000px之间。图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。
4567
+ # @type ImageBase64: String
4568
+ # @param PdfPageNumber: 需要识别的PDF页面的对应页码,仅支持PDF单页识别,当上传文件为PDF且IsPdf参数值为true时有效,默认值为前3页。
4569
+ # @type PdfPageNumber: Integer
4570
+ # @param ConfigId: 配置id支持:
4571
+ # ArticleRecognize -- 手写作文模版
4572
+ # 默认:ArticleRecognize
4573
+ # @type ConfigId: String
4574
+ # @param Scene: 模版的单个属性配置
4575
+ # @type Scene: String
4576
+
4577
+ attr_accessor :ImageUrl, :ImageBase64, :PdfPageNumber, :ConfigId, :Scene
4578
+
4579
+ def initialize(imageurl=nil, imagebase64=nil, pdfpagenumber=nil, configid=nil, scene=nil)
4580
+ @ImageUrl = imageurl
4581
+ @ImageBase64 = imagebase64
4582
+ @PdfPageNumber = pdfpagenumber
4583
+ @ConfigId = configid
4584
+ @Scene = scene
4585
+ end
4586
+
4587
+ def deserialize(params)
4588
+ @ImageUrl = params['ImageUrl']
4589
+ @ImageBase64 = params['ImageBase64']
4590
+ @PdfPageNumber = params['PdfPageNumber']
4591
+ @ConfigId = params['ConfigId']
4592
+ @Scene = params['Scene']
4593
+ end
4594
+ end
4595
+
4596
+ # HandwritingEssayOCR返回参数结构体
4597
+ class HandwritingEssayOCRResponse < TencentCloud::Common::AbstractModel
4598
+ # @param Angle: 图片旋转角度(角度制),文本的水平方向为 0;顺时针为正,逆时针为负
4599
+ # @type Angle: Float
4600
+ # @param WordList: 还原文本信息
4601
+ # @type WordList: Array
4602
+ # @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
4603
+ # @type RequestId: String
4604
+
4605
+ attr_accessor :Angle, :WordList, :RequestId
4606
+
4607
+ def initialize(angle=nil, wordlist=nil, requestid=nil)
4608
+ @Angle = angle
4609
+ @WordList = wordlist
4610
+ @RequestId = requestid
4611
+ end
4612
+
4613
+ def deserialize(params)
4614
+ @Angle = params['Angle']
4615
+ unless params['WordList'].nil?
4616
+ @WordList = []
4617
+ params['WordList'].each do |i|
4618
+ worditem_tmp = WordItem.new
4619
+ worditem_tmp.deserialize(i)
4620
+ @WordList << worditem_tmp
4621
+ end
4622
+ end
4623
+ @RequestId = params['RequestId']
4624
+ end
4625
+ end
4626
+
4232
4627
  # HmtResidentPermitOCR请求参数结构体
4233
4628
  class HmtResidentPermitOCRRequest < TencentCloud::Common::AbstractModel
4234
4629
  # @param ImageBase64: 图片的 Base64 值。
@@ -11113,15 +11508,18 @@ module TencentCloud
11113
11508
  # @type StructuralList: Array
11114
11509
  # @param WordList: 还原文本信息
11115
11510
  # @type WordList: Array
11511
+ # @param TokenNum: 识别出的token个数
11512
+ # @type TokenNum: Integer
11116
11513
  # @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
11117
11514
  # @type RequestId: String
11118
11515
 
11119
- attr_accessor :Angle, :StructuralList, :WordList, :RequestId
11516
+ attr_accessor :Angle, :StructuralList, :WordList, :TokenNum, :RequestId
11120
11517
 
11121
- def initialize(angle=nil, structurallist=nil, wordlist=nil, requestid=nil)
11518
+ def initialize(angle=nil, structurallist=nil, wordlist=nil, tokennum=nil, requestid=nil)
11122
11519
  @Angle = angle
11123
11520
  @StructuralList = structurallist
11124
11521
  @WordList = wordlist
11522
+ @TokenNum = tokennum
11125
11523
  @RequestId = requestid
11126
11524
  end
11127
11525
 
@@ -11143,6 +11541,7 @@ module TencentCloud
11143
11541
  @WordList << worditem_tmp
11144
11542
  end
11145
11543
  end
11544
+ @TokenNum = params['TokenNum']
11146
11545
  @RequestId = params['RequestId']
11147
11546
  end
11148
11547
  end
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.1078
4
+ version: 3.0.1079
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tencent Cloud