<commit_before>from amcat.models.article import Article

fok_articles = Article.objects.filter(medium=989899008)
n_articles = fok_articles.count()
for i,article in enumerate(articles):
    article.section = article.url.split("/")[3]
    print("{i}/{n_articles}: {article.section} : {article}".format(**locals()))
    #article.save()<commit_msg>Automated merge with https://code.google.com/p/amcat<commit_after>from amcat.models.article import Article

fok_articles = Article.objects.filter(medium=989899008)
n_articles = fok_articles.count()
i = 0
for article in fok_articles:
    i+= 1
    if article.url:
        article.section = article.url.split("/")[3]
    
    print("{i}/{n_articles}: {article.section} : {article}".format(**locals()))
    article.save()
{'fraction_non_alphanumeric': 0.16010498687664043, 'fraction_numerical': 0.028871391076115485, 'mean_word_length': 4.9147286821705425, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, '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': '7585933', 'n_tokens_mistral': 275, 'n_tokens_neox': 249, 'n_words': 44}