chore: наметил структуру применения трансформаций
This commit is contained in:
5
src/markov.py
Normal file
5
src/markov.py
Normal file
@ -0,0 +1,5 @@
|
||||
def main():
|
||||
raise NotImplementedError("Sorry, this project is WIP and didn't implement user functionality yet")
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
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