tencentcloud-sdk-python-intl-en 3.0.1113__py2.py3-none-any.whl → 3.0.1114__py2.py3-none-any.whl
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-intl-en might be problematic. Click here for more details.
- tencentcloud/__init__.py +1 -1
- tencentcloud/ocr/v20181119/models.py +239 -0
- tencentcloud/ocr/v20181119/ocr_client.py +25 -0
- {tencentcloud_sdk_python_intl_en-3.0.1113.dist-info → tencentcloud_sdk_python_intl_en-3.0.1114.dist-info}/METADATA +1 -1
- {tencentcloud_sdk_python_intl_en-3.0.1113.dist-info → tencentcloud_sdk_python_intl_en-3.0.1114.dist-info}/RECORD +7 -7
- {tencentcloud_sdk_python_intl_en-3.0.1113.dist-info → tencentcloud_sdk_python_intl_en-3.0.1114.dist-info}/WHEEL +0 -0
- {tencentcloud_sdk_python_intl_en-3.0.1113.dist-info → tencentcloud_sdk_python_intl_en-3.0.1114.dist-info}/top_level.txt +0 -0
tencentcloud/__init__.py
CHANGED
|
@@ -12726,6 +12726,245 @@ class SmartStructuralOCRV2Response(AbstractModel):
|
|
|
12726
12726
|
self._RequestId = params.get("RequestId")
|
|
12727
12727
|
|
|
12728
12728
|
|
|
12729
|
+
class SmartStructuralProRequest(AbstractModel):
|
|
12730
|
+
"""SmartStructuralPro request structure.
|
|
12731
|
+
|
|
12732
|
+
"""
|
|
12733
|
+
|
|
12734
|
+
def __init__(self):
|
|
12735
|
+
r"""
|
|
12736
|
+
:param _ImageUrl: The URL of the image.
|
|
12737
|
+
Supported image formats: PNG, JPG, and JPEG. GIF is currently not supported.
|
|
12738
|
+
Supported image size: The downloaded image after Base64 encoding can be up to 7 MB. The download time of the image cannot exceed 3s.
|
|
12739
|
+
We recommend that you store the image in Tencent Cloud for higher download speed and stability.
|
|
12740
|
+
The download speed and stability of non-Tencent Cloud URLs may be low.
|
|
12741
|
+
:type ImageUrl: str
|
|
12742
|
+
:param _ImageBase64: The Base64-encoded value of the image.
|
|
12743
|
+
Supported image formats: PNG, JPG, and JPEG. GIF is currently not supported.
|
|
12744
|
+
Supported image size: The downloaded image after Base64 encoding can be up to 7 MB. The download time of the image cannot exceed 3s.
|
|
12745
|
+
Either `ImageUrl` or `ImageBase64` of the image must be provided. If both are provided, only `ImageUrl` is used.
|
|
12746
|
+
:type ImageBase64: str
|
|
12747
|
+
:param _PdfPageNumber: The number of the PDF page that needs to be recognized. Only one single PDF page can be recognized. This parameter is valid if the uploaded file is a PDF `. Default value: `1`.
|
|
12748
|
+
:type PdfPageNumber: int
|
|
12749
|
+
:param _ItemNames: The names of the fields you want to return for the structured information recognition.
|
|
12750
|
+
For example, if you want to return only the recognition result of the "Name" and "Gender" fields, set this parameter as follows:
|
|
12751
|
+
ItemNames=["Name","Gender"]
|
|
12752
|
+
:type ItemNames: list of str
|
|
12753
|
+
:param _ReturnFullText: Whether to enable recognition of all fields.
|
|
12754
|
+
:type ReturnFullText: bool
|
|
12755
|
+
:param _ConfigId: Configuration ID support: General
|
|
12756
|
+
-- General scenarios; InvoiceEng
|
|
12757
|
+
-- Ocean bill of lading, international invoice template;
|
|
12758
|
+
-- Ocean shipment order template; WayBillEng
|
|
12759
|
+
-- CustomsDeclaration
|
|
12760
|
+
-- WeightNote
|
|
12761
|
+
-- MedicalMeter
|
|
12762
|
+
:type ConfigId: str
|
|
12763
|
+
:param _EnableCoord: Enable recognition of coordinate values in full-text fields
|
|
12764
|
+
:type EnableCoord: bool
|
|
12765
|
+
"""
|
|
12766
|
+
self._ImageUrl = None
|
|
12767
|
+
self._ImageBase64 = None
|
|
12768
|
+
self._PdfPageNumber = None
|
|
12769
|
+
self._ItemNames = None
|
|
12770
|
+
self._ReturnFullText = None
|
|
12771
|
+
self._ConfigId = None
|
|
12772
|
+
self._EnableCoord = None
|
|
12773
|
+
|
|
12774
|
+
@property
|
|
12775
|
+
def ImageUrl(self):
|
|
12776
|
+
"""The URL of the image.
|
|
12777
|
+
Supported image formats: PNG, JPG, and JPEG. GIF is currently not supported.
|
|
12778
|
+
Supported image size: The downloaded image after Base64 encoding can be up to 7 MB. The download time of the image cannot exceed 3s.
|
|
12779
|
+
We recommend that you store the image in Tencent Cloud for higher download speed and stability.
|
|
12780
|
+
The download speed and stability of non-Tencent Cloud URLs may be low.
|
|
12781
|
+
:rtype: str
|
|
12782
|
+
"""
|
|
12783
|
+
return self._ImageUrl
|
|
12784
|
+
|
|
12785
|
+
@ImageUrl.setter
|
|
12786
|
+
def ImageUrl(self, ImageUrl):
|
|
12787
|
+
self._ImageUrl = ImageUrl
|
|
12788
|
+
|
|
12789
|
+
@property
|
|
12790
|
+
def ImageBase64(self):
|
|
12791
|
+
"""The Base64-encoded value of the image.
|
|
12792
|
+
Supported image formats: PNG, JPG, and JPEG. GIF is currently not supported.
|
|
12793
|
+
Supported image size: The downloaded image after Base64 encoding can be up to 7 MB. The download time of the image cannot exceed 3s.
|
|
12794
|
+
Either `ImageUrl` or `ImageBase64` of the image must be provided. If both are provided, only `ImageUrl` is used.
|
|
12795
|
+
:rtype: str
|
|
12796
|
+
"""
|
|
12797
|
+
return self._ImageBase64
|
|
12798
|
+
|
|
12799
|
+
@ImageBase64.setter
|
|
12800
|
+
def ImageBase64(self, ImageBase64):
|
|
12801
|
+
self._ImageBase64 = ImageBase64
|
|
12802
|
+
|
|
12803
|
+
@property
|
|
12804
|
+
def PdfPageNumber(self):
|
|
12805
|
+
"""The number of the PDF page that needs to be recognized. Only one single PDF page can be recognized. This parameter is valid if the uploaded file is a PDF `. Default value: `1`.
|
|
12806
|
+
:rtype: int
|
|
12807
|
+
"""
|
|
12808
|
+
return self._PdfPageNumber
|
|
12809
|
+
|
|
12810
|
+
@PdfPageNumber.setter
|
|
12811
|
+
def PdfPageNumber(self, PdfPageNumber):
|
|
12812
|
+
self._PdfPageNumber = PdfPageNumber
|
|
12813
|
+
|
|
12814
|
+
@property
|
|
12815
|
+
def ItemNames(self):
|
|
12816
|
+
"""The names of the fields you want to return for the structured information recognition.
|
|
12817
|
+
For example, if you want to return only the recognition result of the "Name" and "Gender" fields, set this parameter as follows:
|
|
12818
|
+
ItemNames=["Name","Gender"]
|
|
12819
|
+
:rtype: list of str
|
|
12820
|
+
"""
|
|
12821
|
+
return self._ItemNames
|
|
12822
|
+
|
|
12823
|
+
@ItemNames.setter
|
|
12824
|
+
def ItemNames(self, ItemNames):
|
|
12825
|
+
self._ItemNames = ItemNames
|
|
12826
|
+
|
|
12827
|
+
@property
|
|
12828
|
+
def ReturnFullText(self):
|
|
12829
|
+
"""Whether to enable recognition of all fields.
|
|
12830
|
+
:rtype: bool
|
|
12831
|
+
"""
|
|
12832
|
+
return self._ReturnFullText
|
|
12833
|
+
|
|
12834
|
+
@ReturnFullText.setter
|
|
12835
|
+
def ReturnFullText(self, ReturnFullText):
|
|
12836
|
+
self._ReturnFullText = ReturnFullText
|
|
12837
|
+
|
|
12838
|
+
@property
|
|
12839
|
+
def ConfigId(self):
|
|
12840
|
+
"""Configuration ID support: General
|
|
12841
|
+
-- General scenarios; InvoiceEng
|
|
12842
|
+
-- Ocean bill of lading, international invoice template;
|
|
12843
|
+
-- Ocean shipment order template; WayBillEng
|
|
12844
|
+
-- CustomsDeclaration
|
|
12845
|
+
-- WeightNote
|
|
12846
|
+
-- MedicalMeter
|
|
12847
|
+
:rtype: str
|
|
12848
|
+
"""
|
|
12849
|
+
return self._ConfigId
|
|
12850
|
+
|
|
12851
|
+
@ConfigId.setter
|
|
12852
|
+
def ConfigId(self, ConfigId):
|
|
12853
|
+
self._ConfigId = ConfigId
|
|
12854
|
+
|
|
12855
|
+
@property
|
|
12856
|
+
def EnableCoord(self):
|
|
12857
|
+
"""Enable recognition of coordinate values in full-text fields
|
|
12858
|
+
:rtype: bool
|
|
12859
|
+
"""
|
|
12860
|
+
return self._EnableCoord
|
|
12861
|
+
|
|
12862
|
+
@EnableCoord.setter
|
|
12863
|
+
def EnableCoord(self, EnableCoord):
|
|
12864
|
+
self._EnableCoord = EnableCoord
|
|
12865
|
+
|
|
12866
|
+
|
|
12867
|
+
def _deserialize(self, params):
|
|
12868
|
+
self._ImageUrl = params.get("ImageUrl")
|
|
12869
|
+
self._ImageBase64 = params.get("ImageBase64")
|
|
12870
|
+
self._PdfPageNumber = params.get("PdfPageNumber")
|
|
12871
|
+
self._ItemNames = params.get("ItemNames")
|
|
12872
|
+
self._ReturnFullText = params.get("ReturnFullText")
|
|
12873
|
+
self._ConfigId = params.get("ConfigId")
|
|
12874
|
+
self._EnableCoord = params.get("EnableCoord")
|
|
12875
|
+
memeber_set = set(params.keys())
|
|
12876
|
+
for name, value in vars(self).items():
|
|
12877
|
+
property_name = name[1:]
|
|
12878
|
+
if property_name in memeber_set:
|
|
12879
|
+
memeber_set.remove(property_name)
|
|
12880
|
+
if len(memeber_set) > 0:
|
|
12881
|
+
warnings.warn("%s fileds are useless." % ",".join(memeber_set))
|
|
12882
|
+
|
|
12883
|
+
|
|
12884
|
+
|
|
12885
|
+
class SmartStructuralProResponse(AbstractModel):
|
|
12886
|
+
"""SmartStructuralPro response structure.
|
|
12887
|
+
|
|
12888
|
+
"""
|
|
12889
|
+
|
|
12890
|
+
def __init__(self):
|
|
12891
|
+
r"""
|
|
12892
|
+
:param _Angle: The rotation angle (degrees) of the text on the image. 0: The text is horizontal. Positive value: The text is rotated clockwise. Negative value: The text is rotated counterclockwise.
|
|
12893
|
+
:type Angle: float
|
|
12894
|
+
:param _StructuralList: The structural information (key-value).
|
|
12895
|
+
:type StructuralList: list of GroupInfo
|
|
12896
|
+
:param _WordList: The recognized text information.
|
|
12897
|
+
:type WordList: list of WordItem
|
|
12898
|
+
:param _RequestId: The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
|
|
12899
|
+
:type RequestId: str
|
|
12900
|
+
"""
|
|
12901
|
+
self._Angle = None
|
|
12902
|
+
self._StructuralList = None
|
|
12903
|
+
self._WordList = None
|
|
12904
|
+
self._RequestId = None
|
|
12905
|
+
|
|
12906
|
+
@property
|
|
12907
|
+
def Angle(self):
|
|
12908
|
+
"""The rotation angle (degrees) of the text on the image. 0: The text is horizontal. Positive value: The text is rotated clockwise. Negative value: The text is rotated counterclockwise.
|
|
12909
|
+
:rtype: float
|
|
12910
|
+
"""
|
|
12911
|
+
return self._Angle
|
|
12912
|
+
|
|
12913
|
+
@Angle.setter
|
|
12914
|
+
def Angle(self, Angle):
|
|
12915
|
+
self._Angle = Angle
|
|
12916
|
+
|
|
12917
|
+
@property
|
|
12918
|
+
def StructuralList(self):
|
|
12919
|
+
"""The structural information (key-value).
|
|
12920
|
+
:rtype: list of GroupInfo
|
|
12921
|
+
"""
|
|
12922
|
+
return self._StructuralList
|
|
12923
|
+
|
|
12924
|
+
@StructuralList.setter
|
|
12925
|
+
def StructuralList(self, StructuralList):
|
|
12926
|
+
self._StructuralList = StructuralList
|
|
12927
|
+
|
|
12928
|
+
@property
|
|
12929
|
+
def WordList(self):
|
|
12930
|
+
"""The recognized text information.
|
|
12931
|
+
:rtype: list of WordItem
|
|
12932
|
+
"""
|
|
12933
|
+
return self._WordList
|
|
12934
|
+
|
|
12935
|
+
@WordList.setter
|
|
12936
|
+
def WordList(self, WordList):
|
|
12937
|
+
self._WordList = WordList
|
|
12938
|
+
|
|
12939
|
+
@property
|
|
12940
|
+
def RequestId(self):
|
|
12941
|
+
"""The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
|
|
12942
|
+
:rtype: str
|
|
12943
|
+
"""
|
|
12944
|
+
return self._RequestId
|
|
12945
|
+
|
|
12946
|
+
@RequestId.setter
|
|
12947
|
+
def RequestId(self, RequestId):
|
|
12948
|
+
self._RequestId = RequestId
|
|
12949
|
+
|
|
12950
|
+
|
|
12951
|
+
def _deserialize(self, params):
|
|
12952
|
+
self._Angle = params.get("Angle")
|
|
12953
|
+
if params.get("StructuralList") is not None:
|
|
12954
|
+
self._StructuralList = []
|
|
12955
|
+
for item in params.get("StructuralList"):
|
|
12956
|
+
obj = GroupInfo()
|
|
12957
|
+
obj._deserialize(item)
|
|
12958
|
+
self._StructuralList.append(obj)
|
|
12959
|
+
if params.get("WordList") is not None:
|
|
12960
|
+
self._WordList = []
|
|
12961
|
+
for item in params.get("WordList"):
|
|
12962
|
+
obj = WordItem()
|
|
12963
|
+
obj._deserialize(item)
|
|
12964
|
+
self._WordList.append(obj)
|
|
12965
|
+
self._RequestId = params.get("RequestId")
|
|
12966
|
+
|
|
12967
|
+
|
|
12729
12968
|
class TableCellInfo(AbstractModel):
|
|
12730
12969
|
"""Cell data
|
|
12731
12970
|
|
|
@@ -864,6 +864,31 @@ class OcrClient(AbstractClient):
|
|
|
864
864
|
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
865
865
|
|
|
866
866
|
|
|
867
|
+
def SmartStructuralPro(self, request):
|
|
868
|
+
"""This API is used to recognize fields from cards, documents, bills, forms, contracts, and other structured information. It is flexible and efficient to use, without any configuration required. This API is suitable for recognizing structured information.
|
|
869
|
+
|
|
870
|
+
A maximum of 10 requests can be initiated per second for this API.
|
|
871
|
+
|
|
872
|
+
:param request: Request instance for SmartStructuralPro.
|
|
873
|
+
:type request: :class:`tencentcloud.ocr.v20181119.models.SmartStructuralProRequest`
|
|
874
|
+
:rtype: :class:`tencentcloud.ocr.v20181119.models.SmartStructuralProResponse`
|
|
875
|
+
|
|
876
|
+
"""
|
|
877
|
+
try:
|
|
878
|
+
params = request._serialize()
|
|
879
|
+
headers = request.headers
|
|
880
|
+
body = self.call("SmartStructuralPro", params, headers=headers)
|
|
881
|
+
response = json.loads(body)
|
|
882
|
+
model = models.SmartStructuralProResponse()
|
|
883
|
+
model._deserialize(response["Response"])
|
|
884
|
+
return model
|
|
885
|
+
except Exception as e:
|
|
886
|
+
if isinstance(e, TencentCloudSDKException):
|
|
887
|
+
raise
|
|
888
|
+
else:
|
|
889
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
890
|
+
|
|
891
|
+
|
|
867
892
|
def TableOCR(self, request):
|
|
868
893
|
"""This API is used to detect and recognize Chinese and English forms in images. It can return the text content of each cell and save the recognition result as Excel.
|
|
869
894
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
tencentcloud/__init__.py,sha256=
|
|
1
|
+
tencentcloud/__init__.py,sha256=_Bqn-_7WG0gptKdxK_kdw47xOugzUCfQJnBOu77vaY0,630
|
|
2
2
|
tencentcloud/advisor/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
3
|
tencentcloud/advisor/v20200721/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
4
|
tencentcloud/advisor/v20200721/advisor_client.py,sha256=b5pLP_oF5HZHo4xbn-hI4dkpnirhcHB2rNDWvGf4q1Y,2919
|
|
@@ -398,8 +398,8 @@ tencentcloud/msp/v20180319/msp_client.py,sha256=XkSbJuPDAeY7elyJ5ByR2wNL0HiFO6Xa
|
|
|
398
398
|
tencentcloud/ocr/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
399
399
|
tencentcloud/ocr/v20181119/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
400
400
|
tencentcloud/ocr/v20181119/errorcodes.py,sha256=4bl4FoPZOHDUIks9THo8XOHYqWBU_oFslKTHUZe011w,3852
|
|
401
|
-
tencentcloud/ocr/v20181119/models.py,sha256=
|
|
402
|
-
tencentcloud/ocr/v20181119/ocr_client.py,sha256=
|
|
401
|
+
tencentcloud/ocr/v20181119/models.py,sha256=DBK6qEt0jEs1nNwGZizSzOhIwaZKxixCNW2tS2_nCRM,525317
|
|
402
|
+
tencentcloud/ocr/v20181119/ocr_client.py,sha256=1abm7UU8ME_lhHcUb3YQ7wQfbZtuAdr7NbtQTXfoHi4,45079
|
|
403
403
|
tencentcloud/omics/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
404
404
|
tencentcloud/omics/v20221128/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
405
405
|
tencentcloud/omics/v20221128/errorcodes.py,sha256=VEkh5arAi4YIbf5y4krDS23zC6KcL6WnOxhpPLsiCGc,4862
|
|
@@ -614,7 +614,7 @@ tencentcloud/yunjing/v20180228/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5
|
|
|
614
614
|
tencentcloud/yunjing/v20180228/errorcodes.py,sha256=VEqwMbMBe7F2oAW6ZDu3vAivBr60lbo7FWduFqRTEVg,3195
|
|
615
615
|
tencentcloud/yunjing/v20180228/models.py,sha256=0rnsJ4JkA5aCTV1cVwCuKnzooe6IhQ0NS3ij6tJ22uw,330670
|
|
616
616
|
tencentcloud/yunjing/v20180228/yunjing_client.py,sha256=GA7Fo5GmpEJ2kufV2upw-ZpMZxznsPZ3NKDKDDAI4Ao,67384
|
|
617
|
-
tencentcloud_sdk_python_intl_en-3.0.
|
|
618
|
-
tencentcloud_sdk_python_intl_en-3.0.
|
|
619
|
-
tencentcloud_sdk_python_intl_en-3.0.
|
|
620
|
-
tencentcloud_sdk_python_intl_en-3.0.
|
|
617
|
+
tencentcloud_sdk_python_intl_en-3.0.1114.dist-info/METADATA,sha256=nyyaIA-duo6VQ1S3QmsjVCericAtDSB-CebhkExrUPM,1628
|
|
618
|
+
tencentcloud_sdk_python_intl_en-3.0.1114.dist-info/WHEEL,sha256=z9j0xAa_JmUKMpmz72K0ZGALSM_n-wQVmGbleXx2VHg,110
|
|
619
|
+
tencentcloud_sdk_python_intl_en-3.0.1114.dist-info/top_level.txt,sha256=g-8OyzoqI6O6LiS85zkeNzhB-osEnRIPZMdyRd_0eL0,13
|
|
620
|
+
tencentcloud_sdk_python_intl_en-3.0.1114.dist-info/RECORD,,
|
|
File without changes
|