<commit_before>import os
import json

class SettingsParser(object):
    SETTINGS_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'settings.json')

    def __init__(self):
        with open(self.SETTINGS_FILE) as fh:
            self.data = json.load(fh)

j = SettingsParser()
print j.SETTINGS_FILE
print j.data
<commit_msg>using yaml instead of json<commit_after>import os
import yaml

class SettingsParser(object):
    SETTINGS_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'settings.yaml')

    def __init__(self):
        with open(self.SETTINGS_FILE) as fh:
            self.data = yaml.load(fh)

j = SettingsParser()
print j.SETTINGS_FILE
print j.data['data']['raw']

{'fraction_non_alphanumeric': 0.13649025069637882, 'fraction_numerical': 0.0, 'mean_word_length': 3.825503355704698, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5766637', 'n_tokens_mistral': 251, 'n_tokens_neox': 247, 'n_words': 50}