Skip to main content

Summarizer tool

Project description

Summarizer

Requires model: pl_nask-0.0.5.tar.gz from http://mozart.ipipan.waw.pl/~rtuora/spacy/

Install:

python -m pip install path/to/pl_nask-0.0.5.tar.gz
python -m pip install path/to/summarizer-0.0.1-py3-none-any.whl 

Usage:

from summarizer import Summarizer

summarizer = Summarizer()
text = "..."
limit = 300
unit = "words" # "words" or "chars"
out = summarizer.summarize(text, limit, unit)  # dict or KeyError

Alternatively use loaded model:

import spacy
from summarizer import Summarizer

nlp = spacy.load('pl_nask')
summarizer = Summarizer(nlp_model=nlp)

Output dict:

{
    'status': str 'correct' or 'failed',
    'message': str,
    'summary': str,
    'event_id': int,
    'algorithm': str,
}

alg_names should be displayed in the dropdown

out['message'] should be displayed in task results

event_id message status
0 None correct
1 Limit wyrazów jest zbyt wysoki. Utworzono podsumowanie zawierające {} wyrazów. correct
2 Limit wyrazów jest zbyt niski. Utworzono podsumowanie zawierające {} wyrazów. correct
10 Nie udało się przetworzyć tekstu. failed
11 Przesłano zbyt krótki tekst. failed
12 Limit liczby wyrazów jest zbyt wysoki. Nie udało się stworzyć podsumowania. failed
13 Limit liczby wyrazów jest zbyt niski. Nie udało się stworzyć podsumowania. failed

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

coh_summarizer-0.2.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

coh_summarizer-0.2-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

File details

Details for the file coh_summarizer-0.2.tar.gz.

File metadata

  • Download URL: coh_summarizer-0.2.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.9

File hashes

Hashes for coh_summarizer-0.2.tar.gz
Algorithm Hash digest
SHA256 77cca4842769b34e98e50f1d58aef622d4efff394e7d6f0b7ba321b1d6af6b0d
MD5 1ffb553f7ec58e08f4f0e5550ffc4e5c
BLAKE2b-256 0770254221f03779585ed5f7a5f73d33c0d50e0b888226e7a175a35b3889dd40

See more details on using hashes here.

File details

Details for the file coh_summarizer-0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for coh_summarizer-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2dbead66d2fb9de752ea5366c8ef5b23b2a1afadcf62cd89ab3640aa593479c3
MD5 d3f715cbc452cc22a52c8b23013489d2
BLAKE2b-256 169645ba1ad6265348ad1633f1aa75b4089ce4cd3fb95f4ccde81afbb1951178

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