chore: наметил структуру применения трансформаций
This commit is contained in:
16
src/rulebook.py
Normal file
16
src/rulebook.py
Normal file
@ -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")
|
||||
Reference in New Issue
Block a user