Skip to main content

Markov's algorithm processing

Project description

Lightweight library which implements Markov algorithm (cycle of replacements) for text strings.


Usage:

creating rules

from markalgo import rules
from markalgo import processing

# from text
replacement = rules.create_rules([("Norwegian blue", "parrot"), ("alive", "dead"), ("dead", "no more")])

# or from csv files
with open("notes/cicero.csv") as argumentation:
    replacement = rules.read_all_rules_from_csv_file(argumentation)

processing text…

processing.process_text("This Norwegian blue is alive", replacement)

 *"This parrot is no more"*

…or plain-text files

with open("notes/note.txt") as argumentation:
    processing.process_file()

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

markalgo-1.0.2-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file markalgo-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for markalgo-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b81d4915fe468b6704cb1aa90449ecf8082b6b734f2b9d5c8d9a829fc4b74577
MD5 93d987e3e8634fb8329cbfca732ca434
BLAKE2b-256 2241ed1d1fa843c97a0c1f3596110da26213395bbc8631d130bbc0fc649eaf55

See more details on using hashes here.

Supported by

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