Skip to main content

Perfect your text processing pipeline.

Project description

Perfectum -- chain-based text processing library aiming for simplicity and productivity.

Usage

To install, run:

pip install perfectum[gpt,translate]

And then, edit the main.py file:

from perfectum.all import *

chain = Chain(
    [
        Translate("en"),
        Asciify(),
        Trim(),
        CollapseWhitespace(),
        Gpt("gpt-4o-mini", "Summarize the text in a less than 10 words."),
    ]
)
print(chain)

text = open("sample.text").read()
text = chain.process(text)
print(text)

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

perfectum-0.1.4.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

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

perfectum-0.1.4-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file perfectum-0.1.4.tar.gz.

File metadata

  • Download URL: perfectum-0.1.4.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.6

File hashes

Hashes for perfectum-0.1.4.tar.gz
Algorithm Hash digest
SHA256 0744784af3a52d0fa40386cd5fd0376c2767f50b177170b1ab5bb943127feb41
MD5 7d8af2dcfe703b82d66c8625a8036097
BLAKE2b-256 663d70f54a75445d71060f5e0745d7106764aeae2fbbccf26e6756f3aa60dca3

See more details on using hashes here.

File details

Details for the file perfectum-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: perfectum-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.6

File hashes

Hashes for perfectum-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 d0c2c0dd6daf09b7bfa779d9200cdcf691fffe9893bed8ef1f8be9b8958c1e1f
MD5 e7df0e2c08c4a10948db9f8670896c0d
BLAKE2b-256 a9348464b20b95c09241b485437b79d95da7aaf8a6047ac7bd258942fa59b5b9

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