<commit_before>from revscoring.features import wikitext

article = [
    wikitext.revision.chars,
    wikitext.revision.content_chars,
    wikitext.revision.ref_tags,
    wikitext.revision.ref_tags / max(wikitext.revision.content_chars, 1),
    wikitext.revision.wikilinks,
    wikitext.revision.wikilinks / max(wikitext.revision.content_chars, 1),
    wikitext.revision.external_links,
    wikitext.revision.external_links / max(wikitext.revision.content_chars, 1),
    wikitext.revision.headings_by_level(2),
    wikitext.revision.headings_by_level(2) /
        max(wikitext.revision.content_chars, 1),
    wikitext.revision.headings_by_level(3),
    wikitext.revision.headings_by_level(3) /
        max(wikitext.revision.content_chars, 1)
]<commit_msg>Fixes division with modifiers in wikipedia.article<commit_after>from revscoring.features import wikitext, modifiers

article = [
    wikitext.revision.chars,
    wikitext.revision.content_chars,
    wikitext.revision.ref_tags,
    wikitext.revision.ref_tags / modifiers.max(wikitext.revision.content_chars, 1),
    wikitext.revision.wikilinks,
    wikitext.revision.wikilinks / modifiers.max(wikitext.revision.content_chars, 1),
    wikitext.revision.external_links,
    wikitext.revision.external_links / modifiers.max(wikitext.revision.content_chars, 1),
    wikitext.revision.headings_by_level(2),
    wikitext.revision.headings_by_level(2) /
        modifiers.max(wikitext.revision.content_chars, 1),
    wikitext.revision.headings_by_level(3),
    wikitext.revision.headings_by_level(3) /
        modifiers.max(wikitext.revision.content_chars, 1)
]
{'fraction_non_alphanumeric': 0.10385572139303482, 'fraction_numerical': 0.011194029850746268, 'mean_word_length': 4.529209621993127, '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': '6943561', 'n_tokens_mistral': 625, 'n_tokens_neox': 589, 'n_words': 60}