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.1.tar.gz (147.1 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.1-py3-none-any.whl (177.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: acl_anthology-1.3.1.tar.gz
  • Upload date:
  • Size: 147.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","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.1.tar.gz
Algorithm Hash digest
SHA256 5d786f1e1946bd5e2d98ac833b95e89e4a9910e07d95413a33d5a1a695ab3569
MD5 cfe488df8de1a7a35e2000e7f59b3669
BLAKE2b-256 ff1e228d9e0da644b13d949b93a0c3f125cc7f59e00c341db9b625b2a8776b94

See more details on using hashes here.

File details

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

File metadata

  • Download URL: acl_anthology-1.3.1-py3-none-any.whl
  • Upload date:
  • Size: 177.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 382ce0b872a4699c166adf3f9d0f65856b516e3532994659f30fcb7d89b8d40e
MD5 3ed275c33936076f78544701f26110be
BLAKE2b-256 c8627ccd42df2f70b3f8abd0d989762830c78589509677f3df2a32ffa828c41e

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 Sentry Error logging StatusPage Status page