Skip to main content

Generate natural sentences describing network flows

Project description

📦 flow-narrator

A Python library to automatically generate natural-language sentences that describe network flows.

🔗 Source code: https://github.com/carmine-ambrosino/flow-narrator

Installation

pip install flow-narrator

Quickstart

import flownarrator as fn

out = fn.generate_sentences(
    "<YOUR DATASETS>",
    max_items=10,
    balance=True,
    show_progress=True,
)

# Save to CSV
out.to_csv("example_sentences.csv", index=False)

Convert to Alpaca format

import flownarrator as fn

out = pd.read_csv(<YOUR CSV>)
alpaca = fn.to_alpaca_format(out)

# Preview of Alpaca-formatted data
print("\n📐 Alpaca-style first item preview:")
print(alpaca[0])

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

flow_narrator-0.1.1.tar.gz (26.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flow_narrator-0.1.1-py3-none-any.whl (22.5 kB view details)

Uploaded Python 3

File details

Details for the file flow_narrator-0.1.1.tar.gz.

File metadata

  • Download URL: flow_narrator-0.1.1.tar.gz
  • Upload date:
  • Size: 26.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for flow_narrator-0.1.1.tar.gz
Algorithm Hash digest
SHA256 9c1e2ab49b5f64642867b710373b8c44b1f83934520898e559fa3d0ce4a93bd9
MD5 7f155c844180c08903436c7413030233
BLAKE2b-256 d03f990a7eaa34580f39f37c5b9ea53f27679625dc84e8196910d62052699cee

See more details on using hashes here.

File details

Details for the file flow_narrator-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: flow_narrator-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 22.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for flow_narrator-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e8fb66dffa4ce038e2be3a0c50ac0a12308633a8bb09b4d31439e79a5fbd065b
MD5 91edc060b04586ea05314a64396430f1
BLAKE2b-256 0b35efabfbc1e9074bf5ffa4aa37f7907fdd01ada5594107bf55d68ff29c2d70

See more details on using hashes here.

Supported by

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