mirror of
https://github.com/yihong0618/bilingual_book_maker.git
synced 2025-06-06 19:45:30 +00:00
20 lines
391 B
Python
20 lines
391 B
Python
import itertools
|
|
from abc import ABC, abstractmethod
|
|
|
|
|
|
class Base(ABC):
|
|
def __init__(self, key, language) -> None:
|
|
self.keys = itertools.cycle(key.split(","))
|
|
self.language = language
|
|
|
|
@abstractmethod
|
|
def rotate_key(self):
|
|
pass
|
|
|
|
@abstractmethod
|
|
def translate(self, text):
|
|
pass
|
|
|
|
def set_deployment_id(self, deployment_id):
|
|
pass
|