<commit_before>F=
->b{s=->l,w=p{c,*x=l.map &:dup
y=w||c.index(?L)
n=x[0]
v=[1,3,3,5,9,0]['PBNRQ'.index(c[y])||5]
w&&c[y]=?X
n ?(m=[]
n[y]<?.&&m<<s[x,y]
y<8&&n[y+1]>?-&&m<<s[x,y+1]
y>0&&n[y-1]>?-&&m<<s[x,y-1]
b=m.max_by{|m|m&&m[0]||0}
b&&[b[0]+v,c+b[1]]):[v, c]}<commit_msg>combined assignment and usage of var `y` to save 2 chars<commit_after>F=
->b{s=->l,w=p{c,*x=l.map &:dup
n=x[0]
v=[1,3,3,5,9,0]['PBNRQ'.index(c[y=w||c.index(?L)])||5]
w&&c[y]=?X
n ?(m=[]
n[y]<?.&&m<<s[x,y]
y<8&&n[y+1]>?-&&m<<s[x,y+1]
y>0&&n[y-1]>?-&&m<<s[x,y-1]
b=m.max_by{|m|m&&m[0]||0}
b&&[b[0]+v,c+b[1]]):[v, c]}
{'fraction_non_alphanumeric': 0.4599659284497445, 'fraction_numerical': 0.06303236797274275, 'mean_word_length': 8.8, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 13, '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': '6203456', 'n_tokens_mistral': 422, 'n_tokens_neox': 413, 'n_words': 38}