Skip to main content

Pygamma-agreement

Package Version Supported Python Version Build Status Documentation Status status

pygamma-agreement is an open-source package to measure Inter/Intra-annotator1 agreement for sequences of annotations with the γ measure2. It is written in Python3 and based mostly on NumPy, Numba and pyannote.core. For a full list of available functions, please refer to the package documentation.

Alignment Example

Dependencies

The main dependencies of pygamma-agreement are NumPy, CVXPY, Numba and pyannote.core.

Optionally, to allow pygamma-agreement to display visual representations of our API's objects in Jupyter Notebooks, Matplotlib is needed.

pygamma-agreement is a Python 3 package and is currently tested for Python 3.7 to 3.11. pygamma-agreement does not work with Python 2.7.

Installation

pygamma-agreement can be easily installed using pip :

$ pip install pygamma-agreement

Pygamma-agreement uses the GNU Linear Programming Kit as its default Mixed Integer Programming solver (critical step of the gamma-agreement algorithm). Since it is quite slow, you can install the CBC solver and its official python API. To use those in pygamma-agreement, simply install them:

  • Ubuntu/Debian : $ sudo apt install coinor-libcbc-dev
  • Fedora : $ sudo yum install coin-or-Cbc-devel
  • Arch Linux : $ sudo pacman -S coin-or-cbc
  • Mac OS X :
    • $ brew tap coin-or-tools/coinor
    • $ brew install coin-or-tools/coinor/cbc pkg-config

then:

$ pip install "pygamma-agreement[CBC]"

If you have trouble during the two last steps, pygamma-agreement should work anyway, although significantly slower for larger input.

WARNING: A bug in GLPK causes the standard output to be polluted by non-deactivable messages. It is strongly advised to use the CBC solver.

Tests

The package comes with a unit-tests suite. To run it, first install the CBC solver, then the testing dependencies on your Python environment:

$ sudo apt install coinor-libcbc-dev
$ pip install "pygamma-agreement[testing]"

After that, tests are ready to be launched (they take ~2m on a recent laptop) :

$ pytest tests/

Documentation

The documentation for this package has been written using Sphinx. To build the documentation locally, run:

$ pip install "pygamma-agreement[docs]"
$ cd docs/
$ make html

After that, you can view the documentation by running

$ firefox build/html/index.html

Submitting and issue or contributing

Please read CONTRIBUTING.md before submitting and issue or writing some contribution to this package.

Citing Pygamma

If you're using pygamma in your work, please cite our package using the following bibtex entry:

@article{Titeux2021,
  doi = {10.21105/joss.02989},
  url = {https://doi.org/10.21105/joss.02989},
  year = {2021},
  publisher = {The Open Journal},
  volume = {6},
  number = {62},
  pages = {2989},
  author = {Hadrien Titeux and Rachid Riad},
  title = {pygamma-agreement: Gamma $\gamma$ measure for inter/intra-annotator agreement in Python},
  journal = {Journal of Open Source Software}
}

References

  1. Titeux H., Riad R. pygamma-agreement: Gamma γ measure for inter/intra-annotator agreement in Python. ↩

  2. Mathet Y., Widlöcher A., Métivier, J.P. The unified and holistic method gamma γ for inter-annotator agreement measure and alignment. Computational Linguistics ↩

Metadata

Release files for pygamma-agreement 0.5.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pygamma-agreement 0.5.9
File Size Uploaded Provenance
pygamma-agreement-0.5.9.tar.gz 998.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pygamma-agreement 0.5.9
File Interpreter ABI Platform
pygamma_agreement-0.5.9-py3-none-any.whl Python 3 none any Details

Total release size: 1.0 MB

Release files / pygamma-agreement-0.5.9.tar.gz

Download URL pygamma-agreement-0.5.9.tar.gz
Size 998.8 kB
Tags Source
SHA-256 checksum
How to use checksums
6d9a459383e1279e40b4cf564c332577dad0b9b393e2919044ab1ec537879e27
BLAKE2b-256 checksum
How to use checksums
4016d2f14f3920232946ec02182a635209806211befcd6c036b9789fad0e7fc3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.12

Release files / pygamma_agreement-0.5.9-py3-none-any.whl

Download URL pygamma_agreement-0.5.9-py3-none-any.whl
Size 44.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3f3b90f467039f11383335dc706dd18404b934992f0ea2327c7b437431fecb83
BLAKE2b-256 checksum
How to use checksums
8cad52cee2def1154a38c9087c69c9269fabefca4e0f170ec2216be7b6ae9ffd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.12

Security for pygamma-agreement 0.5.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page