From 1b0e59922e31824e9b9818c7dd88eb72fbeffe96 Mon Sep 17 00:00:00 2001 From: ElectronixTM Date: Sat, 15 Mar 2025 22:58:09 +0300 Subject: [PATCH] =?UTF-8?q?chore:=20=D0=BD=D0=B0=D0=BC=D0=B5=D1=82=D0=B8?= =?UTF-8?q?=D0=BB=20=D1=81=D1=82=D1=80=D1=83=D0=BA=D1=82=D1=83=D1=80=D1=83?= =?UTF-8?q?=20=D0=BF=D1=80=D0=B8=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD=D0=B8=D1=8F?= =?UTF-8?q?=20=D1=82=D1=80=D0=B0=D0=BD=D1=81=D1=84=D0=BE=D1=80=D0=BC=D0=B0?= =?UTF-8?q?=D1=86=D0=B8=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/markov.py | 5 +++++ src/rulebook.py | 16 ++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 src/markov.py create mode 100644 src/rulebook.py diff --git a/src/markov.py b/src/markov.py new file mode 100644 index 0000000..3f32c85 --- /dev/null +++ b/src/markov.py @@ -0,0 +1,5 @@ +def main(): + raise NotImplementedError("Sorry, this project is WIP and didn't implement user functionality yet") + +if __name__ == "__main__": + main() diff --git a/src/rulebook.py b/src/rulebook.py new file mode 100644 index 0000000..90a52d0 --- /dev/null +++ b/src/rulebook.py @@ -0,0 +1,16 @@ +""" +Rulebook class is deisgned to work with strings. +this class applies markov algorightm to given string +""" + +from dataclasses import dataclass +from collections import OrderedDict + +@dataclass +class Rulebook: + rules: OrderedDict[str, str] + + def __call__(self, string: str): + """aplies rule to the given string""" + raise NotImplementedError("Sorry, we still don't know how to apply" + "algorithm to your string")