Metadata-Version: 2.0
Name: markalgo
Version: 1.0.2
Summary: Markov's algorithm processing
Home-page: https://gitlab.com/fedinskiy/marknalgo
Author: fedinskiy
Author-email: UNKNOWN
License: WTFPL
Description-Content-Type: UNKNOWN
Keywords: markov replace
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Environment :: Console
Classifier: License :: Public Domain
Classifier: Operating System :: OS Independent
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3
Requires-Dist: argparse
Provides-Extra: test
Requires-Dist: unittest; extra == 'test'


Lightweight library which implements `Markov
algorithm <https://en.wikipedia.org/wiki/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()


