Financial News Summarization (Medium)

Description

This model is a Financial news Summarizer, finetuned with a financial dataset (about 10K news).

Predicted Entities

Copy S3 URI

How to use

document_assembler = nlp.DocumentAssembler() \
    .setInputCol("text") \
    .setOutputCol("documents")

t5 = nlp.T5Transformer() \
    .pretrained("finsum_news_md" ,"en", "finance/models") \
    .setTask("summarization") \ # or summarize:
    .setInputCols(["documents"]) \
    .setMaxOutputLength(512) \
    .setOutputCol("summaries")

data_df = spark.createDataFrame([["Deere Grows Sales 37% as Shipments Rise. Farm equipment supplier forecasts higher sales in year ahead, lifted by price increases and infrastructure investments. Deere & Co. said its fiscal fourth-quarter sales surged 37% as supply constraints eased and the company shipped more of its farm and construction equipment. The Moline, Ill.-based company, the largest supplier of farm equipment in the U.S., said demand held up as it raised prices on farm equipment, and forecast sales gains in the year ahead. Chief Executive John May cited strong demand and increased investment in infrastructure projects as the Biden administration ramps up spending. Elevated crop prices have kept farmers interested in new machinery even as their own production expenses increase."]]).toDF("text")

pipeline = nlp.Pipeline().setStages([document_assembler, t5])
results = pipeline.fit(data_df).transform(data_df)
results.select("summaries.result").show(truncate=False)

Results

Deere & Co. said its fiscal fourth-quarter sales surged 37% as supply constraints eased and the company shipped more farm and construction equipment. Deere & Co. said its fiscal fourth-quarter sales surged 37% as supply constraints eased and the company shipped more farm and construction equipment.

Model Information

Model Name: finsum_news_md
Compatibility: Finance NLP 1.0.0+
License: Licensed
Edition: Official
Input Labels: [documents]
Output Labels: [summaries]
Language: en
Size: 925.1 MB

References

John Snow Labs in-house summarized articles.