Skip to main content

Tool of computing the TEDS of table recognition

Project description

table_recognition_metric

PyPI SemVer2.0

1. Install package by pypi.

pip install table_recognition_metric

2. Run by command line.

  • Usage:
    $ table_recognition_metric -h
    usage: table_recognition_metric [-h] [-gt GT_HTML] [-pred PRED_HTML]
    
    optional arguments:
    -h, --help            show this help message and exit
    -gt GT_HTML, --gt_html GT_HTML
    -pred PRED_HTML, --pred_html PRED_HTM
    
  • Example:
    $ table_recognition_metric -gt '<html><body><table><tr><td>购买方</td><td colspan="5">纳税人识别号地址、电记开户行及账号</td><td>密码区</td><td colspan="4"></td></tr><tr><td colspan="2">货物或应税劳务、服务名称理肤泉清痘旅行装控油祛痘调节水油平衡理肤泉特安舒缓修护乳40ml合计</td><td>规格型号</td><td>单位</td><td>11</td><td colspan="3"></td><td></td><td>税率17%17%</td><td></td></tr><tr><td colspan="2">价税合计(大写)</td><td colspan="9"></td></tr><tr><td>销售方</td><td colspan="5">纳税人识别号地址、电话开户行及账号</td><td>备注</td><td colspan="4"></td></tr></table></body></html>' -pred ''
    
    # 0.0
    

3. Run by script.

teds = TEDS()

gt_html = '<html><body><table><tr><td>购买方</td><td colspan="5">纳税人识别号地址、电记开户行及账号</td><td>密码区</td><td colspan="4"></td></tr><tr><td colspan="2">货物或应税劳务、服务名称理肤泉清痘旅行装控油祛痘调节水油平衡理肤泉特安舒缓修护乳40ml合计</td><td>规格型号</td><td>单位</td><td>11</td><td colspan="3"></td><td></td><td>税率17%17%</td><td></td></tr><tr><td colspan="2">价税合计(大写)</td><td colspan="9"></td></tr><tr><td>销售方</td><td colspan="5">纳税人识别号地址、电话开户行及账号</td><td>备注</td><td colspan="4"></td></tr></table></body></html>'
pred_html = '<html><body><table><tr><td>购买方</td><td colspan="5">纳税人识别号地址、电记开户行及账号</td><td>密码区</td><td colspan="4"></td></tr><tr><td colspan="2">货物或应税劳务、服务名称理肤泉清痘旅行装控油祛痘调节水油平衡理肤泉特安舒缓修护乳40ml合计</td><td>规格型号</td><td>单位</td><td>11</td><td colspan="3"></td><td></td><td>税率17%17%</td><td></td></tr><tr><td colspan="2">价税合计(大写)</td><td colspan="9"></td></tr><tr><td>销售方</td><td colspan="5">纳税人识别号地址、电话开户行及账号</td><td>备注</td><td colspan="4"></td></tr></table></body></html>'

score = teds(gt_html, pred_html)
print(score)

See details for TableRecognitionMetric.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

table_recognition_metric-0.0.3-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file table_recognition_metric-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for table_recognition_metric-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4fcf87d2186745fc941da78be2350c19bfb16f4d118935592d1d61b4b4006ea2
MD5 6c007e7b9f431f4f247ef18b25e65379
BLAKE2b-256 adafe7ed8426cd55453f6236cf08e280f8ce4d631417356c451fddcc50afb98a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page