Skip to main content

A library for accessing the ACL Anthology

Project description

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, while just -n <recipe> will print the commands that the recipe would run.

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).

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

acl_anthology-1.1.0.tar.gz (134.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.1.0-py3-none-any.whl (166.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: acl_anthology-1.1.0.tar.gz
  • Upload date:
  • Size: 134.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"43","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for acl_anthology-1.1.0.tar.gz
Algorithm Hash digest
SHA256 bf8aa4b30abd129fdef01c0106ed2f7a57ea65408e3f4caeb03cf1d77600ad66
MD5 c545a0d93a0e8632841123f7cb12fda7
BLAKE2b-256 8344aae7a37292fa3eb32bb0074d61d96a1be2ec90cae0d9bd992c0f1d91da96

See more details on using hashes here.

File details

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

File metadata

  • Download URL: acl_anthology-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 166.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"43","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for acl_anthology-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f6c9d5a51866db765b348a63cfa14215583ffa4f184fe75397a646f9f5f2d3ba
MD5 32f196ae8c5c25f1be67f731115b69ad
BLAKE2b-256 3f80902d9d3654d8753fe735cd7b769861ab131f514f9abb18145703b68bd61a

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