Skip to main content

Template-based NLG framework for creating text narratives out of data

Project description

pynarrator

Template-based NLG framework for creating text narratives out of data

Installation

You can install the package from pip:

pip3 install pynarrator
import os
from pynarrator import narrate_descriptive, read_data

Basic Usage

pynarrator has a range of functions for creating template-based narratives and also embedded data set that you can use by calling read_data()

sales = read_data()
narrative = narrate_descriptive(sales, measure = 'Sales', dimensions = ['Region', 'Product'], coverage = 0.5)

Chat GPT

 from pynarrator import gpt_get_completions, enhance_narrative, translate_narrative, summarize_narrative
enhance_narrative(narrative)
enhance_narrative(narrative, language = 'Spanish')
summarize_narrative(narrative)

Complete documentation is available at the narrator package website

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

pynarrator-0.0.1.12-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

Details for the file pynarrator-0.0.1.12-py3-none-any.whl.

File metadata

File hashes

Hashes for pynarrator-0.0.1.12-py3-none-any.whl
Algorithm Hash digest
SHA256 9f765efdbf1a5a0da3f20c53af2dce49f7eac417e21c239423118cb2c1d1af59
MD5 f920b7fc80d6ca26b425ff2925870bb0
BLAKE2b-256 a2f6b6799f1abd848e344b3b56aeaf89772a5c9c1b17acf7fe66e9287d349b65

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