acl-anthology
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 checkwill run ruff (linter and formatter), mypy, and some other pre-commit hooks on all files in the repo.just install-hookswill install pre-commit hooks so they run on every attempted commit.
-
just test-allwill run all tests except for tests that run on the full Anthology data.just test NAMEwill only run test functions withNAMEin them.just test-integrationwill run tests on the full Anthology data.
-
just fix-and-test(orjust ftfor 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 docsgenerates the documentation in thesite/folder.just docs-serveserves 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).
Release files for acl-anthology 1.3.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| acl_anthology-1.3.3.tar.gz | 152.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| acl_anthology-1.3.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 334.2 kB
Release files / acl_anthology-1.3.3.tar.gz
| Download URL | acl_anthology-1.3.3.tar.gz |
|---|---|
| Size | 152.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7edbfdc3aeda2e6a3f82e1def7bc50745a1c8c64497999eb19d747a0fcfe4ee0
|
|
BLAKE2b-256 checksum How to use checksums |
143eb607ffc57e8f6cf738b44fc3d1384fc1d02f982976fae612ca86e5b315c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.14 {"installer":{"name":"uv","version":"0.12.14","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}
|
Release files / acl_anthology-1.3.3-py3-none-any.whl
| Download URL | acl_anthology-1.3.3-py3-none-any.whl |
|---|---|
| Size | 181.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5dbab042f56a2d49d227b4ccb03c5b94d7b8b2e88f5d750437b4d53d0438a245
|
|
BLAKE2b-256 checksum How to use checksums |
a6e69d0b237d8d6296a63c8efdd00f36e2a6640c99cf6f5661020fe5ee0ce6e9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.14 {"installer":{"name":"uv","version":"0.12.14","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}
|