tencentcloud-sdk-python-ocr 3.1.82__tar.gz → 3.1.88__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 (17) hide show
  1. {tencentcloud_sdk_python_ocr-3.1.82 → tencentcloud_sdk_python_ocr-3.1.88}/PKG-INFO +2 -2
  2. {tencentcloud_sdk_python_ocr-3.1.82 → tencentcloud_sdk_python_ocr-3.1.88}/setup.py +1 -1
  3. {tencentcloud_sdk_python_ocr-3.1.82 → tencentcloud_sdk_python_ocr-3.1.88}/tencentcloud/__init__.py +1 -1
  4. {tencentcloud_sdk_python_ocr-3.1.82 → tencentcloud_sdk_python_ocr-3.1.88}/tencentcloud/ocr/v20181119/models.py +47 -455
  5. {tencentcloud_sdk_python_ocr-3.1.82 → tencentcloud_sdk_python_ocr-3.1.88}/tencentcloud/ocr/v20181119/ocr_client.py +0 -50
  6. {tencentcloud_sdk_python_ocr-3.1.82 → tencentcloud_sdk_python_ocr-3.1.88}/tencentcloud/ocr/v20181119/ocr_client_async.py +0 -40
  7. {tencentcloud_sdk_python_ocr-3.1.82 → tencentcloud_sdk_python_ocr-3.1.88}/tencentcloud_sdk_python_ocr.egg-info/PKG-INFO +2 -2
  8. tencentcloud_sdk_python_ocr-3.1.88/tencentcloud_sdk_python_ocr.egg-info/requires.txt +1 -0
  9. tencentcloud_sdk_python_ocr-3.1.82/tencentcloud_sdk_python_ocr.egg-info/requires.txt +0 -1
  10. {tencentcloud_sdk_python_ocr-3.1.82 → tencentcloud_sdk_python_ocr-3.1.88}/README.rst +0 -0
  11. {tencentcloud_sdk_python_ocr-3.1.82 → tencentcloud_sdk_python_ocr-3.1.88}/setup.cfg +0 -0
  12. {tencentcloud_sdk_python_ocr-3.1.82 → tencentcloud_sdk_python_ocr-3.1.88}/tencentcloud/ocr/__init__.py +0 -0
  13. {tencentcloud_sdk_python_ocr-3.1.82 → tencentcloud_sdk_python_ocr-3.1.88}/tencentcloud/ocr/v20181119/__init__.py +0 -0
  14. {tencentcloud_sdk_python_ocr-3.1.82 → tencentcloud_sdk_python_ocr-3.1.88}/tencentcloud/ocr/v20181119/errorcodes.py +0 -0
  15. {tencentcloud_sdk_python_ocr-3.1.82 → tencentcloud_sdk_python_ocr-3.1.88}/tencentcloud_sdk_python_ocr.egg-info/SOURCES.txt +0 -0
  16. {tencentcloud_sdk_python_ocr-3.1.82 → tencentcloud_sdk_python_ocr-3.1.88}/tencentcloud_sdk_python_ocr.egg-info/dependency_links.txt +0 -0
  17. {tencentcloud_sdk_python_ocr-3.1.82 → tencentcloud_sdk_python_ocr-3.1.88}/tencentcloud_sdk_python_ocr.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tencentcloud-sdk-python-ocr
3
- Version: 3.1.82
3
+ Version: 3.1.88
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
@@ -15,7 +15,7 @@ Classifier: Programming Language :: Python :: 2.7
15
15
  Classifier: Programming Language :: Python :: 3
16
16
  Classifier: Programming Language :: Python :: 3.6
17
17
  Classifier: Programming Language :: Python :: 3.7
18
- Requires-Dist: tencentcloud-sdk-python-common<4.0.0,>=3.1.82
18
+ Requires-Dist: tencentcloud-sdk-python-common<4.0.0,>=3.1.88
19
19
 
20
20
  ============================
21
21
  Tencent Cloud SDK for Python
@@ -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.1.82,<4.0.0"],
11
+ install_requires=["tencentcloud-sdk-python-common>=3.1.88,<4.0.0"],
12
12
 
13
13
  version=tencentcloud.__version__,
14
14
  description='Tencent Cloud Ocr SDK for Python',
@@ -14,4 +14,4 @@
14
14
  # limitations under the License.
15
15
 
16
16
 
17
- __version__ = '3.1.82'
17
+ __version__ = '3.1.88'
@@ -4486,9 +4486,9 @@ class Coord(AbstractModel):
4486
4486
 
4487
4487
  def __init__(self):
4488
4488
  r"""
4489
- :param _X: 横坐标
4489
+ :param _X: <p>横坐标。</p>
4490
4490
  :type X: int
4491
- :param _Y: 纵坐标
4491
+ :param _Y: <p>纵坐标。</p>
4492
4492
  :type Y: int
4493
4493
  """
4494
4494
  self._X = None
@@ -4496,7 +4496,7 @@ class Coord(AbstractModel):
4496
4496
 
4497
4497
  @property
4498
4498
  def X(self):
4499
- r"""横坐标
4499
+ r"""<p>横坐标。</p>
4500
4500
  :rtype: int
4501
4501
  """
4502
4502
  return self._X
@@ -4507,7 +4507,7 @@ class Coord(AbstractModel):
4507
4507
 
4508
4508
  @property
4509
4509
  def Y(self):
4510
- r"""纵坐标
4510
+ r"""<p>纵坐标。</p>
4511
4511
  :rtype: int
4512
4512
  """
4513
4513
  return self._Y
@@ -4530,252 +4530,6 @@ class Coord(AbstractModel):
4530
4530
 
4531
4531
 
4532
4532
 
4533
- class CropEnhanceImageOCRRequest(AbstractModel):
4534
- r"""CropEnhanceImageOCR请求参数结构体
4535
-
4536
- """
4537
-
4538
- def __init__(self):
4539
- r"""
4540
- :param _ImageBase64: <p>图片/PDF的 Base64 值。要求Base64不超过10M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。</p>
4541
- :type ImageBase64: str
4542
- :param _ImageUrl: <p>图片/PDF的 Url 地址。要求图片经Base64编码后不超过10M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。图片下载时间不超过 3 秒。图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。</p>
4543
- :type ImageUrl: str
4544
- :param _PdfPageNumber: <p>需要识别的PDF页面的对应页码,仅支持PDF单页识别,默认值为1。</p>
4545
- :type PdfPageNumber: int
4546
- :param _Crop: <p>0表示关闭切边<br>1表示开启切边,默认为1</p>
4547
- :type Crop: int
4548
- :param _Deskew: <p>0表示关闭弯曲矫正<br>1表示开启弯曲矫正,默认为1</p>
4549
- :type Deskew: int
4550
- :param _OnlyPosition: <p>0表示返回处理后的图和坐标,默认为0<br>1表示只返回坐标,不返回图片</p>
4551
- :type OnlyPosition: int
4552
- :param _EnhanceType: <p>默认-1</p><ul><li>-1 不处理增强</li><li>1 增亮</li><li>2 增强并锐化</li><li>3 黑白</li><li>4 灰度</li><li>5 去阴影增强</li><li>6 点阵图</li></ul>
4553
- :type EnhanceType: int
4554
- :param _AdjustOrientation: <p>0表示不矫正图像方向,默认为0 1表示矫正图像方向</p>
4555
- :type AdjustOrientation: int
4556
- """
4557
- self._ImageBase64 = None
4558
- self._ImageUrl = None
4559
- self._PdfPageNumber = None
4560
- self._Crop = None
4561
- self._Deskew = None
4562
- self._OnlyPosition = None
4563
- self._EnhanceType = None
4564
- self._AdjustOrientation = None
4565
-
4566
- @property
4567
- def ImageBase64(self):
4568
- r"""<p>图片/PDF的 Base64 值。要求Base64不超过10M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。</p>
4569
- :rtype: str
4570
- """
4571
- return self._ImageBase64
4572
-
4573
- @ImageBase64.setter
4574
- def ImageBase64(self, ImageBase64):
4575
- self._ImageBase64 = ImageBase64
4576
-
4577
- @property
4578
- def ImageUrl(self):
4579
- r"""<p>图片/PDF的 Url 地址。要求图片经Base64编码后不超过10M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。图片下载时间不超过 3 秒。图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。</p>
4580
- :rtype: str
4581
- """
4582
- return self._ImageUrl
4583
-
4584
- @ImageUrl.setter
4585
- def ImageUrl(self, ImageUrl):
4586
- self._ImageUrl = ImageUrl
4587
-
4588
- @property
4589
- def PdfPageNumber(self):
4590
- r"""<p>需要识别的PDF页面的对应页码,仅支持PDF单页识别,默认值为1。</p>
4591
- :rtype: int
4592
- """
4593
- return self._PdfPageNumber
4594
-
4595
- @PdfPageNumber.setter
4596
- def PdfPageNumber(self, PdfPageNumber):
4597
- self._PdfPageNumber = PdfPageNumber
4598
-
4599
- @property
4600
- def Crop(self):
4601
- r"""<p>0表示关闭切边<br>1表示开启切边,默认为1</p>
4602
- :rtype: int
4603
- """
4604
- return self._Crop
4605
-
4606
- @Crop.setter
4607
- def Crop(self, Crop):
4608
- self._Crop = Crop
4609
-
4610
- @property
4611
- def Deskew(self):
4612
- r"""<p>0表示关闭弯曲矫正<br>1表示开启弯曲矫正,默认为1</p>
4613
- :rtype: int
4614
- """
4615
- return self._Deskew
4616
-
4617
- @Deskew.setter
4618
- def Deskew(self, Deskew):
4619
- self._Deskew = Deskew
4620
-
4621
- @property
4622
- def OnlyPosition(self):
4623
- r"""<p>0表示返回处理后的图和坐标,默认为0<br>1表示只返回坐标,不返回图片</p>
4624
- :rtype: int
4625
- """
4626
- return self._OnlyPosition
4627
-
4628
- @OnlyPosition.setter
4629
- def OnlyPosition(self, OnlyPosition):
4630
- self._OnlyPosition = OnlyPosition
4631
-
4632
- @property
4633
- def EnhanceType(self):
4634
- r"""<p>默认-1</p><ul><li>-1 不处理增强</li><li>1 增亮</li><li>2 增强并锐化</li><li>3 黑白</li><li>4 灰度</li><li>5 去阴影增强</li><li>6 点阵图</li></ul>
4635
- :rtype: int
4636
- """
4637
- return self._EnhanceType
4638
-
4639
- @EnhanceType.setter
4640
- def EnhanceType(self, EnhanceType):
4641
- self._EnhanceType = EnhanceType
4642
-
4643
- @property
4644
- def AdjustOrientation(self):
4645
- r"""<p>0表示不矫正图像方向,默认为0 1表示矫正图像方向</p>
4646
- :rtype: int
4647
- """
4648
- return self._AdjustOrientation
4649
-
4650
- @AdjustOrientation.setter
4651
- def AdjustOrientation(self, AdjustOrientation):
4652
- self._AdjustOrientation = AdjustOrientation
4653
-
4654
-
4655
- def _deserialize(self, params):
4656
- self._ImageBase64 = params.get("ImageBase64")
4657
- self._ImageUrl = params.get("ImageUrl")
4658
- self._PdfPageNumber = params.get("PdfPageNumber")
4659
- self._Crop = params.get("Crop")
4660
- self._Deskew = params.get("Deskew")
4661
- self._OnlyPosition = params.get("OnlyPosition")
4662
- self._EnhanceType = params.get("EnhanceType")
4663
- self._AdjustOrientation = params.get("AdjustOrientation")
4664
- memeber_set = set(params.keys())
4665
- for name, value in vars(self).items():
4666
- property_name = name[1:]
4667
- if property_name in memeber_set:
4668
- memeber_set.remove(property_name)
4669
- if len(memeber_set) > 0:
4670
- warnings.warn("%s fileds are useless." % ",".join(memeber_set))
4671
-
4672
-
4673
-
4674
- class CropEnhanceImageOCRResponse(AbstractModel):
4675
- r"""CropEnhanceImageOCR返回参数结构体
4676
-
4677
- """
4678
-
4679
- def __init__(self):
4680
- r"""
4681
- :param _CroppedWidth: <p>处理后图的宽</p>
4682
- :type CroppedWidth: int
4683
- :param _CroppedHeight: <p>处理后图的高</p>
4684
- :type CroppedHeight: int
4685
- :param _CroppedImage: <p>图像处理后的jpg图片,base64格式</p>
4686
- :type CroppedImage: str
4687
- :param _Position: <p>切图区域的4个角点坐标, 是个长度为8的数组<br>[0,1,2,3,4,5,6,7]</p><p>(0,1) 左上角坐标<br>(2,3) 右上角坐标<br>(4,5) 右下角坐标<br>(6,7) 左下角坐标</p>
4688
- :type Position: list of int
4689
- :param _Angle: <p>图像角度,AdjustOrientation =1时生效, 返回值如下 -1: 失败 0、90、180、270</p>
4690
- 注意:此字段可能返回 null,表示取不到有效值。
4691
- :type Angle: int
4692
- :param _RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
4693
- :type RequestId: str
4694
- """
4695
- self._CroppedWidth = None
4696
- self._CroppedHeight = None
4697
- self._CroppedImage = None
4698
- self._Position = None
4699
- self._Angle = None
4700
- self._RequestId = None
4701
-
4702
- @property
4703
- def CroppedWidth(self):
4704
- r"""<p>处理后图的宽</p>
4705
- :rtype: int
4706
- """
4707
- return self._CroppedWidth
4708
-
4709
- @CroppedWidth.setter
4710
- def CroppedWidth(self, CroppedWidth):
4711
- self._CroppedWidth = CroppedWidth
4712
-
4713
- @property
4714
- def CroppedHeight(self):
4715
- r"""<p>处理后图的高</p>
4716
- :rtype: int
4717
- """
4718
- return self._CroppedHeight
4719
-
4720
- @CroppedHeight.setter
4721
- def CroppedHeight(self, CroppedHeight):
4722
- self._CroppedHeight = CroppedHeight
4723
-
4724
- @property
4725
- def CroppedImage(self):
4726
- r"""<p>图像处理后的jpg图片,base64格式</p>
4727
- :rtype: str
4728
- """
4729
- return self._CroppedImage
4730
-
4731
- @CroppedImage.setter
4732
- def CroppedImage(self, CroppedImage):
4733
- self._CroppedImage = CroppedImage
4734
-
4735
- @property
4736
- def Position(self):
4737
- r"""<p>切图区域的4个角点坐标, 是个长度为8的数组<br>[0,1,2,3,4,5,6,7]</p><p>(0,1) 左上角坐标<br>(2,3) 右上角坐标<br>(4,5) 右下角坐标<br>(6,7) 左下角坐标</p>
4738
- :rtype: list of int
4739
- """
4740
- return self._Position
4741
-
4742
- @Position.setter
4743
- def Position(self, Position):
4744
- self._Position = Position
4745
-
4746
- @property
4747
- def Angle(self):
4748
- r"""<p>图像角度,AdjustOrientation =1时生效, 返回值如下 -1: 失败 0、90、180、270</p>
4749
- 注意:此字段可能返回 null,表示取不到有效值。
4750
- :rtype: int
4751
- """
4752
- return self._Angle
4753
-
4754
- @Angle.setter
4755
- def Angle(self, Angle):
4756
- self._Angle = Angle
4757
-
4758
- @property
4759
- def RequestId(self):
4760
- r"""唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
4761
- :rtype: str
4762
- """
4763
- return self._RequestId
4764
-
4765
- @RequestId.setter
4766
- def RequestId(self, RequestId):
4767
- self._RequestId = RequestId
4768
-
4769
-
4770
- def _deserialize(self, params):
4771
- self._CroppedWidth = params.get("CroppedWidth")
4772
- self._CroppedHeight = params.get("CroppedHeight")
4773
- self._CroppedImage = params.get("CroppedImage")
4774
- self._Position = params.get("Position")
4775
- self._Angle = params.get("Angle")
4776
- self._RequestId = params.get("RequestId")
4777
-
4778
-
4779
4533
  class CustomsDeclaration(AbstractModel):
4780
4534
  r"""海关进/出口货物报关单
4781
4535
 
@@ -5604,9 +5358,9 @@ class DetectedWords(AbstractModel):
5604
5358
 
5605
5359
  def __init__(self):
5606
5360
  r"""
5607
- :param _Confidence: 置信度 0 ~100
5361
+ :param _Confidence: <p>置信度 0 ~100。</p>
5608
5362
  :type Confidence: int
5609
- :param _Character: 候选字Character
5363
+ :param _Character: <p>候选字Character。</p>
5610
5364
  :type Character: str
5611
5365
  """
5612
5366
  self._Confidence = None
@@ -5614,7 +5368,7 @@ class DetectedWords(AbstractModel):
5614
5368
 
5615
5369
  @property
5616
5370
  def Confidence(self):
5617
- r"""置信度 0 ~100
5371
+ r"""<p>置信度 0 ~100。</p>
5618
5372
  :rtype: int
5619
5373
  """
5620
5374
  return self._Confidence
@@ -5625,7 +5379,7 @@ class DetectedWords(AbstractModel):
5625
5379
 
5626
5380
  @property
5627
5381
  def Character(self):
5628
- r"""候选字Character
5382
+ r"""<p>候选字Character。</p>
5629
5383
  :rtype: str
5630
5384
  """
5631
5385
  return self._Character
@@ -8968,183 +8722,6 @@ class EnterpriseLicenseOCRResponse(AbstractModel):
8968
8722
  self._RequestId = params.get("RequestId")
8969
8723
 
8970
8724
 
8971
- class EraseHandwrittenImageOCRRequest(AbstractModel):
8972
- r"""EraseHandwrittenImageOCR请求参数结构体
8973
-
8974
- """
8975
-
8976
- def __init__(self):
8977
- r"""
8978
- :param _ImageBase64: 图片/PDF的 Base64 值。要求Base64不超过10M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。
8979
- :type ImageBase64: str
8980
- :param _ImageUrl: 图片/PDF的 Url 地址。要求图片经Base64编码后不超过10M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。图片下载时间不超过 3 秒。图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。
8981
- :type ImageUrl: str
8982
- :param _PdfPageNumber: 需要识别的PDF页面的对应页码,仅支持PDF单页识别,默认值为1。
8983
- :type PdfPageNumber: int
8984
- :param _Crop: 0表示关闭切边,默认为0
8985
- 1表示开启切边
8986
- :type Crop: int
8987
- :param _Deskew: 0表示关闭弯曲矫正,默认为0
8988
- 1表示开启弯曲矫正
8989
- :type Deskew: int
8990
- :param _Sharpen: 0表示关闭增强锐化,默认为0
8991
- 1表示开启增强锐化
8992
- :type Sharpen: int
8993
- :param _Grayscale: 0表示返回黑白图像
8994
- 1表示返回彩色图像,默认为1
8995
- :type Grayscale: int
8996
- """
8997
- self._ImageBase64 = None
8998
- self._ImageUrl = None
8999
- self._PdfPageNumber = None
9000
- self._Crop = None
9001
- self._Deskew = None
9002
- self._Sharpen = None
9003
- self._Grayscale = None
9004
-
9005
- @property
9006
- def ImageBase64(self):
9007
- r"""图片/PDF的 Base64 值。要求Base64不超过10M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。
9008
- :rtype: str
9009
- """
9010
- return self._ImageBase64
9011
-
9012
- @ImageBase64.setter
9013
- def ImageBase64(self, ImageBase64):
9014
- self._ImageBase64 = ImageBase64
9015
-
9016
- @property
9017
- def ImageUrl(self):
9018
- r"""图片/PDF的 Url 地址。要求图片经Base64编码后不超过10M,分辨率建议600*800以上,支持PNG、JPG、JPEG、BMP、PDF格式。图片下载时间不超过 3 秒。图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。
9019
- :rtype: str
9020
- """
9021
- return self._ImageUrl
9022
-
9023
- @ImageUrl.setter
9024
- def ImageUrl(self, ImageUrl):
9025
- self._ImageUrl = ImageUrl
9026
-
9027
- @property
9028
- def PdfPageNumber(self):
9029
- r"""需要识别的PDF页面的对应页码,仅支持PDF单页识别,默认值为1。
9030
- :rtype: int
9031
- """
9032
- return self._PdfPageNumber
9033
-
9034
- @PdfPageNumber.setter
9035
- def PdfPageNumber(self, PdfPageNumber):
9036
- self._PdfPageNumber = PdfPageNumber
9037
-
9038
- @property
9039
- def Crop(self):
9040
- r"""0表示关闭切边,默认为0
9041
- 1表示开启切边
9042
- :rtype: int
9043
- """
9044
- return self._Crop
9045
-
9046
- @Crop.setter
9047
- def Crop(self, Crop):
9048
- self._Crop = Crop
9049
-
9050
- @property
9051
- def Deskew(self):
9052
- r"""0表示关闭弯曲矫正,默认为0
9053
- 1表示开启弯曲矫正
9054
- :rtype: int
9055
- """
9056
- return self._Deskew
9057
-
9058
- @Deskew.setter
9059
- def Deskew(self, Deskew):
9060
- self._Deskew = Deskew
9061
-
9062
- @property
9063
- def Sharpen(self):
9064
- r"""0表示关闭增强锐化,默认为0
9065
- 1表示开启增强锐化
9066
- :rtype: int
9067
- """
9068
- return self._Sharpen
9069
-
9070
- @Sharpen.setter
9071
- def Sharpen(self, Sharpen):
9072
- self._Sharpen = Sharpen
9073
-
9074
- @property
9075
- def Grayscale(self):
9076
- r"""0表示返回黑白图像
9077
- 1表示返回彩色图像,默认为1
9078
- :rtype: int
9079
- """
9080
- return self._Grayscale
9081
-
9082
- @Grayscale.setter
9083
- def Grayscale(self, Grayscale):
9084
- self._Grayscale = Grayscale
9085
-
9086
-
9087
- def _deserialize(self, params):
9088
- self._ImageBase64 = params.get("ImageBase64")
9089
- self._ImageUrl = params.get("ImageUrl")
9090
- self._PdfPageNumber = params.get("PdfPageNumber")
9091
- self._Crop = params.get("Crop")
9092
- self._Deskew = params.get("Deskew")
9093
- self._Sharpen = params.get("Sharpen")
9094
- self._Grayscale = params.get("Grayscale")
9095
- memeber_set = set(params.keys())
9096
- for name, value in vars(self).items():
9097
- property_name = name[1:]
9098
- if property_name in memeber_set:
9099
- memeber_set.remove(property_name)
9100
- if len(memeber_set) > 0:
9101
- warnings.warn("%s fileds are useless." % ",".join(memeber_set))
9102
-
9103
-
9104
-
9105
- class EraseHandwrittenImageOCRResponse(AbstractModel):
9106
- r"""EraseHandwrittenImageOCR返回参数结构体
9107
-
9108
- """
9109
-
9110
- def __init__(self):
9111
- r"""
9112
- :param _Image: 图像处理后的jpg图片,base64格式
9113
- :type Image: str
9114
- :param _RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
9115
- :type RequestId: str
9116
- """
9117
- self._Image = None
9118
- self._RequestId = None
9119
-
9120
- @property
9121
- def Image(self):
9122
- r"""图像处理后的jpg图片,base64格式
9123
- :rtype: str
9124
- """
9125
- return self._Image
9126
-
9127
- @Image.setter
9128
- def Image(self, Image):
9129
- self._Image = Image
9130
-
9131
- @property
9132
- def RequestId(self):
9133
- r"""唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
9134
- :rtype: str
9135
- """
9136
- return self._RequestId
9137
-
9138
- @RequestId.setter
9139
- def RequestId(self, RequestId):
9140
- self._RequestId = RequestId
9141
-
9142
-
9143
- def _deserialize(self, params):
9144
- self._Image = params.get("Image")
9145
- self._RequestId = params.get("RequestId")
9146
-
9147
-
9148
8725
  class EstateCertOCRRequest(AbstractModel):
9149
8726
  r"""EstateCertOCR请求参数结构体
9150
8727
 
@@ -12157,6 +11734,8 @@ class GeneralAccurateOCRRequest(AbstractModel):
12157
11734
  :type EnableDetectText: bool
12158
11735
  :param _ConfigID: <p>配置ID支持: OCR -- 通用场景 MulOCR--多语种场景,默认值为OCR</p>
12159
11736
  :type ConfigID: str
11737
+ :param _WordsType: <p>需要识别的文字类型,默认识别全部类型的文字。 0:自动识别全部类型文字 1:仅识别手写体文字 2:仅识别印刷体文字</p><p>当config id=OCR 且 iswords 是false 时 才生效</p>
11738
+ :type WordsType: str
12160
11739
  """
12161
11740
  self._ImageBase64 = None
12162
11741
  self._ImageUrl = None
@@ -12166,6 +11745,7 @@ class GeneralAccurateOCRRequest(AbstractModel):
12166
11745
  self._PdfPageNumber = None
12167
11746
  self._EnableDetectText = None
12168
11747
  self._ConfigID = None
11748
+ self._WordsType = None
12169
11749
 
12170
11750
  @property
12171
11751
  def ImageBase64(self):
@@ -12255,6 +11835,17 @@ class GeneralAccurateOCRRequest(AbstractModel):
12255
11835
  def ConfigID(self, ConfigID):
12256
11836
  self._ConfigID = ConfigID
12257
11837
 
11838
+ @property
11839
+ def WordsType(self):
11840
+ r"""<p>需要识别的文字类型,默认识别全部类型的文字。 0:自动识别全部类型文字 1:仅识别手写体文字 2:仅识别印刷体文字</p><p>当config id=OCR 且 iswords 是false 时 才生效</p>
11841
+ :rtype: str
11842
+ """
11843
+ return self._WordsType
11844
+
11845
+ @WordsType.setter
11846
+ def WordsType(self, WordsType):
11847
+ self._WordsType = WordsType
11848
+
12258
11849
 
12259
11850
  def _deserialize(self, params):
12260
11851
  self._ImageBase64 = params.get("ImageBase64")
@@ -12265,6 +11856,7 @@ class GeneralAccurateOCRRequest(AbstractModel):
12265
11856
  self._PdfPageNumber = params.get("PdfPageNumber")
12266
11857
  self._EnableDetectText = params.get("EnableDetectText")
12267
11858
  self._ConfigID = params.get("ConfigID")
11859
+ self._WordsType = params.get("WordsType")
12268
11860
  memeber_set = set(params.keys())
12269
11861
  for name, value in vars(self).items():
12270
11862
  property_name = name[1:]
@@ -16624,13 +16216,13 @@ class ItemCoord(AbstractModel):
16624
16216
 
16625
16217
  def __init__(self):
16626
16218
  r"""
16627
- :param _X: 左上角x
16219
+ :param _X: <p>左上角x。</p>
16628
16220
  :type X: int
16629
- :param _Y: 左上角y
16221
+ :param _Y: <p>左上角y。</p>
16630
16222
  :type Y: int
16631
- :param _Width: width
16223
+ :param _Width: <p>宽width。</p>
16632
16224
  :type Width: int
16633
- :param _Height: height
16225
+ :param _Height: <p>高height。</p>
16634
16226
  :type Height: int
16635
16227
  """
16636
16228
  self._X = None
@@ -16640,7 +16232,7 @@ class ItemCoord(AbstractModel):
16640
16232
 
16641
16233
  @property
16642
16234
  def X(self):
16643
- r"""左上角x
16235
+ r"""<p>左上角x。</p>
16644
16236
  :rtype: int
16645
16237
  """
16646
16238
  return self._X
@@ -16651,7 +16243,7 @@ class ItemCoord(AbstractModel):
16651
16243
 
16652
16244
  @property
16653
16245
  def Y(self):
16654
- r"""左上角y
16246
+ r"""<p>左上角y。</p>
16655
16247
  :rtype: int
16656
16248
  """
16657
16249
  return self._Y
@@ -16662,7 +16254,7 @@ class ItemCoord(AbstractModel):
16662
16254
 
16663
16255
  @property
16664
16256
  def Width(self):
16665
- r"""width
16257
+ r"""<p>宽width。</p>
16666
16258
  :rtype: int
16667
16259
  """
16668
16260
  return self._Width
@@ -16673,7 +16265,7 @@ class ItemCoord(AbstractModel):
16673
16265
 
16674
16266
  @property
16675
16267
  def Height(self):
16676
- r"""height
16268
+ r"""<p>高height。</p>
16677
16269
  :rtype: int
16678
16270
  """
16679
16271
  return self._Height
@@ -34230,22 +33822,22 @@ class TextDetection(AbstractModel):
34230
33822
 
34231
33823
  def __init__(self):
34232
33824
  r"""
34233
- :param _DetectedText: <p>识别出的文本行内容</p>
33825
+ :param _DetectedText: <p>识别出的文本行内容。</p>
34234
33826
  :type DetectedText: str
34235
- :param _Confidence: <p>置信度 0 ~100</p>
33827
+ :param _Confidence: <p>置信度 0 ~100。</p>
34236
33828
  :type Confidence: int
34237
- :param _Polygon: <p>文本行坐标,以四个顶点坐标表示</p>
33829
+ :param _Polygon: <p>文本行坐标,以四个顶点坐标表示。</p>
34238
33830
  注意:此字段可能返回 null,表示取不到有效值。
34239
33831
  :type Polygon: list of Coord
34240
- :param _AdvancedInfo: <p>此字段为扩展字段。<br>GeneralBasicOcr接口返回段落信息Parag,包含ParagNo。</p>
33832
+ :param _AdvancedInfo: <p>此字段为扩展字段。GeneralBasicOcr接口返回段落信息Parag,包含ParagNo。</p>
34241
33833
  :type AdvancedInfo: str
34242
- :param _ItemPolygon: <p>文本行在旋转纠正之后的图像中的像素坐标,表示为(左上角x, 左上角y,宽width,高height)</p>
33834
+ :param _ItemPolygon: <p>文本行在旋转纠正之后的图像中的像素坐标,表示为(左上角x, 左上角y,宽width,高height)。</p>
34243
33835
  :type ItemPolygon: :class:`tencentcloud.ocr.v20181119.models.ItemCoord`
34244
- :param _Words: <p>识别出来的单字信息包括单字(包括单字Character和单字置信度confidence), 支持识别的接口:GeneralBasicOCR、GeneralAccurateOCR</p>
33836
+ :param _Words: <p>识别出来的单字信息包括单字(包括单字Character和单字置信度confidence), 支持识别的接口:GeneralBasicOCR、GeneralAccurateOCR。</p>
34245
33837
  :type Words: list of DetectedWords
34246
- :param _WordCoordPoint: <p>单字在原图中的四点坐标, 支持识别的接口:GeneralBasicOCR、GeneralAccurateOCR</p>
33838
+ :param _WordCoordPoint: <p>单字在原图中的四点坐标, 支持识别的接口:GeneralBasicOCR、GeneralAccurateOCR。</p>
34247
33839
  :type WordCoordPoint: list of DetectedWordCoordPoint
34248
- :param _Language: <p>语种信息。zh:中文; en:英文; th:泰语; id:印尼语; ja:日语; ko:韩语; es:西班牙语; fr:法语; de:德语; pt:葡萄牙语; vi:越南语; ms:马来语; ru:俄语; it:意大利语; nl:荷兰语; sv:瑞典语; fi:芬兰语; no:挪威语; hu:匈牙利语; ar:阿拉伯语; hi:印地语</p>
33840
+ :param _Language: <p>语种信息。注:仅ConfigID配置为MulOCR时支持。zh:中文; en:英文; tha:泰语; may:印尼语; jap:日语; kor:韩语; spa:西班牙语; fre:法语; ger:德语; por:葡萄牙语; vie:越南语; may:马来语; rus:俄语; ita:意大利语; hol:荷兰语; swe:瑞典语; fin:芬兰语; nor:挪威语; hun:匈牙利语; ara:阿拉伯语; hi:印地语。</p>
34249
33841
  :type Language: str
34250
33842
  """
34251
33843
  self._DetectedText = None
@@ -34259,7 +33851,7 @@ class TextDetection(AbstractModel):
34259
33851
 
34260
33852
  @property
34261
33853
  def DetectedText(self):
34262
- r"""<p>识别出的文本行内容</p>
33854
+ r"""<p>识别出的文本行内容。</p>
34263
33855
  :rtype: str
34264
33856
  """
34265
33857
  return self._DetectedText
@@ -34270,7 +33862,7 @@ class TextDetection(AbstractModel):
34270
33862
 
34271
33863
  @property
34272
33864
  def Confidence(self):
34273
- r"""<p>置信度 0 ~100</p>
33865
+ r"""<p>置信度 0 ~100。</p>
34274
33866
  :rtype: int
34275
33867
  """
34276
33868
  return self._Confidence
@@ -34281,7 +33873,7 @@ class TextDetection(AbstractModel):
34281
33873
 
34282
33874
  @property
34283
33875
  def Polygon(self):
34284
- r"""<p>文本行坐标,以四个顶点坐标表示</p>
33876
+ r"""<p>文本行坐标,以四个顶点坐标表示。</p>
34285
33877
  注意:此字段可能返回 null,表示取不到有效值。
34286
33878
  :rtype: list of Coord
34287
33879
  """
@@ -34293,7 +33885,7 @@ class TextDetection(AbstractModel):
34293
33885
 
34294
33886
  @property
34295
33887
  def AdvancedInfo(self):
34296
- r"""<p>此字段为扩展字段。<br>GeneralBasicOcr接口返回段落信息Parag,包含ParagNo。</p>
33888
+ r"""<p>此字段为扩展字段。GeneralBasicOcr接口返回段落信息Parag,包含ParagNo。</p>
34297
33889
  :rtype: str
34298
33890
  """
34299
33891
  return self._AdvancedInfo
@@ -34304,7 +33896,7 @@ class TextDetection(AbstractModel):
34304
33896
 
34305
33897
  @property
34306
33898
  def ItemPolygon(self):
34307
- r"""<p>文本行在旋转纠正之后的图像中的像素坐标,表示为(左上角x, 左上角y,宽width,高height)</p>
33899
+ r"""<p>文本行在旋转纠正之后的图像中的像素坐标,表示为(左上角x, 左上角y,宽width,高height)。</p>
34308
33900
  :rtype: :class:`tencentcloud.ocr.v20181119.models.ItemCoord`
34309
33901
  """
34310
33902
  return self._ItemPolygon
@@ -34315,7 +33907,7 @@ class TextDetection(AbstractModel):
34315
33907
 
34316
33908
  @property
34317
33909
  def Words(self):
34318
- r"""<p>识别出来的单字信息包括单字(包括单字Character和单字置信度confidence), 支持识别的接口:GeneralBasicOCR、GeneralAccurateOCR</p>
33910
+ r"""<p>识别出来的单字信息包括单字(包括单字Character和单字置信度confidence), 支持识别的接口:GeneralBasicOCR、GeneralAccurateOCR。</p>
34319
33911
  :rtype: list of DetectedWords
34320
33912
  """
34321
33913
  return self._Words
@@ -34326,7 +33918,7 @@ class TextDetection(AbstractModel):
34326
33918
 
34327
33919
  @property
34328
33920
  def WordCoordPoint(self):
34329
- r"""<p>单字在原图中的四点坐标, 支持识别的接口:GeneralBasicOCR、GeneralAccurateOCR</p>
33921
+ r"""<p>单字在原图中的四点坐标, 支持识别的接口:GeneralBasicOCR、GeneralAccurateOCR。</p>
34330
33922
  :rtype: list of DetectedWordCoordPoint
34331
33923
  """
34332
33924
  return self._WordCoordPoint
@@ -34337,7 +33929,7 @@ class TextDetection(AbstractModel):
34337
33929
 
34338
33930
  @property
34339
33931
  def Language(self):
34340
- r"""<p>语种信息。zh:中文; en:英文; th:泰语; id:印尼语; ja:日语; ko:韩语; es:西班牙语; fr:法语; de:德语; pt:葡萄牙语; vi:越南语; ms:马来语; ru:俄语; it:意大利语; nl:荷兰语; sv:瑞典语; fi:芬兰语; no:挪威语; hu:匈牙利语; ar:阿拉伯语; hi:印地语</p>
33932
+ r"""<p>语种信息。注:仅ConfigID配置为MulOCR时支持。zh:中文; en:英文; tha:泰语; may:印尼语; jap:日语; kor:韩语; spa:西班牙语; fre:法语; ger:德语; por:葡萄牙语; vie:越南语; may:马来语; rus:俄语; ita:意大利语; hol:荷兰语; swe:瑞典语; fin:芬兰语; nor:挪威语; hun:匈牙利语; ara:阿拉伯语; hi:印地语。</p>
34341
33933
  :rtype: str
34342
33934
  """
34343
33935
  return self._Language
@@ -276,31 +276,6 @@ class OcrClient(AbstractClient):
276
276
  raise TencentCloudSDKException(type(e).__name__, str(e))
277
277
 
278
278
 
279
- def CropEnhanceImageOCR(self, request):
280
- r"""图像切边矫正增强是面向文档类图片提供的图像增强处理能力,包括切边增强、图像矫正、阴影去除、摩尔纹去除等;可以有效优化文档类的图片质量,提升文字的清晰度,可以作为所有识别场景的图像预处理原子能力,从而提升识别效果。
281
-
282
- 默认接口请求频率限制:5次/秒。
283
-
284
- :param request: Request instance for CropEnhanceImageOCR.
285
- :type request: :class:`tencentcloud.ocr.v20181119.models.CropEnhanceImageOCRRequest`
286
- :rtype: :class:`tencentcloud.ocr.v20181119.models.CropEnhanceImageOCRResponse`
287
-
288
- """
289
- try:
290
- params = request._serialize()
291
- headers = request.headers
292
- body = self.call("CropEnhanceImageOCR", params, headers=headers)
293
- response = json.loads(body)
294
- model = models.CropEnhanceImageOCRResponse()
295
- model._deserialize(response["Response"])
296
- return model
297
- except Exception as e:
298
- if isinstance(e, TencentCloudSDKException):
299
- raise
300
- else:
301
- raise TencentCloudSDKException(type(e).__name__, str(e))
302
-
303
-
304
279
  def DescribeExtractDocAgentJob(self, request):
305
280
  r"""模型参数更大,速度更慢。推荐场景:可以接受异步(超过30s返回),样本输入输出token大于2000,长文本类文档建议用异步模型。需要 SubmitExtractDocAgentJob(提交任务)、DescribeExtractDocAgentJob(查询任务)两个接口配套使用,计费发生在提交任务后。【备注:1.固定价格不限抽取字段数,2.自适应价格抽取字段大于10记两次费用,小于等于10记一次费用】
306
281
 
@@ -508,31 +483,6 @@ class OcrClient(AbstractClient):
508
483
  raise TencentCloudSDKException(type(e).__name__, str(e))
509
484
 
510
485
 
511
- def EraseHandwrittenImageOCR(self, request):
512
- r"""本功能可自动清除试卷图片中的手写与批改痕迹,并输出洁净的空白试卷。也可以配合集成图像切边矫正技术,能自动定位、拉平试卷区域,从而在最优预处理基础上实现更佳的擦除效果。
513
-
514
- 默认接口请求频率限制:5次/秒。
515
-
516
- :param request: Request instance for EraseHandwrittenImageOCR.
517
- :type request: :class:`tencentcloud.ocr.v20181119.models.EraseHandwrittenImageOCRRequest`
518
- :rtype: :class:`tencentcloud.ocr.v20181119.models.EraseHandwrittenImageOCRResponse`
519
-
520
- """
521
- try:
522
- params = request._serialize()
523
- headers = request.headers
524
- body = self.call("EraseHandwrittenImageOCR", params, headers=headers)
525
- response = json.loads(body)
526
- model = models.EraseHandwrittenImageOCRResponse()
527
- model._deserialize(response["Response"])
528
- return model
529
- except Exception as e:
530
- if isinstance(e, TencentCloudSDKException):
531
- raise
532
- else:
533
- raise TencentCloudSDKException(type(e).__name__, str(e))
534
-
535
-
536
486
  def EstateCertOCR(self, request):
537
487
  r"""本接口支持不动产权证关键字段的识别,包括使用期限、面积、用途、权利性质、权利类型、坐落、共有情况、权利人、权利其他状况等。
538
488
 
@@ -225,26 +225,6 @@ class OcrClient(AbstractClient):
225
225
 
226
226
  return await self.call_and_deserialize(**kwargs)
227
227
 
228
- async def CropEnhanceImageOCR(
229
- self,
230
- request: models.CropEnhanceImageOCRRequest,
231
- opts: Dict = None,
232
- ) -> models.CropEnhanceImageOCRResponse:
233
- """
234
- 图像切边矫正增强是面向文档类图片提供的图像增强处理能力,包括切边增强、图像矫正、阴影去除、摩尔纹去除等;可以有效优化文档类的图片质量,提升文字的清晰度,可以作为所有识别场景的图像预处理原子能力,从而提升识别效果。
235
-
236
- 默认接口请求频率限制:5次/秒。
237
- """
238
-
239
- kwargs = {}
240
- kwargs["action"] = "CropEnhanceImageOCR"
241
- kwargs["params"] = request._serialize()
242
- kwargs["resp_cls"] = models.CropEnhanceImageOCRResponse
243
- kwargs["headers"] = request.headers
244
- kwargs["opts"] = opts or {}
245
-
246
- return await self.call_and_deserialize(**kwargs)
247
-
248
228
  async def DescribeExtractDocAgentJob(
249
229
  self,
250
230
  request: models.DescribeExtractDocAgentJobRequest,
@@ -412,26 +392,6 @@ class OcrClient(AbstractClient):
412
392
 
413
393
  return await self.call_and_deserialize(**kwargs)
414
394
 
415
- async def EraseHandwrittenImageOCR(
416
- self,
417
- request: models.EraseHandwrittenImageOCRRequest,
418
- opts: Dict = None,
419
- ) -> models.EraseHandwrittenImageOCRResponse:
420
- """
421
- 本功能可自动清除试卷图片中的手写与批改痕迹,并输出洁净的空白试卷。也可以配合集成图像切边矫正技术,能自动定位、拉平试卷区域,从而在最优预处理基础上实现更佳的擦除效果。
422
-
423
- 默认接口请求频率限制:5次/秒。
424
- """
425
-
426
- kwargs = {}
427
- kwargs["action"] = "EraseHandwrittenImageOCR"
428
- kwargs["params"] = request._serialize()
429
- kwargs["resp_cls"] = models.EraseHandwrittenImageOCRResponse
430
- kwargs["headers"] = request.headers
431
- kwargs["opts"] = opts or {}
432
-
433
- return await self.call_and_deserialize(**kwargs)
434
-
435
395
  async def EstateCertOCR(
436
396
  self,
437
397
  request: models.EstateCertOCRRequest,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tencentcloud-sdk-python-ocr
3
- Version: 3.1.82
3
+ Version: 3.1.88
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
@@ -15,7 +15,7 @@ Classifier: Programming Language :: Python :: 2.7
15
15
  Classifier: Programming Language :: Python :: 3
16
16
  Classifier: Programming Language :: Python :: 3.6
17
17
  Classifier: Programming Language :: Python :: 3.7
18
- Requires-Dist: tencentcloud-sdk-python-common<4.0.0,>=3.1.82
18
+ Requires-Dist: tencentcloud-sdk-python-common<4.0.0,>=3.1.88
19
19
 
20
20
  ============================
21
21
  Tencent Cloud SDK for Python
@@ -0,0 +1 @@
1
+ tencentcloud-sdk-python-common<4.0.0,>=3.1.88
@@ -1 +0,0 @@
1
- tencentcloud-sdk-python-common<4.0.0,>=3.1.82