<commit_before>"""
API object specification and correspond methods
"""

def fill_timeline_article_object(title, site, updated):
    """
    timeline article object:
        {
            title: title,
            site: site_title,
            updated: YYYY-MM-DD
        }
    """
    result = dict(title=title, site=site, updated=updated.strftime("%Y-%M-%d"))
    return result

def fill_article_object():
    pass<commit_msg>add article object<commit_after>"""
API object specification and correspond methods
"""

def fill_timeline_article_object(title, site, updated):
    """
    timeline article object:
        {
            title: title,
            site: site_title,
            updated: YYYY-MM-DD
        }
    """
    result = dict(title=title, site=site, updated=updated.strftime("%Y-%M-%d"))
    return result

def fill_article_object(title, site, updated, content, url):
    """
    article object:
        {
            title: title,
            site: site_title,
            updated: YYYY-MM-DD,
            content: html content,
            url: origin article url
        }
    """
    return dict(title=title, site=site, updated=updated.strftime("%Y-%M-%d"),
            content=content, url=url)
{'fraction_non_alphanumeric': 0.12088815789473684, 'fraction_numerical': 0.0, 'mean_word_length': 2.289189189189189, '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': '636002', 'n_tokens_mistral': 354, 'n_tokens_neox': 348, 'n_words': 83}