ConversAI / src /utils /functions.py
techconsptrs's picture
INITIAL COMMIT
7e24b41
raw
history blame
424 Bytes
import configparser
import string
import yaml
def getConfig(path: str):
config = configparser.ConfigParser()
config.read(path)
return config
def cleanText(text: str):
text = text.replace("\n", " ")
text = text.translate(str.maketrans('', '', string.punctuation.replace(".", "")))
return text
def loadYaml(path: str):
with open(path) as file:
return yaml.safe_load(file)