Skip to main content

acl-anthology

License Build Status Documentation Code Coverage Supported Python Versions Development Status Package on PyPI

This package accesses data from the ACL Anthology.

For end users

Install via pip:

$ pip install acl-anthology

Instantiate the library, automatically fetching data files from the ACL Anthology repo (requires git to be installed on your system):

from acl_anthology import Anthology
anthology = Anthology.from_repo()

Some brief usage examples:

>>> paper = anthology.get("C92-1025")
>>> str(paper.title)
Two-Level Morphology with Composition
>>> [author.name for author in paper.authors]
[
    Name(first='Lauri', last='Karttunen'),
    Name(first='Ronald M.', last='Kaplan'),
    Name(first='Annie', last='Zaenen')
]
>>> anthology.find_people("Karttunen, Lauri")
[
    Person(
        id='lauri-karttunen', names=[Name(first='Lauri', last='Karttunen')],
        item_ids=<set of 30 AnthologyIDTuple objects>, comment=None
    )
]

Find more examples and details on the API in the official documentation.

For Anthology maintainers

If you want to instantiate the library from a script within the repo, e.g. in order to make modifications to the data and push them to a branch, instantiate the library like this:

anthology = Anthology.from_within_repo()

If you want to quickly check or try out something in a Python REPL, you can invoke just python repl (or simply just repl if you're within the python/ folder) to start a REPL with this anthology object already instantiated.

For developers

This package uses uv for project management. Development is easiest with the just command runner.

Running just -l will list all available recipes in the current directory, while just -n <recipe> will print the commands that the recipe would run.

Given below are example just commands that can be run inside the python/ folder (or with just python from the repository root).

Running checks, pre-commit hooks, and tests

  • just check will run ruff (linter and formatter), mypy, and some other pre-commit hooks on all files in the repo.

    • just install-hooks will install pre-commit hooks so they run on every attempted commit.
  • just test-all will run all tests except for tests that run on the full Anthology data.

    • just test NAME will only run test functions with NAME in them.
    • just test-integration will run tests on the full Anthology data.
  • just fix-and-test (or just ft for short) will run all checks and tests, additionally re-running the checks on failure, so that the checking and testing will continue even if some hooks have modified files.

  • The justfile defines several more useful recipes; list them with just -l!

Generating and writing documentation

  • just docs generates the documentation in the site/ folder.
  • just docs-serve serves the documentation for local browsing.

Docstrings are written in Google style as this supports the most features with the mkdocstrings handler (particularly compared to Sphinx/reST).

Download files

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

Source Distribution

acl_anthology-1.3.2.tar.gz (148.6 kB view details)

Uploaded Source

Built Distribution

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

acl_anthology-1.3.2-py3-none-any.whl (178.9 kB view details)

Uploaded Python 3

File details

Details for the file acl_anthology-1.3.2.tar.gz.

File metadata

  • Download URL: acl_anthology-1.3.2.tar.gz
  • Upload date:
  • Size: 148.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.6 {"installer":{"name":"uv","version":"0.12.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for acl_anthology-1.3.2.tar.gz
Algorithm Hash digest
SHA256 426876960d1a56f43a81e9257e85dd61bb776ce58703d1717266e2c2361fed66
MD5 1b35e96842c7bb808705ed15efca1a13
BLAKE2b-256 d277b58d955674773da507658e7c3bc1d5e7f0f10691221b54d81a00b81a4efb

See more details on using hashes here.

File details

Details for the file acl_anthology-1.3.2-py3-none-any.whl.

File metadata

  • Download URL: acl_anthology-1.3.2-py3-none-any.whl
  • Upload date:
  • Size: 178.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.6 {"installer":{"name":"uv","version":"0.12.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for acl_anthology-1.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6cd09e108ef08c91a17705ff8fc5974e1265c417e14d61ea1ece6453ee756f0f
MD5 77ced98649f02bf96c6ea071b2edfc6b
BLAKE2b-256 0e15bbc38c65e2a8a2ed4e10818ec42756c68f8ffb2af182cf3f93e1ebf8c022

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.3.2 This release

2 files

1.3.1

2 files

1.3.0

2 files

1.2.0

2 files

1.1.0

2 files

1.0.0

2 files

0.5.4

2 files

0.5.3

2 files

0.5.2

2 files

0.5.1

2 files

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