tencentcloud-sdk-python-ocr 3.0.1258__tar.gz → 3.0.1260__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.
- {tencentcloud-sdk-python-ocr-3.0.1258 → tencentcloud-sdk-python-ocr-3.0.1260}/PKG-INFO +1 -1
- {tencentcloud-sdk-python-ocr-3.0.1258 → tencentcloud-sdk-python-ocr-3.0.1260}/setup.py +1 -1
- {tencentcloud-sdk-python-ocr-3.0.1258 → tencentcloud-sdk-python-ocr-3.0.1260}/tencentcloud/__init__.py +1 -1
- {tencentcloud-sdk-python-ocr-3.0.1258 → tencentcloud-sdk-python-ocr-3.0.1260}/tencentcloud/ocr/v20181119/models.py +165 -1
- {tencentcloud-sdk-python-ocr-3.0.1258 → tencentcloud-sdk-python-ocr-3.0.1260}/tencentcloud/ocr/v20181119/ocr_client.py +25 -0
- {tencentcloud-sdk-python-ocr-3.0.1258 → tencentcloud-sdk-python-ocr-3.0.1260}/tencentcloud_sdk_python_ocr.egg-info/PKG-INFO +1 -1
- tencentcloud-sdk-python-ocr-3.0.1260/tencentcloud_sdk_python_ocr.egg-info/requires.txt +1 -0
- tencentcloud-sdk-python-ocr-3.0.1258/tencentcloud_sdk_python_ocr.egg-info/requires.txt +0 -1
- {tencentcloud-sdk-python-ocr-3.0.1258 → tencentcloud-sdk-python-ocr-3.0.1260}/README.rst +0 -0
- {tencentcloud-sdk-python-ocr-3.0.1258 → tencentcloud-sdk-python-ocr-3.0.1260}/setup.cfg +0 -0
- {tencentcloud-sdk-python-ocr-3.0.1258 → tencentcloud-sdk-python-ocr-3.0.1260}/tencentcloud/ocr/__init__.py +0 -0
- {tencentcloud-sdk-python-ocr-3.0.1258 → tencentcloud-sdk-python-ocr-3.0.1260}/tencentcloud/ocr/v20181119/__init__.py +0 -0
- {tencentcloud-sdk-python-ocr-3.0.1258 → tencentcloud-sdk-python-ocr-3.0.1260}/tencentcloud/ocr/v20181119/errorcodes.py +0 -0
- {tencentcloud-sdk-python-ocr-3.0.1258 → tencentcloud-sdk-python-ocr-3.0.1260}/tencentcloud_sdk_python_ocr.egg-info/SOURCES.txt +0 -0
- {tencentcloud-sdk-python-ocr-3.0.1258 → tencentcloud-sdk-python-ocr-3.0.1260}/tencentcloud_sdk_python_ocr.egg-info/dependency_links.txt +0 -0
- {tencentcloud-sdk-python-ocr-3.0.1258 → tencentcloud-sdk-python-ocr-3.0.1260}/tencentcloud_sdk_python_ocr.egg-info/top_level.txt +0 -0
|
@@ -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.
|
|
11
|
+
install_requires=["tencentcloud-sdk-python-common==3.0.1260"],
|
|
12
12
|
version=tencentcloud.__version__,
|
|
13
13
|
description='Tencent Cloud Ocr SDK for Python',
|
|
14
14
|
long_description=open('README.rst').read(),
|
|
@@ -22654,6 +22654,170 @@ class SmartStructuralOCRV2Response(AbstractModel):
|
|
|
22654
22654
|
self._RequestId = params.get("RequestId")
|
|
22655
22655
|
|
|
22656
22656
|
|
|
22657
|
+
class SmartStructuralProRequest(AbstractModel):
|
|
22658
|
+
"""SmartStructuralPro请求参数结构体
|
|
22659
|
+
|
|
22660
|
+
"""
|
|
22661
|
+
|
|
22662
|
+
def __init__(self):
|
|
22663
|
+
r"""
|
|
22664
|
+
:param _ImageUrl: 图片的 Url 地址。支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。支持的图片大小:所下载图片经 Base64 编码后不超过 7M。图片下载时间不超过 3 秒。支持的图片像素:需介于20-10000px之间。图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。
|
|
22665
|
+
:type ImageUrl: str
|
|
22666
|
+
:param _ImageBase64: 图片的 Base64 值。支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。支持的图片大小:所下载图片经Base64编码后不超过 7M。图片下载时间不超过 3 秒。支持的图片像素:需介于20-10000px之间。图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。
|
|
22667
|
+
:type ImageBase64: str
|
|
22668
|
+
:param _PdfPageNumber: 需要识别的PDF页面的对应页码,仅支持PDF单页识别,当上传文件为PDF且IsPdf参数值为true时有效,默认值为1。
|
|
22669
|
+
:type PdfPageNumber: int
|
|
22670
|
+
:param _ItemNames: 自定义结构化功能需返回的字段名称,例:若客户只想返回姓名、性别两个字段的识别结果,则输入ItemNames=["姓名","性别"]
|
|
22671
|
+
:type ItemNames: list of str
|
|
22672
|
+
:param _ReturnFullText: 是否开启全文字段识别
|
|
22673
|
+
:type ReturnFullText: bool
|
|
22674
|
+
:param _ConfigId: 配置id支持:General -- 通用场景 InvoiceEng -- 海运提单、国际invoice模版 WayBillEng --海运订单模板
|
|
22675
|
+
:type ConfigId: str
|
|
22676
|
+
"""
|
|
22677
|
+
self._ImageUrl = None
|
|
22678
|
+
self._ImageBase64 = None
|
|
22679
|
+
self._PdfPageNumber = None
|
|
22680
|
+
self._ItemNames = None
|
|
22681
|
+
self._ReturnFullText = None
|
|
22682
|
+
self._ConfigId = None
|
|
22683
|
+
|
|
22684
|
+
@property
|
|
22685
|
+
def ImageUrl(self):
|
|
22686
|
+
return self._ImageUrl
|
|
22687
|
+
|
|
22688
|
+
@ImageUrl.setter
|
|
22689
|
+
def ImageUrl(self, ImageUrl):
|
|
22690
|
+
self._ImageUrl = ImageUrl
|
|
22691
|
+
|
|
22692
|
+
@property
|
|
22693
|
+
def ImageBase64(self):
|
|
22694
|
+
return self._ImageBase64
|
|
22695
|
+
|
|
22696
|
+
@ImageBase64.setter
|
|
22697
|
+
def ImageBase64(self, ImageBase64):
|
|
22698
|
+
self._ImageBase64 = ImageBase64
|
|
22699
|
+
|
|
22700
|
+
@property
|
|
22701
|
+
def PdfPageNumber(self):
|
|
22702
|
+
return self._PdfPageNumber
|
|
22703
|
+
|
|
22704
|
+
@PdfPageNumber.setter
|
|
22705
|
+
def PdfPageNumber(self, PdfPageNumber):
|
|
22706
|
+
self._PdfPageNumber = PdfPageNumber
|
|
22707
|
+
|
|
22708
|
+
@property
|
|
22709
|
+
def ItemNames(self):
|
|
22710
|
+
return self._ItemNames
|
|
22711
|
+
|
|
22712
|
+
@ItemNames.setter
|
|
22713
|
+
def ItemNames(self, ItemNames):
|
|
22714
|
+
self._ItemNames = ItemNames
|
|
22715
|
+
|
|
22716
|
+
@property
|
|
22717
|
+
def ReturnFullText(self):
|
|
22718
|
+
return self._ReturnFullText
|
|
22719
|
+
|
|
22720
|
+
@ReturnFullText.setter
|
|
22721
|
+
def ReturnFullText(self, ReturnFullText):
|
|
22722
|
+
self._ReturnFullText = ReturnFullText
|
|
22723
|
+
|
|
22724
|
+
@property
|
|
22725
|
+
def ConfigId(self):
|
|
22726
|
+
return self._ConfigId
|
|
22727
|
+
|
|
22728
|
+
@ConfigId.setter
|
|
22729
|
+
def ConfigId(self, ConfigId):
|
|
22730
|
+
self._ConfigId = ConfigId
|
|
22731
|
+
|
|
22732
|
+
|
|
22733
|
+
def _deserialize(self, params):
|
|
22734
|
+
self._ImageUrl = params.get("ImageUrl")
|
|
22735
|
+
self._ImageBase64 = params.get("ImageBase64")
|
|
22736
|
+
self._PdfPageNumber = params.get("PdfPageNumber")
|
|
22737
|
+
self._ItemNames = params.get("ItemNames")
|
|
22738
|
+
self._ReturnFullText = params.get("ReturnFullText")
|
|
22739
|
+
self._ConfigId = params.get("ConfigId")
|
|
22740
|
+
memeber_set = set(params.keys())
|
|
22741
|
+
for name, value in vars(self).items():
|
|
22742
|
+
property_name = name[1:]
|
|
22743
|
+
if property_name in memeber_set:
|
|
22744
|
+
memeber_set.remove(property_name)
|
|
22745
|
+
if len(memeber_set) > 0:
|
|
22746
|
+
warnings.warn("%s fileds are useless." % ",".join(memeber_set))
|
|
22747
|
+
|
|
22748
|
+
|
|
22749
|
+
|
|
22750
|
+
class SmartStructuralProResponse(AbstractModel):
|
|
22751
|
+
"""SmartStructuralPro返回参数结构体
|
|
22752
|
+
|
|
22753
|
+
"""
|
|
22754
|
+
|
|
22755
|
+
def __init__(self):
|
|
22756
|
+
r"""
|
|
22757
|
+
:param _Angle: 图片旋转角度(角度制),文本的水平方向为 0;顺时针为正,逆时针为负
|
|
22758
|
+
:type Angle: float
|
|
22759
|
+
:param _StructuralList: 配置结构化文本信息
|
|
22760
|
+
:type StructuralList: list of GroupInfo
|
|
22761
|
+
:param _WordList: 还原文本信息
|
|
22762
|
+
:type WordList: list of WordItem
|
|
22763
|
+
:param _RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
|
22764
|
+
:type RequestId: str
|
|
22765
|
+
"""
|
|
22766
|
+
self._Angle = None
|
|
22767
|
+
self._StructuralList = None
|
|
22768
|
+
self._WordList = None
|
|
22769
|
+
self._RequestId = None
|
|
22770
|
+
|
|
22771
|
+
@property
|
|
22772
|
+
def Angle(self):
|
|
22773
|
+
return self._Angle
|
|
22774
|
+
|
|
22775
|
+
@Angle.setter
|
|
22776
|
+
def Angle(self, Angle):
|
|
22777
|
+
self._Angle = Angle
|
|
22778
|
+
|
|
22779
|
+
@property
|
|
22780
|
+
def StructuralList(self):
|
|
22781
|
+
return self._StructuralList
|
|
22782
|
+
|
|
22783
|
+
@StructuralList.setter
|
|
22784
|
+
def StructuralList(self, StructuralList):
|
|
22785
|
+
self._StructuralList = StructuralList
|
|
22786
|
+
|
|
22787
|
+
@property
|
|
22788
|
+
def WordList(self):
|
|
22789
|
+
return self._WordList
|
|
22790
|
+
|
|
22791
|
+
@WordList.setter
|
|
22792
|
+
def WordList(self, WordList):
|
|
22793
|
+
self._WordList = WordList
|
|
22794
|
+
|
|
22795
|
+
@property
|
|
22796
|
+
def RequestId(self):
|
|
22797
|
+
return self._RequestId
|
|
22798
|
+
|
|
22799
|
+
@RequestId.setter
|
|
22800
|
+
def RequestId(self, RequestId):
|
|
22801
|
+
self._RequestId = RequestId
|
|
22802
|
+
|
|
22803
|
+
|
|
22804
|
+
def _deserialize(self, params):
|
|
22805
|
+
self._Angle = params.get("Angle")
|
|
22806
|
+
if params.get("StructuralList") is not None:
|
|
22807
|
+
self._StructuralList = []
|
|
22808
|
+
for item in params.get("StructuralList"):
|
|
22809
|
+
obj = GroupInfo()
|
|
22810
|
+
obj._deserialize(item)
|
|
22811
|
+
self._StructuralList.append(obj)
|
|
22812
|
+
if params.get("WordList") is not None:
|
|
22813
|
+
self._WordList = []
|
|
22814
|
+
for item in params.get("WordList"):
|
|
22815
|
+
obj = WordItem()
|
|
22816
|
+
obj._deserialize(item)
|
|
22817
|
+
self._WordList.append(obj)
|
|
22818
|
+
self._RequestId = params.get("RequestId")
|
|
22819
|
+
|
|
22820
|
+
|
|
22657
22821
|
class StoreInfo(AbstractModel):
|
|
22658
22822
|
"""门头照识别结果
|
|
22659
22823
|
|
|
@@ -23891,7 +24055,7 @@ class TextArithmetic(AbstractModel):
|
|
|
23891
24055
|
‘10’: 脱式计算
|
|
23892
24056
|
‘11’: 解方程
|
|
23893
24057
|
:type ExpressionType: str
|
|
23894
|
-
:param _Answer: 错题推荐答案,算式运算结果正确返回为"",算式运算结果错误返回推荐答案 (
|
|
24058
|
+
:param _Answer: 错题推荐答案,算式运算结果正确返回为"",算式运算结果错误返回推荐答案 (注:暂不支持多个关系运算符(如`1<10<7`)、无关系运算符(如frac(1,2)+frac(2,3))、单位换算(如1元=100角)错题的推荐答案返回)
|
|
23895
24059
|
:type Answer: str
|
|
23896
24060
|
"""
|
|
23897
24061
|
self._DetectedText = None
|
|
@@ -2273,6 +2273,31 @@ class OcrClient(AbstractClient):
|
|
|
2273
2273
|
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
2274
2274
|
|
|
2275
2275
|
|
|
2276
|
+
def SmartStructuralPro(self, request):
|
|
2277
|
+
"""本接口支持智能提取各类证照、票据、表单、合同等结构化场景的key:value字段信息,并支持提取表格信息的key:value组的结构化,灵活高效,适用于各类非标准材料的信息录入场景,点击[立即体验](https://cloud.tencent.com/product/smart-ocr)。
|
|
2278
|
+
|
|
2279
|
+
默认接口请求频率限制:1次/秒。
|
|
2280
|
+
|
|
2281
|
+
:param request: Request instance for SmartStructuralPro.
|
|
2282
|
+
:type request: :class:`tencentcloud.ocr.v20181119.models.SmartStructuralProRequest`
|
|
2283
|
+
:rtype: :class:`tencentcloud.ocr.v20181119.models.SmartStructuralProResponse`
|
|
2284
|
+
|
|
2285
|
+
"""
|
|
2286
|
+
try:
|
|
2287
|
+
params = request._serialize()
|
|
2288
|
+
headers = request.headers
|
|
2289
|
+
body = self.call("SmartStructuralPro", params, headers=headers)
|
|
2290
|
+
response = json.loads(body)
|
|
2291
|
+
model = models.SmartStructuralProResponse()
|
|
2292
|
+
model._deserialize(response["Response"])
|
|
2293
|
+
return model
|
|
2294
|
+
except Exception as e:
|
|
2295
|
+
if isinstance(e, TencentCloudSDKException):
|
|
2296
|
+
raise
|
|
2297
|
+
else:
|
|
2298
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
2299
|
+
|
|
2300
|
+
|
|
2276
2301
|
def TableOCR(self, request):
|
|
2277
2302
|
"""<b>此接口为表格识别的旧版本服务,不再进行服务升级,建议您使用识别能力更强、服务性能更优的<a href="https://cloud.tencent.com/document/product/866/49525">新版表格识别</a>。</b>
|
|
2278
2303
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
tencentcloud-sdk-python-common==3.0.1260
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
tencentcloud-sdk-python-common==3.0.1258
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|