πŸ“„ BillsumΒΆ

Dataset Card for β€œbillsum” Dataset Summary BillSum, summarization of US Congressional and California state bills. There are several features: text: bill text. summary: summary of the bills. title: title of the bills. features for us bills. ca bills does not have. text_len: number of chars in text. sum_len: number of chars in summary. Supported Tasks and Leaderboards More Information Needed Languages More Information Needed… See the full description on the dataset page: https://huggingface.co/datasets/billsum.

Tags: annotations_creators:found, arxiv:1910.00523, bills-summarization:True, croissant:True, language:en, language_creators:found, license:cc0-1.0, multilinguality:monolingual, region:us, size_categories:10K<n<100K, source_datasets:original, task_categories:summarization

Note

ID: cards.billsum | Type: TaskCard

{
    "__description__": "Dataset Card for \"billsum\"\nDataset Summary\nBillSum, summarization of US Congressional and California state bills.\nThere are several features:\ntext: bill text.\nsummary: summary of the bills.\ntitle: title of the bills.\nfeatures for us bills. ca bills does not have.\ntext_len: number of chars in text.\nsum_len: number of chars in summary.\nSupported Tasks and Leaderboards\nMore Information Needed\nLanguages\nMore Information Needed… See the full description on the dataset page: https://huggingface.co/datasets/billsum.",
    "__tags__": {
        "annotations_creators": "found",
        "arxiv": "1910.00523",
        "bills-summarization": true,
        "croissant": true,
        "language": "en",
        "language_creators": "found",
        "license": "cc0-1.0",
        "multilinguality": "monolingual",
        "region": "us",
        "size_categories": "10K<n<100K",
        "source_datasets": "original",
        "task_categories": "summarization"
    },
    "loader": {
        "path": "billsum",
        "type": "load_hf"
    },
    "preprocess_steps": [
        {
            "field_to_field": {
                "text": "document"
            },
            "type": "rename_fields"
        },
        {
            "fields": {
                "document_type": "document"
            },
            "type": "add_fields"
        }
    ],
    "task": "tasks.summarization.abstractive",
    "templates": "templates.summarization.abstractive.all",
    "type": "task_card"
}

Explanation about TaskCardΒΆ

TaskCard delineates the phases in transforming the source dataset into a model-input, and specifies the metrics for evaluation of model-output.

Attributes:

loader: specifies the source address and the loading operator that can access that source and transform it into a unitxt multistream.

preprocess_steps: list of unitxt operators to process the data source into a model-input.

task: specifies the fields (of the already (pre)processed instance) making the inputs, the fields making the outputs, and the metrics to be used for evaluating the model output.

templates: format strings to be applied on the input fields (specified by the task) and the output fields. The template also carries the instructions and the list of postprocessing steps, to be applied to the model output.

Explanation about RenameFieldsΒΆ

Renames fields.

Move value from one field to another, potentially, if field name contains a /, from one branch into another. Remove the from field, potentially part of it in case of / in from_field.

Examples:

RenameFields(field_to_field={β€œb”: β€œc”}) will change inputs [{β€œa”: 1, β€œb”: 2}, {β€œa”: 2, β€œb”: 3}] to [{β€œa”: 1, β€œc”: 2}, {β€œa”: 2, β€œc”: 3}]

RenameFields(field_to_field={β€œb”: β€œc/d”}) will change inputs [{β€œa”: 1, β€œb”: 2}, {β€œa”: 2, β€œb”: 3}] to [{β€œa”: 1, β€œc”: {β€œd”: 2}}, {β€œa”: 2, β€œc”: {β€œd”: 3}}]

RenameFields(field_to_field={β€œb”: β€œb/d”}) will change inputs [{β€œa”: 1, β€œb”: 2}, {β€œa”: 2, β€œb”: 3}] to [{β€œa”: 1, β€œb”: {β€œd”: 2}}, {β€œa”: 2, β€œb”: {β€œd”: 3}}]

RenameFields(field_to_field={β€œb/c/e”: β€œb/d”}) will change inputs [{β€œa”: 1, β€œb”: {β€œc”: {β€œe”: 2, β€œf”: 20}}}] to [{β€œa”: 1, β€œb”: {β€œc”: {β€œf”: 20}, β€œd”: 2}}]

Explanation about AddFieldsΒΆ

Adds specified fields to each instance in a given stream or all streams (default) If fields exist, updates them.

Args:
fields (Dict[str, object]): The fields to add to each instance.

Use β€˜/’ to access inner fields

use_deepcopy (bool) : Deep copy the input value to avoid later modifications

Examples:

# Add a β€˜classes’ field with a value of a list β€œpositive” and β€œnegative” to all streams AddFields(fields={β€œclasses”: [β€œpositive”,”negatives”]})

# Add a β€˜start’ field under the β€˜span’ field with a value of 0 to all streams AddFields(fields={β€œspan/start”: 0}

# Add a β€˜classes’ field with a value of a list β€œpositive” and β€œnegative” to β€˜train’ stream AddFields(fields={β€œclasses”: [β€œpositive”,”negatives”], apply_to_stream=[β€œtrain”]})

# Add a β€˜classes’ field on a given list, prevent modification of original list # from changing the instance. AddFields(fields={β€œclasses”: alist}), use_deepcopy=True) # if now alist is modified, still the instances remain intact.

References: tasks.summarization.abstractive, templates.summarization.abstractive.all

Read more about catalog usage here.