Skip to content

collections.paper

Paper

A paper entry.

Info

To create a new paper, use Volume.create_paper().

Required Attributes:

Name Type Description
id str

The ID of this paper (e.g. "1" or "42").

parent Volume

The Volume object that this paper belongs to.

bibkey str

Bibliography key, e.g. for BibTeX. Must be unique across all papers in the Anthology.

title MarkupText

The title of the paper.

Tuple Attributes:

Name Type Description
attachments tuple[tuple[str, AttachmentReference], ...]

File attachments of this paper, as tuples of the format (type_of_attachment, attachment_file); can be empty.

authors tuple[NameSpecification, ...]

Names of authors associated with this paper; can be empty.

awards tuple[str, ...]

Names of awards this has paper has received; can be empty.

errata tuple[PaperErratum, ...]

Errata for this paper; can be empty.

revisions tuple[PaperRevision, ...]

Revisions for this paper; can be empty.

videos tuple[VideoReference, ...]

Zero or more references to video recordings belonging to this paper.

Optional Attributes:

Name Type Description
abstract Optional[MarkupText]

The full abstract.

deletion Optional[PaperDeletionNotice]

A notice of the paper's retraction or removal, if applicable.

doi Optional[str]

The DOI for the paper.

language Optional[str]

The language this paper is (mainly) written in. When given, this should be a ISO 639-2 code (e.g. "eng"), though occasionally IETF is used (e.g. "pt-BR").

month Optional[str]

The month of publication. If not set on the paper, this is inherited from the parent volume.

note Optional[str]

A note attached to this paper. Used very sparingly.

year str

The year of publication. If not set on the paper, this is inherited from the parent volume.

pages Optional[str]

Page numbers of this paper within its volume.

pdf Optional[PDFReference]

A reference to the paper's PDF.

type PaperType

The paper's type, currently used to mark frontmatter and backmatter.

address property

address

The publisher's address for this paper. Inherited from the parent Volume.

bibtype property

bibtype

The BibTeX entry type for this paper.

citeproc_dict cached property

citeproc_dict

The citation object corresponding to this paper for use with CiteProcJSON.

collection property

collection

The collection this paper belongs to.

collection_id property

collection_id

The collection ID this paper belongs to.

csltype property

csltype

The CSL type for this paper.

editors property writable

editors

The editors for this paper. Uses the paper's own editor list if set, otherwise inherited from the parent Volume.

full_id property

full_id

The full anthology ID of this paper (e.g. "L06-1042" or "2022.emnlp-main.1").

full_id_tuple property

full_id_tuple

The full anthology ID of this paper, as a tuple (e.g. ("L06", "1", "42")).

ingest_date property writable

ingest_date

The date when this paper was added to the Anthology. Uses the paper's own ingestion date if set, otherwise inherited from the parent Volume.

is_deleted property

is_deleted

Returns True if this paper was retracted or removed from the Anthology.

is_frontmatter property

is_frontmatter

Returns True if this paper represents a volume's frontmatter.

journal_issue property writable

journal_issue

The issue number of this paper. Uses the paper's own issue number if set, otherwise inherited from the parent Volume.

journal_title property writable

journal_title

The journal title of this paper. Uses the paper's own journal title if set, otherwise inherited from the parent Volume.

journal_volume property

journal_volume

The volume number of this paper. Inherited from the parent Volume.

language_name property

language_name

The name of the language this paper is written in, if specified.

month property writable

month

The month of publication. Uses the paper's own month if set, otherwise inherited from the parent Volume.

namespecs property

namespecs

All name specifications on this paper.

publisher property

publisher

The paper's publisher. Inherited from the parent Volume.

root property

root

The Anthology instance to which this object belongs.

thumbnail property

thumbnail

A reference to a thumbnail image of the paper's PDF.

venue_ids property

venue_ids

Sequence of venue IDs associated with this paper. Inherited from the parent Volume.

volume_id property

volume_id

The volume ID this paper belongs to.

web_url property

web_url

The URL of this paper's landing page on the ACL Anthology website.

year property writable

year

The year of publication. Uses the paper's own year if set, otherwise inherited from the parent Volume.

from_frontmatter_xml classmethod

from_frontmatter_xml(parent, paper)

Instantiates a new paper from a <frontmatter> block in the XML.

from_xml classmethod

from_xml(parent, paper)

Instantiates a new paper from its <paper> block in the XML.

This function can also be called with a <frontmatter> block, in which case it will just defer to self.from_frontmatter_xml.

get_events

get_events()

Returns:

Type Description
list[Event]

A list of events associated with this paper.

get_namespec_for

get_namespec_for(person)

Find the NameSpecification on this paper that refers to a given Person.

Parameters:

Name Type Description Default
person Person

A person that is an author/editor on this paper.

required

Returns:

Type Description
NameSpecification

The first NameSpecification that resolves to the given Person.

Raises:

Type Description
ValueError

If none of the authors/editors resolve to the given Person.

refresh_bibkey

refresh_bibkey()

Replace this paper's bibkey with a unique, automatically-generated one.

Can be used to re-generate a bibkey after the title or author information has been modified.

Returns:

Type Description
str

The new bibkey. (May be identical to the current one.)

to_bibtex

to_bibtex(with_abstract=False)

Generate a BibTeX entry for this paper.

Parameters:

Name Type Description Default
with_abstract bool

If True, includes the abstract in the BibTeX entry.

False

Returns:

Type Description
str

The BibTeX entry for this paper as a formatted string.

Raises:

Type Description
ValueError

If 'bibkey' is set to constants.NO_BIBKEY.

to_citation

to_citation(style=None)

Generate a citation (reference) for this paper.

Parameters:

Name Type Description Default
style Optional[str]

A path to a CSL file. If None (default), uses the built-in ACL citation style.

None

Returns:

Type Description
str

The generated citation reference as a single string with HTML markup. See citeproc_render_html() for the rationale behind returning a single string here.

to_markdown_citation

to_markdown_citation()

Generate a brief citation (reference) in Markdown for this paper.

Returns:

Type Description
str

The generated citation reference as a single string with Markdown markup.

to_xml

to_xml()

Returns:

Type Description
_Element

A serialization of this paper as a <paper> or <frontmatter> block in the Anthology XML format.

Raises:

Type Description
ValueError

If 'bibkey' is set to constants.NO_BIBKEY.

PaperDeletionNotice

A notice about a paper's deletion (i.e., retraction or removal) from the Anthology.

date class-attribute instance-attribute

date = field(
    default=None,
    converter=date_to_str,
    validator=matches_re(RE_ISO_DATE),
)

The date on which the paper was retracted or removed.

note class-attribute instance-attribute

note = field()

A note explaining the retraction or removal.

type class-attribute instance-attribute

type = field(converter=PaperDeletionType)

Type indicating whether the paper was retracted or removed.

from_xml classmethod

from_xml(element)

Instantiates a deletion notice from its <removed> or <retracted> block in the XML.

to_xml

to_xml()

Returns:

Type Description
_Element

A serialization of this deletion notice in Anthology XML format.

PaperErratum

An erratum for a paper.

date class-attribute instance-attribute

date = field(
    default=None,
    converter=date_to_str,
    validator=optional(matches_re(RE_ISO_DATE)),
)

The date where this erratum was added.

id class-attribute instance-attribute

id = field(
    converter=int_to_str,
    validator=matches_re("^[1-9][0-9]?$"),
)

An ID for this erratum. Must be numeric.

pdf class-attribute instance-attribute

pdf = field()

A reference to the erratum's PDF.

from_xml classmethod

from_xml(element)

Instantiates an erratum from its <erratum> block in the XML.

to_xml

to_xml()

Returns:

Type Description
_Element

A serialization of this erratum in Anthology XML format.

PaperRevision

A revised version of a paper.

date class-attribute instance-attribute

date = field(
    default=None,
    converter=date_to_str,
    validator=optional(matches_re(RE_ISO_DATE)),
)

The date where this revision was added.

id class-attribute instance-attribute

id = field(
    converter=int_to_str,
    validator=matches_re("^[1-9][0-9]?$"),
)

An ID for this revision. Must be numeric.

note class-attribute instance-attribute

note = field()

A note explaining the reason for the revision.

pdf class-attribute instance-attribute

pdf = field()

A reference to the revision's PDF.

from_xml classmethod

from_xml(element)

Instantiates a revision from its <revision> block in the XML.

to_xml

to_xml()

Returns:

Type Description
_Element

A serialization of this revision in Anthology XML format.