<commit_before>#!/usr/bin/python
 
import yaml

def read_config():
    yml_file = open('/home/dlarochelle/git_dev/mediacloud/mediawords.yml', 'rb')
    config_file = yaml.load( yml_file )
    return config_file
<commit_msg>Use relative path location for mediawords.yml.<commit_after>#!/usr/bin/python
 
import yaml
import os.path

_config_file_base_name = 'mediawords.yml'
_config_file_name = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'mediawords.yml'))

def read_config():
    yml_file = open(_config_file_name, 'rb')
    config_file = yaml.load( yml_file )
    return config_file

{'fraction_non_alphanumeric': 0.13122923588039867, 'fraction_numerical': 0.0, 'mean_word_length': 4.688679245283019, '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': '5080469', 'n_tokens_mistral': 230, 'n_tokens_neox': 215, 'n_words': 38}