Skip to main content

No project description provided

Project description

Schnitsum: Easy to use neural network based summarization models

This package enables to generate summaries of you documents of interests.

Currently, we support following models,

  • BART (large) fine-tuned on computer science papers (ref. SciTLDR).
    • Model name: sobamchan/bart-large-scitldr
  • BART (large) fine-tuned on computer science papers (ref. SciTLDR). Then distilled (by shrink and fine-tune) to have 65% parameters less.
    • Model name: sobamchan/bart-large-scitldr-distilled-3-3
  • BART (large) fine-tuned on computer science papers (ref. SciTLDR). Then distilled (by shrink and fine-tune) to have 37% parameters less.
    • Model name: sobamchan/bart-large-scitldr-distilled-12-3
  • mBART (large, en-to-de) fine-tuned on computer science papers, English papers and German summaries (ref. X-SciTLDR).
    • Model name: sobamchan/mbart-large-xscitldr-de
  • BART (large) fine-tuned on XSum, BCC news article lead sentences in English. (ref. X-SciTLDR).
    • Model name: facebook/bart-large-xsum

we are planning to expand coverage soon to other sizes, domains, languages, models soon.

Installation

pip install schnitsum  # or poetry add schnitsum

This will let you generate summaries with CPUs only, if you want to utilize your GPUs, please follow the instruction by PyTorch, here.

Usage

From Command Line

Pass document as an argument and print the summary

> schnitsum --model-name sobamchan/bart-large-scitldr-distilled-3-3 --text "Text to summarize"

Pass documents as a file and save summaries in a file. Input file needs to contain documents line by line. example

> schnitsum --model-name sobamchan/bart-large-scitldr-distilled-3-3 --file docs.txt --opath sums.txt

From Python

from schnitsum import SchnitSum

model = SchnitSum("sobamchan/bart-large-scitldr-distilled-3-3")
docs = [
    "Document you want to summarize."
]
summaries = model(docs)
print(summaries)

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

schnitsum-0.4.10.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

schnitsum-0.4.10-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file schnitsum-0.4.10.tar.gz.

File metadata

  • Download URL: schnitsum-0.4.10.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.9.5 Darwin/22.4.0

File hashes

Hashes for schnitsum-0.4.10.tar.gz
Algorithm Hash digest
SHA256 165b82bb3ebae06042ec750ff6ca6ec1f0918eb633150673718f97656f83219a
MD5 47b2bbda9a41182d204da72ccd0d38c6
BLAKE2b-256 d6c6f7cc5f322eb763f19ca6a5ce461e00847a05f17c08c8bc06d20111d4f352

See more details on using hashes here.

File details

Details for the file schnitsum-0.4.10-py3-none-any.whl.

File metadata

  • Download URL: schnitsum-0.4.10-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.9.5 Darwin/22.4.0

File hashes

Hashes for schnitsum-0.4.10-py3-none-any.whl
Algorithm Hash digest
SHA256 22d9b27c967fc94254d88efad8b71d5dd6dcfb4bdf3862f301d0a1bcda44247f
MD5 863c91a9899b7ec976c73f56eb27c366
BLAKE2b-256 60804585e217753e02dc0b45af4db88c401a77f004036f49bca36c9a53a9a685

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page