File size: 424 Bytes
7e24b41
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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)