A library for accessing the ACL Anthology
Project description
acl-anthology
This package accesses data from the ACL Anthology.
How to use
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.
Developing
This package uses the Poetry packaging system.
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 checkwill run black, ruff, 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!
Running benchmarks
There are some benchmark scripts intended to be run with richbench:
poetry run richbench benchmarks/
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).
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file acl_anthology-1.0.0.tar.gz.
File metadata
- Download URL: acl_anthology-1.0.0.tar.gz
- Upload date:
- Size: 130.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.13.11 Linux/6.17.13-200.fc42.x86_64
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bdfa4afe7e3d87ccf3e6ebdbd4e8aa538afbfadc1631b39f616f4a605b44e082
|
|
| MD5 |
2f3ff79a64c566f9d857cd675f934c81
|
|
| BLAKE2b-256 |
347cfb77450cd258310324469da1a75e28df4835a7128a5ea791b7cd179bdf82
|
File details
Details for the file acl_anthology-1.0.0-py3-none-any.whl.
File metadata
- Download URL: acl_anthology-1.0.0-py3-none-any.whl
- Upload date:
- Size: 161.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.13.11 Linux/6.17.13-200.fc42.x86_64
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f9c366761a7145e69ce89cc13ec491d22a29a819b358d26cfcd9c2b01ca43a7
|
|
| MD5 |
dc292c6fd4ff5e2c1f5cb156bc37fa9d
|
|
| BLAKE2b-256 |
8fd9104da60d1c316765d3a56cf5c08dd5318691b2432e02dafcb1b562b78980
|