Skip to main content

A library for comparing sequential data

Project description

Pyaliner

Library for aligning and visually comparing sequential data in the terminal.

paired ground-truth vs predicted comparison

compact

Compact paired ground-truth vs predicted

classic

Classic paired ground-truth vs predicted

inlined ground-truth vs predicted comparison

compact

Compact inlined ground-truth vs predicted

classic

Classic inlined ground-truth vs predicted

paired input vs ground-truth vs predicted comparison

compact

Compact paired input vs ground-truth vs predicted

classic

Classic paired input vs ground-truth vs predicted

paired ground-truth vs 1st predicted vs 2nd predicted comparison

Classic paired ground-truth vs 1st predicted vs 2nd predicted

alignment

>>> from pyaliner import align, COMPACT

>>> align('Example invalid invalid sentence'.split(), 'Example sentence'.split())
(('Example', 'invalid', 'invalid', 'sentence'), ('Example', '⎵', '⎵', 'sentence'))

>>> align('Example invalid invalid sentence'.split(), 'Example sentence'.split(), kind=COMPACT)
(('Example', 'invalid∙invalid', 'sentence'), ('Example', '⎵', 'sentence'))

Limitations

  • Three-way alignment uses a slow heuristic.
  • Wide characters, e.g., East Asian scripts, are not properly aligned with narrow ones

Installing

Install with pip:

pip install pyaliner

Testing

Unit tests are written with pytest and hypothesis. Run with:

pip install pytest hypothesis

pytest

Changelog

Check the Changelog for fixes and enhancements of each version.

License

Copyright Jose Llarena 2022

Distributed under the terms of the MIT license, Pyaliner is free and open source software.

Project details


Download files

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

Source Distribution

pyaliner-0.1.2.tar.gz (13.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyaliner-0.1.2-py3-none-any.whl (13.9 kB view details)

Uploaded Python 3

File details

Details for the file pyaliner-0.1.2.tar.gz.

File metadata

  • Download URL: pyaliner-0.1.2.tar.gz
  • Upload date:
  • Size: 13.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for pyaliner-0.1.2.tar.gz
Algorithm Hash digest
SHA256 8904a71285076cde0cdddd9e128cbe63d5074b1cddeaaf943a3f2d86000349ee
MD5 e53a0dece9d61430558109a5202da8a7
BLAKE2b-256 918131b2d2312c87349792788669a535c9e1a5b1cf4dd883dd50df23f49490e0

See more details on using hashes here.

File details

Details for the file pyaliner-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: pyaliner-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 13.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for pyaliner-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bd2c14a7b18d5bb183a5f44b382b6dc785fb3b6b4a46cd7832eca85cf8118e5d
MD5 e20ce16a85163e48ca27e112ba5d440c
BLAKE2b-256 999b2402214975e1c1f4c145bedc1937846266d543ff314fcac99adda817007a

See more details on using hashes here.

Supported by

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