tencentcloud-sdk-python-ocr 3.0.1211__tar.gz → 3.0.1213__tar.gz

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.
Files changed (16) hide show
  1. {tencentcloud-sdk-python-ocr-3.0.1211 → tencentcloud-sdk-python-ocr-3.0.1213}/PKG-INFO +1 -1
  2. {tencentcloud-sdk-python-ocr-3.0.1211 → tencentcloud-sdk-python-ocr-3.0.1213}/setup.py +1 -1
  3. {tencentcloud-sdk-python-ocr-3.0.1211 → tencentcloud-sdk-python-ocr-3.0.1213}/tencentcloud/__init__.py +1 -1
  4. {tencentcloud-sdk-python-ocr-3.0.1211 → tencentcloud-sdk-python-ocr-3.0.1213}/tencentcloud/ocr/v20181119/errorcodes.py +6 -0
  5. {tencentcloud-sdk-python-ocr-3.0.1211 → tencentcloud-sdk-python-ocr-3.0.1213}/tencentcloud/ocr/v20181119/models.py +267 -1
  6. {tencentcloud-sdk-python-ocr-3.0.1211 → tencentcloud-sdk-python-ocr-3.0.1213}/tencentcloud/ocr/v20181119/ocr_client.py +46 -0
  7. {tencentcloud-sdk-python-ocr-3.0.1211 → tencentcloud-sdk-python-ocr-3.0.1213}/tencentcloud_sdk_python_ocr.egg-info/PKG-INFO +1 -1
  8. tencentcloud-sdk-python-ocr-3.0.1213/tencentcloud_sdk_python_ocr.egg-info/requires.txt +1 -0
  9. tencentcloud-sdk-python-ocr-3.0.1211/tencentcloud_sdk_python_ocr.egg-info/requires.txt +0 -1
  10. {tencentcloud-sdk-python-ocr-3.0.1211 → tencentcloud-sdk-python-ocr-3.0.1213}/README.rst +0 -0
  11. {tencentcloud-sdk-python-ocr-3.0.1211 → tencentcloud-sdk-python-ocr-3.0.1213}/setup.cfg +0 -0
  12. {tencentcloud-sdk-python-ocr-3.0.1211 → tencentcloud-sdk-python-ocr-3.0.1213}/tencentcloud/ocr/__init__.py +0 -0
  13. {tencentcloud-sdk-python-ocr-3.0.1211 → tencentcloud-sdk-python-ocr-3.0.1213}/tencentcloud/ocr/v20181119/__init__.py +0 -0
  14. {tencentcloud-sdk-python-ocr-3.0.1211 → tencentcloud-sdk-python-ocr-3.0.1213}/tencentcloud_sdk_python_ocr.egg-info/SOURCES.txt +0 -0
  15. {tencentcloud-sdk-python-ocr-3.0.1211 → tencentcloud-sdk-python-ocr-3.0.1213}/tencentcloud_sdk_python_ocr.egg-info/dependency_links.txt +0 -0
  16. {tencentcloud-sdk-python-ocr-3.0.1211 → tencentcloud-sdk-python-ocr-3.0.1213}/tencentcloud_sdk_python_ocr.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.1
2
2
  Name: tencentcloud-sdk-python-ocr
3
- Version: 3.0.1211
3
+ Version: 3.0.1213
4
4
  Summary: Tencent Cloud Ocr SDK for Python
5
5
  Home-page: https://github.com/TencentCloud/tencentcloud-sdk-python
6
6
  Author: Tencent Cloud
@@ -8,7 +8,7 @@ ROOT = os.path.dirname(__file__)
8
8
 
9
9
  setup(
10
10
  name='tencentcloud-sdk-python-ocr',
11
- install_requires=["tencentcloud-sdk-python-common==3.0.1211"],
11
+ install_requires=["tencentcloud-sdk-python-common==3.0.1213"],
12
12
  version=tencentcloud.__version__,
13
13
  description='Tencent Cloud Ocr SDK for Python',
14
14
  long_description=open('README.rst').read(),
@@ -14,4 +14,4 @@
14
14
  # limitations under the License.
15
15
 
16
16
 
17
- __version__ = '3.0.1211'
17
+ __version__ = '3.0.1213'
@@ -20,6 +20,9 @@ FAILEDOPERATION_ARREARSERROR = 'FailedOperation.ArrearsError'
20
20
  # 身份证CardSide类型错误
21
21
  FAILEDOPERATION_CARDSIDEERROR = 'FailedOperation.CardSideError'
22
22
 
23
+ # 图片分类失败
24
+ FAILEDOPERATION_CLASSIFYSTOREFAILED = 'FailedOperation.ClassifyStoreFailed'
25
+
23
26
  # 今日次数达到限制。
24
27
  FAILEDOPERATION_COUNTLIMITERROR = 'FailedOperation.CountLimitError'
25
28
 
@@ -104,6 +107,9 @@ FAILEDOPERATION_NOMASIDCARD = 'FailedOperation.NoMASIDCard'
104
107
  # 非护照。
105
108
  FAILEDOPERATION_NOPASSPORT = 'FailedOperation.NoPassport'
106
109
 
110
+ # 图片不属于门头照
111
+ FAILEDOPERATION_NOSTORELABEL = 'FailedOperation.NoStoreLabel'
112
+
107
113
  # 上传的图片非行驶证
108
114
  FAILEDOPERATION_NOVEHICLELICENSEERROR = 'FailedOperation.NoVehicleLicenseError'
109
115
 
@@ -2946,6 +2946,92 @@ class ClassifyDetectOCRResponse(AbstractModel):
2946
2946
  self._RequestId = params.get("RequestId")
2947
2947
 
2948
2948
 
2949
+ class ClassifyStoreNameRequest(AbstractModel):
2950
+ """ClassifyStoreName请求参数结构体
2951
+
2952
+ """
2953
+
2954
+ def __init__(self):
2955
+ r"""
2956
+ :param _ImageBase64: 图片的 Base64 值。
2957
+ 支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。
2958
+ 支持的图片大小:所下载图片经Base64编码后不超过 7M。图片下载时间不超过 3 秒。
2959
+ 支持的图片像素:需介于20-10000px之间。
2960
+ 图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。
2961
+ :type ImageBase64: str
2962
+ :param _ImageUrl: 图片的 Url 地址。支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。支持的图片大小:所下载图片经 Base64 编码后不超过 7M。图片下载时间不超过 3 秒。支持的图片像素:需介于20-10000px之间。图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。
2963
+ :type ImageUrl: str
2964
+ """
2965
+ self._ImageBase64 = None
2966
+ self._ImageUrl = None
2967
+
2968
+ @property
2969
+ def ImageBase64(self):
2970
+ return self._ImageBase64
2971
+
2972
+ @ImageBase64.setter
2973
+ def ImageBase64(self, ImageBase64):
2974
+ self._ImageBase64 = ImageBase64
2975
+
2976
+ @property
2977
+ def ImageUrl(self):
2978
+ return self._ImageUrl
2979
+
2980
+ @ImageUrl.setter
2981
+ def ImageUrl(self, ImageUrl):
2982
+ self._ImageUrl = ImageUrl
2983
+
2984
+
2985
+ def _deserialize(self, params):
2986
+ self._ImageBase64 = params.get("ImageBase64")
2987
+ self._ImageUrl = params.get("ImageUrl")
2988
+ memeber_set = set(params.keys())
2989
+ for name, value in vars(self).items():
2990
+ property_name = name[1:]
2991
+ if property_name in memeber_set:
2992
+ memeber_set.remove(property_name)
2993
+ if len(memeber_set) > 0:
2994
+ warnings.warn("%s fileds are useless." % ",".join(memeber_set))
2995
+
2996
+
2997
+
2998
+ class ClassifyStoreNameResponse(AbstractModel):
2999
+ """ClassifyStoreName返回参数结构体
3000
+
3001
+ """
3002
+
3003
+ def __init__(self):
3004
+ r"""
3005
+ :param _StoreLabel: 门头照标签
3006
+ :type StoreLabel: list of str
3007
+ :param _RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
3008
+ :type RequestId: str
3009
+ """
3010
+ self._StoreLabel = None
3011
+ self._RequestId = None
3012
+
3013
+ @property
3014
+ def StoreLabel(self):
3015
+ return self._StoreLabel
3016
+
3017
+ @StoreLabel.setter
3018
+ def StoreLabel(self, StoreLabel):
3019
+ self._StoreLabel = StoreLabel
3020
+
3021
+ @property
3022
+ def RequestId(self):
3023
+ return self._RequestId
3024
+
3025
+ @RequestId.setter
3026
+ def RequestId(self, RequestId):
3027
+ self._RequestId = RequestId
3028
+
3029
+
3030
+ def _deserialize(self, params):
3031
+ self._StoreLabel = params.get("StoreLabel")
3032
+ self._RequestId = params.get("RequestId")
3033
+
3034
+
2949
3035
  class Coord(AbstractModel):
2950
3036
  """坐标
2951
3037
 
@@ -15334,7 +15420,12 @@ class QrcodeResultsInfo(AbstractModel):
15334
15420
 
15335
15421
  def __init__(self):
15336
15422
  r"""
15337
- :param _TypeName: 类型(二维码、条形码)
15423
+ :param _TypeName: 类型包括
15424
+ 二维码:QR_CODE
15425
+ 一维码:EAN-13、EAN-8、EAN-2、UPC-A、UPC-E、CODE-39、CODE-93、CODE-128
15426
+ PDF:PDF_417
15427
+ DataMatrix:DATA_MATRIX
15428
+ 小程序码:WX_CODE
15338
15429
  :type TypeName: str
15339
15430
  :param _Url: 二维码/条形码包含的地址
15340
15431
  :type Url: str
@@ -19159,6 +19250,121 @@ class RecognizePhilippinesVoteIDOCRResponse(AbstractModel):
19159
19250
  self._RequestId = params.get("RequestId")
19160
19251
 
19161
19252
 
19253
+ class RecognizeStoreNameRequest(AbstractModel):
19254
+ """RecognizeStoreName请求参数结构体
19255
+
19256
+ """
19257
+
19258
+ def __init__(self):
19259
+ r"""
19260
+ :param _ImageBase64: 图片的 Base64 值。
19261
+ 支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。
19262
+ 支持的图片大小:所下载图片经Base64编码后不超过 7M。图片下载时间不超过 3 秒。
19263
+ 支持的图片像素:需介于20-10000px之间。
19264
+ 图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。
19265
+ :type ImageBase64: str
19266
+ :param _ImageUrl: 图片的 Url 地址。支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。支持的图片大小:所下载图片经 Base64 编码后不超过 7M。图片下载时间不超过 3 秒。支持的图片像素:需介于20-10000px之间。图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。
19267
+ :type ImageUrl: str
19268
+ """
19269
+ self._ImageBase64 = None
19270
+ self._ImageUrl = None
19271
+
19272
+ @property
19273
+ def ImageBase64(self):
19274
+ return self._ImageBase64
19275
+
19276
+ @ImageBase64.setter
19277
+ def ImageBase64(self, ImageBase64):
19278
+ self._ImageBase64 = ImageBase64
19279
+
19280
+ @property
19281
+ def ImageUrl(self):
19282
+ return self._ImageUrl
19283
+
19284
+ @ImageUrl.setter
19285
+ def ImageUrl(self, ImageUrl):
19286
+ self._ImageUrl = ImageUrl
19287
+
19288
+
19289
+ def _deserialize(self, params):
19290
+ self._ImageBase64 = params.get("ImageBase64")
19291
+ self._ImageUrl = params.get("ImageUrl")
19292
+ memeber_set = set(params.keys())
19293
+ for name, value in vars(self).items():
19294
+ property_name = name[1:]
19295
+ if property_name in memeber_set:
19296
+ memeber_set.remove(property_name)
19297
+ if len(memeber_set) > 0:
19298
+ warnings.warn("%s fileds are useless." % ",".join(memeber_set))
19299
+
19300
+
19301
+
19302
+ class RecognizeStoreNameResponse(AbstractModel):
19303
+ """RecognizeStoreName返回参数结构体
19304
+
19305
+ """
19306
+
19307
+ def __init__(self):
19308
+ r"""
19309
+ :param _StoreInfo: 门头照名称
19310
+ :type StoreInfo: list of StoreInfo
19311
+ :param _Angle: 图片旋转角度(角度制),文本的水平方向为0°,顺时针为正,逆时针为负
19312
+ :type Angle: float
19313
+ :param _StoreLabel: 门头照标签
19314
+ :type StoreLabel: list of str
19315
+ :param _RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
19316
+ :type RequestId: str
19317
+ """
19318
+ self._StoreInfo = None
19319
+ self._Angle = None
19320
+ self._StoreLabel = None
19321
+ self._RequestId = None
19322
+
19323
+ @property
19324
+ def StoreInfo(self):
19325
+ return self._StoreInfo
19326
+
19327
+ @StoreInfo.setter
19328
+ def StoreInfo(self, StoreInfo):
19329
+ self._StoreInfo = StoreInfo
19330
+
19331
+ @property
19332
+ def Angle(self):
19333
+ return self._Angle
19334
+
19335
+ @Angle.setter
19336
+ def Angle(self, Angle):
19337
+ self._Angle = Angle
19338
+
19339
+ @property
19340
+ def StoreLabel(self):
19341
+ return self._StoreLabel
19342
+
19343
+ @StoreLabel.setter
19344
+ def StoreLabel(self, StoreLabel):
19345
+ self._StoreLabel = StoreLabel
19346
+
19347
+ @property
19348
+ def RequestId(self):
19349
+ return self._RequestId
19350
+
19351
+ @RequestId.setter
19352
+ def RequestId(self, RequestId):
19353
+ self._RequestId = RequestId
19354
+
19355
+
19356
+ def _deserialize(self, params):
19357
+ if params.get("StoreInfo") is not None:
19358
+ self._StoreInfo = []
19359
+ for item in params.get("StoreInfo"):
19360
+ obj = StoreInfo()
19361
+ obj._deserialize(item)
19362
+ self._StoreInfo.append(obj)
19363
+ self._Angle = params.get("Angle")
19364
+ self._StoreLabel = params.get("StoreLabel")
19365
+ self._RequestId = params.get("RequestId")
19366
+
19367
+
19162
19368
  class RecognizeTableAccurateOCRRequest(AbstractModel):
19163
19369
  """RecognizeTableAccurateOCR请求参数结构体
19164
19370
 
@@ -22389,6 +22595,66 @@ class SmartStructuralOCRV2Response(AbstractModel):
22389
22595
  self._RequestId = params.get("RequestId")
22390
22596
 
22391
22597
 
22598
+ class StoreInfo(AbstractModel):
22599
+ """门头照识别结果
22600
+
22601
+ """
22602
+
22603
+ def __init__(self):
22604
+ r"""
22605
+ :param _Name: 识别出的字段名称(关键字),支持以下字段:
22606
+ 付款开户行、收款开户行、付款账号、收款账号、回单类型、回单编号、币种、流水号、凭证号码、交易机构、交易金额、手续费、日期等字段信息。
22607
+ :type Name: str
22608
+ :param _Value: 识别出的字段名称对应的值,也就是字段Name对应的字符串结果。
22609
+ :type Value: str
22610
+ :param _Rect: 文本行在旋转纠正之后的图像中的像素坐标
22611
+ :type Rect: :class:`tencentcloud.ocr.v20181119.models.Rect`
22612
+ """
22613
+ self._Name = None
22614
+ self._Value = None
22615
+ self._Rect = None
22616
+
22617
+ @property
22618
+ def Name(self):
22619
+ return self._Name
22620
+
22621
+ @Name.setter
22622
+ def Name(self, Name):
22623
+ self._Name = Name
22624
+
22625
+ @property
22626
+ def Value(self):
22627
+ return self._Value
22628
+
22629
+ @Value.setter
22630
+ def Value(self, Value):
22631
+ self._Value = Value
22632
+
22633
+ @property
22634
+ def Rect(self):
22635
+ return self._Rect
22636
+
22637
+ @Rect.setter
22638
+ def Rect(self, Rect):
22639
+ self._Rect = Rect
22640
+
22641
+
22642
+ def _deserialize(self, params):
22643
+ self._Name = params.get("Name")
22644
+ self._Value = params.get("Value")
22645
+ if params.get("Rect") is not None:
22646
+ self._Rect = Rect()
22647
+ self._Rect._deserialize(params.get("Rect"))
22648
+ memeber_set = set(params.keys())
22649
+ for name, value in vars(self).items():
22650
+ property_name = name[1:]
22651
+ if property_name in memeber_set:
22652
+ memeber_set.remove(property_name)
22653
+ if len(memeber_set) > 0:
22654
+ warnings.warn("%s fileds are useless." % ",".join(memeber_set))
22655
+
22656
+
22657
+
22392
22658
  class StructuralItem(AbstractModel):
22393
22659
  """智能结构化识别
22394
22660
 
@@ -253,6 +253,29 @@ class OcrClient(AbstractClient):
253
253
  raise TencentCloudSDKException(type(e).__name__, str(e))
254
254
 
255
255
 
256
+ def ClassifyStoreName(self, request):
257
+ """本接口用于识别门头照分类标签信息
258
+
259
+ :param request: Request instance for ClassifyStoreName.
260
+ :type request: :class:`tencentcloud.ocr.v20181119.models.ClassifyStoreNameRequest`
261
+ :rtype: :class:`tencentcloud.ocr.v20181119.models.ClassifyStoreNameResponse`
262
+
263
+ """
264
+ try:
265
+ params = request._serialize()
266
+ headers = request.headers
267
+ body = self.call("ClassifyStoreName", params, headers=headers)
268
+ response = json.loads(body)
269
+ model = models.ClassifyStoreNameResponse()
270
+ model._deserialize(response["Response"])
271
+ return model
272
+ except Exception as e:
273
+ if isinstance(e, TencentCloudSDKException):
274
+ raise
275
+ else:
276
+ raise TencentCloudSDKException(type(e).__name__, str(e))
277
+
278
+
256
279
  def CreateAIFormTask(self, request):
257
280
  """本接口可创建智能表单录入任务,支持多个识别图片和PDF的URL上传,返回含有识别内容的操作页面URL。
258
281
 
@@ -1921,6 +1944,29 @@ class OcrClient(AbstractClient):
1921
1944
  raise TencentCloudSDKException(type(e).__name__, str(e))
1922
1945
 
1923
1946
 
1947
+ def RecognizeStoreName(self, request):
1948
+ """本接口用于识别门头照文字识别结果以及对应分类标签信息
1949
+
1950
+ :param request: Request instance for RecognizeStoreName.
1951
+ :type request: :class:`tencentcloud.ocr.v20181119.models.RecognizeStoreNameRequest`
1952
+ :rtype: :class:`tencentcloud.ocr.v20181119.models.RecognizeStoreNameResponse`
1953
+
1954
+ """
1955
+ try:
1956
+ params = request._serialize()
1957
+ headers = request.headers
1958
+ body = self.call("RecognizeStoreName", params, headers=headers)
1959
+ response = json.loads(body)
1960
+ model = models.RecognizeStoreNameResponse()
1961
+ model._deserialize(response["Response"])
1962
+ return model
1963
+ except Exception as e:
1964
+ if isinstance(e, TencentCloudSDKException):
1965
+ raise
1966
+ else:
1967
+ raise TencentCloudSDKException(type(e).__name__, str(e))
1968
+
1969
+
1924
1970
  def RecognizeTableAccurateOCR(self, request):
1925
1971
  """本接口支持中英文图片/PDF内常规表格、无线表格、多表格的检测和识别,返回每个单元格的文字内容,支持旋转的表格图片识别,且支持将识别结果保存为 Excel 格式。识别效果比表格识别V2更好,覆盖场景更加广泛,对表格难例场景,如无线表格、嵌套表格(有线表格中包含无线表格)的识别效果均优于表格识别V2。点击[立即体验](https://cloud.tencent.com/act/event/ocrdemo)。
1926
1972
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.1
2
2
  Name: tencentcloud-sdk-python-ocr
3
- Version: 3.0.1211
3
+ Version: 3.0.1213
4
4
  Summary: Tencent Cloud Ocr SDK for Python
5
5
  Home-page: https://github.com/TencentCloud/tencentcloud-sdk-python
6
6
  Author: Tencent Cloud
@@ -0,0 +1 @@
1
+ tencentcloud-sdk-python-common==3.0.1213
@@ -1 +0,0 @@
1
- tencentcloud-sdk-python-common==3.0.1211