tencentcloud-sdk-python-ocr 3.0.1429__tar.gz → 3.0.1431__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.
Potentially problematic release.
This version of tencentcloud-sdk-python-ocr might be problematic. Click here for more details.
- {tencentcloud-sdk-python-ocr-3.0.1429 → tencentcloud-sdk-python-ocr-3.0.1431}/PKG-INFO +1 -1
- {tencentcloud-sdk-python-ocr-3.0.1429 → tencentcloud-sdk-python-ocr-3.0.1431}/setup.py +1 -1
- {tencentcloud-sdk-python-ocr-3.0.1429 → tencentcloud-sdk-python-ocr-3.0.1431}/tencentcloud/__init__.py +1 -1
- {tencentcloud-sdk-python-ocr-3.0.1429 → tencentcloud-sdk-python-ocr-3.0.1431}/tencentcloud/ocr/v20181119/models.py +147 -0
- {tencentcloud-sdk-python-ocr-3.0.1429 → tencentcloud-sdk-python-ocr-3.0.1431}/tencentcloud/ocr/v20181119/ocr_client.py +25 -0
- {tencentcloud-sdk-python-ocr-3.0.1429 → tencentcloud-sdk-python-ocr-3.0.1431}/tencentcloud_sdk_python_ocr.egg-info/PKG-INFO +1 -1
- tencentcloud-sdk-python-ocr-3.0.1431/tencentcloud_sdk_python_ocr.egg-info/requires.txt +1 -0
- tencentcloud-sdk-python-ocr-3.0.1429/tencentcloud_sdk_python_ocr.egg-info/requires.txt +0 -1
- {tencentcloud-sdk-python-ocr-3.0.1429 → tencentcloud-sdk-python-ocr-3.0.1431}/README.rst +0 -0
- {tencentcloud-sdk-python-ocr-3.0.1429 → tencentcloud-sdk-python-ocr-3.0.1431}/setup.cfg +0 -0
- {tencentcloud-sdk-python-ocr-3.0.1429 → tencentcloud-sdk-python-ocr-3.0.1431}/tencentcloud/ocr/__init__.py +0 -0
- {tencentcloud-sdk-python-ocr-3.0.1429 → tencentcloud-sdk-python-ocr-3.0.1431}/tencentcloud/ocr/v20181119/__init__.py +0 -0
- {tencentcloud-sdk-python-ocr-3.0.1429 → tencentcloud-sdk-python-ocr-3.0.1431}/tencentcloud/ocr/v20181119/errorcodes.py +0 -0
- {tencentcloud-sdk-python-ocr-3.0.1429 → tencentcloud-sdk-python-ocr-3.0.1431}/tencentcloud_sdk_python_ocr.egg-info/SOURCES.txt +0 -0
- {tencentcloud-sdk-python-ocr-3.0.1429 → tencentcloud-sdk-python-ocr-3.0.1431}/tencentcloud_sdk_python_ocr.egg-info/dependency_links.txt +0 -0
- {tencentcloud-sdk-python-ocr-3.0.1429 → tencentcloud-sdk-python-ocr-3.0.1431}/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.1431,<4.0.0"],
|
12
12
|
version=tencentcloud.__version__,
|
13
13
|
description='Tencent Cloud Ocr SDK for Python',
|
14
14
|
long_description=open('README.rst').read(),
|
@@ -26168,6 +26168,153 @@ class RecognizeTableAccurateOCRResponse(AbstractModel):
|
|
26168
26168
|
self._RequestId = params.get("RequestId")
|
26169
26169
|
|
26170
26170
|
|
26171
|
+
class RecognizeTableMultiOCRRequest(AbstractModel):
|
26172
|
+
"""RecognizeTableMultiOCR请求参数结构体
|
26173
|
+
|
26174
|
+
"""
|
26175
|
+
|
26176
|
+
def __init__(self):
|
26177
|
+
r"""
|
26178
|
+
:param _ImageBase64: 图片/PDF的 Base64 值。 要求图片/PDF经Base64编码后不超过 10M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。 图片支持的像素范围:需介于20-10000px之间。 图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。
|
26179
|
+
:type ImageBase64: str
|
26180
|
+
:param _ImageUrl: 图片/PDF的 Url 地址。 要求图片/PDF经Base64编码后不超过 10M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。 图片支持的像素范围:需介于20-10000px之间。 图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。
|
26181
|
+
:type ImageUrl: str
|
26182
|
+
:param _PdfStartPageNumber: 文档的起始页码。 当传入文件是PDF型时,用来指定识别的起始页码,识别的页码包含当前值。
|
26183
|
+
:type PdfStartPageNumber: int
|
26184
|
+
:param _PdfEndPageNumber: 文档的结束页码。 当传入文件是PDF类型时,用来指定识别的结束页码,识别的页码包含当前值。单次调用最多支持识别3页内容,即PdfEndPageNumber-PdfStartPageNumber需要不大于3。
|
26185
|
+
:type PdfEndPageNumber: int
|
26186
|
+
:param _DataFormat: 配置选项,支持配置输出数据格式。
|
26187
|
+
|
26188
|
+
* **Mdbase64** 返回 base64 编码的 markdown 格式文本。
|
26189
|
+
* **Excelbase64** 返回 base64 编码的 excel 文件。
|
26190
|
+
:type DataFormat: str
|
26191
|
+
"""
|
26192
|
+
self._ImageBase64 = None
|
26193
|
+
self._ImageUrl = None
|
26194
|
+
self._PdfStartPageNumber = None
|
26195
|
+
self._PdfEndPageNumber = None
|
26196
|
+
self._DataFormat = None
|
26197
|
+
|
26198
|
+
@property
|
26199
|
+
def ImageBase64(self):
|
26200
|
+
"""图片/PDF的 Base64 值。 要求图片/PDF经Base64编码后不超过 10M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。 图片支持的像素范围:需介于20-10000px之间。 图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。
|
26201
|
+
:rtype: str
|
26202
|
+
"""
|
26203
|
+
return self._ImageBase64
|
26204
|
+
|
26205
|
+
@ImageBase64.setter
|
26206
|
+
def ImageBase64(self, ImageBase64):
|
26207
|
+
self._ImageBase64 = ImageBase64
|
26208
|
+
|
26209
|
+
@property
|
26210
|
+
def ImageUrl(self):
|
26211
|
+
"""图片/PDF的 Url 地址。 要求图片/PDF经Base64编码后不超过 10M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。 图片支持的像素范围:需介于20-10000px之间。 图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。
|
26212
|
+
:rtype: str
|
26213
|
+
"""
|
26214
|
+
return self._ImageUrl
|
26215
|
+
|
26216
|
+
@ImageUrl.setter
|
26217
|
+
def ImageUrl(self, ImageUrl):
|
26218
|
+
self._ImageUrl = ImageUrl
|
26219
|
+
|
26220
|
+
@property
|
26221
|
+
def PdfStartPageNumber(self):
|
26222
|
+
"""文档的起始页码。 当传入文件是PDF型时,用来指定识别的起始页码,识别的页码包含当前值。
|
26223
|
+
:rtype: int
|
26224
|
+
"""
|
26225
|
+
return self._PdfStartPageNumber
|
26226
|
+
|
26227
|
+
@PdfStartPageNumber.setter
|
26228
|
+
def PdfStartPageNumber(self, PdfStartPageNumber):
|
26229
|
+
self._PdfStartPageNumber = PdfStartPageNumber
|
26230
|
+
|
26231
|
+
@property
|
26232
|
+
def PdfEndPageNumber(self):
|
26233
|
+
"""文档的结束页码。 当传入文件是PDF类型时,用来指定识别的结束页码,识别的页码包含当前值。单次调用最多支持识别3页内容,即PdfEndPageNumber-PdfStartPageNumber需要不大于3。
|
26234
|
+
:rtype: int
|
26235
|
+
"""
|
26236
|
+
return self._PdfEndPageNumber
|
26237
|
+
|
26238
|
+
@PdfEndPageNumber.setter
|
26239
|
+
def PdfEndPageNumber(self, PdfEndPageNumber):
|
26240
|
+
self._PdfEndPageNumber = PdfEndPageNumber
|
26241
|
+
|
26242
|
+
@property
|
26243
|
+
def DataFormat(self):
|
26244
|
+
"""配置选项,支持配置输出数据格式。
|
26245
|
+
|
26246
|
+
* **Mdbase64** 返回 base64 编码的 markdown 格式文本。
|
26247
|
+
* **Excelbase64** 返回 base64 编码的 excel 文件。
|
26248
|
+
:rtype: str
|
26249
|
+
"""
|
26250
|
+
return self._DataFormat
|
26251
|
+
|
26252
|
+
@DataFormat.setter
|
26253
|
+
def DataFormat(self, DataFormat):
|
26254
|
+
self._DataFormat = DataFormat
|
26255
|
+
|
26256
|
+
|
26257
|
+
def _deserialize(self, params):
|
26258
|
+
self._ImageBase64 = params.get("ImageBase64")
|
26259
|
+
self._ImageUrl = params.get("ImageUrl")
|
26260
|
+
self._PdfStartPageNumber = params.get("PdfStartPageNumber")
|
26261
|
+
self._PdfEndPageNumber = params.get("PdfEndPageNumber")
|
26262
|
+
self._DataFormat = params.get("DataFormat")
|
26263
|
+
memeber_set = set(params.keys())
|
26264
|
+
for name, value in vars(self).items():
|
26265
|
+
property_name = name[1:]
|
26266
|
+
if property_name in memeber_set:
|
26267
|
+
memeber_set.remove(property_name)
|
26268
|
+
if len(memeber_set) > 0:
|
26269
|
+
warnings.warn("%s fileds are useless." % ",".join(memeber_set))
|
26270
|
+
|
26271
|
+
|
26272
|
+
|
26273
|
+
class RecognizeTableMultiOCRResponse(AbstractModel):
|
26274
|
+
"""RecognizeTableMultiOCR返回参数结构体
|
26275
|
+
|
26276
|
+
"""
|
26277
|
+
|
26278
|
+
def __init__(self):
|
26279
|
+
r"""
|
26280
|
+
:param _DataBase64: Base64 编码后的 Excel 数据或 Markdown 数据。 注意:此字段可能返回空,表示取不到有效值。
|
26281
|
+
注意:此字段可能返回 null,表示取不到有效值。
|
26282
|
+
:type DataBase64: str
|
26283
|
+
:param _RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
26284
|
+
:type RequestId: str
|
26285
|
+
"""
|
26286
|
+
self._DataBase64 = None
|
26287
|
+
self._RequestId = None
|
26288
|
+
|
26289
|
+
@property
|
26290
|
+
def DataBase64(self):
|
26291
|
+
"""Base64 编码后的 Excel 数据或 Markdown 数据。 注意:此字段可能返回空,表示取不到有效值。
|
26292
|
+
注意:此字段可能返回 null,表示取不到有效值。
|
26293
|
+
:rtype: str
|
26294
|
+
"""
|
26295
|
+
return self._DataBase64
|
26296
|
+
|
26297
|
+
@DataBase64.setter
|
26298
|
+
def DataBase64(self, DataBase64):
|
26299
|
+
self._DataBase64 = DataBase64
|
26300
|
+
|
26301
|
+
@property
|
26302
|
+
def RequestId(self):
|
26303
|
+
"""唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
26304
|
+
:rtype: str
|
26305
|
+
"""
|
26306
|
+
return self._RequestId
|
26307
|
+
|
26308
|
+
@RequestId.setter
|
26309
|
+
def RequestId(self, RequestId):
|
26310
|
+
self._RequestId = RequestId
|
26311
|
+
|
26312
|
+
|
26313
|
+
def _deserialize(self, params):
|
26314
|
+
self._DataBase64 = params.get("DataBase64")
|
26315
|
+
self._RequestId = params.get("RequestId")
|
26316
|
+
|
26317
|
+
|
26171
26318
|
class RecognizeTableOCRRequest(AbstractModel):
|
26172
26319
|
"""RecognizeTableOCR请求参数结构体
|
26173
26320
|
|
@@ -2103,6 +2103,31 @@ class OcrClient(AbstractClient):
|
|
2103
2103
|
raise TencentCloudSDKException(type(e).__name__, str(e))
|
2104
2104
|
|
2105
2105
|
|
2106
|
+
def RecognizeTableMultiOCR(self, request):
|
2107
|
+
"""基于MLLM(多模态大语言模型)的表格识别能力,针对复杂表格的算法识别效果更佳,适配财务报表识别场景,并可输出直接对接业务系统的Excel数据。
|
2108
|
+
|
2109
|
+
默认接口请求频率限制:1次/秒。
|
2110
|
+
|
2111
|
+
:param request: Request instance for RecognizeTableMultiOCR.
|
2112
|
+
:type request: :class:`tencentcloud.ocr.v20181119.models.RecognizeTableMultiOCRRequest`
|
2113
|
+
:rtype: :class:`tencentcloud.ocr.v20181119.models.RecognizeTableMultiOCRResponse`
|
2114
|
+
|
2115
|
+
"""
|
2116
|
+
try:
|
2117
|
+
params = request._serialize()
|
2118
|
+
headers = request.headers
|
2119
|
+
body = self.call("RecognizeTableMultiOCR", params, headers=headers)
|
2120
|
+
response = json.loads(body)
|
2121
|
+
model = models.RecognizeTableMultiOCRResponse()
|
2122
|
+
model._deserialize(response["Response"])
|
2123
|
+
return model
|
2124
|
+
except Exception as e:
|
2125
|
+
if isinstance(e, TencentCloudSDKException):
|
2126
|
+
raise
|
2127
|
+
else:
|
2128
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
2129
|
+
|
2130
|
+
|
2106
2131
|
def RecognizeTableOCR(self, request):
|
2107
2132
|
"""本接口支持中英文图片/ PDF内常规表格、无线表格、多表格的检测和识别,支持日文有线表格识别,返回每个单元格的文字内容,支持旋转的表格图片识别,且支持将识别结果保存为 Excel 格式。
|
2108
2133
|
|
@@ -0,0 +1 @@
|
|
1
|
+
tencentcloud-sdk-python-common<4.0.0,>=3.0.1431
|
@@ -1 +0,0 @@
|
|
1
|
-
tencentcloud-sdk-python-common<4.0.0,>=3.0.1429
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|